Node Conversion Methods

convertToMesh <node> -- mapped 

This function converts appropriate scene object types into Editable Meshes. It is similar to collapseStack() in that it will remove all modifiers present, but unlike collapseStack() it will always replace the base object with an editable mesh version, even if there are no modifiers present.

convertToMesh() can be applied to any object that an Edit Mesh modifier can work on such as, geometry and shapes, but not helpers, space warps, lights, and so on. If the object cannot be converted, the function returns undefined .

convertToSplineShape <node> -- mapped 

Converts the given scene node to a SplineShape object. If the object cannot be converted (typically, if it is not a shape), the function returns undefined . Any modifiers present will be collapsed. The collapseStack() function can also be used as well as the collapse button in the modifier stack dialog in 3ds Max; both generate a SplineShape, but will only do so if there is at least one modifier present.

canConvertTo <node> <class> 

Allows you to test whether a given node is convertible into a given class. Returns true or false .

FOR EXAMPLE:

   if canConvertTo $foo NURBSSurface then...

The kind of classes you can convert objects to are the generic editable forms including Mesh, SplineShape, NURBSCurve, NURBSSurface, and others.

convertTo <node> <class> -- mapped 

This function is a general form of the existing specific conversion functions such as, convertToMesh() , convertToSplineShape() , and so on.

convertToSplineShape() can be written as:

FOR EXAMPLE:

   convertTo $circle001 SplineShape

If the conversion is not supported, the function returns the value undefined.

convertToNURBSSurface <node> -- mapped 
convertToNURBSCurve <node> -- mapped 

These functions work on those primitive geometry and shape classes that support conversion to NURBS (such as boxes, spheres, circles, lines, and others). If an object does not support conversion, the function returns undefined.