-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcallback1.py
More file actions
18 lines (14 loc) · 733 Bytes
/
callback1.py
File metadata and controls
18 lines (14 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# vecnode 18-12-2025
def onValueChange(channel, sampleIndex, val, prev):
value = int(val)
print('[-] this is toggled from container1', value)
if value == 1:
# When toggled on, reload and play the movie, and reset the level to normal
op('/project1/container2/movie').par.reloadpulse.pulse()
op('/project1/container2/movie').par.play = 1
op('/project1/container2/level1').par.brightness1 = 1 # Ensure normal video display
else:
# When toggled off, stop the movie and adjust the level to make the video output black
op('/project1/container2/movie').par.play = 0
op('/project1/container2/level1').par.brightness1 = 0 # Make the video display black
return