// =========================================================================== // 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: June 2000 // // Description: // Option tool property window for Attribute Paint tool. // // // Procedure Name: // artFluidAttrProperties // // Description: // Initialize the UI for Attribute Paint tool. // // Input Arguments: // // Return Value: // None. // global proc artFluidAttrCreateOperFrame( string $parent, string $currTool ) // // UI for generic Attribute Paint Tool - Attribute Paint tool, // Paint Weights tool and others. // { setUITemplate -pushTemplate OptionsTemplate; setParent $parent; columnLayout; separator -h 5 -style "none"; checkBoxGrp -label "" -label1 (uiRes("m_artFluidAttrProperties.kAutoSetInitialState")) -annotation (uiRes("m_artFluidAttrProperties.kAutoSetInitialStateAnnot")) -ncb 1 artFluidAutoSave; separator -h 5 -style "none"; // Paintable Attribute Menu. optionMenuGrp -label (uiRes("m_artFluidAttrProperties.kPaintableAttributes")) -annotation (uiRes("m_artFluidAttrProperties.kPaintableAttributesAnnot")) artAttrListOptionMenu; menuItem -label (uiRes("m_artFluidAttrProperties.kDensity")) ; menuItem -label (uiRes("m_artFluidAttrProperties.kDensityAndColor")) ; menuItem -label (uiRes("m_artFluidAttrProperties.kDensityAndFuel")) ; menuItem -label (uiRes("m_artFluidAttrProperties.kVelocity")) ; menuItem -label (uiRes("m_artFluidAttrProperties.kTemperature")) ; menuItem -label (uiRes("m_artFluidAttrProperties.kFuel")) ; menuItem -label (uiRes("m_artFluidAttrProperties.kColor")) ; menuItem -label (uiRes("m_artFluidAttrProperties.kFalloff")) ; colorSliderGrp -label (uiRes("m_artFluidAttrProperties.kColorValue")) -annotation (uiRes("m_artFluidAttrProperties.kColorValueAnnot")) artFluidColorSlider; radioButtonGrp -label (uiRes("m_artFluidAttrProperties.kVelocityDirection")) -nrb 2 -annotation (uiRes("m_artFluidAttrProperties.kVelocityDirectionAnnot")) -label1 (uiRes("m_artFluidAttrProperties.kFromStroke")) -label2 (uiRes("m_artFluidAttrProperties.kAsSpecified")) artFluidStrokeDirection; floatFieldGrp -nf 3 -pre 4 -label (uiRes("m_artFluidAttrProperties.kSpecified")) -annotation (uiRes("m_artFluidAttrProperties.kSpecifiedAnnot")) artFluidSpecifiedVelocity; separator -h 10 -style "none"; // Put all the common stuff. artAttrCreateCommonProperties(); separator -h 5 -style "none"; setParent ..; setUITemplate -popTemplate; } global proc artFluidAttrDisplayFrame( string $parent, string $tool ) // // Description: // // { setUITemplate -pushTemplate OptionsTemplate; setParent $parent; columnLayout; separator -h 5 -style "none"; radioButtonGrp -label (uiRes("m_artFluidAttrProperties.kShadedDisplay")) -label1 (uiRes("m_artFluidAttrProperties.kCurrentAttribute")) -label2 (uiRes("m_artFluidAttrProperties.kAsRender")) -annotation (uiRes("m_artFluidAttrProperties.kCurrentAttributeAnnot")) -nrb 2 artFluidDisplayAsRender; checkBoxGrp -label "" -label1 (uiRes("m_artFluidAttrProperties.kDrawVelocity")) -annotation (uiRes("m_artFluidAttrProperties.kDrawVelocityAnnot")) -ncb 1 artFluidDisplayVelocity; checkBoxGrp -ncb 1 -label " " -label1 (uiRes("m_artFluidAttrProperties.kDrawOutline")) -annotation (uiRes("m_artFluidAttrProperties.kDrawOutlineAnnot")) artDrawOutlineChkBox; checkBoxGrp -ncb 1 -label "" -label1 (uiRes("m_artFluidAttrProperties.kDrawOutlineWhile")) -annotation (uiRes("m_artFluidAttrProperties.kDrawOutlineWhileAnnot")) artBrushWhilePaintingChkBox; checkBoxGrp -ncb 1 -label "" -label1 (uiRes("m_artFluidAttrProperties.kDrawBrushFeedback")) -annotation (uiRes("m_artFluidAttrProperties.kDrawBrushFeedbackAnnot")) artBrushFeedbackChkBox; // Don't need this one for fluid paint, but need it to // exist so artisanValues.mel and artisanCallback.mel don't // generate errors. Make it invisible. // checkBoxGrp -ncb 1 -visible false -label "" -label1 (uiRes("m_artFluidAttrProperties.kShowWireframe")) -annotation (uiRes("m_artFluidAttrProperties.kShowWireframeAnnot")) artShowActiveLinesChkBox; setParent ..; setUITemplate -popTemplate; } // ======================================================= // Main Procedure. // ======================================================= global proc artFluidAttrProperties() { // Base Artisan (applicable to all Artisan tools) properties. source "artisanProperties.mel"; source "artisanCallback.mel"; source "artisanValues.mel"; source "artAttrProperties.mel"; source "artFluidAttrCallback.mel"; source "artFluidAttrValues.mel"; string $currContext = `currentCtx`; string $currTool = `contextInfo -c $currContext`; setUITemplate -pushTemplate DefaultTemplate; string $parent = `toolPropertyWindow -q -location`; setParent $parent; columnLayout -adj true artFluidAttr; // Brush frameLayout. frameLayout -label (uiRes("m_artFluidAttrProperties.kBrush")) -collapsable true -collapse false artAttrBrushFrame; // Create brush option menu. artisanCreateBrushFrame( "artAttrBrushFrame", $currTool ); setParent ..; // Paint Attribute operation frameLayout. frameLayout -label (uiRes("m_artFluidAttrProperties.kPaintAttributes")) -collapsable true -collapse false artAttrOperationFrame; // Create Paint Attribute operation menu. artFluidAttrCreateOperFrame( "artAttrOperationFrame", $currTool ); setParent ..; // Stroke options. frameLayout -label (uiRes("m_artFluidAttrProperties.kStroke")) -collapsable true -collapse false artAttrStrokeFrame; // Create stroke options. artisanCreateStrokeFrame( "artAttrStrokeFrame", $currTool ); // Not applicable to 2D fluids -- make this clear for the user." string $helpStr = (uiRes("m_artFluidAttrProperties.kFluidStampDepthAnnot")); floatSliderGrp -e -annotation $helpStr -label (uiRes("m_artFluidAttrProperties.kStampDepth3D")) artStampDepthSlider; setParent ..; // Stylus Pressure options. frameLayout -label (uiRes("m_artFluidAttrProperties.kStylusPressure")) -collapsable true -collapse true artAttrPressureFrame; // Create stroke options. artisanCreatePressureFrame( "artAttrPressureFrame", $currTool ); setParent ..; frameLayout -label (uiRes("m_artFluidAttrProperties.kAttributeMaps")) -collapsable true -collapse true artAttrAttrMapFrame; // Create Attribute Map option menu. artisanCreateAttrMapFrame( "artAttrAttrMapFrame", $currTool ); setParent ..; frameLayout -label (uiRes("m_artFluidAttrProperties.kDisplay")) -collapsable true -collapse true artAttrDisplayFrame; // Create Display options. artFluidAttrDisplayFrame( "artAttrDisplayFrame", $currTool ); setParent ..; setParent ..; setUITemplate -popTemplate; // Set the callbacks and the values. artFluidAttrCallback( "artFluidAttrCtx" ); }