i’m creating a node by:
MAXScript_interface7->CreateObjectNode(obj, name);
my question is - can I check that the Object (obj) is valid to make a INode?
i don’t want to use try/catch as some sdk examples do
i’m creating a node by:
MAXScript_interface7->CreateObjectNode(obj, name);
my question is - can I check that the Object (obj) is valid to make a INode?
i don’t want to use try/catch as some sdk examples do
i can pass a reference target or class. if it’s a class i create an instance of this class (and of course check if the class is creatable).
but it might be a controller or material class for example… which cannot be used to make a node
that’s easy then
Object* obj = dynamic_cast<Object*>(input);
if(obj != NULL).....
with RTTI set in the compile
or
inline BOOL isObject(ReferenceTarget* ref) { return ref->GetInterface(I_OBJECT) ? TRUE : FALSE; }