[Closed] how know if an object is a primitive ?
I found this thread, but…
So, if this is the best way to find if the selected object is a primitive:
if (isDeformable selection[1]) == false do print "Selected object is a primitive"
About isDeformablemaxscript help file says:
While isDeformable might return true for some nodes, this does not necessarily mean that they can be deformed. For example, all legacy particle systems like Snow, Superspray and Blizzard return true but are not being affected by deformations, while all geometry primitives return false but can be deformed.
i think you also have to check that the node is kind of Geometry class. Shapes are not deformable too.
but there is another problem… some geometry classes is not deformable but not a primitive. for example Compound Objects.
probably you need to check some specific condition to decide that the node is a primitive in your meaning or not.
I need all primitives including shapes. If Compound object is reported as not deformable the script can operate on it without problems.
there are only 2 kind of primitives :
#Standard_Primitives
#Extended_Primitives
$.category
max helpfile mentions thw word ‘spline primitives’,
but 3dsmax itself, report those only as #shapes
for all objects from the create panel, and not converted, maybe:
numPoints $ == 0
there is also #scripted primitive kind… and it’s up to developer what category the class to add to.
$.category
reports all splines primitives as #Splines
If the splines are converted to editable_splines the
$.category
reports them as #Shapes
Extended splines are reported as #Extended_Splines
Tested on max2012