1
$\begingroup$

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.

$\endgroup$
2
$\begingroup$

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

$\endgroup$
  • $\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$ – Marten Zander Jun 24 '15 at 11:38
  • $\begingroup$ @SlimMarten see: blender.stackexchange.com/questions/2892/… $\endgroup$ – p2or Jun 24 '15 at 11:45
  • $\begingroup$ wiki.blender.org/index.php/User:Hjaarnio/Manual/Animation/… $\endgroup$ – josh sanfelici Jun 24 '15 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$ – Marten Zander Jun 24 '15 at 11:56
  • $\begingroup$ @SlimMarten Please ask a new question on this :) $\endgroup$ – p2or Jun 24 '15 at 12:08

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.