ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
for o in geometry do
(o.visibility = bezier_float()
with animate on
(
at time 0 o.visibility.controller.value = 0
at time 100 o.visibility.controller.value = 1
)
)
I started on making a script to do this once upon a time ;o)
It's not finnished, but here it is anyway:
try(destroyDialog roll_VisibilityDialog)catch()------------------------------------------------------------------------------- Function (with animate on)----------------------------------------------------------------------------- (
fn fn_AddVisKey Obj Val =
(
VisTrack = obj.visibility.controller
with animate on
(
newKey = addNewKey VisTrack currentTime #select
newKey.value = Val
))
rollout roll_VisibilityDialog "Vissibility On/Off V1.0"(------------------------------------------------------------------------------- UI STUFF-----------------------------------------------------------------------------
group "Object Visibility:"(
button btn_VisOn "..:: ON ::.." width:85 height:30 align:#left across:2
button btn_VisOff "..:: OFF ::.." width:85 height:30 align:#right
button btn_DelVisKey "Delete Keys On Selected Objects" width:175 height:40 align:#center
slider sld_VisSlide "Visibility" width:175 height:30 range:[0,1,0])------------------------------------------------------------------------------- Visibility Slider -----------------------------------------------------------------------------
on sld_VisSlide changed val do(for obj in selectiondo(if obj[1].controller == undefined do obj.visibility = bezier_float()
obj[1].controller.value = val
--registerRedrawViewsCallback "Lage en Function" (sld_VisSlide)--RedrawViews() ))------------------------------------------------------------------------------- Visibility OFF-----------------------------------------------------------------------------
on btn_VisOff pressed do(ifselection.count >= 1 then
(
undo on
(for obj in selectiondo(ifclassOf obj[1].track != bezier_float do obj.visibility = bezier_float()
fn_AddVisKey obj 0.0))))-- End on btn_VisOff------------------------------------------------------------------------------- Visibility ON-----------------------------------------------------------------------------
on btn_VisOn pressed do(ifselection.count >= 1 then
(
undo on
(for obj in selectiondo(ifclassOf obj[1].track != bezier_float do obj.visibility = bezier_float()
fn_AddVisKey obj 1.0))))-- End on btn_VisOn------------------------------------------------------------------------------- Delete Visibility Key On Selected Object-----------------------------------------------------------------------------
on btn_DelVisKey pressed do(for i in selectiondo(
deletekeys i.visibility.controller
))-- End on btn_DelVisKey)-- End Rollout
createDialog roll_VisibilityDialog 200180)-- End Script
The hide property can not be animated by default, because it has no animation track yet. You can add one manually in the graph editor, or use this wonderful script by lonerobot to animate the visibility: http://www.scriptspot.com/3ds-max/scripts/visibility-assistant
Cheers
Thx, I am looking for something simple with animate on that I can add to may program. I tryed this
for o in geometry do
(o.visibility = bezier_float()
with animate on
(
at time 0 o.visibility.controller.value = [0,0,0]
at time 100 o.visibility.controller.value = [0,1,1]
)
)
but I get
-- Error occurred in o loop; filename: C:\Users\Avner Dei\Documents\3dsMax\Scripts\viz.ms; position: 138; line: 6
-- Frame:
-- o: $Box001
-- Unable to convert: [0,0,0] to type: Float
Comments
I have solved it with for o
I have solved it with
for o in geometry do
(o.visibility = bezier_float()
with animate on
(
at time 0 o.visibility.controller.value = 0
at time 100 o.visibility.controller.value = 1
)
)
I started on making a script
I started on making a script to do this once upon a time ;o)
It's not finnished, but here it is anyway:
/ Raymond
The hide property can not be
The hide property can not be animated by default, because it has no animation track yet. You can add one manually in the graph editor, or use this wonderful script by lonerobot to animate the visibility:
http://www.scriptspot.com/3ds-max/scripts/visibility-assistant
Cheers
Never get low & slow & out of ideas
Thx, I am looking for
Thx, I am looking for something simple with animate on that I can add to may program. I tryed this
for o in geometry do
(o.visibility = bezier_float()
with animate on
(
at time 0 o.visibility.controller.value = [0,0,0]
at time 100 o.visibility.controller.value = [0,1,1]
)
)
but I get
-- Error occurred in o loop; filename: C:\Users\Avner Dei\Documents\3dsMax\Scripts\viz.ms; position: 138; line: 6
-- Frame:
-- o: $Box001
-- Unable to convert: [0,0,0] to type: Float