0
$\begingroup$

Can I set up a Driver for the bone on the left to slightly copy the rotation of the selected one when rotating clockwise on its Z axis, and to copy the rotation with higher influence when rotated counter clockwise on its Z axis?enter image description here

$\endgroup$

1 Answer 1

0
$\begingroup$

you could do this by putting a simple condition in your driver's code block:

zrot / 2 if zrot < 0 else zrot * 5

enter image description here

which gives this:

enter image description here


⚠️ Note that you can just map the range(-180,180) to something else. it means that if you rotate counterclockwise when zRotation is currently greater than zero this doesn't work. if that's what you really need you can animate your reference bones and using f-curves you can do the rest.


$\endgroup$
5
  • 1
    $\begingroup$ Somewhat related blender.stackexchange.com/questions/164765/… IMO will need to keep the value of the previous frame eg going from 90 to 100 or 80 on next frame will both be considered > 0. See the slow value example in Text Edtor > Python > Templates > Driver Functions $\endgroup$
    – batFINGER
    Commented Jan 27, 2021 at 9:20
  • $\begingroup$ @batFINGER thanks but blender doesn't store added functions. I wanted to ask this problem before but I forgot. whats your opinion about it. $\endgroup$ Commented Jan 27, 2021 at 9:41
  • $\begingroup$ @batFINGER instead of using addons is there a way to store (or run before load) these kind of functions in blender? $\endgroup$ Commented Jan 27, 2021 at 10:57
  • 1
    $\begingroup$ put them in a text block with py extension, add the methods to driver namepace in register method. Check the register checkbox in text editor. Text > Register save to startup file. Requires Auto run python scripts to be set in prefs too. $\endgroup$
    – batFINGER
    Commented Jan 27, 2021 at 11:00
  • $\begingroup$ thanks so much! $\endgroup$ Commented Jan 27, 2021 at 11:08

You must log in to answer this question.

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