Message 1 of 2
ConvertToPoly in SDK

Not applicable
03-19-2015
05:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm having a hard time finding answers to simple things in the SKD.
Like doing actions in maxscript...
macros.run "Modifier Stack" "Convert_to_Poly"
or
ConvertToPoly $
I have been working with
ip = GetCOREInterface(); TimeValue t = GetCOREInterface()->GetTime(); int Node_Count; Node_Count = ip->GetSelNodeCount(); Object *N_obj[100]; for (int i = 0; i < Node_Count; i++){ INode *node = ip->GetSelNode(i); Object *obj = node->EvalWorldState(t).obj; if (obj->CanConvertToType(Class_ID(POLYOBJ_CLASS_ID, 0))){ obj->ConvertToType(t, defObjectClassID); PolyObject * PolyObj = (PolyObject *)obj; MNMesh *pmesh = &PolyObj->GetMesh(); } }
or
for (int i = 0; i < Node_Count; i++){ INode *node = ip->GetSelNode(i); Object *obj = node->EvalWorldState(t).obj; Object *New_obj = obj->CollapseObject(); }
The first looks like it gets me down to a mesh level. But does not "ConvertToType(t, defObjectClassID);"
Any ideas any thoughts?