Home Technical Talk

[Maxscript] Event Callback for multiple nodes added/deleted

polycounter lvl 8
Offline / Send Message
Sidelity polycounter lvl 8
Hi all,

We've run into some issues with maxscript's event callback mechanism. It doesn't seem to have an event for after all items in the "queue" have been deleted or added.

Backstory: we have a dotNet listview that displays objects, and some of the object's properties. When the user deletes or adds new items, the list should update. First, we used the #nodePostDelete and #sceneNodeAdded events. However these fire for every object in the delete and creation "queue". So if the user deletes or copies 50 objects, the list updates 50 times. Not good.

We've tried alternative events, such as #
selectedNodesPostDelete and #postNodesCloned, and they work for those specific events. However, #selectedNodesPostDelete doesn't fire when objects are deleted via script or when attaching objects. And #postNodesCloned doesn't fire when creating new objects, or merging, or importing objects.

Everything would just work if there were two events called #nodesPostDelete and #sceneNodesAdded. No such luck. Does anyone have any smart solutions here? Thanks.

[Linked CGTalk Thread]

Replies

Sign In or Register to comment.