diff options
| author | Ben Marsh <[email protected]> | 2019-10-22 09:07:59 -0400 |
|---|---|---|
| committer | Ben Marsh <[email protected]> | 2019-10-22 09:07:59 -0400 |
| commit | bd0027e737c6512397f841c22786274ed74b927f (patch) | |
| tree | f7ffbdb8f3741bb7f24635616cc189cba5cb865c /scripts/shaveCursorCtxCommonValues.mel | |
| download | archived-shave-and-a-haircut-bd0027e737c6512397f841c22786274ed74b927f.tar.xz archived-shave-and-a-haircut-bd0027e737c6512397f841c22786274ed74b927f.zip | |
Adding Shave-and-a-Haircut 9.6
Diffstat (limited to 'scripts/shaveCursorCtxCommonValues.mel')
| -rw-r--r-- | scripts/shaveCursorCtxCommonValues.mel | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/scripts/shaveCursorCtxCommonValues.mel b/scripts/shaveCursorCtxCommonValues.mel new file mode 100644 index 0000000..9e3cba5 --- /dev/null +++ b/scripts/shaveCursorCtxCommonValues.mel @@ -0,0 +1,49 @@ +// Shave and a Haircut +// (c) 2019 Epic Games +// US Patent 6720962 + +global string $shaveCursorCtxCommonValues_fileVersion = "$Revision$"; + + +// +// This is a common values script for all shaveCursorCtx-based tools. +// +global proc shaveCursorCtxCommonValues(string $toolName) +{ + toolPropertySetCommon($toolName, "", ""); + shaveCursorCtx_updateCommonPropertySheet(); + toolPropertySelect shaveCursor; +} + + +global proc shaveCursorCtx_updateCommonPropertySheet() +{ + string $parent = (`toolPropertyWindow -q -location` + "|shaveCursor"); + + if (`layout -q -exists $parent`) + { + setParent $parent; + + string $ctx = `currentCtx`; + string $class = `contextInfo -q -c $ctx`; + string $ctxCmd = $class + "Ctx"; + + if (`floatSliderGrp -exists shaveCursorSize`) + { + float $size = eval($ctxCmd + " -q -brushSize " + $ctx); + floatSliderGrp -e -v $size shaveCursorSize; + } + + if (`floatSliderGrp -exists shaveCursorStren`) + { + float $s = eval($ctxCmd + " -q -brushStren " + $ctx); + floatSliderGrp -e -v $s shaveCursorStren; + } + + if (`checkBoxGrp -exists shaveCursorEnableFalloff`) + { + int $enable = eval($ctxCmd + " -q -enableFalloff " + $ctx); + checkBoxGrp -e -v1 $enable shaveCursorEnableFalloff; + } + } +} |