Atmosphere callbacks (C#)


#1

Anybody knows which callback I should use to detect when atmosphere added-deleted (Environment and Efffects dialog) by using C# and Autodesk.max.dll?


#2

there is no a general scene callback for this as I know. the best you can catch:
MXS:

when subAnimStructure rootscene[#Render_Effects] changes do ()

you can also register it with the SDK


#3

Now question is how we can register that with C#?


#4

a little example or the link to sdk file would be great


#5

As I understand it, this doesn’t work anymore … ChangeHandler methods are currently missing from any library. It used to be in Maxscript.lib (MAXScrpt.dll). Maybe Autodesk developers can answer, where it was gone?


#6

Yes, ChangeHandler is absent in Autodesk.Max.dll
I was thinking about to use TVNodeNotify class to override NotifyRefChanged(), but unfortunately it’s not in Autodesk.Max.Plugins namespace and afaik we can’t implement any interface that is not present in this namespace.


#7

I’ve wrote my own class. It’s based on RefTargMonitor, but has an optional list of ReferenceTargets used for notification, and additional callback to call it during monitoring.