MaxPlus : convert to editable poly

Any idea how to convert a node (an object) to editable poly ?
3dsmax2014/python

Have check the doc and can’t find anything on this. Must say the doc is really simple and lack descriptions and examples …

Take this with a grain of salt, I’m just too lazy to think about finding a proper way (getting PolyObj Object representation and actually using EPOLYOBJ_CLASS_ID = MaxPlus.Class_ID(469250957, 422535320) instead of collapsing the resulting PolyObject):

POLYOBJ_CLASS_ID = MaxPlus.Class_ID(1562457754, 0)

for node in MaxPlus.SelectionManager.Nodes:
	node.Collapse() #any pointer on how to get the result of the modstack otherwise? node.Object.AsTriObject() won't work with modifiers...
	node.BaseObject = node.BaseObject.ConvertToType(POLYOBJ_CLASS_ID)
	node.Collapse()

Will have a look. Actually I did with adding turntopoly modifier and collapse. Works great also

Maybe a bit late :slight_smile: but here there is a small snippet that allows to convert nodes to editable poly and editable mesh without using Collapse or Modifiers


obj = MaxPlus.Factory.CreateGeomObject(MaxPlus.ClassIds.Sphere)
node = MaxPlus.Factory.CreateNode(obj)

# Convert to Editable Mesh
node.Convert(MaxPlus.ClassIds.TriMeshGeometry)
obj = node.GetBaseObject()

# Convert to Editable Poly
node.Convert(MaxPlus.ClassIds.PolyMeshObject)
obj = node.GetBaseObject()

Also, you can to create, for example, a sphere directly as Editable Mesh


obj = MaxPlus.Factory.CreateGeomObject(MaxPlus.ClassIds.Sphere)
obj = obj.ConvertToType(MaxPlus.ClassIds.TriMeshGeometry)
node = MaxPlus.Factory.CreateNode(obj)

Tested using MaxPlus in 3ds Max 2017