// =========================================================================== // Copyright 2018 Autodesk, Inc. All rights reserved. // // Use of this software is subject to the terms of the Autodesk license // agreement provided at the time of installation or download, or which // otherwise accompanies this software in either electronic or hard copy form. // =========================================================================== //================================================================== // MayaSoftware Renderer Tab //================================================================== // Description: Utility procedure used by other procedures in this file. // Must be used to account for multiple instances of the same tab. // global proc setParentToSoftwareTab() { // First set the parent to the correct tab layout. // Account for the special "all renderers" master layer layout // when we are using render layers global string $gMasterLayerRendererName; string $renderer = isDisplayingAllRendererTabs() ? $gMasterLayerRendererName : `currentRenderer`; string $tabLayout = rendererTabLayoutName($renderer); setParent $tabLayout; // Now set the parent to the correct column layout setParent softwareTabColumn; } // Description: This procedure is called to create the mayaSoftware // tab for the unified render globals window. // global proc createMayaSoftwareGlobalsTab() { string $parentForm = `setParent -query`; scrollLayout -horizontalScrollBarThickness 0 mayaSoftwareGlobalsScrollLayout; columnLayout -adjustableColumn true softwareTabColumn; // Anti-aliasing quality section // frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kAntiAliasingQuality")) -cll true -cl 0 mayaSoftwareQualityFrame; createRenderQuality ("mayaSoftwareQualityFrame"); setParent ..; // Field Options // frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kFieldOptions")) -cll true -cl 1 -preExpandCommand "createFieldOptions (\"rgFieldOptionsFrame\")" rgFieldOptionsFrame; setParent ..; // Raytracing quality section // frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kRaytracingQuality")) -cll true -cl 1 -preExpandCommand "createRayTraceQuality (\"rgRayTraceFrame\")" rgRayTraceFrame; setParent ..; // Motion Blur // frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kLayoutMotionBlur")) -cll true -cl 1 -preExpandCommand "createMotionBlur (\"rgBlurFrame\")" rgBlurFrame; setParent ..; // Render Options // frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kRenderOptions")) -cll true -cl 1 -preExpandCommand "createRenderOptions (\"rgOptionSoftwareFrame\")" rgOptionSoftwareFrame; setParent ..; // Performance Options // frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kMemoryAndPerformanceOptions")) -cll true -cl 1 -preExpandCommand "createPerformanceOptions (\"rgPerfFrame\")" rgPerfFrame; setParent ..; // IPR Options // frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kIPROptions")) -cll true -cl 1 rgIPRFrame; createIPROptions("rgIPRFrame"); setParent ..; if (`isTrue MayaCreatorExists`) { // Urchin Options frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kPaintEffectsRenderingOptions")) -cll true -cl 1 -preExpandCommand "createUrchinOptions (\"rgUrchinFrame\")" rgUrchinFrame; setParent ..; } setParent ..; setParent ..; formLayout -edit -af mayaSoftwareGlobalsScrollLayout "top" 0 -af mayaSoftwareGlobalsScrollLayout "bottom" 0 -af mayaSoftwareGlobalsScrollLayout "left" 0 -af mayaSoftwareGlobalsScrollLayout "right" 0 $parentForm; } // Description: This procedure is called to create the render quality // frame in the maysSoftware tab in the unified render globals // window. // global proc createRenderQuality (string $parent) // // Procedure Name: // createRenderQuality // // Description: // Creates the UI in the "Anti-aliasing Quality" // expand/collapse section. // { setUITemplate -pushTemplate attributeEditorTemplate; setParentToSoftwareTab(); setParent $parent; // If the UI is created already then reset the command with the correct // render quality + update the attribute values. string $rendQual[] = `listConnections defaultRenderGlobals.qual`; string $fullPath = `setParent -q`+ "|mayaSoftwareQualityLayout"; if (`columnLayout -exists $fullPath`) { updateRenderQuality; return; } columnLayout -adjustableColumn true mayaSoftwareQualityLayout; frameLayout -labelVisible false -collapsable false -collapse true; columnLayout -adjustableColumn true; optionMenuGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kQuality")) qualityPresetMenu; optionMenuGrp -edit -cc RGsetDefaultQuality qualityPresetMenu; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kCustom")) rgCustomQuality; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kPreviewQuality")) rgPreviewQuality; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kIntermediateQuality")) rgIntermediateQuality; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kProductionQuality")) rgProductionQuality; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kContrastSensitiveProduction")) rgContrastProductionQuality; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kMotionBlurProduction")) rgMotionBlurQuality; optionMenuGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kEdgeAntialiasing")) edgeMenu; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kLowQuality")) -data 3; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kMediumQuality")) -data 2; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kHighQuality")) -data 1; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kHighestQuality")) -data 0; // connect the label, so we can change its color connectControl -index 1 edgeMenu ($rendQual[0] + ".edgeAntiAliasing"); // connect the menu, so it will always match the attribute connectControl -index 2 edgeMenu ($rendQual[0] + ".edgeAntiAliasing"); setParent ..; setParent ..; frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kNumberOfSamples")) -labelVisible true -collapsable false -collapse true; columnLayout -adjustableColumn true; string $attr = $rendQual[0]+ ".shadingSamples"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kShading")) -attribute $attr -cc "updateRenderQuality" shadingSamplesField; $attr = $rendQual[0]+ ".maxShadingSamples"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kMaxShading")) -attribute $attr -cc "updateRenderQuality" maxShadingSamplesField; $attr = $rendQual[0]+ ".visibilitySamples"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kBlurVisib")) -attribute $attr -cc "updateRenderQuality" visSamplesField; $attr = $rendQual[0]+ ".maxVisibilitySamples"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kMaxBlurVisib")) -attribute $attr -cc "updateRenderQuality" maxVisSamplesField; $attr = $rendQual[0]+ ".particleSamples"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kParticles")) -attribute $attr -cc "updateRenderQuality" particlesSamplesField; setParent ..; setParent ..; frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kMultipixelFiltering")) -labelVisible true -collapsable false -collapse true; columnLayout -adjustableColumn true; $attr = $rendQual[0]+ ".useMultiPixelFilter"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kUseMultipixelFilter")) -attribute $attr -cc "updateRenderQuality" pixelCheck; optionMenuGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kPixelFilterType")) pixelFilterMenu; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kBoxFilter")) -data 0; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kTriangleFilter")) -data 2; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kGaussianFilter")) -data 4; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kQuadraticFilter")) -data 5; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kPluginFilter")) -data 1000; // connect the label, so we can change its color connectControl -index 1 pixelFilterMenu ($rendQual[0] + ".pixelFilterType"); // connect the menu, so it will always match the attribute connectControl -index 2 pixelFilterMenu ($rendQual[0] + ".pixelFilterType"); $attr = $rendQual[0]+ ".pixelFilterWidthX"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kPixelFilterWidthX")) -attribute $attr filterXField; $attr = $rendQual[0]+ ".pixelFilterWidthY"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kPixelFilterWidthY")) -attribute $attr filterYField; setParent ..; setParent ..; frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kContrastThreshold")) -labelVisible true -collapsable false -collapse true; columnLayout -adjustableColumn true; $attr = $rendQual[0]+ ".redThreshold"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kRed")) -attribute $attr -cc "updateRenderQuality" contrastRedField; $attr = $rendQual[0]+ ".greenThreshold"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kGreen")) -attribute $attr -cc "updateRenderQuality" contrastGreenField; $attr = $rendQual[0]+ ".blueThreshold"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kBlue")) -attribute $attr -cc "updateRenderQuality" contrastBlueField; $attr = $rendQual[0]+ ".coverageThreshold"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kCoverage")) -attribute $attr -cc "updateRenderQuality" contrastCoverField; setParent ..; setParent ..; setParent ..; setUITemplate -popTemplate; // Make sure the values are right // updateRenderQuality; // Set up script jobs for those attributes which require updating of // multiple controls. // This is especially important when a user changes render layers. // string $attrArray[]; $attrArray[size($attrArray)] = $rendQual[0] + ".edgeAntiAliasing"; int $i; for ($i = 0; $i < size($attrArray); $i++) { scriptJob -attributeChange $attrArray[$i] "updateRenderQuality" -parent mayaSoftwareQualityLayout; } } // Description: This procedure is called to create the field options // frame in the maysSoftware tab in the unified render globals // window. // global proc createFieldOptions (string $parent) // // Procedure Name: // createFieldOptions // // Description: // Creates the UI in the "Field Options" expand/collapse section. // { setUITemplate -pushTemplate attributeEditorTemplate; setParentToSoftwareTab(); setParent $parent; // If the UI is created already then just update the attribute values. // We must obtain the full path to account for multiple instances of // the same layout. // string $fullPath = `setParent -q` + "|rgFieldLayout"; if (`columnLayout -exists $fullPath`) { updateFieldOptions; return; } columnLayout -adjustableColumn true rgFieldLayout; optionMenuGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kRender")) -cc changeFieldOptions fieldMenu; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kFrames")) -data 0; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kBothFieldsInterlaced")) -data 3; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kBothFieldsSeparate")) -data 4; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kOddFields")) -data 1; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kEvenFields")) -data 2; // connect the label, so we can change its color connectControl -index 1 fieldMenu defaultResolution.fields; // connect the menu, so it will always match the attribute connectControl -index 2 fieldMenu defaultResolution.fields; scriptJob -p $parent -ac "defaultResolution.fields" "updateFieldOptions;"; optionMenuGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kFieldDominance")) -cc "changeFieldOptions" fieldDominanceMenu; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kOddFieldNTSC")) -data 1 rgOddField; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kEvenFieldPAL")) -data 0 rgEvenField; // connect the label, so we can change its color connectControl -index 1 fieldDominanceMenu defaultResolution.oddFieldFirst; // connect the menu, so it will always match the attribute connectControl -index 2 fieldDominanceMenu defaultResolution.oddFieldFirst; radioButtonGrp -numberOfRadioButtons 2 -label (uiRes("m_createMayaSoftwareGlobalsTab.kZerothScanline")) -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kAtTop")) -label2 (uiRes("m_createMayaSoftwareGlobalsTab.kAtBottom")) -on1 "setAttr defaultResolution.zerothScanline 0" -on2 "setAttr defaultResolution.zerothScanline 1" -data1 0 -data2 1 scanlineButtons; // connect the label, so we can change its color connectControl -index 1 scanlineButtons defaultResolution.zerothScanline; scriptJob -p $parent -ac "defaultResolution.zerothScanline" "updateFieldOptions"; separator; radioButtonGrp -numberOfRadioButtons 1 -label (uiRes("m_createMayaSoftwareGlobalsTab.kFieldExtension")) -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kNoFieldExtension")) -onc changeFieldOptions -data1 1 fieldButton1; radioButtonGrp -numberOfRadioButtons 1 -shareCollection fieldButton1 -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kDefaultFieldExtension")) -onc changeFieldOptions -data1 0 fieldButton2; radioButtonGrp -numberOfRadioButtons 1 -shareCollection fieldButton1 -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kCustomExtension")) -onc changeFieldOptions fieldButton3; connectControl -index 1 fieldButton1 defaultRenderGlobals.fieldExtControl; connectControl -index 1 fieldButton2 defaultRenderGlobals.fieldExtControl; // This works on the above 3 radio buttons // scriptJob -p $parent -ac "defaultRenderGlobals.fieldExtControl" "updateFieldOptions;"; // Make these fields small to indicate that // only a single character is accepted. // There's a SUG on this. #87405 // textFieldGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kCustomExtensionOddField")) -adj 0 -cw 2 30 -cc changeFieldOptions oddFieldExt; connectControl -index 1 oddFieldExt defaultRenderGlobals.oddFieldExt; scriptJob -p $parent -ac "defaultRenderGlobals.oddFieldExt" "updateFieldOptions;"; textFieldGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kCustomExtensionEvenField")) -adj 0 -cw 2 30 -cc changeFieldOptions evenFieldExt; connectControl -index 1 evenFieldExt defaultRenderGlobals.evenFieldExt; scriptJob -p $parent -ac "defaultRenderGlobals.evenFieldExt" "updateFieldOptions;"; setParent ..; setUITemplate -popTemplate; // Make sure the values are right // updateFieldOptions; } // Description: This procedure is called to create the render quality // frame in the maysSoftware tab in the unified render globals // window. // global proc updateRenderQuality () // // Procedure Name: // updateRenderQuality // // Description: // Gets the real values from the nodes and sets the UI based // on these values. This procedure updates all of the quality // values. // { string $oldParent = `setParent -query`; setParentToSoftwareTab(); string $fullPath = `setParent -q` + "|mayaSoftwareQualityFrame|mayaSoftwareQualityLayout"; if (!`columnLayout -exists $fullPath`) { return; } string $rendQual[] = `listConnections defaultRenderGlobals.qual`; int $useBlur = `getAttr defaultRenderGlobals.motionBlur`; int $blur2d = (`getAttr defaultRenderGlobals.motionBlurType` == 0); int $enableMultiPixelFilter = false; int $enableFilterAttrs = false; int $shadingSamples = `getAttr ($rendQual[0] + ".shadingSamples")`; int $maxShadingSamples = `getAttr ($rendQual[0] + ".maxShadingSamples")`; int $visibilitySamples = `getAttr ($rendQual[0] + ".visibilitySamples")`; int $maxVisibilitySamples = `getAttr ($rendQual[0] + ".maxVisibilitySamples")`; int $particleSamples = `getAttr ($rendQual[0] + ".particleSamples")`; // The edge AA settings go from 0-3 for Highest down to Low // But we choose to display the menu items in _ascending_ order, // for consistency with the order of presets. // Thus we must remap the values here // int $edgeAA = `getAttr ($rendQual[0] + ".edgeAntiAliasing")`; int $edgeMenuItem; if ($edgeAA == 0) { // Highest $edgeMenuItem = 4; } else if ($edgeAA == 1) { // High $edgeMenuItem = 3; } else if ($edgeAA == 2) { // Medium $edgeMenuItem = 2; } else if ($edgeAA == 3) { // Low $edgeMenuItem = 1; } optionMenuGrp -edit -sl $edgeMenuItem edgeMenu; int $useMultiPixelFilter = `getAttr ($rendQual[0] + ".useMultiPixelFilter")`; // Check against the contrast threshold values. The below // tolerance check is due to MEL's poor numerical accuracy. // E.g., setting a 0.4 value will not result in a 0.4 setting. // float $numerialTol = 0.001; float $highContrastRed = 0.4; float $highContrastGreen = 0.3; float $highContrastBlue = 0.6; float $lowContrastRed = 0.2; float $lowContrastGreen = 0.15; float $lowContrastBlue = 0.3; float $redTol = `getAttr ($rendQual[0] + ".redThreshold")`; float $greenTol = `getAttr ($rendQual[0] + ".greenThreshold")`; float $blueTol = `getAttr ($rendQual[0] + ".blueThreshold")`; float $redDiff = $redTol - $highContrastRed; float $greenDiff = $greenTol - $highContrastGreen; float $blueDiff = $blueTol - $highContrastBlue; int $highContrast = $redDiff < $numerialTol && $redDiff > -$numerialTol && $greenDiff < $numerialTol && $greenDiff > -$numerialTol && $blueDiff < $numerialTol && $blueDiff > -$numerialTol; $redDiff = $redTol - $lowContrastRed; $greenDiff = $greenTol - $lowContrastGreen; $blueDiff = $blueTol - $lowContrastBlue; int $lowContrast = $redDiff < $numerialTol && $redDiff > -$numerialTol && $greenDiff < $numerialTol && $greenDiff > -$numerialTol && $blueDiff < $numerialTol && $blueDiff > -$numerialTol; // See if the current settings of the 6 attributes we just queried // match any preset settings, and set the Presets menu state // accordingly // if ($shadingSamples == 1 && $maxShadingSamples == 1 && $visibilitySamples == 1 && $maxVisibilitySamples == 4 && $edgeAA == 3 && $useMultiPixelFilter == 0 && $highContrast) { optionMenuGrp -edit -sl 2 qualityPresetMenu; // Preview Quality } else if ($shadingSamples == 1 && $maxShadingSamples == 8 && $visibilitySamples == 1 && $maxVisibilitySamples == 4 && $edgeAA == 0 && $useMultiPixelFilter == 0 && $highContrast) { optionMenuGrp -edit -sl 3 qualityPresetMenu; // Intermediate Quality } else if ($shadingSamples == 2 && $maxShadingSamples == 8 && $visibilitySamples == 1 && $maxVisibilitySamples == 4 && $edgeAA == 0 && $useMultiPixelFilter == 1 && $highContrast) { optionMenuGrp -edit -sl 4 qualityPresetMenu; // Production Quality } else if ($shadingSamples == 2 && $maxShadingSamples == 8 && $visibilitySamples == 1 && $maxVisibilitySamples == 4 && $edgeAA == 0 && $useMultiPixelFilter == 1 && $lowContrast) { optionMenuGrp -edit -sl 5 qualityPresetMenu; // Contrast Sensitive Production Quality } else if ($shadingSamples == 3 && $maxShadingSamples == 8 && $visibilitySamples == 1 && $maxVisibilitySamples == 4 && $edgeAA == 0 && $useMultiPixelFilter == 1 && $highContrast) { optionMenuGrp -edit -sl 6 qualityPresetMenu; // Motion Blur Production } else { optionMenuGrp -edit -sl 1 qualityPresetMenu; // custom } int $filterType = `getAttr ($rendQual[0] + ".pixelFilterType")`; if ($filterType == 0) { // Box Filter optionMenuGrp -edit -sl 1 pixelFilterMenu; } else if ($filterType == 2) { // Triangle Filter optionMenuGrp -edit -sl 2 pixelFilterMenu; } else if ($filterType == 4) { // Gaussian Filter optionMenuGrp -edit -sl 3 pixelFilterMenu; } else if ($filterType == 5) { // Quadratic B-Spline Filter optionMenuGrp -edit -sl 4 pixelFilterMenu; } else if ($filterType == 1000) { // Plug-in Filter optionMenuGrp -edit -sl 5 pixelFilterMenu; } attrControlGrp -edit -enable ($useBlur && !$blur2d) contrastCoverField; optionMenuGrp -edit -enable $useMultiPixelFilter pixelFilterMenu; attrControlGrp -edit -enable $useMultiPixelFilter filterXField; attrControlGrp -edit -enable $useMultiPixelFilter filterYField; // Now dim out items that are not applicable, // based on the current settings // if ($edgeAA == 3) { // Low attrControlGrp -edit -enable false pixelCheck; optionMenuGrp -edit -enable false pixelFilterMenu; attrControlGrp -edit -enable false filterXField; attrControlGrp -edit -enable false filterYField; attrControlGrp -edit -enable false contrastRedField; attrControlGrp -edit -enable false contrastGreenField; attrControlGrp -edit -enable false contrastBlueField; attrControlGrp -edit -enable false maxShadingSamplesField; attrControlGrp -edit -enable ($useBlur && !$blur2d) visSamplesField; attrControlGrp -edit -enable false maxVisSamplesField; } else if ($edgeAA == 2) { // Medium attrControlGrp -edit -enable false pixelCheck; optionMenuGrp -edit -enable false pixelFilterMenu; attrControlGrp -edit -enable false filterXField; attrControlGrp -edit -enable false filterYField; attrControlGrp -edit -enable false contrastRedField; attrControlGrp -edit -enable false contrastGreenField; attrControlGrp -edit -enable false contrastBlueField; attrControlGrp -edit -enable false maxShadingSamplesField; attrControlGrp -edit -enable ($useBlur && !$blur2d) visSamplesField; attrControlGrp -edit -enable false maxVisSamplesField; } else if ($edgeAA == 1) { // High $enableMultiPixelFilter = true; attrControlGrp -edit -enable false contrastRedField; attrControlGrp -edit -enable false contrastGreenField; attrControlGrp -edit -enable false contrastBlueField; attrControlGrp -edit -enable false maxShadingSamplesField; attrControlGrp -edit -enable ($useBlur && !$blur2d) visSamplesField; attrControlGrp -edit -enable false maxVisSamplesField; } else if ($edgeAA == 0) { // Highest $enableMultiPixelFilter = true; attrControlGrp -edit -enable true contrastRedField; attrControlGrp -edit -enable true contrastGreenField; attrControlGrp -edit -enable true contrastBlueField; attrControlGrp -edit -enable true maxShadingSamplesField; attrControlGrp -edit -enable ($useBlur && !$blur2d) visSamplesField; attrControlGrp -edit -enable ($useBlur && !$blur2d) maxVisSamplesField; } if ($enableMultiPixelFilter) { $enableFilterAttrs = `getAttr ($rendQual[0] + ".useMultiPixelFilter")`; } attrControlGrp -edit -enable $enableMultiPixelFilter pixelCheck; optionMenuGrp -edit -enable $enableFilterAttrs pixelFilterMenu; attrControlGrp -edit -enable $enableFilterAttrs filterXField; attrControlGrp -edit -enable $enableFilterAttrs filterYField; setParent $oldParent; } global proc createRayTraceQuality (string $parent) // // Procedure Name: // createRayTraceQuality // // Description: // Creates the UI in the "Raytracing Quality" // expand/collapse section. // { setUITemplate -pushTemplate attributeEditorTemplate; setParentToSoftwareTab(); setParent $parent; string $rendQual[] = `listConnections defaultRenderGlobals.qual`; // If the UI is created already then reset the command with the correct // render quality + update the attribute values. // string $fullPath = `setParent -q` + "|rgRaytraceLayout"; if (`columnLayout -exists $fullPath`) { updateRaytraceQuality; return; } columnLayout -adjustableColumn true rgRaytraceLayout; string $attr = $rendQual[0] + ".enableRaytracing"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kRaytracing")) -attribute $attr -cc "updateRaytraceQuality" raytraceCheck; $attr = $rendQual[0] + ".reflections"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kReflections")) -attribute $attr reflectionsField; $attr = $rendQual[0] + ".refractions"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kRefractions")) -attribute $attr refractionsField; $attr = $rendQual[0] + ".shadows"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kShadows")) -attribute $attr shadowsField; $attr = $rendQual[0] + ".rayTraceBias"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kBias")) -attribute $attr rayTraceBiasField; setParent ..; setUITemplate -popTemplate; // Make sure the values are right updateRaytraceQuality; } global proc createMotionBlur (string $parent) // // Procedure Name: // createMotionBlur // // Description: // Creates the UI in the "Motion Blur" expand/collapse section. // { setUITemplate -pushTemplate attributeEditorTemplate; setParentToSoftwareTab(); setParent $parent; // If the UI is created already then just update attribute values. string $fullPath = `setParent -q`+ "|rgBlurLayout"; if (`columnLayout -exists $fullPath`) { updateMotionBlur; return; } columnLayout -adjustableColumn true rgBlurLayout; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kMotionBlur")) -attribute "defaultRenderGlobals.motionBlur" -cc "updateMotionBlur; updateRenderQuality;" blurCheck; radioButtonGrp -numberOfRadioButtons 1 -label (uiRes("m_createMayaSoftwareGlobalsTab.kMotionBlurType")) -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kDim2")) -onc "setAttr defaultRenderGlobals.motionBlurType 0" -data1 0 blurButton1; radioButtonGrp -numberOfRadioButtons 1 -shareCollection blurButton1 -label "" -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kDim3")) -onc "setAttr defaultRenderGlobals.motionBlurType 1" -data1 1 blurButton2; connectControl -index 1 blurButton1 defaultRenderGlobals.motionBlurType; connectControl -index 1 blurButton2 defaultRenderGlobals.motionBlurType; // Any time the motion blur type changes we also need to call // updateMotionBlur and updateRenderQuality. This is done through // a script job watching for an attribute change. // scriptJob -p $parent -ac "defaultRenderGlobals.motionBlurType" "updateMotionBlur; updateRenderQuality;"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kBlurFrame")) -attribute "defaultRenderGlobals.motionBlurByFrame" -hideMapButton true blurFrameField; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kBlurLength")) -attribute "defaultRenderGlobals.blurLength" -hideMapButton true blurLengthField; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kShutterOpenClose")) - attribute "defaultRenderGlobals.motionBlurUseShutter" - hideMapButton true -cc "updateMotionBlur; updateRenderQuality;" shutterOpenCloseField; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kShutterOpen")) - attribute "defaultRenderGlobals.motionBlurShutterOpen" - changeCommand "updateMotionBlur; updateRenderQuality;" - hideMapButton true shutterOpenField; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kShutterClose")) - attribute "defaultRenderGlobals.motionBlurShutterClose" - changeCommand "updateMotionBlur; updateRenderQuality;" - hideMapButton true shutterCloseField; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kBlurSharpness")) -attribute "defaultRenderGlobals.blurSharpness" -hideMapButton true blurSharpField; radioButtonGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kSmooth")) -numberOfRadioButtons 2 -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kAlpha")) -label2 (uiRes("m_createMayaSoftwareGlobalsTab.kColor")) -on1 "setAttr defaultRenderGlobals.smoothColor 0" -on2 "setAttr defaultRenderGlobals.smoothColor 1" blurSmoothRadio; scriptJob -p $parent -ac "defaultRenderGlobals.smoothColor" "updateMotionBlur"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kSmoothValue")) -attribute "defaultRenderGlobals.smoothValue" -hideMapButton true blurSmoothField; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kKeepMotionVectors")) -attribute "defaultRenderGlobals.keepMotionVector" blurVectorCheck; if(!`about -mac`){ attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kUseBlurMemoryLimit")) -attribute "defaultRenderGlobals.useBlur2DMemoryCap" -cc "updateMotionBlur" blurMemoryCapCheck; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kBlurMemoryLimit")) -attribute "defaultRenderGlobals.blur2DMemoryCap" -hideMapButton true blurMemoryCapField; } setParent ..; setUITemplate -popTemplate; // Make sure the values are right // updateMotionBlur; } global proc createRenderOptions (string $parent) // // Procedure Name: // createRenderOptions // // Description: // Creates the UI in the "Render Options" expand/collapse section. // { setUITemplate -pushTemplate attributeEditorTemplate; setParentToSoftwareTab(); setParent $parent; string $fullPath = `setParent -q`+ "|rgOptionsLayout"; if (`columnLayout -exists $fullPath`) { return; } columnLayout -adjustableColumn true rgOptionsLayout; // Post Processing // frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kPostProcessing")) -cll false -cl false; columnLayout -adjustableColumn true; attrNavigationControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kEnvironmentFog")) -at defaultRenderGlobals.fogGeometry envFogControl; if (`isTrue MayaCreatorExists`) { attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kApplyFogInPost")) -attribute "defaultRenderGlobals.applyFogInPost" -cc "attrControlGrp -edit -enable `getAttr defaultRenderGlobals.applyFogInPost` postFogBlurField" applyFogInPostCheck; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kPostFogBlur")) -attribute "defaultRenderGlobals.postFogBlur" -hideMapButton true -enable `getAttr defaultRenderGlobals.applyFogInPost` postFogBlurField; separator; } setParent ..; // from columnLayout setParent ..; // from frameLayout "Post Processing" // Cameras // frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kCamera")) -cll false -cl false; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kIgnoreFilmGate")) -attribute "defaultRenderGlobals.ignoreFilmGate" filmGateCheck; setParent ..; // from frameLayout "Camera" // Lights and Shadows // frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kLightsAndShadows")) -cll false -cl false; columnLayout -adjustableColumn true; optionMenuGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kShadowLinking")) mswShadowLinkingMenu; optionMenuGrp -edit -cc RGsetShadowLinking -cw 2 240 mswShadowLinkingMenu; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kObeyShadowLinking")) rgShadowsObeyShadowLinking; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kObeyLightLinking")) rgShadowsObeyLightLinking; menuItem -label (uiRes("m_createMayaSoftwareGlobalsTab.kIgnoreShadowLinking")) rgAllLightsShadow; if (`getAttr defaultRenderGlobals.shadowsObeyShadowLinking`) { optionMenuGrp -edit -select 1 mswShadowLinkingMenu; } else if (`getAttr defaultRenderGlobals.shadowsObeyLightLinking`) { optionMenuGrp -edit -select 2 mswShadowLinkingMenu; } else { optionMenuGrp -edit -select 3 mswShadowLinkingMenu; } attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kEnableDepthMaps")) -attribute "defaultRenderGlobals.enableDepthMaps" depthMapCheck; setParent ..; // from columnLayout setParent ..; // from frameLayout "Lights and Shadows" // Color/Compositing // frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kColorCompositing")) -cll false -cl false; columnLayout -adjustableColumn true; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kGammaCorrection")) -attribute "defaultRenderGlobals.gammaCorrection" -hideMapButton true gammaField; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kClipFinalShadedColor")) -attribute "defaultRenderGlobals.clipFinalShadedColor" clipCheck; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kJitterFinalColor")) -attribute "defaultRenderGlobals.jitterFinalColor" jitterColor; checkBoxGrp -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kPremultiply")) -cc "mayaSoftwarePremultiplyCtrlChanged" mayaSoftwarePremultiplyCtrl; scriptJob -p "mayaSoftwarePremultiplyCtrl" -ac "defaultRenderGlobals.composite" "updateMayaSoftwarePremultiplyCtrl"; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kPremultiplyThreshold")) -attribute "defaultRenderGlobals.compositeThreshold" -hideMapButton true premultiplyThresholdCtrl; setParent ..; // from columnLayout setParent ..; // from frameLayout "Color/Compositing" if( getenv("MAYA_BG_DEPTH_IMAGE") == "1" ) { // Background Image // frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kLayoutBackgroundImage")) -cll false -cl false; columnLayout -adjustableColumn true; checkBoxGrp -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kEnableBackgroundImage")) -cc "swBgImage_UiChanged bgImageEnable" swBgImageEnableCtrl; textFieldButtonGrp -en 0 -label (uiRes("m_createMayaSoftwareGlobalsTab.kBackgroundImage")) -annotation (uiRes("m_createMayaSoftwareGlobalsTab.kBackgroundImageAnnot")) -text "" -buttonLabel "..." -buttonCommand "swBgImage_PromptForFilename()" -changeCommand "swBgImage_UiChanged bgImageFileName" swBgImageFileCtrl; checkBoxGrp -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kUseFrameExtension")) -en 0 -changeCommand "swBgImage_UiChanged bgImageFrameExt" swBgImageFrameExtCtrl; checkBoxGrp -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kCompositeColorAlpha")) -en 0 -changeCommand "swBgImage_UiChanged bgImageComp" swBgImageCompCtrl; checkBoxGrp -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kInputPremultiplied")) -en 0 -changeCommand "swBgImage_UiChanged bgImagePremult" swBgImagePremultCtrl; intFieldGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kOversample")) -en 0 -v1 1 -changeCommand "swBgImage_UiChanged bgImageOversample" swBgImageOversampleCtrl; checkBoxGrp -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kUseSeparateDepthMap")) -en 0 -changeCommand "swBgImage_UiChanged bgImageSepDepthEnable" swBgImageSepDepthEnableCtrl; textFieldButtonGrp -en 0 -label (uiRes("m_createMayaSoftwareGlobalsTab.kBackgroundDepth")) -annotation (uiRes("m_createMayaSoftwareGlobalsTab.kBackgroundDepthAnnot")) -text "" -buttonLabel "..." -buttonCommand "swBgImage_PromptForDepthFilename()" -changeCommand "swBgImage_UiChanged bgImageSepDepthFileName" swBgImageSepDepthFileCtrl; intFieldGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kDepthOversample")) -en 0 -v1 1 -changeCommand "swBgImage_UiChanged bgImageSepDepthOversample" swBgImageSepDepthOversampleCtrl; swBgImage_Init(); } setParent ..; // from frameLayout "Background Image" // update the premultiply controls // updateMayaSoftwarePremultiplyCtrl(); setParent ..; setUITemplate -popTemplate; } //============================================================================= // // Support code for Background Image render options. // //============================================================================= global proc swBgImage_Init() { if( swBgImage_AttrsExist() ) { swBgImage_InitScriptJobs(); swBgImage_UpdateUi(); } } global proc swBgImage_InitScriptJobs() { scriptJob -ac "defaultRenderGlobals.bgImageEnable" "swBgImage_UpdateUi()"; scriptJob -ac "defaultRenderGlobals.bgImageFileName" "swBgImage_UpdateUi()"; scriptJob -ac "defaultRenderGlobals.bgImageFrameExt" "swBgImage_UpdateUi()"; scriptJob -ac "defaultRenderGlobals.bgImageComp" "swBgImage_UpdateUi()"; } global proc swBgImage_EnableSepDepthUi( int $on ) { textFieldButtonGrp -e -en $on swBgImageSepDepthFileCtrl; intFieldGrp -e -en $on swBgImageSepDepthOversampleCtrl; } global proc swBgImage_EnableUi( int $on ) { textFieldButtonGrp -e -en $on swBgImageFileCtrl; checkBoxGrp -e -en $on swBgImageFrameExtCtrl; checkBoxGrp -e -en $on swBgImageCompCtrl; checkBoxGrp -e -en $on swBgImagePremultCtrl; intFieldGrp -e -en $on swBgImageOversampleCtrl; checkBoxGrp -e -en $on swBgImageSepDepthEnableCtrl; swBgImage_EnableSepDepthUi( `checkBoxGrp -q -v1 swBgImageSepDepthEnableCtrl` && `checkBoxGrp -q -v1 swBgImageEnableCtrl` ); } global proc swBgImage_UiChanged( string $attr ) { // Ensure that we are updating the correct UI if multiple // instances exist // string $oldParent = `setParent -query`; setParentToSoftwareTab(); if( $attr == "bgImageEnable" ) { int $enabled = `checkBoxGrp -q -v1 swBgImageEnableCtrl`; if( $enabled ) { swBgImage_AddAttrs(); swBgImage_InitScriptJobs(); } swBgImage_EnableUi($enabled); } else if( $attr == "bgImageSepDepthEnable" ) { int $enabled = `checkBoxGrp -q -v1 swBgImageSepDepthEnableCtrl`; swBgImage_EnableSepDepthUi($enabled); } setAttr defaultRenderGlobals.bgImageEnable `checkBoxGrp -q -v1 swBgImageEnableCtrl`; setAttr defaultRenderGlobals.bgImageFileName -type "string" `textFieldButtonGrp -q -text swBgImageFileCtrl`; setAttr defaultRenderGlobals.bgImageFrameExt `checkBoxGrp -q -v1 swBgImageFrameExtCtrl`; setAttr defaultRenderGlobals.bgImageComp `checkBoxGrp -q -v1 swBgImageCompCtrl`; setAttr defaultRenderGlobals.bgImagePremult `checkBoxGrp -q -v1 swBgImagePremultCtrl`; setAttr defaultRenderGlobals.bgImageOversample `intFieldGrp -q -v1 swBgImageOversampleCtrl`; setAttr defaultRenderGlobals.bgImageSepDepthEnable `checkBoxGrp -q -v1 swBgImageSepDepthEnableCtrl`; setAttr defaultRenderGlobals.bgImageSepDepthFile -type "string" `textFieldButtonGrp -q -text swBgImageSepDepthFileCtrl`; setAttr defaultRenderGlobals.bgImageSepDepthOversample `intFieldGrp -q -v1 swBgImageSepDepthOversampleCtrl`; setParent $oldParent; } global proc swBgImage_UpdateUi() { checkBoxGrp -e -v1 `getAttr defaultRenderGlobals.bgImageEnable` swBgImageEnableCtrl; textFieldButtonGrp -e -text `getAttr defaultRenderGlobals.bgImageFileName` swBgImageFileCtrl; checkBoxGrp -e -v1 `getAttr defaultRenderGlobals.bgImageFrameExt` swBgImageFrameExtCtrl; checkBoxGrp -e -v1 `getAttr defaultRenderGlobals.bgImageComp` swBgImageCompCtrl; checkBoxGrp -e -v1 `getAttr defaultRenderGlobals.bgImagePremult` swBgImagePremultCtrl; intFieldGrp -e -v1 `getAttr defaultRenderGlobals.bgImageOversample` swBgImageOversampleCtrl; checkBoxGrp -e -v1 `getAttr defaultRenderGlobals.bgImageSepDepthEnable` swBgImageSepDepthEnableCtrl; textFieldButtonGrp -e -text `getAttr defaultRenderGlobals.bgImageSepDepthFile` swBgImageSepDepthFileCtrl; intFieldGrp -e -v1 `getAttr defaultRenderGlobals.bgImageSepDepthOversample` swBgImageSepDepthOversampleCtrl; swBgImage_EnableUi( `getAttr defaultRenderGlobals.bgImageEnable` ); } global proc int swBgImage_AttrsExist() { if( `attributeQuery -ex -n defaultRenderGlobals bgImageFileName` ) { swBgImage_AddAttrs(); return true; } else { return false; } } global proc swBgImage_AddAttrs() { if( !`attributeQuery -ex -n defaultRenderGlobals bgImageFileName` ) { addAttr -dt "string" -ln "bgImageFileName" defaultRenderGlobals; } if( !`attributeQuery -ex -n defaultRenderGlobals bgImageEnable` ) { addAttr -at "bool" -ln "bgImageEnable" defaultRenderGlobals; } if( !`attributeQuery -ex -n defaultRenderGlobals bgImageComp` ) { addAttr -at "bool" -ln "bgImageComp" defaultRenderGlobals; } if( !`attributeQuery -ex -n defaultRenderGlobals bgImageFrameExt` ) { addAttr -at "bool" -ln "bgImageFrameExt" defaultRenderGlobals; } if( !`attributeQuery -ex -n defaultRenderGlobals bgImagePremult` ) { addAttr -at "bool" -ln "bgImagePremult" defaultRenderGlobals; } if( !`attributeQuery -ex -n defaultRenderGlobals bgImageOversample` ) { addAttr -at "long" -dv 1 -min 1 -ln "bgImageOversample" defaultRenderGlobals; } if( !`attributeQuery -ex -n defaultRenderGlobals bgImageSepDepthEnable` ) { addAttr -at "bool" -ln "bgImageSepDepthEnable" defaultRenderGlobals; } if( !`attributeQuery -ex -n defaultRenderGlobals bgImageSepDepthFile` ) { addAttr -dt "string" -ln "bgImageSepDepthFile" defaultRenderGlobals; } if( !`attributeQuery -ex -n defaultRenderGlobals bgImageSepDepthOversample` ) { addAttr -at "long" -dv 1 -min 1 -ln "bgImageSepDepthOversample" defaultRenderGlobals; } } global proc swBgImage_PromptForFilename() { // Ensure that we are updating the correct UI if multiple // instances exist // string $oldParent = `setParent -query`; setParentToSoftwareTab(); string $dirMask = `workspace -q -rd`; string $sourceImg = `workspace -fileRuleEntry sourceImages`; if (size($sourceImg) > 0) { $dirMask += $sourceImg; } else { $sourceImg = `workspace -fre sourceImages`; if (size($sourceImg) > 0) { $dirMask += $sourceImg; } else if (`file -q -ex ($dirMask+"sourceimages")`) { $dirMask += "sourceImages"; } } $dirMask += ("/*"); string $bgFile = `fileDialog -dm $dirMask`; if( $bgFile != "" ) { textFieldButtonGrp -e -text $bgFile swBgImageFileCtrl; swBgImage_UiChanged( "bgImageFileName" ); } setParent $oldParent; } global proc swBgImage_PromptForDepthFilename() { // Ensure that we are updating the correct UI if multiple // instances exist // string $oldParent = `setParent -query`; setParentToSoftwareTab(); string $dirMask = `workspace -q -rd`; string $sourceImg = `workspace -fileRuleEntry sourceImages`; if (size($sourceImg) > 0) { $dirMask += $sourceImg; } else { $sourceImg = `workspace -fre sourceImages`; if (size($sourceImg) > 0) { $dirMask += $sourceImg; } else if (`file -q -ex ($dirMask+"sourceimages")`) { $dirMask += "sourceImages"; } } $dirMask += ("/*"); string $bgFile = `fileDialog -dm $dirMask`; if( $bgFile != "" ) { textFieldButtonGrp -e -text $bgFile swBgImageSepDepthFileCtrl; swBgImage_UiChanged( "bgImageSepDepthFileName" ); } setParent $oldParent; } //============================================================================= // End Background Image render option support //============================================================================= // Description: This procedure is called when the "Premultiply" control // is changed by the user. // global proc mayaSoftwarePremultiplyCtrlChanged() { string $oldParent = `setParent -query`; setParentToSoftwareTab(); int $premultiply = `checkBoxGrp -query -value1 mayaSoftwarePremultiplyCtrl`; int $composite = !$premultiply; setAttr defaultRenderGlobals.composite $composite; attrControlGrp -edit -enable $composite premultiplyThresholdCtrl; setParent $oldParent; } // Description: This procedure is called when the attribute // renderGlobals.composite // is changed and we need to update the "Premultiply" control // to reflect this change. // global proc updateMayaSoftwarePremultiplyCtrl() { string $oldParent = `setParent -query`; setParentToSoftwareTab(); int $composite = `getAttr defaultRenderGlobals.composite`; int $premultiply = !$composite; checkBoxGrp -edit -value1 $premultiply mayaSoftwarePremultiplyCtrl; attrControlGrp -edit -enable $composite premultiplyThresholdCtrl; setParent $oldParent; } global proc createPerformanceOptions (string $parent) // // Procedure Name: // createPerformanceOptions // // Description: // Creates the UI in the "Memory and Performance Options" // expand/collapse section. // { setUITemplate -pushTemplate attributeEditorTemplate; setParentToSoftwareTab(); setParent $parent; // If the UI is created already then just update the attribute values. // string $fullPath = `setParent -q`+ "|rgPerformanceLayout"; if (`columnLayout -exists $fullPath`) { return; } columnLayout -adjustableColumn true rgPerformanceLayout; frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kTessellation")) -labelVisible true -collapsable false -collapse true; columnLayout -adjustableColumn true; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kUseFileCache")) -attribute "defaultRenderGlobals.useFileCache" cacheCheck; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kOptimizeInstances")) -attribute "defaultRenderGlobals.optimizeInstances" optCheck; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kReuseTessellations")) -attribute "defaultRenderGlobals.reuseTessellations" reuseCheck; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kUseDisplacementBoundingBox")) -attribute "defaultRenderGlobals.useDisplacementBoundingBox" dispBBCheck; setParent ..; setParent ..; frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kRayTracing")) -labelVisible true -collapsable false -collapse true; columnLayout -adjustableColumn true; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kRecursionDepth")) -attribute "defaultRenderGlobals.recursionDepth" -hideMapButton true recursionDepth; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kLeafPrimitives")) -attribute "defaultRenderGlobals.leafPrimitives" -hideMapButton true leafPrim; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kSubdivisionPower")) -attribute "defaultRenderGlobals.subdivisionPower" -hideMapButton true subPower; setParent ..; setParent ..; frameLayout -label (uiRes("m_createMayaSoftwareGlobalsTab.kMultiProcessing")) -labelVisible true -collapsable false -collapse true; columnLayout -adjustableColumn true; checkBoxGrp -numberOfCheckBoxes 1 -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kUseAllCPUs")) -cc "setAttr defaultRenderGlobals.numCpusToUse (#1 ? 0 : 1)" numCpusCheckBox; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kCPUsToUse")) -attribute "defaultRenderGlobals.numCpusToUse" -cc "updateMayaSoftwareNumCpusSlider(`getAttr defaultRenderGlobals.numCpusToUse`);" -hideMapButton true numCpusSlider; updateMayaSoftwareNumCpusSlider(`getAttr defaultRenderGlobals.numCpusToUse`); setParent ..; setParent ..; setParent ..; setUITemplate -popTemplate; } global proc createIPROptions (string $parent) // // Procedure Name: // createIPROptions // // Description: // Creates the UI in the "IPR Render Globals" // expand/collapse section. // { setUITemplate -pushTemplate attributeEditorTemplate; setParentToSoftwareTab(); setParent $parent; // If the UI is created already then just update the attribute values. string $fullPath = `setParent -q` + "|rgIPRLayout"; if (`columnLayout -exists $fullPath`) { updateIPROptions; return; } columnLayout -adjustableColumn true rgIPRLayout; checkBoxGrp -numberOfCheckBoxes 1 -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kRenderShadingLightingAndGlow")) -cc "updateIPRShadingOptionVar" iprShadingCheck; checkBoxGrp -numberOfCheckBoxes 1 -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kRenderShadowMaps")) -cc "updateIPRShadowOptionVar" iprShadowCheck; checkBoxGrp -numberOfCheckBoxes 1 -label1 (uiRes("m_createMayaSoftwareGlobalsTab.kRender2DMotionBlur")) -cc "updateIPR2dBlurOptionVar" ipr2DBlurCheck; setParent ..; setUITemplate -popTemplate; // Make sure the values are right // updateIPROptions; } global proc int depthFileSelCB( string $filename, string $fileType ) { // Depth file selection callback function. textFieldGrp -e -fileName $filename depthStrokesCheck; return true; } global proc openDepthFileBrowser() { // Ensure that we are updating the correct UI if multiple // instances exist // string $oldParent = `setParent -query`; setParentToSoftwareTab(); fileBrowser "depthFileSelCB" (uiRes("m_createMayaSoftwareGlobalsTab.kSelectDepthFile")) "" 0; setRenderGlobalsDepthFile; setParent $oldParent; } global proc createUrchinOptions (string $parent) // // Procedure Name: // createUrchinOptions // // Description: // Creates the UI in the "Paint Effects Rendering Options" // expand/collapse section. // { setUITemplate -pushTemplate attributeEditorTemplate; global string $gDepthFileBrowse; setParentToSoftwareTab(); setParent $parent; // If the UI is created already then just update the attribute values. string $fullPath = `setParent -q` + "|rgUrchinLayout"; if (`columnLayout -exists $fullPath`) { updateUrchinOptions; return; } columnLayout -adjustableColumn true rgUrchinLayout; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kEnableStrokeRendering")) -attribute "defaultRenderGlobals.enableStrokeRender" -cc "updateUrchinOptions;" enableStrokesCheck; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kPaintEffectsOversample")) -attribute "defaultRenderGlobals.oversamplePaintEffects" -cc "updateUrchinOptions;" oversamplePaintEffectsCheck; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kOversamplePostFilter")) -attribute "defaultRenderGlobals.oversamplePfxPostFilter" -changeCommand "updateUrchinOptions;" oversamplePfxPostFilterCheck; attrControlGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kOnlyRenderStrokes")) -attribute "defaultRenderGlobals.onlyRenderStrokes" -cc "updateUrchinOptions;" onlyStrokesCheck; rowLayout -numberOfColumns 2 -cw 1 345 -cw 2 40; textFieldGrp -label (uiRes("m_createMayaSoftwareGlobalsTab.kReadThisDepthFile")) -cc "setRenderGlobalsDepthFile" depthStrokesCheck; connectControl -index 1 depthStrokesCheck defaultRenderGlobals.strokesDepthFile; $gDepthFileBrowse = `symbolButton -c "openDepthFileBrowser" -i "navButtonBrowse.png" -en false`; setParent ..; setParent ..; setUITemplate -popTemplate; // Make sure the values are right // updateUrchinOptions; } // Description: This procedure is called when a particular // quality preset is chosen in the render quality frame. // It sets some attributes according to the chosen quality preset. // global proc RGsetDefaultQuality () { string $oldParent = `setParent -query`; setParentToSoftwareTab(); string $rendQual[] = `listConnections defaultRenderGlobals.qual`; string $curr = `optionMenuGrp -q -v qualityPresetMenu`; if ($curr == (uiRes("m_createMayaSoftwareGlobalsTab.kPreviewQuality"))) { setAttr ($rendQual[0] + ".edgeAntiAliasing") 3; setAttr ($rendQual[0] + ".useMultiPixelFilter") 0; setAttr ($rendQual[0] + ".shadingSamples") 1; setAttr ($rendQual[0] + ".maxShadingSamples") 1; setAttr ($rendQual[0] + ".visibilitySamples") 1; setAttr ($rendQual[0] + ".maxVisibilitySamples") 4; setAttr ($rendQual[0] + ".redThreshold") 0.4; setAttr ($rendQual[0] + ".greenThreshold") 0.3; setAttr ($rendQual[0] + ".blueThreshold") 0.6; setAttr ($rendQual[0] + ".reflections") 1; setAttr ($rendQual[0] + ".refractions") 6; setAttr ($rendQual[0] + ".shadows") 2; } else if ($curr == (uiRes("m_createMayaSoftwareGlobalsTab.kIntermediateQuality"))) { setAttr ($rendQual[0] + ".edgeAntiAliasing") 0; setAttr ($rendQual[0] + ".useMultiPixelFilter") 0; setAttr ($rendQual[0] + ".shadingSamples") 1; setAttr ($rendQual[0] + ".maxShadingSamples") 8; setAttr ($rendQual[0] + ".visibilitySamples") 1; setAttr ($rendQual[0] + ".maxVisibilitySamples") 4; setAttr ($rendQual[0] + ".redThreshold") 0.4; setAttr ($rendQual[0] + ".greenThreshold") 0.3; setAttr ($rendQual[0] + ".blueThreshold") 0.6; setAttr ($rendQual[0] + ".reflections") 1; setAttr ($rendQual[0] + ".refractions") 6; setAttr ($rendQual[0] + ".shadows") 2; } else if ($curr == (uiRes("m_createMayaSoftwareGlobalsTab.kProductionQuality"))) { setAttr ($rendQual[0] + ".edgeAntiAliasing") 0; setAttr ($rendQual[0] + ".useMultiPixelFilter") 1; setAttr ($rendQual[0] + ".shadingSamples") 2; setAttr ($rendQual[0] + ".maxShadingSamples") 8; setAttr ($rendQual[0] + ".visibilitySamples") 1; setAttr ($rendQual[0] + ".maxVisibilitySamples") 4; setAttr ($rendQual[0] + ".redThreshold") 0.4; setAttr ($rendQual[0] + ".greenThreshold") 0.3; setAttr ($rendQual[0] + ".blueThreshold") 0.6; setAttr ($rendQual[0] + ".reflections") 10; setAttr ($rendQual[0] + ".refractions") 10; setAttr ($rendQual[0] + ".shadows") 10; } else if ($curr == (uiRes("m_createMayaSoftwareGlobalsTab.kContrastSensitiveProduction"))) { setAttr ($rendQual[0] + ".edgeAntiAliasing") 0; setAttr ($rendQual[0] + ".useMultiPixelFilter") 1; setAttr ($rendQual[0] + ".shadingSamples") 2; setAttr ($rendQual[0] + ".maxShadingSamples") 8; setAttr ($rendQual[0] + ".visibilitySamples") 1; setAttr ($rendQual[0] + ".maxVisibilitySamples") 4; setAttr ($rendQual[0] + ".redThreshold") 0.2; setAttr ($rendQual[0] + ".greenThreshold") 0.15; setAttr ($rendQual[0] + ".blueThreshold") 0.3; setAttr ($rendQual[0] + ".reflections") 10; setAttr ($rendQual[0] + ".refractions") 10; setAttr ($rendQual[0] + ".shadows") 10; } else if ($curr == (uiRes("m_createMayaSoftwareGlobalsTab.kMotionBlurProduction"))) { setAttr ($rendQual[0] + ".edgeAntiAliasing") 0; setAttr ($rendQual[0] + ".useMultiPixelFilter") 1; setAttr ($rendQual[0] + ".shadingSamples") 3; setAttr ($rendQual[0] + ".maxShadingSamples") 8; setAttr ($rendQual[0] + ".visibilitySamples") 1; setAttr ($rendQual[0] + ".maxVisibilitySamples") 4; setAttr ($rendQual[0] + ".redThreshold") 0.4; setAttr ($rendQual[0] + ".greenThreshold") 0.3; setAttr ($rendQual[0] + ".blueThreshold") 0.6; setAttr ($rendQual[0] + ".reflections") 10; setAttr ($rendQual[0] + ".refractions") 10; setAttr ($rendQual[0] + ".shadows") 10; } updateRenderQuality; if (`columnLayout -exists rgRaytraceLayout`) updateRaytraceQuality; setParent $oldParent; } // Description: Sets shadow linking according to changes made in the // drop-down menu. global proc RGsetShadowLinking () { int $shadowLinkType = `optionMenuGrp -query -select mswShadowLinkingMenu`; if ($shadowLinkType == 1) { setAttr "defaultRenderGlobals.shadowsObeyShadowLinking" true; setAttr "defaultRenderGlobals.shadowsObeyLightLinking" false; } else if ($shadowLinkType == 2) { setAttr "defaultRenderGlobals.shadowsObeyShadowLinking" false; setAttr "defaultRenderGlobals.shadowsObeyLightLinking" true; } else { setAttr "defaultRenderGlobals.shadowsObeyShadowLinking" false; setAttr "defaultRenderGlobals.shadowsObeyLightLinking" false; } } global proc updateFieldOptions () // // Procedure Name: // updateFieldOptions // // Description: // Gets the real values from the nodes and sets the UI based // on these values. This procedure updates all of the field // values. // { string $oldParent = `setParent -query`; setParentToSoftwareTab(); int $fieldType = `getAttr defaultResolution.fields` + 1; int $useFields = ($fieldType != 1); int $autoInterlace = ($fieldType == 4); // Because of 123444, the ordering of the menu and the actual // saved fields values are not the same, which is why the // below convoluted code. // switch ($fieldType) { case 1: optionMenuGrp -edit -select 1 fieldMenu; break; case 2: case 3: optionMenuGrp -edit -select ($fieldType + 2) fieldMenu; break; case 4: case 5: optionMenuGrp -edit -select ($fieldType - 2) fieldMenu; break; } optionMenuGrp -edit -enable $useFields fieldDominanceMenu; int $oddFieldFirst = `getAttr defaultResolution.oddFieldFirst`; int $whichDominance = $oddFieldFirst ? 1 : 2; optionMenuGrp -edit -sl $whichDominance fieldDominanceMenu; if ($fieldType == 1 || $fieldType == 4) radioButtonGrp -edit -select (`getAttr defaultResolution.zerothScanline` + 1) -enable 0 scanlineButtons; else radioButtonGrp -edit -select (`getAttr defaultResolution.zerothScanline` + 1) -enable 1 scanlineButtons; int $useCustom = 0; if (`getAttr "defaultRenderGlobals.fieldExtControl"` == 1) radioButtonGrp -edit -select 1 fieldButton1; else if (`getAttr "defaultRenderGlobals.fieldExtControl"` == 0) radioButtonGrp -edit -select 1 fieldButton2; else { radioButtonGrp -edit -select 1 fieldButton3; $useCustom = 1; } radioButtonGrp -edit -enable ($useFields && !$autoInterlace) fieldButton1; radioButtonGrp -edit -enable ($useFields && !$autoInterlace) fieldButton2; radioButtonGrp -edit -enable ($useFields && !$autoInterlace) fieldButton3; textFieldGrp -edit -text `getAttr "defaultRenderGlobals.oddFieldExt"` -enable ($useFields && $useCustom) oddFieldExt; textFieldGrp -edit -text `getAttr "defaultRenderGlobals.evenFieldExt"` -enable ($useFields && $useCustom) evenFieldExt; setParent $oldParent; } global proc changeFieldOptions () // // Procedure Name: // changeFieldOptions // // Description: // This procedure is called when the user changes any of the // values for fields. It sets the internal representation // and then updates the example to show the changes. // { string $oldParent = `setParent -query`; setParentToSoftwareTab(); // Note that we stored the fields values internally different // from what's presented in the menu. That is why the below // convoluted case statement. Sorry - see 123444. int $realFieldsValue = (`optionMenuGrp -q -sl fieldMenu` - 1); switch ($realFieldsValue) { case 0: setAttr "defaultResolution.fields" 0; break; case 1: case 2: setAttr "defaultResolution.fields" ($realFieldsValue + 2); break; case 3: case 4: setAttr "defaultResolution.fields" ($realFieldsValue - 2); break; } int $whichDominance = `optionMenuGrp -q -sl fieldDominanceMenu`; if ($whichDominance == 1) { setAttr "defaultResolution.oddFieldFirst" true; } else { setAttr "defaultResolution.oddFieldFirst" false; } setAttr "defaultResolution.zerothScanline" (`radioButtonGrp -q -sl scanlineButtons` -1); if (`radioButtonGrp -q -sl fieldButton1`) { setAttr "defaultRenderGlobals.fieldExtControl" 1; } else if (`radioButtonGrp -q -sl fieldButton2`) { setAttr "defaultRenderGlobals.fieldExtControl" 0; } else { setAttr "defaultRenderGlobals.fieldExtControl" 2; } string $test = `textFieldGrp -q -text oddFieldExt`; string $fieldExtensions = (uiRes("m_createMayaSoftwareGlobalsTab.kFieldExtensionsError")); if (size($test) > 1) { catch (error ($fieldExtensions)); } else { setAttr -type "string" "defaultRenderGlobals.oddFieldExt" $test; } $test = `textFieldGrp -q -text evenFieldExt`; if (size($test) > 1) { catch (error ($fieldExtensions)); } else { setAttr -type "string" "defaultRenderGlobals.evenFieldExt" $test; } updateFieldOptions; updateMayaSoftwareTargetFilePreview; setParent $oldParent; } global proc updateRaytraceQuality () // // Procedure Name: // updateRaytraceQuality // // Description: // Gets the real values from the nodes and sets the UI based // on these values. This procedure updates all of the quality // values. // { string $oldParent = `setParent -query`; setParentToSoftwareTab(); string $rendQual[] = `listConnections defaultRenderGlobals.qual`; int $useRT = `getAttr ($rendQual[0] + ".enableRaytracing")`; attrControlGrp -edit -enable $useRT reflectionsField; attrControlGrp -edit -enable $useRT refractionsField; attrControlGrp -edit -enable $useRT shadowsField; attrControlGrp -edit -enable $useRT rayTraceBiasField; setParent $oldParent; } global proc updateMotionBlur () // // Procedure Name: // updateMotionBlur // // Description: // Gets the real values from the nodes and sets the UI based // on these values. This procedure updates all of the motion // blur values. // { string $oldParent = `setParent -query`; setParentToSoftwareTab(); int $useBlur = `getAttr defaultRenderGlobals.motionBlur`; int $blur2d = (`getAttr defaultRenderGlobals.motionBlurType` == 0); if ($blur2d) { radioButtonGrp -edit -select 1 blurButton1; } else { radioButtonGrp -edit -select 1 blurButton2; } // change shutter open/close settings // first, uncheck using the shutter open/close feature attrControlGrp -edit -enable $useBlur shutterOpenCloseField; int $useShutterOpenClose = `getAttr defaultRenderGlobals.motionBlurUseShutter`; // then, en/disable the actual open/close values based on the above value attrControlGrp -edit -enable ($useBlur && $useShutterOpenClose) shutterOpenField; attrControlGrp -edit -enable ($useBlur && $useShutterOpenClose) shutterCloseField; float $shutterOpen = `getAttr defaultRenderGlobals.motionBlurShutterOpen`; float $shutterClose = `getAttr defaultRenderGlobals.motionBlurShutterClose`; if ($shutterClose < $shutterOpen) { // Default is to have the shutter open for an entire frame $shutterClose = $shutterOpen + 1.0; setAttr defaultRenderGlobals.motionBlurShutterClose $shutterClose; } radioButtonGrp -edit -enable $useBlur blurButton1; radioButtonGrp -edit -enable $useBlur blurButton2; int $keepMotionVector = (`getAttr defaultRenderGlobals.keepMotionVector` == 1); if ($useBlur && $blur2d && $keepMotionVector) { int $imageFormatNum = `getAttr defaultRenderGlobals.imageFormat`; // Only allow iff and iff16 if (($imageFormatNum != 7) && ($imageFormatNum != 10)) { warning (uiRes("m_createMayaSoftwareGlobalsTab.kNonIFFImageFormatNotSupported")); // Set globals imageFormat to Maya IFF setAttr defaultRenderGlobals.imageFormat 7; } } attrControlGrp -edit -enable $useBlur blurFrameField; attrControlGrp -edit -enable ($useBlur && $blur2d) blurLengthField; attrControlGrp -edit -enable ($useBlur && $blur2d) blurSharpField; attrControlGrp -edit -enable ($useBlur && $blur2d) blurSmoothField; int $smoothColor = `getAttr defaultRenderGlobals.smoothColor`; radioButtonGrp -edit -enable ($useBlur && $blur2d) -select ($smoothColor + 1) blurSmoothRadio; attrControlGrp -edit -enable ($useBlur && $blur2d) blurVectorCheck; if(!`about -mac`){ int $useMemoryCap = `getAttr defaultRenderGlobals.useBlur2DMemoryCap`; attrControlGrp -edit -enable ($useBlur && $blur2d) blurMemoryCapCheck; attrControlGrp -edit -enable ($useBlur && $blur2d && $useMemoryCap) blurMemoryCapField; } setParent $oldParent; } global proc updateMayaSoftwareNumCpusSlider(int $value) // // Procedure Name: // updateMayaSoftwareNumCpusSlider // // Description: // When the controls for the number of CPUs are updated this // procedure will be invoked. The check box, field and slider // will be update to reflect the new value. If the value is // zero, all CPUs will be used. // { string $oldParent = `setParent -query`; setParentToSoftwareTab(); if ($value == 0) { checkBoxGrp -e -value1 true numCpusCheckBox; attrControlGrp -e -enable false numCpusSlider; } else { checkBoxGrp -e -value1 false numCpusCheckBox; attrControlGrp -e -enable true numCpusSlider; if (`iprEngine -query -exists defaultIprEngine`) { warning -showLineNumber false (uiRes("m_createMayaSoftwareGlobalsTab.kIPRClosed")); } } setParent $oldParent; } global proc updateIPROptions () // // Procedure Name: // updateIPROptions // // Description: // Gets the real values from the option vars and sets the UI based // on these values. This procedure updates all of the IPR // values. // { string $oldParent = `setParent -query`; setParentToSoftwareTab(); int $doShading = `optionVar -query iprRenderShading`; checkBoxGrp -edit -v1 $doShading iprShadingCheck; checkBoxGrp -edit -v1 `optionVar -query iprRenderShadowMaps` -enable $doShading iprShadowCheck; checkBoxGrp -edit -v1 `optionVar -query iprRenderMotionBlur` ipr2DBlurCheck; setParent $oldParent; } // Description: This procedure is used to update the IPR Shading Option // control. // global proc updateIPRShadingOptionVar() { string $oldParent = `setParent -query`; setParentToSoftwareTab(); int $doShading = `checkBoxGrp -q -v1 iprShadingCheck`; optionVar -intValue iprRenderShading $doShading; checkBoxGrp -edit -enable $doShading iprShadowCheck; setParent $oldParent; } // Description: This procedure is used to update the IPR Shadow Option // control. // global proc updateIPRShadowOptionVar() { string $oldParent = `setParent -query`; setParentToSoftwareTab(); int $doShadows = `checkBoxGrp -q -v1 iprShadowCheck`; optionVar -intValue iprRenderShadowMaps $doShadows; setParent $oldParent; } // Description: This procedure is used to update the 2D Blur Option // control. // global proc updateIPR2dBlurOptionVar() { string $oldParent = `setParent -query`; setParentToSoftwareTab(); int $doBlur = `checkBoxGrp -q -v1 ipr2DBlurCheck`; optionVar -intValue iprRenderMotionBlur $doBlur; setParent $oldParent; } global proc updateUrchinOptions () // // Procedure Name: // updateUrchinOptions // // Description: // Gets the real values from the nodes and sets the UI based // on these values. This procedure updates all of the memory // and performance values. I guess hard-coding the render globals // name is okay until we handle multiple nodes, and since every // other routine in this file makes that assumption, so will I. // { string $oldParent = `setParent -query`; setParentToSoftwareTab(); global string $gDepthFileBrowse; string $strokesFile = `getAttr defaultRenderGlobals.strokesDepthFile`; textFieldGrp -edit -fileName $strokesFile depthStrokesCheck; // Now update the UI greyed/enabled state. int $value1 = `getAttr defaultRenderGlobals.enableStrokeRender`; if ($value1 == 1) { int $value2 = `getAttr defaultRenderGlobals.onlyRenderStrokes`; int $value3 = `getAttr defaultRenderGlobals.oversamplePaintEffects`; if ($value2 == 1) { textFieldGrp -edit -en true depthStrokesCheck; symbolButton -edit -en true $gDepthFileBrowse; } else { textFieldGrp -edit -en false depthStrokesCheck; symbolButton -edit -en false $gDepthFileBrowse; } if ($value3 == 1) { attrControlGrp -edit -enable true oversamplePfxPostFilterCheck; } else { attrControlGrp -edit -enable false oversamplePfxPostFilterCheck; } attrControlGrp -edit -enable true onlyStrokesCheck; attrControlGrp -edit -enable true oversamplePaintEffectsCheck; } else { textFieldGrp -edit -en false depthStrokesCheck; attrControlGrp -edit -enable false onlyStrokesCheck; attrControlGrp -edit -enable false oversamplePaintEffectsCheck; attrControlGrp -edit -enable false oversamplePfxPostFilterCheck; } setParent $oldParent; } // Description: This procedure is called to set the // defaultRenderGlobals.strokeDepthFile value. // global proc setRenderGlobalsDepthFile() { setAttr defaultRenderGlobals.strokesDepthFile -type "string" `textFieldGrp -q -fileName depthStrokesCheck`; } // Description: This procedure is called to update all the frames // in the mayaSoftware software render globals tab. // global proc updateMayaSoftwareGlobalsTab() { string $oldParent = `setParent -query`; setParentToSoftwareTab(); updateMayaSoftwareTargetFilePreview; if (`frameLayout -q -cl mayaSoftwareQualityFrame` == 0) { updateRenderQuality; } if (`frameLayout -q -cl rgRayTraceFrame` == 0) { updateRaytraceQuality; } if (`frameLayout -q -cl rgFieldOptionsFrame` == 0) { updateFieldOptions; } if (`frameLayout -q -cl rgBlurFrame` == 0) { updateMotionBlur; } if (`frameLayout -q -cl rgIPRFrame` == 0) { updateIPROptions; } if (`isTrue MayaCreatorExists`) { if (`frameLayout -q -cl rgUrchinFrame` == 0) { updateUrchinOptions; } } setParent $oldParent; }