I just started working with Blender Drivers and some Scripted Expressions.

To start off, I wanted to apply an objects rotation to another object, but inverted.

Here is what I did:

enter image description here

But it's not working and I don't know why, becuase when I type my expression into console, it returns the correct value that I need.


1 Answer 1


Scripted expression expects a mathematical function using the variable you set underneath (default name is "var", but you can choose your own, avoiding blank spaces or others special sign).

In this example I've set the Z rotation of the child object to be driven by Z rotation of the parent Obj. The name of the variable is "var_ob_par", and the scripted expression is " - var_ob_par".

It works!

enter image description here

  • $\begingroup$ do you know, if it's possible to add if-statemnts or for-loops to a driver? I come form after effects where you can simply code an expression but in blender it seems to work differently and i haven't figured out yet how it does. $\endgroup$ Jun 24, 2015 at 11:38
  • $\begingroup$ @SlimMarten see: blender.stackexchange.com/questions/2892/… $\endgroup$
    – p2or
    Jun 24, 2015 at 11:45
  • $\begingroup$ wiki.blender.org/index.php/User:Hjaarnio/Manual/Animation/… $\endgroup$ Jun 24, 2015 at 11:56
  • $\begingroup$ do you also know how I can achieve a visual feedback form what my expression is? My current value depens on another objects rotation and when i change its rotation, I cant look at the driver anymore and see what it actually calculates $\endgroup$ Jun 24, 2015 at 11:56
  • $\begingroup$ @SlimMarten Please ask a new question on this :) $\endgroup$
    – p2or
    Jun 24, 2015 at 12:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .