Tagged: parametric animation stop all
- This topic has 9 replies, 3 voices, and was last updated 2 years ago by kdv.
-
AuthorPosts
-
2022-12-22 at 11:34 pm #59163rollos5sonParticipant
Good evening from the USA!
I have a scene set up where clicking either of two buttons will trigger a different parametric animation of a group of shapes; to animate the individual objects, I pass them to an animation procedure (see screenshot) via loop, assigning each its own start and stop positions.
I’d like to have all animations stop and reset if a button is clicked while they are still running.
How would I do this? Or is there a better approach? I can’t figure this out.
Attachments:
You must be logged in to view attached files.2022-12-23 at 12:50 am #59167xeonCustomerHello back from the USA – SoCal – Happy Holidays.
There are several methods of animation and you have selected one method that is based on the animate parameter. Without knowing the reasoning behind this decision I could not say whether its the best way or not or what way I would recommend.However, a simple way to create a reset is to create a reset “flag”.
See attached image. I have created an event that would be linked to your reset object.Since your animation parameter is only .25 seconds…one might consider just doing a test on the flag at the end of the animation so that the reset ends gracefully but I don’t know your needs so this is an option.
Note, parametric animating is pretty great but can really eat up processing if not managed and can really start to slow things down if the list of items being animated is large.
If you would like to discuss…let me know. Xeon@r66d.com.
Attachments:
You must be logged in to view attached files.Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2022-12-23 at 1:03 am #59170kdvParticipantPuzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-12-23 at 5:03 pm #59189rollos5sonParticipantThanks all for the tips!
@kdv77kdv – I tried something similar but missed putting the animation code under a “do” statement, thanks for pointing that out.I also ran into an issue with clearing the param animations after stopping (could this be an added feature?), so I’m going to roll with NLA instead (which was a bit more tedious to set up but not as bad as I’d expected).
2022-12-23 at 6:58 pm #59195kdvParticipantI also ran into an issue with clearing the param animations after stopping
And what exactly are you clearing??? It’s not enough just to stop them?
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-12-23 at 7:03 pm #59196rollos5sonParticipant@kdv77kdv – maybe I missed something with my setup, but what happens is when I ‘restart’ the animations through my procedure they resume at the points they would have been if they had still been running, instead of from my defined start points. To me, it looks as if the process driving the animations is still running in the background even when the animation itself is stopped. Definitely would like to know the cause and resolution, if it exists, of that behavior.
2022-12-23 at 7:27 pm #59202kdvParticipantjust kill them all
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-12-23 at 10:29 pm #59204rollos5sonParticipantThe NLAs are showing the same behavior, so it looks like it’s the loops I need to kill (my old-school linear brain never can get used to the behavior of object-based code). I tried the break puzzle but that seemed to only go buggy and not stop the loops. Hopefully just me not applying it correctly.
PS Thanks for the code snippet, may still be able to use at some point.
2022-12-23 at 11:17 pm #59205rollos5sonParticipant‘Cliff Notes’ version of the below: Timer puzzle code can be used as a loop with a ‘kill switch’!
Finally making some progress here – I found this bit about Timer puzzles and it seems to provide the behavior I require; kill the timer and I also kill any processes it’s driving! Leaving here in case someone has the same issue.
[Edit: Yes, this did the trick! I just use the timer as my loop! Definitely is working for me, at least at this stage of my project. Thanks again! ]
2022-12-24 at 1:21 am #59209kdvParticipantWrong usage can lead to the wrong behavior ))) There is no need to clear smth after animations have been stoped via the
stop animate param
puzzle. When restarted they start from the very begining.
https://v3d.net/a3r
a double click toggles animations statePuzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
-
AuthorPosts
- You must be logged in to reply to this topic.