I'm using a driver with scripted expression to create chaotically swinging pendulum.

One empty is used as a pivot point, the second as a pendulum controller, and some mesh linked to second empty as a child.

The second empty has a constraint to keep it a constant distance from the first empty, then I did some movement in the horizontal plane by F-curves to simulate swinging. Then I wrote PyDrivers to make the second empty automatically rotate to keep the local Z axis directed to first empty.

Using TrackTo is good in some cases, but not this one. When the pendulum swings near the vertical axis it automatically rotates about 180 degrees around the local Z axis. So it is hard to clean up this animation by manual compensation. It is somehow connected with gimbal problems.

I wrote two drivers for X and Y rotation (like atan(X/dist)), I changed the axis order to ZYX to allow the pendulum to rotate around local Z axis correctly.

After that I worked on a remote host with Blender 2.69 through the command-line to render the animation.

Every piece of animation has the same problem: the first frame driver is not working. I tested a lot of sequences and every time only first frame was not calculated by driver.

Well I have workaround to render first frames manually but this is a solution, because I have to render a heavy pile of animation. But I'm not sure enough that it is a bug.

Demonstration scene is here: http://www.pasteall.org/blend/25644

  • $\begingroup$ Seems to work for me.. I assume you did run blender with the -y flag? $\endgroup$ – gandalf3 Dec 10 '13 at 20:42
  • $\begingroup$ I did it with --enable-autoexec, because switching checkbox "auto run python scripts" didn't took effect in my case at all. And the problem that python driver is workung for all frames in sequence except first one. $\endgroup$ – Daniil Romanov Dec 11 '13 at 7:58
  • $\begingroup$ strangely enough, i have a related (or the same) problem. i have some drivers setup to create the rotation of some spheres rolling on a floor. when rendering frames manually, it seems fine, but when rendering animation or per commandline (i would really like to use the render farm i have access to!) it does not sometimes. the behavior looks completely random to me. $\endgroup$ – A. Tropics Jul 4 '17 at 21:12

Sorry for bothering, looks like it was a floating bug. Аfter some another runs all first frames are correct, seems python driver works after that unclear behavior. Question is closed for me.

| improve this answer | |
  • 1
    $\begingroup$ What is a floating bug ? $\endgroup$ – ideasman42 Mar 12 '15 at 11:41

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.