[Closed] Accessing maxscript plugin objects from C++ api
so i defined a plugin object in maxscript with “plugin simpleObject …” and it has a bunch of parameters i want to get at from C++. i expected i’d be able to get the object, cast it to simpleobject and then access the paramblock but this doesn’t seem to work. the paramblock is null.
here’s what i’m doing in c++:
Object * obj = node->GetObjectRef();
IParamArray * params = obj->GetParamBlock();
// params is null
SimpleObject * so = (SimpleObject *)obj;
// so->pblock is null
anyone know? thanks!!
after trying many things i figured it out. for others who may want to do the same thing:
Object * obj = node->GetObjectRef();
SimpleObject * so = (SimpleObject *)obj;
IParamBlock2 * paramBlock = so->GetParamBlockByID(0);
so apparently you can get the paramblock with GetParamBlockByID but if you use the GetParamBlock API you get null. not the best API design, but hey this is the max sdk.