blob: 19995500f2a8e959b78f3661d39cc233aff02f3d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
// Shave and a Haircut
// (c) 2019 Epic Games
// US Patent 6720962
global string $shaveCursorCtxCommonProperties_fileVersion = "$Revision$";
//
// This is a common properties script for all shaveCursorCtx-based tools.
//
global proc shaveCursorCtxCommonProperties(string $toolName, string $ctxCmd)
{
string $parent = `toolPropertyWindow -q -location`;
setParent $parent;
setUITemplate -pushTemplate OptionsTemplate;
if (`columnLayout -q -exists shaveCursor`) deleteUI shaveCursor;
columnLayout shaveCursor;
{
frameLayout -collapsable true -collapse false
-l $toolName shaveCursorFrame;
{
columnLayout;
{
floatSliderGrp -field true -l "Size"
-ann "Brush size, relative to size of current view"
-min 0.0 -max 1.0
-cc ($ctxCmd + " -e -brushSize #1 `currentCtx`")
shaveCursorSize;
floatSliderGrp -field true -l "Strength"
-ann "Brush strength"
-min 0.0 -max 1.0
-cc ($ctxCmd + " -e -brushStren #1 `currentCtx`")
shaveCursorStren;
checkBoxGrp -ncb 1 -l "Enable Falloff"
-cc ($ctxCmd + " -e -enableFalloff #1 `currentCtx`")
shaveCursorEnableFalloff;
//
// Tool-specific controls.
//
if ($toolName == "Brush")
{
separator -h 5 -style "none";
rowColumnLayout -nc 7 -cs 2 5
-cw 1 127 -cw 2 35 -cw 3 35 -cw 4 35
-cw 5 35 -cw 6 35 -cw 7 35;
{
text -al "right" -l "Mode"
-ann "Brush modes" shaveBrushMode;
symbolCheckBox -w 35 -h 36 -i "shaveTranslate.xpm"
-ann "Translate" -cc shaveBrushTranslateMode
shaveBrushTransBox;
symbolCheckBox -w 35 -h 36 -i "shaveScale.xpm"
-ann "Scale" -cc shaveBrushScaleMode
shaveBrushScaleBox;
symbolCheckBox -w 35 -h 36 -i "shaveRotate.xpm"
-ann "Rotate about cursor" -cc shaveBrushRotateMode
shaveBrushRotCursorBox;
symbolCheckBox -w 35 -h 36 -i "shaveStand.xpm"
-ann "Stand hairs on end" -cc shaveBrushStandMode
shaveBrushStandBox;
symbolCheckBox -w 35 -h 36 -i "shavePuffRoots.xpm"
-ann "Puff hairs out" -cc shaveBrushPuffMode
shaveBrushPuffBox;
symbolCheckBox -w 35 -h 36 -i "shaveClump.xpm"
-ann "Clump" -cc shaveBrushClumpMode
shaveBrushClumpBox;
setParent ..;
}
}
setParent ..;
}
setParent ..;
}
setParent ..;
}
setUITemplate -popTemplate;
}
|