MotionBuilder Forum
Welcome to Autodesk’s MotionBuilder Forums. Share your knowledge, ask questions, and explore popular MotionBuilder topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

DeviceIONotify interrupted by a change of Parent

1 REPLY 1
Reply
Message 1 of 2
Anonymous
338 Views, 1 Reply

DeviceIONotify interrupted by a change of Parent

Running this piece of code during the DeviceIONotify event seems to interrupt the code evaluation and return to Mobu as if the process was done and the DeviceIONotify is never called again for that device.


void MyDevice::DeviceIONotify( kDeviceIOs pAction,FBDeviceNotifyInfo &pDeviceNotifyInfo)
{
HFBModel testA = new FBModel("TestA");
HFBModel testB = new FBModel("TestB");
testB->Parent = testA; //this line interrupt the code evaluation
}


Running these 3 lines sees to work well in the Start() process of the same device. How can I run something like this (I need to create a hierarchy of object parented to each other) based on what happens during the DeviceIONotify evaluation?

Thanks
1 REPLY 1
Message 2 of 2
mchristi
in reply to: Anonymous

 

 

  This is an old post, but still may be usefull to someone.

  DeviceIONotify is call for each Frame. If you change the relation between the objects at every frame, MoBu surely gets mixed up (I understand it splits the scene graph into different independent subgraphs --the DAGs -- and evaluates them in paralellel for performance). 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report