0
votes

I am iterating through all nodes in current layer. I want to filter only nodes which are drawn as plane objects. Is there a way in 3ds max sdk to check whether the shape is a plane?

ILayerManager* manager = GetCOREInterface13()->GetLayerManager();

ILayer* hLayer = manager->GetCurrentLayer();

ILayerProperties* props = static_cast<ILayerProperties*>(hLayer->GetInterface(LAYERPROPERTIES_INTERFACE));
Tab<INode*> nodes;
props->Nodes(nodes);
for (int i=0; i < nodes.Count(); ++i)
{
  INode* node = nodes[i];
 // check if the node is a plane
}
1

1 Answers

2
votes

Define the classid on top of your project. Then us that to check the classid of your node.

#define plane_ClassID Class_ID(136257020, 2002153317)
if (node->ClassID() == plane_ClassID)
{
//we found it.
}

You can get the classID's of things in maxscript by selecting object and type :

$.classid

That will print it's ID, that can be used for all objects\materials\helpers and so on.