// =========================================================================== // 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 // // Note that this script depends on your Linear units being set to cm. // You can check your current units in the preferences window, under Settings. // ======================================================= // Main callback procedure for Paint Selecion tool. // ======================================================= global proc artUserPaintValues( string $toolName ) { source "artisanCallback.mel"; source "artisanValues.mel"; source "artAttrValues.mel"; string $artCommand = "artUserPaintCtx"; string $currContext = `currentCtx`; string $currTool = `contextInfo -c $currContext`; // Provide a different icon for different attribute tools. string $icon = "userPaint.png"; string $helpTag = "UserPaintTool"; string $parent = (`toolPropertyWindow -q -location` + "|artUserPaint"); setParent $parent; toolPropertySetCommon $toolName $icon $helpTag; // Brush frameLayout values. artisanBrushValues( $artCommand, $currTool ); // Common Attribute Paint UI. artAttrCommonValues( $artCommand, $currTool ); // Stroke frameLayout values. artisanStrokeValues( $artCommand, $currTool ); // Stylus Pressure frameLayout values. artisanPressureValues( $artCommand, $currTool ); // Attribute Maps frameLayout values. artisanAttrMapValues( $artCommand, $currTool ); // Display frameLayout values. artisanDisplayValues( $artCommand, $currTool ); artUserPaintSetupValues( $artCommand, $toolName); toolPropertySelect artUserPaint; } global proc artUserPaintSetupValues( string $artCommand, string $toolName ) { string $cmd; $cmd = ($artCommand + " -q -tsc " + $toolName); textFieldGrp -e -text `eval $cmd` toolSetupTextField; $cmd = ($artCommand + " -q -tcc " + $toolName); textFieldGrp -e -text `eval $cmd` toolCleanupTextField; $cmd = ($artCommand + " -q -gsc " + $toolName); textFieldGrp -e -text `eval $cmd` getSrfTextField; $cmd = ($artCommand+ " -q -ic " + $toolName); textFieldGrp -e -text `eval $cmd` initTextField; $cmd = ($artCommand + " -q -fc " + $toolName); textFieldGrp -e -text `eval $cmd` finalizeTextField; $cmd = ($artCommand + " -q -svc " + $toolName); textFieldGrp -e -text `eval $cmd` setValueTextField; $cmd = ($artCommand+ " -q -gvc " + $toolName); textFieldGrp -e -text `eval $cmd` getValueTextField; $cmd = ($artCommand + " -q -gac " + $toolName); textFieldGrp -e -text `eval $cmd` getArrayAttrTextField; $cmd = ($artCommand + " -q -fp " + $toolName); checkBoxGrp -e -v1 `eval $cmd` fullPathsChkBox; }