Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / NodeEventCallback - how do I remove it?
  RSS 2.0 ATOM  

NodeEventCallback - how do I remove it?
Rate this thread
 
21426
 
Permlink of this thread  
avatar
  • octoboy
  • Posted: 15 January 2009 10:11 AM
  • Total Posts: 7
  • Joined: 16 January 2007 08:53 AM

Hi.

I have a utility that is successfully triggered by a NodeEventCallback.  I want to be able to toggle this utility on/off - but can find no description of how to remove a NodeEventCallback. The remove syntax for regular callbacks doesn’t seem to work and I have to use the NodeEventCallback as my utility is related to a sub-object selection change.

any help much appreciated!

Ollie.



Replies: 0
avatar
  • octoboy
  • Posted: 28 January 2009 05:40 AM

So in the end I got the answer from a contact who is part of the AutoDesk developer network. For the benefit of anyone else who is encountering this, here’s the explanation:

When you call NodeEventCallback, you are creating an instance of the class.
myInstance = NodeEventCallback(—arguments here );

To release this, we need to delete the class.
myInstance = undefined;—remove handle to class
gc() —force memory reclamation to actually delete anything

The guys at ADN agreed this was unintuitive and promised to add it to the help documentation.

Octoboy.



Replies: 0
avatar
  • Ripley
  • Posted: 08 February 2009 07:07 AM

Thanks for solving this, there was a similar thread at cgsociety, http://forums.cgsociety.org/showthread.php?f=98&t=725434

-R



Replies: 0