// =========================================================================== // 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. // =========================================================================== // // // Creation Date: December 2004 // // Description: // Option tool property window for BlendShape Paint Weight tool. // // Procedure Name: // artAttrBlendShapeProperties // // Description: // Initialize the UI for BlendShape Paint Weight tool. // // Input Arguments: // // Return Value: // None. // proc artBlendShapeCreateOperFrame( string $parent, string $currTool ) // // Custom UI for Paint BlendShape Weights tool. // { // // Target object // columnLayout; rowColumnLayout -nc 3 -cw 1 10 -cw 2 80 -cw 3 250; separator -h 10 -style "none"; columnLayout; setParent ..; textScrollList -w 240 -nr 7 -ams false blendShapeTargetList; setParent ..; rowColumnLayout -nc 2 -cw 1 90 -cw 2 250; separator -h 10 -style "none"; button -label (uiRes("m_artAttrBlendShapeProperties.kKeySelectedTargetWeights")) -w 100 -c "artKeyFrameTargetWtsAttr" artKeyFrameTargetWtsButton; setParent ..; setParent ..; } // ======================================================= // Main Procedure. // ======================================================= global proc artAttrBlendShapeProperties() { // Base Artisan (applicable to all Artisan tools) properties. source "artisanProperties.mel"; source "artisanCallback.mel"; source "artAttrProperties.mel"; source "artAttrBlendShapeCallback.mel"; source "artisanRampCallback.mel"; string $currContext = `currentCtx`; string $currTool = `contextInfo -c $currContext`; setUITemplate -pushTemplate DefaultTemplate; string $parent = `toolPropertyWindow -q -location`; setParent $parent; columnLayout -adj true artAttrBlendShape; // Brush frameLayout. frameLayout -label (uiRes("m_artAttrBlendShapeProperties.kBrush")) -collapsable true -collapse false artAttrBlendShapeBrushFrame; // Create brush option menu. artisanCreateBrushFrame( "artAttrBlendShapeBrushFrame", $currTool ); setParent ..; // Skin Paint operation frameLayout. frameLayout -label (uiRes("m_artAttrBlendShapeProperties.kTarget")) -collapsable true -collapse false artBlendShapeOperationFrame; // Create Paint Attribute operation menu. artBlendShapeCreateOperFrame( "artBlendShapeOperationFrame", $currTool ); setParent ..; string $artCommonOpFrame = `frameLayout -label (uiRes("m_artAttrBlendShapeProperties.kPaintWeights")) -collapsable true -collapse false artCommonOperationFrame`; setUITemplate -pushTemplate OptionsTemplate; setParent $artCommonOpFrame; columnLayout; // Put all the common stuff. artAttrCreateCommonProperties(); artisanCreateRamp($artCommonOpFrame, 0 ); setUITemplate -popTemplate; setParent ..; // Stroke options. frameLayout -label (uiRes("m_artAttrBlendShapeProperties.kStroke")) -collapsable true -collapse true artAttrBlendShapeStrokeFrame; // Create stroke options. artisanCreateStrokeFrame( "artAttrBlendShapeStrokeFrame", $currTool ); setParent ..; // Stylus Pressure options. frameLayout -label (uiRes("m_artAttrBlendShapeProperties.kStylusPressure")) -collapsable true -collapse true artAttrBlendShapePressureFrame; // Create stroke options. artisanCreatePressureFrame( "artAttrBlendShapePressureFrame", $currTool ); setParent ..; // Attribute Maps options. frameLayout -label (uiRes("m_artAttrBlendShapeProperties.kAttributeMaps")) -collapsable true -collapse true artAttrBlendShapeAttrMapFrame; // Create Attribute Map option menu. artisanCreateAttrMapFrame( "artAttrBlendShapeAttrMapFrame", $currTool ); setParent ..; // Display options. frameLayout -label (uiRes("m_artAttrBlendShapeProperties.kDisplay")) -collapsable true -collapse true artAttrBlendShapeDisplayFrame; // Create Display options. artisanCreateDisplayFrame( "artAttrBlendShapeDisplayFrame", $currTool ); setParent ..; setParent ..; setUITemplate -popTemplate; artAttrBlendShapeTargetMenu( "blendShapeTargetList", "artAttrCtx" ); // Set the callbacks and various global functions. artAttrBlendShapeCallback( "artAttrCtx" ); // Ramp controls artisanRampCallback( "artAttrCtx" ); }