[Closed] Get access to MaxScript Struct member in c++ function
Damn, I didn’t look into /samples folder, only into /howto, and there’s much more samples there, thanks for the tip! The help doesn’t seem very informative to me though. It’s just lists all classes and their methods, without any description. Looks like it’s just a copy of the .h files. Or maybe I’m looking in the wrong place again?
Got stuck again. I pass two arguments to my C++ function: an object and it’s Uvwrap modifier. Then I say: object->to_node() and modifier->to_modifier() and that seems to work. Now I can use their methods like node->GetName() and modifier->SelectAll(1) and they work fine. But how do I use UnwrapUVW specific methods? I tried something like:
uvMod = (IUnwrapMod2*)modifier;
uvMod->fnSetGridSize(0.01);
But no, that doesn’t work.
#include “iunwrap.h”
IUnwrapMod2* unwrapper = (IUnwrapMod2*) mod->GetInterface(UNWRAP_INTERFACE2);
if(unwrapper ){…
repeat for other interfaces
void IUnwrapModTest(Modifier* modi)
{
IUnwrapMod2* uvw2 = (IUnwrapMod2*)(modi)->GetInterface(UNWRAP_INTERFACE2);
if (uvw2)
{
}
}
oh… i’m late
i was late because i’ve also added to my extension a function – getnodeunwarp