Posted by: | Vincentt | |
Data created: | 8 January 2015 |
Hello, I’m yet again stuck, I apologize for all the questions I’ve been posting recently, but all of the answers have been very helpful, so I’m trying it again :) I want to register some callbacks to update my UI accordingly. One of them is a global one I was able to register with the help of the documentation: http://www.ephere.com/autodesk/max/docs/902.html. (SystemNotificationCode.SelNodesPostDelete). Problem 1: Now I would like to also have a callback for when the stack of my object(s) is getting collapsed. I found:
in ‘IBaseObject’ however I don’t know how to actually register to it? I thought about inheriting IBaseObject, this didn’t really work because then I’d have to implement all the methods from IBaseObject, I tried to inherit from BaseObject but even then I don’t know what to do with my new class…
Problem 2: I want to register an INodeEvenCallback. I got this so far:
This doesn’t work though, am I registering it correctly, with CreateUnmanagedWrapper? I’ve also tried .Create() and .InitializeLifetimeService() without luck.
Thank you in advance!
| |
9 January 2015
#5718 | |
Hi Vin, NotifyPostCollapse should be a method you override in your plugin (Texture/Modifier/GeomObject/etc.). It will be called by Max whenever it collapses your object. You don't "subscribe" to it with a callback, it is something you override. This is how you register INodeEventCallback:
Marsel Khadiyev (Software Developer, EPHERE Inc.) | |
9 January 2015
#5719 | |
Hey Marsel, Thanks for the reply! I have 1 question about the NotifyPostCollapse method. I have this as my base plugin class:
So I don't think I have a "real" plugin. I have a WinForm where I draw all my information on and I use GlobalInterface to get everything. Is it possible then to override NotifyPostCollapse? It sounds like this is not a "global" callback but per Node one.
|