// =========================================================================== // 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. // =========================================================================== // // // // // Script Paint Tool UI script // global proc artUserPaintCreateSetupFrame( string $parent, string $currTool ) { setUITemplate -pushTemplate OptionsTemplate; setParent $parent; columnLayout; textFieldGrp -label (uiRes("m_artUserPaintProperties.kToolSetupCmd")) toolSetupTextField; textFieldGrp -label (uiRes("m_artUserPaintProperties.kToolCleanupCmd")) toolCleanupTextField; separator -h 20 -style "none"; textFieldGrp -label (uiRes("m_artUserPaintProperties.kGetSurfaceCmd")) getSrfTextField; textFieldGrp -label (uiRes("m_artUserPaintProperties.kGetArrayAttrCmd")) getArrayAttrTextField; separator -h 20 -style "none"; textFieldGrp -label (uiRes("m_artUserPaintProperties.kInitializeCmd")) initTextField; textFieldGrp -label (uiRes("m_artUserPaintProperties.kFinalizeCmd")) finalizeTextField; textFieldGrp -label (uiRes("m_artUserPaintProperties.kSetValueCmd")) setValueTextField; textFieldGrp -label (uiRes("m_artUserPaintProperties.kGetValueCmd")) getValueTextField; separator -h 20 -style "none"; checkBoxGrp -ncb 1 -label (uiRes("m_artUserPaintProperties.kSendFullPaths")) -label1 (uiRes("m_artUserPaintProperties.kOnOff")) fullPathsChkBox; setParent ..; setParent ..; setUITemplate -popTemplate; } // ======================================================= // Main Procedure. // ======================================================= global proc artUserPaintProperties() { // Base Artisan (applicable to all Artisan tools) properties. source "artisanProperties.mel"; source "artisanCallback.mel"; source "artAttrProperties.mel"; source "artUserPaintCallback.mel"; string $currContext = `currentCtx`; string $currTool = `contextInfo -c $currContext`; setUITemplate -pushTemplate DefaultTemplate; string $parent = `toolPropertyWindow -q -location`; setParent $parent; columnLayout -adj true artUserPaint; // Brush frameLayout. frameLayout -label (uiRes("m_artUserPaintProperties.kBrush")) -collapsable true -collapse false artUserPaintBrushFrame; // Create brush option menu. artisanCreateBrushFrame( "artUserPaintBrushFrame", $currTool ); setParent ..; string $artCommonOpFrame = `frameLayout -label (uiRes("m_artUserPaintProperties.kPaintAttributes")) -collapsable true -collapse false artCommonOperationFrame`; setUITemplate -pushTemplate OptionsTemplate; setParent $artCommonOpFrame; columnLayout; // Put all the common stuff. artAttrCreateCommonProperties(); setParent ..; setUITemplate -popTemplate; setParent ..; // Stroke options. frameLayout -label (uiRes("m_artUserPaintProperties.kStroke")) -collapsable true -collapse true artUserPaintStrokeFrame; // Create stroke options. artisanCreateStrokeFrame( "artUserPaintStrokeFrame", $currTool ); setParent ..; // Stylus Pressure options. frameLayout -label (uiRes("m_artUserPaintProperties.kStylusPressure")) -collapsable true -collapse true artUserPaintPressureFrame; // Create stroke options. artisanCreatePressureFrame( "artUserPaintPressureFrame", $currTool ); setParent ..; // Attribute Maps options. frameLayout -label (uiRes("m_artUserPaintProperties.kAttributeMaps")) -collapsable true -collapse true artAttrAttrMapFrame; // Create Attribute Map option menu. artisanCreateAttrMapFrame( "artAttrAttrMapFrame", $currTool ); setParent ..; // Display options. frameLayout -label (uiRes("m_artUserPaintProperties.kDisplay")) -collapsable true -collapse true artUserPaintDisplayFrame; // Create Display options. artisanCreateDisplayFrame( "artUserPaintDisplayFrame", $currTool ); setParent ..; // Setup options. frameLayout -label (uiRes("m_artUserPaintProperties.kSetup")) -collapsable true -collapse true artUserPaintSetupFrame; // Create Display options. artUserPaintCreateSetupFrame( "artUserPaintSetupFrame", $currTool ); setParent ..; setParent ..; setUITemplate -popTemplate; // Set the callbacks and various global functions. artUserPaintCallback( "artUserPaintCtx" ); }