AREA forums upgrade
Read more about the planned upgrade of our forums
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / SDK / Different events callbacks
IMPORTANT ANNOUNCEMENT ABOUT AREA FORUMS
  RSS 2.0 ATOM  

Different events callbacks
Rate this thread
 
71356
 
Permlink of this thread  
avatar
  • mateusz83
  • Posted: 20 September 2012 10:53 AM
  • Total Posts: 14
  • Joined: 04 May 2008 12:44 PM

How use those classes:
- INodeEventCallback
- ISceneEventCallback

To get the callback if for example new geometry is created?



Replies: 0
avatar
  • SataraX
  • Posted: 20 September 2012 10:51 PM

I think you have to create a subclass of INodeEventCallback and override

virtual void Added(NodeKeyTab &nodes)

. Then register this class using the RegisterCallback function of ISceneEventManager.
Greetings,
Satara



Replies: 0
avatar
  • mateusz83
  • Posted: 22 September 2012 05:27 AM

Hi,
thanks for answering..

Yes, I extended the INodeCallback class by overwriting the Added function,
but now I can’t figure out how to register it,
this call is not working:
ISceneEventManager::RegisterCallback( myNodeCallback.GetINodeEventCallback(), false, 0, false );
( illegal call of non-static member function )

If I would created the ISceneEventManager object I also should register it somewhere,
cant figure it out…

Maybe you have some ideas?



Replies: 0
avatar
  • mateusz83
  • Posted: 22 September 2012 06:59 AM

Ok, I solved it…

I used:
GetISceneEventManager() to get the handle, and then just:
GetISceneEventManager()->RegisterCallback( my_NodeEventCallback.GetINodeEventCallback(), false, 0, false );

cheers…



Replies: 0