aboutsummaryrefslogtreecommitdiff
path: root/scripts/shaveCursorCtxCommonValues.mel
diff options
context:
space:
mode:
authorBen Marsh <[email protected]>2019-10-22 09:07:59 -0400
committerBen Marsh <[email protected]>2019-10-22 09:07:59 -0400
commitbd0027e737c6512397f841c22786274ed74b927f (patch)
treef7ffbdb8f3741bb7f24635616cc189cba5cb865c /scripts/shaveCursorCtxCommonValues.mel
downloadarchived-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.mel49
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;
+ }
+ }
+}