-
Notifications
You must be signed in to change notification settings - Fork 126
ExamplesMayaMeshExport
Ben Toogood edited this page Jun 13, 2013
·
3 revisions
Exporting meshes from maya into the custom cortex format is pretty straightforward. See how it can be used in ExamplesProceduralsAnimatedMesh .
import os
import maya.cmds
import IECore
import IECoreMaya
def exportMeshes( meshes, destinationDirectory ) :
if not os.path.exists( destinationDirectory ) :
os.makedirs( destinationDirectory )
for mesh in meshes :
converter = IECoreMaya.FromMayaShapeConverter.create( mesh )
converted = converter.convert()
writer = IECore.ObjectWriter( converted, destinationDirectory + "/" + mesh + ".cob" )
writer.write()
allMeshes = maya.cmds.ls( selection=True, noIntermediate=True, dag=True, type="mesh" )
exportMeshes( allMeshes, "/tmp/myMeshes" )
- Introduction
- General Functionality
- Data Handling
- Parameters and Ops
- Point Primitives
- Mesh Primitives
- Image Primitives
- Procedurals
- Cortex & Python
- Cortex & Maya
- Cortex & Houdini