Hi all… got another one here.
I’m trying to update an array based on checkboxes selected and then use them as frames to render from the timeline. For example
Checkbox 1 = Frame 1
Checkbox 2 = Frame 2
Checkbox 3 = Frame 3
And so on and so forth (38 frames total)
This will be used to select specific frames to add to the render que, for example…
When you check the check boxes for 1, 5, 19, 22,23,24,28, those frames will be added to the ‘Frames’ Time Output under the common Parameters of the Render set up.
I have almost got this all working but the last part has me a little stumped (I do currently get an error ‘Invalid RendPickupFrames sting character: u’ not sure where it is getting a u from yet) but my main concern is in the only way I can think of to add each of the checked boxes to the array is with an if = true for each one of them, but I’m thinking that there must be a more efficient way to do this that I cannot think of being that I am new to scripting (I bet you’ve never heard anyone say that before haha).
Anyway, I’ll show you what I have (of a sample to avoid all the checkbox rollout elements) and you should be able to see what I’m talking about.
try(destroydialog FrameRollout_UI)catch() frames = #() rollout FrameRollout_UI "Frame Select" ( group "Select Frames" ( checkbox cb0 " Front" pos: [20,30] checked: true checkbox cb1 "Back" pos: [150,30] checked: false checkbox cb2 "Left" pos: [280,30] checked: false checkbutton Toggle_all "Toggle All" tooltip:"This will turn all checkboxes to 'On/Off" pos: [300,220] ) button btnSubmit "Submit to Deadline" pos: [300,460] on Toggle_all changed state do if state then ( for aControl in FrameRollout_UI.controls do ( case classof aControl of ( CheckBoxControl: aControl.state = true ) ) ) else ( for aControl in FrameRollout_UI.controls do ( case classof aControl of ( CheckBoxControl: aControl.state = false ) ) ) on btnSubmit pressed do ( if cb0.state == true then ( Insertitem 0 frames 1 Format "New Array: %\n" frames ) if cb1.state == true then ( Insertitem 1 frames 2 Format "New Array: %\n" frames ) if cb2.state == true then ( Insertitem 2 frames 3 Format "New Array: %\n" frames ) for f in frames do ( rendTimeType=4 rendPickupFrames=(F as string) rendSaveFile=1 rendoutputfilename = ("C:\Users\MY\Desktop\Master Scene v1.0\RendTests\Frame_"+(f as string)+".tif") max quick render --swap this for deadline submition ) ) ) -- Create the UI createDialog FrameRollout_UI 420 500
Appreciate any help and guidance here… I’m trying