|
Hi everyone,
I’m dealing with SDK for the first time and have a problem. The goal is to change objects’ thickness by moving its “bottom” faces via SDK. For example, there is a box and two its faces have material ID set to 100. I’m trying to select them by ID and move them:
pluginInstance->ip->MergeFromFile("D:\\test.max", true, false, true, false, NULL, 0, 0)
INode * pNode = SceneNodeByNameCache::GetInst().GetSceneNodeByName("Box001", true, false); Object * obj = pNode->GetObjectRef();
if (obj->ClassID() == EPOLYOBJ_CLASS_ID) {
PolyObject * po = (PolyObject *)obj;
EPoly * ep = (EPoly *)po->GetInterface(EPOLY_INTERFACE);
ep->SetEPolySelLevel(EP_SL_FACE);
ep->EpfnSelectByMat(100, FALSE, pluginInstance->ip->GetTime());
ep->MoveSelection(EP_SL_FACE, pluginInstance->ip->GetTime(), Matrix3(true), Matrix3(true), Point3(200,200,200), TRUE); }
The code in “if” block is executed, doesn’t give errors, but nothing happens. The box is loaded but not modified. What’s the mistake?
|