-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGridViewExample.ms
More file actions
660 lines (582 loc) · 22.7 KB
/
GridViewExample.ms
File metadata and controls
660 lines (582 loc) · 22.7 KB
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
---------------------------------------------------------------------------------------
-- MultiCamLister.ms
-- By Ilya Floussov (ilya@conceptfarm.ca)
-- Dec 16th 2018
-- Lists all Vray Cameras and their porperties MultiCam Attribute properties
---------------------------------------------------------------------------------------
macroScript MultiCamLister
category:"ilya_s Scripts"
tooltip:"MCL"
buttontext:"MCL"
Icon:#("Lights",7)
(
-- add callback on selectionChanged: to untick or tick selection boxes
-- http://help.autodesk.com/view/3DSMAX/2017/ENU/?guid=__files_GUID_7C91D285_5683_4606_9F7C_B8D3A7CA508B_htm
-- use .currentcell
-- consider freezing select and name columns
global MultiCamLister
global MultiCamListerOpen = false
local prevSelectedRows = #()
local prevSelectedRowsLessSelf = #()
local prevSelectedRowsPlusSelf = #()
local dgvRowHeight = 26
local dgvHeaderRowHeight = 36
local dgvMaxHeight = 600
local dgvRefreshing = false
local disabledColor = (dotnetclass "system.drawing.color").fromARGB 128 128 128
local enabledColor = (dotnetclass "system.drawing.color").fromARGB 255 255 255
local enabledStyle = dotnetobject "DataGridViewCellStyle"
enabledStyle.forecolor = enabledColor
local disabledStyle = dotnetobject "DataGridViewCellStyle"
disabledStyle.forecolor = disabledColor
-- Name, Type, Width
local defList = #(
#("Select","button",41),
#("Camera Name","text",101),
#("First Frame","number",40),
#("Last Frame","number",37),
#("Get Range","button",56),
#(" ","text",11),
#("Use Hide Layers","check",55),
#("Clear All","button",56),
#("Add Hidden","button",72),
#(" ","text",11),
#("Use Sunpoints","check",58),
#("Show Sunpoints","check",58),
#("Get From Sun","button",80),
#("Move Sun","button",80),
#(" ","text",11),
#("Use Resolution","check",57),
#("Width","number",46),
#("Height","number",46),
#("Get Res.","button",56),
#(" ","text",11),
#("Use HDRI","check",42),
#("HDRI Map","button",56),
#("Link HDRI","check",56),
#("Edit Map","button",56),
#("ID","text",42),
#("ID","text",42))
fn getVraySunInScene =
(
local result = undefined
local allSuns = for o in objects where classof o == VraySun collect o
if (allSuns.count == 1 ) then
(
result = allSuns[1]
)
else if (allSuns.count > 1) then
(
--MessageBox ("There are " + allSuns.count as string + " in the scene.\nThere can only be one!")
result = undefined
)
else
(
--MessageBox ("No VraySun in the scene.")
result = undefined
)
return result
)
fn getRowsFromSelection dgvObject subtract:true cell:unsupplied =
(
local result = #()
for i = 0 to dgvObject.SelectedCells.count-1 do
(
appendifUnique result dgvObject.SelectedCells.item[i].rowindex
)
if cell != unsupplied then
(
--print cell
if subtract then
(
if (findItem result cell) != 0 then
(
local itemToDelete = (findItem result cell)
--print ("item to delete " + itemtodelete as string)
deleteItem result itemToDelete
--print ("result is " + result as string)
)
)
else if not subtract then
(
appendifUnique result cell
)
)
result
)
fn checkSelectedCells dgvObject val =
(
for row in prevSelectedRows do
(
if dgvObject.rows.item[row].cells.item[val.ColumnIndex].readonly != true then
(
dgvObject.rows.item[row].cells.item[val.ColumnIndex].value = dgvObject.currentCell.value
)
)
)
fn getObjectByRow dgvObject row =
(
local obj = GetAnimByHandle ((dgvObject.rows.item[row].cells.item[24].value) as integerPtr)
return obj
)
fn getObjectsFromChecked dgvObject col =
(
local objToSelect = (for i = 0 to (dgvObject.rows.count - 1) where ( (dgvObject.rows.item[i].cells.item[col].value) == true ) collect (GetAnimByHandle ((dgvObject.rows.item[i].cells.item[24].value) as integerPtr)))
return objToSelect
)
fn changeControlStatus dgvObject row val arr =
(
for cell in arr do
(
--here we change the whole style rather than just forecolor, bug in max or dotnet?
dgvObject.rows.item[row].cells.item[cell].ReadOnly = not val
if val == true then
(
dgvObject.rows.item[row].cells.item[cell].style = enabledStyle
)
else
(
dgvObject.rows.item[row].cells.item[cell].style = disabledStyle
)
)
)
fn populateDGV dgvObject =
(
local allCams = for o in objects where (superclassof o == camera and o.modifiers[#MultiCam_Attribute] != undefined) collect o
for i = 0 to i = (allCams.count - 1) do
(
local o = allCams[i+1]
row=dgvObject.rows.item[dgvObject.rows.add()]
row.height = dgvRowHeight
rowCells=row.cells
row.cells.item[0].value = ""
row.cells.item[0].flatstyle = (dotnetclass "FlatStyle").Flat
row.cells.item[1].value = o.name
row.cells.item[2].value = o.modifiers[#MultiCam_Attribute].firstFrame_sp
row.cells.item[3].value = o.modifiers[#MultiCam_Attribute].lastFrame_sp
row.cells.item[4].value = "Get"
row.cells.item[4].flatstyle = (dotnetclass "FlatStyle").Flat
row.cells.item[5].ReadOnly = true
row.cells.item[6].value = o.modifiers[#MultiCam_Attribute].useHideLayers_chb
row.cells.item[7].value = "Clear All"
row.cells.item[7].flatstyle = (dotnetclass "FlatStyle").Flat
row.cells.item[7].ReadOnly = not row.cells.item[6].value
row.cells.item[8].value = "Add Hidden"
row.cells.item[8].flatstyle = (dotnetclass "FlatStyle").Flat
row.cells.item[8].ReadOnly = not row.cells.item[6].value
if row.cells.item[6].value == false then
(
row.cells.item[7].style = disabledStyle
row.cells.item[8].style = disabledStyle
)
row.cells.item[9].ReadOnly = true
row.cells.item[10].value = o.modifiers[#MultiCam_Attribute].useSunpoints_chb
row.cells.item[11].value = o.modifiers[#MultiCam_Attribute].showSunPoint_btn
row.cells.item[11].ReadOnly = not row.cells.item[10].value
row.cells.item[12].value = "Get from Sun"
row.cells.item[12].flatstyle = (dotnetclass "FlatStyle").Flat
row.cells.item[12].ReadOnly = not row.cells.item[10].value
row.cells.item[13].value = "Move Sun"
row.cells.item[13].flatstyle = (dotnetclass "FlatStyle").Flat
row.cells.item[13].ReadOnly = not row.cells.item[10].value
if row.cells.item[10].value == false then
(
row.cells.item[11].style = disabledStyle
row.cells.item[12].style = disabledStyle
row.cells.item[13].style = disabledStyle
)
row.cells.item[14].ReadOnly = true
row.cells.item[15].value = o.modifiers[#MultiCam_Attribute].useHeightWidth_chb
row.cells.item[16].value = o.modifiers[#MultiCam_Attribute].imgWidth_sp
row.cells.item[16].ReadOnly = not row.cells.item[15].value
row.cells.item[17].value = o.modifiers[#MultiCam_Attribute].imgHeight_sp
row.cells.item[17].ReadOnly = not row.cells.item[15].value
row.cells.item[18].value = "Get Res."
row.cells.item[18].flatstyle = (dotnetclass "FlatStyle").Flat
row.cells.item[18].ReadOnly = not row.cells.item[15].value
if row.cells.item[15].value == false then
(
row.cells.item[16].style = disabledStyle
row.cells.item[17].style = disabledStyle
row.cells.item[18].style = disabledStyle
)
row.cells.item[19].ReadOnly = true
row.cells.item[20].value = o.modifiers[#MultiCam_Attribute].useHDRIMap_chb
row.cells.item[21].value = if (o.modifiers[#MultiCam_Attribute].hdriMap_btn != undefined) then (o.modifiers[#MultiCam_Attribute].hdriMap_btn.name) else ("None")
row.cells.item[21].flatstyle = (dotnetclass "FlatStyle").Flat
row.cells.item[21].ReadOnly = not row.cells.item[20].value
row.cells.item[22].value = o.modifiers[#MultiCam_Attribute].hdriMapLink_chb
row.cells.item[22].ReadOnly = not row.cells.item[20].value
row.cells.item[23].value = "Edit"
row.cells.item[23].flatstyle = (dotnetclass "FlatStyle").Flat
row.cells.item[23].ReadOnly = not row.cells.item[20].value
if row.cells.item[20].value == false then
(
row.cells.item[21].style = disabledStyle
row.cells.item[22].style = disabledStyle
row.cells.item[23].style = disabledStyle
)
row.cells.item[24].value = (GetHandleByAnim o) as string
row.cells.item[24].ReadOnly = true
row.cells.item[25].value = if (o.modifiers[#MultiCam_Attribute].hdriMap_btn != undefined) then ((GetHandleByAnim o.modifiers[#MultiCam_Attribute].hdriMap_btn) as string) else ("None")
row.cells.item[25].ReadOnly = true
)
---dgv.autoresizecolumns()
dgvObject.height = ceil ((dgvRowHeight*(allCams.count)) + dgvHeaderRowHeight + (0.6* (allCams.count)))
if dgvObject.height > dgvMaxHeight then
(
dgvObject.height = dgvMaxHeight
dgvObject.width = 1212
MultiCamLister.width = 1212
)
else
(
dgvObject.width = 1196
MultiCamLister.width = 1196
)
dgvObject.AllowUserToAddRows = false
dgvObject.AllowUserToDeleteRows = false
--dgv.rows.removeat((objects.count))
dgvObject.ClearSelection()
)
rollout MultiCamLister "DataGridView" width:1196 height:800
(
button btn "Refresh"
dotnetcontrol dgv "DataGridView" align:#center width:1196 height:600 offset:[0,20]
on btn pressed do
(
dgvRefreshing = true
for i = (dgv.rows.count-1) to 0 by -1 do dgv.Rows.Remove dgv.rows.item[i]
populateDGV dgv
dgvRefreshing = false
)
on MultiCamLister open do
(
dgv.Dock=dgv.Dock.Fill
dgv.RowHeadersVisible=false
for o in defList do
(
local col = undefined
case o[2] of
(
"text":(
col = (dotnetobject "DataGridViewTextBoxColumn")
)
"button": (
col = (dotnetobject "DataGridViewButtonColumn")
col.sortmode = (dotnetclass "DataGridViewColumnSortMode").NotSortable
)
"number": (
col = (dotnetobject "DataGridViewTextBoxColumn")
--Not a good idea to set column to integer mode, harder to handle non-number entries
--col.valueType = (dotnetclass "type").gettype "System.Int32"
)
"check":(
col = (dotnetobject "DataGridViewCheckBoxColumn")
)
)
col.DataPropertyName = "Name"
col.Name = o[1]
col.width = o[3]
if o[1] == "ID" then col.visible = false
dgv.Columns.Add (col)
)
--Colour and Styling
oddColor=(dotnetclass "system.drawing.color").fromARGB 32 32 32
evenColor= (dotnetclass "system.drawing.color").fromARGB 68 68 68
dgv.defaultCellStyle.backColor=evenColor
dgv.AlternatingRowsDefaultCellStyle.backColor=oddColor
dgv.BackgroundColor = (dotnetclass "system.drawing.color").fromARGB 68 68 68
dgv.ForeColor = (dotnetclass "system.drawing.color").fromARGB 255 255 255
dgv.DefaultCellStyle.SelectionBackColor = (dotnetclass "system.drawing.color").fromARGB 80 200 69
dgv.ColumnHeadersDefaultCellStyle.backcolor = (dotnetclass "system.drawing.color").fromARGB 100 100 100
dgv.ColumnHeadersDefaultCellStyle.forecolor = (dotnetclass "system.drawing.color").fromARGB 255 255 255
dgv.enableheadersvisualstyles = false
dgv.CellBorderStyle = (dotnetclass "DataGridViewCellBorderStyle").None
dgv.RowHeadersBorderStyle = (dotnetclass "DataGridViewHeaderBorderStyle").Single
dgv.ColumnHeadersBorderStyle =(dotnetclass "DataGridViewHeaderBorderStyle").Single
dgv.ColumnHeadersHeight=dgvHeaderRowHeight
dgv.AllowUserToResizeColumns = false
dgv.ColumnHeadersHeightSizeMode = (dotnetclass "DataGridViewColumnHeadersHeightSizeMode").DisableResizing
dgv.AllowUserToResizeRows = false
dgv.RowHeadersWidthSizeMode = (dotnetclass "DataGridViewRowHeadersWidthSizeMode").DisableResizing
--dgv.SelectionMode=(dotNetClass "System.Windows.Forms.DataGridViewSelectionMode").FullRowSelect
populateDGV dgv
MultiCamListerOpen = true
)
on MultiCamLister close do
(
MultiCamListerOpen = false
)
on dgv CellLeave val do
(
--show val
)
on dgv cellMouseDown val do
(
prevSelectedRows = getRowsFromSelection dgv
prevSelectedRowsLessSelf = getRowsFromSelection dgv cell:val.RowIndex
prevSelectedRowsPlusSelf = getRowsFromSelection dgv cell:val.RowIndex subtract:false
if (prevSelectedRows.count == 0 or prevSelectedRows.count == 1) then
(
prevSelectedRows = #(val.rowIndex)
prevSelectedRowsLessSelf = #(val.rowIndex)
prevSelectedRowsPlusSelf = #(val.rowIndex)
)
--print ("prevSelectedRows" + prevSelectedRows as string)
--print ("prevSelectedRowsLessSelf" + prevSelectedRowsLessSelf as string)
)
on dgv CellMouseClick val do
(
if val.RowIndex >= 0 then
(
case val.ColumnIndex of
(
4:(--Get FrameRange
for row in prevSelectedRowsPlusSelf do
(
local obj = getObjectByRow dgv row
setProperty obj.modifiers[#MultiCam_Attribute] #getFrameRange_btn true
dgv.rows.item[row].cells.item[2].value = obj.modifiers[#MultiCam_Attribute].firstFrame_sp
dgv.rows.item[row].cells.item[3].value = obj.modifiers[#MultiCam_Attribute].lastFrame_sp
)
)--end 4
7:(--Clear All
for row in prevSelectedRowsPlusSelf do
(
if dgv.rows.item[row].cells.item[7].readonly != true then
(
local obj = getObjectByRow dgv row
setProperty obj.modifiers[#MultiCam_Attribute] #clearLayers_btn true
)
)
)--end 7
8:(--Add Hidden
for row in prevSelectedRowsPlusSelf do
(
if dgv.rows.item[row].cells.item[8].readonly != true then
(
local obj = getObjectByRow dgv row
setProperty obj.modifiers[#MultiCam_Attribute] #addLayers_btn true
)
)
)--end 8
12:(--Get From Sun
for row in prevSelectedRowsPlusSelf do
(
if dgv.rows.item[row].cells.item[12].readonly != true then
(
local obj = getObjectByRow dgv row
setProperty obj.modifiers[#MultiCam_Attribute] #readSunPos_btn true
)
)
)--end 12
13:(--Move Sun
if dgv.rows.item[val.RowIndex].cells.item[13].readonly != true then
(
local obj = getObjectByRow dgv val.RowIndex
setProperty obj.modifiers[#MultiCam_Attribute] #moveSunToPos_btn true
)
)--end 13
18:(--Get Res
for row in prevSelectedRowsPlusSelf do
(
if dgv.rows.item[row].cells.item[18].readonly != true then
(
local obj = getObjectByRow dgv row
setProperty obj.modifiers[#MultiCam_Attribute] #getImgFrame_btn true
dgv.rows.item[row].cells.item[16].value = obj.modifiers[#MultiCam_Attribute].imgWidth_sp
dgv.rows.item[row].cells.item[17].value = obj.modifiers[#MultiCam_Attribute].imgHeight_sp
)
)
)--end 18
21:(--HDRI Map
for row in prevSelectedRowsPlusSelf do
(
if dgv.rows.item[row].cells.item[21].readonly != true then
(
local obj = getObjectByRow dgv row
if (obj.modifiers[#MultiCam_Attribute].hdriMap_btn == undefined) then
(
local map = VrayHDRI()
map.name = "HDRI for " + obj.name
setProperty obj.modifiers[#MultiCam_Attribute] #hdriMap_btn map
dgv.rows.item[row].cells.item[25].value = (GetHandleByAnim map) as string
dgv.rows.item[row].cells.item[21].value = map.name
)
else
(
local qb = QueryBox "There is already a VrayHDRI map assigned. Overwrite with new?"
if qb == true then
(
local map = VrayHDRI()
map.name = "HDRI for " + obj.name
setProperty obj.modifiers[#MultiCam_Attribute] #hdriMap_btn map
dgv.rows.item[row].cells.item[25].value = (GetHandleByAnim map) as string
dgv.rows.item[row].cells.item[21].value = map.name
)
)
)
)
)--end 21
23:(--Edit Map
if dgv.rows.item[val.RowIndex].cells.item[23].readonly != true then
(
local obj = getObjectByRow dgv val.RowIndex
setProperty obj.modifiers[#MultiCam_Attribute] #hdriMapEdit_btn true
)
)--end 23
)--end case
)--end if
)--end on Click
on dgv CellMouseUp val do
(
dgv.commitEdit (dotNetClass "DataGridViewDataErrorContexts").commit
if val.RowIndex >= 0 then
(
case val.ColumnIndex of
(
0:( --Selection
clearSelection()
local objToSelect = #()
local rows = getRowsFromSelection dgv
for row in rows do
(
local obj = getObjectByRow dgv row
append objToSelect obj
)
select objToSelect
)
22:(dgv.endEdit())
)--end case
)--end if
)--end on mouseUp
-- ISSUE: this triggers after the active cell is changed and another cell becomes active
-- use CellMouseUp to trigger a commit otherwise the even won't know there was a change
-- and not trigger
on dgv CellValueChanged val do
(
if MultiCamListerOpen == true and dgvRefreshing == false then
(
case val.ColumnIndex of
(
1:(--Camera Name
local obj = getObjectByRow dgv val.RowIndex
obj.name = (dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value)
)--end 1
2:(--First Frame
local thisValue = (dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value) as integer
local nextValue = (dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex + 1].value) as integer
local obj = getObjectByRow dgv val.RowIndex
if thisValue !=undefined and nextValue != undefined then
(
if (thisValue > nextValue) then
(
Messagebox ("First frame number can't be grater than last frame number.")
(dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value) = nextValue
obj.modifiers[#MultiCam_Attribute].firstFrame_sp = dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value as integer
)
else
(
dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value = dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value as integer
obj.modifiers[#MultiCam_Attribute].firstFrame_sp = dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value as integer
)
)
else
(
Messagebox ("Frame number must be an number.")
(dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value) = 0
obj.modifiers[#MultiCam_Attribute].firstFrame_sp = dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value as integer
)
)--end 2
3:(--Last Frame
local thisValue = (dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value) as integer
local prevValue = (dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex - 1].value) as integer
local obj = getObjectByRow dgv val.RowIndex
if thisValue !=undefined and prevValue != undefined then
(
if (thisValue < prevValue) then
(
Messagebox ("Last frame number can't be smaller than first frame number.")
(dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value) = prevValue
obj.modifiers[#MultiCam_Attribute].lastFrame_sp = dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value as integer
)
else
(
dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value = dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value as integer
obj.modifiers[#MultiCam_Attribute].lastFrame_sp = dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value as integer
)
)
else
(
Messagebox ("Frame number must be an number.")
(dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value) = 0
obj.modifiers[#MultiCam_Attribute].lastFrame_sp = dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value as integer
)
)--end 3
6:(--Use Layers
checkSelectedCells dgv val
local thisValue = (dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value)
for row in prevSelectedRowsPlusSelf do
(
changeControlStatus dgv row thisValue #(7,8)
)
local obj = getObjectByRow dgv val.RowIndex
setProperty obj.modifiers[#MultiCam_Attribute] #useHideLayers_chb thisValue
)--end 6
10:(--Use Sunpoints
checkSelectedCells dgv val
local thisValue = (dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value)
for row in prevSelectedRowsPlusSelf do
(
changeControlStatus dgv row thisValue #(11, 12, 13)
)
local obj = getObjectByRow dgv val.RowIndex
setProperty obj.modifiers[#MultiCam_Attribute] #useSunpoints_chb thisValue
)--end 10
11:(--Show Sunpoints
checkSelectedCells dgv val
local thisValue = (dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value)
local obj = getObjectByRow dgv val.RowIndex
setProperty obj.modifiers[#MultiCam_Attribute] #showSunPoint_btn thisValue
)--end 11
15:(--Use Resolution
checkSelectedCells dgv val
local thisValue = (dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value)
for row in prevSelectedRowsPlusSelf do
(
changeControlStatus dgv row thisValue #(16, 17, 18)
)
local obj = getObjectByRow dgv val.RowIndex
setProperty obj.modifiers[#MultiCam_Attribute] #useHeightWidth_chb thisValue
)--end 15
20:(--Use HDRI
checkSelectedCells dgv val
local thisValue = (dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value)
for row in prevSelectedRowsPlusSelf do
(
changeControlStatus dgv row thisValue #(21, 22, 23)
)
local obj = getObjectByRow dgv val.RowIndex
setProperty obj.modifiers[#MultiCam_Attribute] #useHDRIMap_chb thisValue
)--end 20
22:(--Link HDRI
local thisValue = (dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value)
for row in prevSelectedRowsPlusSelf do
(
if dgv.rows.item[row].cells.item[22].readonly != true then
(
local obj = getObjectByRow dgv row
setProperty obj.modifiers[#MultiCam_Attribute] #hdriMapLink_chb thisValue
dgv.rows.item[val.RowIndex].cells.item[val.ColumnIndex].value = obj.modifiers[#MultiCam_Attribute].hdriMapLink_chb
)
)
)--end 22
)--end case
)--end if
)--end on Change
)--end rollout
try(destroydialog MultiCamLister )catch()
createDialog MultiCamLister
)
-- dgv = MultiCamLister.dgv