Notifications
Clear all

[Closed] How to check if there is animation on an object?

Hi gays!
Is there an easy way to check if there is any animation on the object (scale, position, rotation)?

13 Replies

here also

and this

I saw it, but for some reason it doesn’t work for me.
Of course I will try again, maybe I missed something

because there was some typo

this should be ok for your needs

clearlistener()
 
(
 local aCurrentSelection = getCurrentSelection()
 for itemNode in aCurrentSelection do
 (
  local aControllers = #(itemNode.position.controller,itemNode.rotation.controller,itemNode.scale.controller)
  for itemController in aControllers do
  (
	  
   for itemKey in itemController.keys do
   (
	
	format "Name: % Key : % Time : % \n" itemNode.name itemKey itemKey.Time
	
   )
  )
 )
)

i just fixed and added name property in the format so credits to Nysuatro in the previous post

Yes, it works now, thanks a lot!
One more question, along the way,
how can i remove all animation from an object?
I tried using

for o in selection do deletekeys o #allkeys

But when keys are removed,somtimes  objects move (rotate)

if you don’t care about modifiers, names or handles you can use this

    for o in selection  do snapshot o ; delete selection

this will copy the objects without keyframes in the current state

1 Reply
(@webley)
Joined: 10 months ago

Posts: 0

not an option,
i do care

macros.run “Animation Tools” “DeleteSelectedAnimation”

Select object/s -> Alt + RMB click -> Delete Selected Animation

1 Reply
(@webley)
Joined: 10 months ago

Posts: 0

I tried this
Sometimes everything is ok
Sometimes objects change position when deleted.
it looks like the objects are in the middle of the animation,
which was deleted

the question is not precisely posed, and therefore it is difficult to answer it …
The point is, what counts as an animated controller … for example, is the script controller animated?

or for example an orientation constraint … it may not have keys, but is driven by an animated target

Second question: what do we want to do with this “possibly animated object”?

I tried this
Sometimes everything is ok
Sometimes objects change position when deleted.
it looks like the objects are in the middle of the animation,
which was deleted

Page 1 / 2