In OR SDK (MotionBuilder SDK) we operate with scene and models through simple pointers. Developer is responsible for the vigilance of the real existence of the model. I’m talking about situations when the user has deleted the model or opened another scene, undone creation, etc. Pointer to the model now may not be relevant and we have to check the entire list of conditions manually.
However, in 2014 SDK there is a new useful class HdlFBPlug – wrap around the pointer with functions to check its relevance . The Sample on how to use the new class can be found in Example tool \ tool_template.
I have added a new Gist