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® / SDK / Change notifications
  RSS 2.0 ATOM  

Change notifications
Rate this thread
 
33998
 
Permlink of this thread  
avatar
  • qwas-
  • Posted: 03 September 2009 01:52 AM
  • Total Posts: 8
  • Joined: 17 August 2009 08:28 AM

Hello.
I am writing export plugin.  I have to know when object was deleted or changed some of it’s properties.
As I understand there are two way to do this. First way is to use Callback function. But it don’t tell when objects or materials changes.
Second way is to use ReferenceTarget - ReferenceMaker system.
Should I create class that inherit from ReferenceTarget or it must be only plugin?

I try create such class

class ObjectListener: public ReferenceTarget {
public:
ObjectListener()
~ObjectListener()
int NumRefs()
RefTargetHandle GetReference(int i)
void SetReference(int i, RefTargetHandle refTarget)

RefResult NotifyRefChanged(Interval changeInt, RefTargetHandle hTarget, PartID& partID, RefMessage message)

private:
RefTargetHandle m_target;
};

And than set reference for first node.

listener.SetReference(0, i->GetRootNode()->GetChildNode(0))

But “listener” object don’t receive message when node is



Replies: 0
avatar

I think your pose was cut short.
When node is what?



Christopher Diggins, M&E SDK Specialist
For 3ds Max SDK questions also check out http://stackoverflow.com/questions/tagged/3dsmax

Replies: 0