global proc int b3dExportOptions (string $parent,string $action,string $initialSettings,string $resultCallback) { int $result; string $currentOptions; string $optionList[]; string $optionBreakDown[]; int $index; if ($action == "post") { setParent $parent; setUITemplate -pushTemplate DefaultTemplate; formLayout -e -vis true optionsBoxForm; columnLayout -adj true; frameLayout -cll true -cl false -bv true -en true -bs "etchedIn" -l "Export Options" b3dOptionsFrame; columnLayout -adj false -cal left b3dComponentOptions; checkBoxGrp -l "Export Components:" -ncb 3 -va3 true true true -la3 "Colors" "Normals" "UVs" exportComponents; checkBox -l "Output Verbose Tags" verbose; checkBox -l "Re-use Materials" reuseMaterials; setParent ..; setParent ..; frameLayout -cll true -cl false -bv true -en true -bs "etchedIn" -l "Performer Loader Options" b3dPerformerFrame; columnLayout -adj false -cal left; checkBox -l "Backface Culling" backfaceculling; checkBox -en false -l "Convert to .pfb" convert2pfb; checkBox -l "Convert to TriStrips" tristrips; checkBox -l "Wireframe" wireframe; checkBox -l "Display Textures in Full Color Mode" textureHiQuality; checkBox -l "Use pfdGeoBuilder Functions" useBuilder; columnLayout; optionMenu -label "Transparency Mode"; menuItem -label "On"; menuItem -label "Best"; menuItem -label "Fast"; menuItem -label "Alpha Blend"; menuItem -label "Multisample Alpha"; menuItem -label "Multisample Alpha Mask"; menuItem -label "Off"; optionMenu -label "Alpha Test Mode"; menuItem -label "Always"; menuItem -label "="; menuItem -label ">="; menuItem -label ">"; menuItem -label "<="; menuItem -label "<"; menuItem -label "!="; menuItem -label "Never"; menuItem -label "Off"; text -label "Alpha Threshold:"; floatField -minValue 0 -maxValue 1; setParent ..; frameLayout -cll true -cl false -bv true -en true -bs "etchedIn" -l "Hierarchy"; columnLayout -adj false -cal left; radioButtonGrp -l "Hierarchy:" -nrb 4 -la4 "Full" "Static" "Flattened" "At Origin" hierarchy; setParent ..; setParent ..; frameLayout -cll true -cl false -bv true -en true -bs "etchedIn" -l "Textures"; columnLayout -adj false -cal left; checkBox -l "Include Textures" textures; checkBox -en false -l "Convert Procedural Textures to File Textures" convertSolid; checkBox -en false -l "Use Original File for File Textures" useOriginal; checkBox -en false -l "Convert to .pfi" convertPfi; checkBox -en false -l "Overwrite Existing Texture Files" txOverwrite; checkBox -en false-l "Bake Lighting into Textures" bakeLighting; intSliderGrp -l "X Tex Res" -field true -max 10000 -fmx 4096 textureXRes; intSliderGrp -l "Y Tex Res" -field true -max 10000 -fmx 4096 textureYRes; intSliderGrp -e -v 256 textureXRes; intSliderGrp -e -v 256 textureYRes; checkBox -e -ofc " checkBox -e -en false convertSolid; \ checkBox -e -en false useOriginal;\ checkBox -e -en false convertPfi;\ checkBox -e -en false txOverwrite;\ checkBox -e -en false bakeLighting;" textures; checkBox -e -onc " checkBox -e -en true convertSolid; \ checkBox -e -en true useOriginal;\ checkBox -e -en true convertPfi;\ checkBox -e -en true txOverwrite;\ checkBox -e -en true bakeLighting;" textures; setParent ..; setParent; // Annotations checkBox -e -ann "Hides faces which face away from the camera.\n\ Turning this on can speed up object display,\n\ but can make parts of non-convex objects invisible." backfaceculling; checkBox -e -ann "convert the output file to an\n\ OpenGL Performer Binary (.pfb)\n\ file after exporting." convert2pfb; checkBox -e -ann "On: Performer will optimize the file when loading, converting meshes to triangle strips.\n\ Tristrips can increase speed performance, but can cause hard-edged faceting on smooth surfaces\n\ under local lighting (point lights or spotlights.)\n\ Off: Performer will load the mesh as-is." tristrips; checkBox -e -ann "On: display textures as full-color 32Bit RGBA.(8 Bits per channel with alpha transparency)\n\ Off: faster but less smooth, 16Bit RGBA (4 Bits per channel with alpha transparency)\n" textureHiQuality; radioButtonGrp -e -ann "Full: export complete transform hierarchy using dynamic transforms\n\ Static: export hierarchy using static transforms\n\ Flatten: combine geometry under one flattened transform\n" hierarchy; checkBox -e -ann ".pfi (Performer Image) format is an optimized, fast-loading image format for Performer" convertPfi; checkBox -e -ann "include the effects of Maya lighting when exporting textures." bakeLighting; // set current settings $currentOptions = $initialSettings; if (size($currentOptions)>0) { tokenize($currentOptions, ";", $optionList); for ($index=0;$index