Notifications
Clear all
[Closed] visibility script
Jun 13, 2014 10:23 pm
Hey Guys,
I am working on a simple script to set the visibility for an object on and off. It seems to work OK, except that it sets a key on wherever the current time slider is at a value of -1. Does anyone know how to have it not set these extra keys? Thank You.
Code:
if ((Visible != undefined) and (Visible.isdisplayed)) do
(destroyDialog Visible)
(
rollout Visible "Visibility" --create the rollout
(
group "Set Frames"
(
spinner spn_Start "Disappear Frame" type: #integer range:[0,1000000,0] width:100 align: #left
spinner spn_End "Appear Frame" type: #integer range:[0,1000000,1] width:100 align: #left
button but_setvisible "Set Visibility" width:100
)
on but_setvisible pressed do with animate on
undo on
(
$.visibility = bezier_float()
t = spn_Start.value
y = spn_End.value
at time t $.visibility.controller.value = 0
at time y $.visibility.controller.value = 1
)
)
)
–create the rollout
createDialog Visible 175 100
1 Reply
Jun 13, 2014 10:23 pm
take a look at this old script of mine, it will hopefully give you some ideas on how to proceed.
http://lonerobot.net/?p=179