//For ColladaMaya_301 global proc int doColladaExport () { string $fullPathFilename = `file -q -sn`; if ($fullPathFilename == "") { confirmDialog -title "Export Failed" -message "Error: You must save the file before exporting it" -button "OK" -defaultButton "OK"; error "You must save the file before exporting it"; return 0; } else { string $baseFilename = basename( $fullPathFilename, ".mb" ); string $baseFilenameWExt = basename( $fullPathFilename, "" ); string $fullPathFilenameSansExt = `substitute $baseFilenameWExt $fullPathFilename $baseFilename`; string $fullPathFilenameDae = ($fullPathFilenameSansExt + ".dae"); pv_performAction $fullPathFilenameDae "COLLADA exporter"; if (`file -f -op "bakeTransforms=1;relativePaths=1;bakeLighting=0;exportCameraAsLookat=0;exportTriangles=1;isSampling=1;curveConstrainSampling=0;samplingFunction=30;exportPolygonMeshes=1;exportLights=1;exportCameras=1;exportJointsAndSkin=1;exportAnimations=1;exportInvisibleNodes=1;exportNormals=1;exportTexCoords=1;exportVertexColors=1;exportTangents=0;exportTexTangents=1;exportMaterialsOnly=0;exportConstraints=1;exportPhysics=1;exclusionSetMode=0;exclusionSets=;exportXRefs=1;dereferenceXRefs=1;cameraXFov=0;cameraYFov=1;" -typ "COLLADA exporter" -pr -ea $fullPathFilenameDae` == $fullPathFilenameDae) { return 1; } else { confirmDialog -title "Export Failed" -message "The file was not sucessfully exported" -button "OK" -defaultButton "OK"; error "The file was not sucessfully exported"; return 0; } } } global proc colladaExport () { if (`doColladaExport`) { print "File Exported"; confirmDialog -message "File Exported" -button "OK" -defaultButton "OK"; } }