Listen to animation changes and change default interpolation

I'm trying to make a plugin that will change the default anim. interpoloation to "constant", but I'm not sure where to start in terms of what to listen or which signal to use.

As a test, I have a working plugin that will listen to the timeline with the timeChanged() signal, and it's working in DazStudio, but I need some help moving forward.

Thanks!

Comments

  • surrealsurreal Posts: 155

    I do not recall ever seeing a default interpolation type setting. I suspect that each tool (Parameter pane, Timeline, PowerPose, Viewport widget, etc) has their own hard wired default interpolation type. I do not see anything resembling a default interpolation type setting in the registry keys.

    If there is no default interpolation type setting for the whole application then your task will be very difficult.

    You mention listening for event signals, so I assume that you are aware that there is no default interpolation type setting and are thinking about changing the key's interpolation type after it has been created.

    To do that you could listen to the transformChanged() signal of each node(DzNode) in your scene. Or maybe have a custom property that gets added to all nodes which has a interpolation type setting and delegate the task of listening to that custom property. However transformChanged gets fired in response to far more than just the creation of a new key. You would have to keep track of all keys on all of the node's properties, so that you could detect when a new key was created rather than just a change of the current frame value or update an existing key. What happens when you copy&paste keys! What happens when you load an animation or a whole new scene!

    Sounds like a challenging project smiley

     

Sign In or Register to comment.