This content has been marked as final. Show 10 replies
there is a pause and play command for animations. If you look in the help files you should find it
great feature!! But..... unfortunately i cant get it to function for both doors to animate at the same time. So far which ever door i place it on first is the only to work. Also if i group the object in 3DS before importing it in then the animation doesnt work at all. Any quick answers -- ive got to give up tonight and send out something for the client, would be great with function but if not.. id still like to know the answer for future work. Thanks.
once grouped the animation is attached to the group not the individual doors address the group. member(1).model("group01") something along these lines use 3dpi
hmmm.. message didnt send, lets try this again..
When i group everything in max before export, then import into director i no longer have the ability to attach the play animation function on the file. no sure what to do... when i export the file from max and preview it..when they are separate objects they will animate in the preview, when grouped nothing moves in the preview (not sure if this is trying to tell me something). Also, would it help to try grouping once in director? ..... what did you mean by "use 3dpi"?
Do you really need to use pre-rendered animations to open doors? If they just swing on a hinge or slide open, perhaps you could simply use 'rotate' or 'translate' commands to rotate or slide the door object to the correct position, frame by frame? That's how I'd approach it unless they are unusual doors with bits that slide in different directions such as a complex airlock or something.
use 3dpi to find out information in the scene like what animation is attached to what object and the name of that animation
you may not be addressing the animations by the right name
I would use an object-oriented approach, using parent scripts as the object envelop, so to speak;
if you are not familiar with object-oriented programming, you would need at least a day to get it under control; once you have figured it out you would create one generic 'door' object which would have rotation amounts and opening and closing methods/functions in it;
when you would instantiate a new door 'object' you would feed it the door model that you want to open/close;
purple_door = member("your_world").model("purple_door")
purple_door_object = script( "generic_parent_script_for_doors" ).new( me , purple_door )
yellow_door = member("your_world").model("yellow_door")
yellow_door_object = script( "generic_parent_script_for_doors" ).new( me , yellow_door )
so at the beginning of the movie you create the door 'objects';
later when you press a button or whatever you would call one of these objects, or both, and tell them to do their thing, such as 'open';
your generic door object parent script would look something like this:
on new me , arg_door_model
this_door_model = arg_door_model
total_degrees_to_open = 85
amount_to_open_each_frame = 3
on open_it me
-- the 'me' thing is confusing; you will have to read up on it; I can't explain it;
-- here you will probably create a timeout object that will call a rotate script every 50 milliseconds or so; and you will have to do the math to see if the door is completely open yet; if so then kill the timeout
I hope that this helps;
First off to duckets - Yes this is unfortunately an airlock! HA! good guess. The more i get into this the more animations i want to function with the press one "object". So rotate and transform dont look like they will help at all. (at least from what i understand with these two functions) Unfortunately im still hoping tyree_2 can shuffle through my confusion to help me with the 'play animation' function. Otherwise ive got to look at what dsdsdsdsd put together for me.. and ive got to be honest here director is a great program but code and i dont get along, so drag and drop functions are always the way id rather go! <- but this is indeed the reason im having this problem to begin with.
I will however give this a try and yes it will probably take a day or two to even grasp what you've type out. I'll post a follow up hopefully this weekend. Thanks again for all the time spent in helping me figure this out!
at the moment i don't have enough time to explain the situation completely. this is little bit different from your problem, but explains how to controll the keyframeplayer. It is designed to work with files that are created with cinema4D where the name of a keyframeanimation is named as the model.
i think in max the exported keyframeanimation has at the end of the name the string "-key".
Maybe you take a look at this example:
I think you can extract something out of it. You would have to create an event where two keyframeplayer are activated at the same time...
hope you can extract something out of it...
you can try linking one door to the other in max but I suspect its a naming problem, when you use the play command. when you use a seperate animation for each door there should be no problem