pymel.core.rendering.convertTessellation¶
- convertTessellation(*args, **kwargs)¶
Command to translate the basic tessellation attributes to advanced. If a camera flag is specified the translation will be based on the distance the surface is from the camera. The closer the surface is to the camera the more triangles there will be in the tessellation. If the -allCamerasflags is specified, the renderable camera closest to the surface will be used to set the tessellation. The camera tessellation estimate is also dependent on the current render resolution; a higher resolution the result in a more finely tessellated surface. Multiple NURB surfaces may be specified on the command line, or if no command arguments are specified the surfaces on the active list will be used. This command operates by calculating the chord height such that smooth tessellation is achieved when the surface is rendered. The advanced tessellation setting will be enabled on each surface specified, the primary tessellation parameters will be set, and chord height will be used as the secondary criteria.
Flags:
Long Name / Short Name Argument Types Properties allCameras / acm bool Specifies that all renderable cameras should be used in calculating the screen based tessellation. camera / cam PyNode Specifies the camera which should be used in calculating the screen based tessellation. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.convertTessellation
Example:
import pymel.core as pm # Convert the basic tessellation settings to advanced. pm.convertTessellation( 'nurbsSphere1' ) # Set the tessellation for nurbsSphere1 based on camera projection # from persp. pm.convertTessellation( 'nurbsSphere1', camera='persp' ) # Set tessellation based on all renderable cameras. pm.convertTessellation( 'nurbsSphere2', allCameras='nurbsSphere1' ) # Set the tessellation for all selected objects. pm.convertTessellation()