0
$\begingroup$

My scene consists of a Null, key-framed rotation on itself, with a cube as child. The cube is translated at (6,0,0) and has a key-framed rotation along the x-axis.

What I would like is to bake or compress (not sure of the right term here) the transform hierarchy. The end result is the cube, moving exactly like when it was the child of the Null, with the offset, but now, it's not the child of the Null any more.

And if there's a way to do it with Python, that would be a must!

$\endgroup$
  • $\begingroup$ Related: blender.stackexchange.com/q/2533/599 $\endgroup$ – gandalf3 Jun 24 '15 at 19:45
  • $\begingroup$ @gandalf3 I tried that, but when I break the Null/Cube relationship, the location of the cube doesn't have any key frames. $\endgroup$ – widgg Jun 24 '15 at 19:50
1
$\begingroup$

This is non-trivial. For an arbitrary animation, you would basically have to evaluate the data_paths at every frame and insert a keyframe. For a rotating cube you would have to give it both rotation and location keyframes.

For an example of how sticky this can become, consider the similar http://web.purplefrog.com/~thoth/blender/python-cookbook/snapshot-keyframes-as-mesh.html, which I do not include inline because it does not actually solve your problem, it is just an example of how things can get messy when you have to step frame by frame and coerce blender to apply (for lack of a better word:) stuff.

For the special case of rotations, you can use sinusoidal easing (on the t menu of the fcurves editor) to animate the location of the cube as long as it always rotates in 90 degree sweeps. sinusoidal easing for rotation Another trick for the limited case would be to change the origin of the cube's mesh to be where the empty used to be and then rotate the cube.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.