-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlocal-vars.ms
202 lines (142 loc) · 3.85 KB
/
local-vars.ms
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
/* Variables */
local VERSION = "v2.0.0"
local LOG_LEVEL = 2
local selectedFrameRateOpt
local selectedFrameRangeOpt
local selectedFrameRangeStart
local selectedFrameRangeEnd
local selectedPickupFrames
local selectedFrameSteps
local selectedObj
local includePositionInfo
local includeRotationInfo
local includeScaleInfo
local isSelectedObjACamera
local includeFovInfo
local includeTargetInfo
local shouldUseCustomOrigin
local selectedCustomOriginOpt
local customOriginX
local customOriginY
local customOriginZ
local outputWidthPx
local outputHeightPx
local compAspectRatio
local sourceAspectRatio
local shouldSaveToDisk
local outputFilePath
/* Functions */
local logger
local formatLineForOutputString
local buildOutputString
local setFrameRange
local validateData
/* Rollouts */
local threeDeeToAEDialog
local howToUseRollout
local timeConfigRollout
local paramsRollout
local advancedOptRollout
local saveOptsRollout
local creditsRollout
/* UI Elements */
local saveProgressTxt
local saveProgressBar
rollout howToUse "How to Use" (
label howToTitle "Get transform info for any 3d object!" align:#center
group "Instructions" (
label instructionsLine2 "1. Set frame rate and range." align:#left
label instructionsLine3 "2. Choose an object." align:#left
label instructionsLine4 "3. Copy/save transform info." align:#left
label instructionsLine5 "4. Profit!" align:#left
)
group "Notes" (
label notesLine6 "TODO(rex): Write something useful here..." align:#left
)
)
/* Time Configuration rollout */
rollout timeConfig "Time Configuration" (
-- Configure Frame Rate
group "Frame Rate" (
radiobuttons frameRate
spinner customFrameRate
)
-- Set Frame Range.
group "Frame Range" (
-- Custom Radio Button functionality.
radiobuttons singleFrameOpt
spinner frameStepSelector
radiobuttons activeTimeSegmentOpt
label activeTimeSegmentLabel
radiobuttons frameRangeOpt
spinner frameRangeStartSelector
spinner frameRangeEndSelector
radiobuttons customFramesOpt
edittext customFramesText
)
)
/* Object and Parameter Selection rollout */
rollout paramSelect "Object and Parameters" (
-- Object select rollout.
group "Object to Track" (
pickbutton objectToTrack
rcmenu objectToTrackContextMenu (
menuItem mi_cs "Cast Shadows" checked:false
menuItem mi_rs "Receive Shadows" checked:false
)
)
-- Select Transform Parameters to Copy.
group "Transform Parameters" (
checkbox positionParam
checkbox scaleParam
checkbox rotationParam
)
/* Advanced Options */
rollout advancedOptions "Advanced Options" (
-- Special Paramters if you are copying a camera.
group "Camera Options" (
checkbox isCameraSelector
checkbox targetParam
checkbox fovParam
)
group "Adjust Origin Point" (
checkbox shouldSetCustomOriginOpt
radiobuttons autoAdjustOriginOpt
label autoAdjustOriginXLabel
label autoAdjustOriginYLabel
label autoAdjustOriginZLabel
radiobuttons customOriginOpt
spinner customOriginXSelector
spinner customOriginYSelector
spinner customOriginZSelector
)
group "Output size" (
spinner outputSizeWidthPx
checkbutton lockAspectRatioFlag
spinner outputSizeHeightPx
label outputSizeAspectRatio
)
group "Aspect Ratio Configuration" (
spinner setSourcePixelAspectRatioSelector
spinner setCompPixelAspectRatioSelector
)
)
/* Output Configuration */
rollout saveOpts "Output Configuration" (
-- Save button
local output_name = undefined
checkbox shouldSaveToDiskSelector
button selectFilePathBtn
label saveFilePathLabel
-- Copy button, progress bar and text.
label saveProgressText
button copyToClipboardBtn
progressBar saveProgressBar
)
/* Credits rollout */
rollout credits "About" (
label author
hyperLink websiteUrl
label copyrightInfo
label versionInfo
)