Hello,
as the title suggests this is the problem I am having. Is there a way to NOT break the connection on a constrained object in Maya? Seems like a simple thing but I can't figure it out. I bake things a lot in animation, and this always breaks my connections.
Also if there is a way to do this, why is this not the default behaviour in Maya? If an animator spends time setting up constrained objects for his animation to work correctly, why would I want them to break by setting a key on the control that is constrained. Seems dumb.
Thanks,
Craig.
Solved! Go to Solution.
Solved by gimble. Go to Solution.
Not quite sure I'm understanding what's happening. For example, let's say you have a cube constrained to follow a locator. Are you saying that if you keyframe the locator, the connections to the cube are broken?
Yes, that is true - once you bake animation, the connections to constraints get broken.
My solution was to reconnect constraints. You can try the script, see if it helps, leave your vote for the idea.
I have somewhat ugraded that script, however it still has one problem that I haven't figured out how to solve yet, and I have no time for that at the moment. Let me know if you are still in need of solving things like that in a week or so.
,,,_°(O__O)°_,,,
Maya2019.1 @ Windows10 & GeForce GTX1080Ti
If the post was helpful, click the ACCEPT SOLUTION button, so others might find it much more easily.
Based on your comment about baking animation. And on hamster's reply. You are saying the constraint connections get broken when baking. There's an easy way around this. Have you noticed that if you set a keyframe on a constrained node that your connected channels become green and there's a new "blend" attribute? The blend attribute allows you to blend between keyframes or constraint. If what you want is to retain the constraint while having keyframes, then this is your option. Write a script that advances along your timeline and sets keyframes. Essentially baking the animation. But by doing it yourself and not using the bake keys function, you retain the constraint connections through the blendWeighted node.
Yeah that's not really a solution though. I'm sure there's a tick box somewhere in the setting to stop constraints breaking. Autodesk are you listening???
Did you check the script in my link?
,,,_°(O__O)°_,,,
Maya2019.1 @ Windows10 & GeForce GTX1080Ti
If the post was helpful, click the ACCEPT SOLUTION button, so others might find it much more easily.
In the example you described, once you key the cube, you will notice a new "BlendParent" attribute in the channelBox. Connect the parentConstraint's weight attribute to this and you can have your constraint affecting the cube any time you want. The trick is to have the constraint weight and the blendParent in sync.
Hi!
I can't reproduce here anything like breaking connections.
@gimble provided a simple example with a cube and a sphere and this does not break any connections.
Please check the "Blend Parent 1" attribute that is added to the cube, this controls the blending between the keyframes and the constraint.
My recommendation would be to
a) only add keys to attributes that are not controlled by the constraint
b) use the Blend Parent attribute to control the influence of the constraint and keys.
c) use Animation Layers to add additional keys.
...
Please keep in mind that baking does "freeze" a certain animation, so this will bake the current values to keys and will remove some control you have on the animation, but this is intended and what baking is usually used for.
This raises the question of why one would be keying a constrained object if one didn't want to transition away from the constraint. If you're just setting keyframes willynilly, then that's the user's problem. Set keyframes to transition off of a constraint. The blend attribute is exactly that, blending from constraint to keys. I agree that the default of "0" is a poor choice. But it's an attribute that needs to be keyed anyway so no big deal.
Hi!
Thanks for the video.
No connection is broken as your video proofs.
Maya transform nodes can only have one input, either a key, an expression a constraint or any other connection to an other node, you can check this in Node Editor.
When you add a keys constrained object to an attribute that has no input, there is no change for the current connections, but if you add keys to an attribute that is already connected / constrained, then the connections need to change, there is no other way.
If you add keys to an attribute that is constrained the connections are not simply replaced, you get a blend node which allows you to keep the previous influence from the constraint and add the influence from the keys, but you can define the ratio on your own.
This value will be different for everyone, so whatever value is chosen here will not fit everyone's need in every case.
You maybe want to keep 100% override from the constraint, but others maybe want to completely override the constraint (as done currently with "0") or maybe prefer a default value of "0.5" .
So my previous recommendations are still all valid.
a) Only add keys to attributes that are not controlled by the constraint.
(This does not change anything related to the constraint and does not require the blend node)
b) Use the Blend Parent attribute to control the influence of the constraint and keys.
(Maybe create your own script for setting keys that sets the blend value as you like at the beginning.)
c) Use Animation Layers to add additional keys.
...
There are for sure more options.
You can also add a suggestion to Maya Ideas to be able to set a custom value for this in Preferences:
Help -> Speak Back -> Maya Ideas
Again, nothing is broken or disconnected when adding keys to a constrained object, you just would prefer an other default value for blending.
Hey,
thanks for taking the time to look in to it, appreciated. From your words on blending nodes etc I took a look at the animation preferences. I figured it out. I was right, a tick box fixed it 🙂
Hi!
I never used this setting before, but I noticed the same options in the Preferences after I replied.
I am glad you found it too and it works for you.
Learned something new today. Thanks. But I'm still lost as to why you would want to keyframe a constrained object and leave it constrained. Why the extra data/nodes? I thought you were going to set another keyframe to show you can animate on top of the constraint. Maybe I'll try that.
shout out for finding that tickbox, the child follows its parent now after setting a keyframe, however when i then key again there is no animation and just remains where ever the first key frame has been set. any idea how to fix this?
Within bake simulation options - you can check "bake to:" new layer, it does preserve constraints and put keys on created layer.
The connections aren't broken, there is a blendNode added between the constraint and the keys. And a channel is added to the constrained object.
The reason this is helpful is so you can blend on and off between the constraint to the keyed animation and then back again.
Think of a hand tossing a ball. you can constrain the ball to the hand. and make the throwing motion. but you would then key the ball ( blending to it's own animation) , and a few frames later , key the ball up in the air. and then a few frames later, return the ball to the hand,, and key the blend to constraint back on again.
This saves a ton of time that used to be done by having to constrain between two objects to control the ball, and then keying the weights on the constraint to make the transition between the two . Now you have 1 simple way to key the constraint on and off.
hth
-=s
Can't find what you're looking for? Ask the community or share your knowledge.