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?
1 Answer
$\begingroup$
$\endgroup$
5
you could do this by putting a simple condition in your driver's code block:
zrot / 2 if zrot < 0 else zrot * 5
which gives this:
⚠️ 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.
-
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$ 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$ Commented Jan 27, 2021 at 11:00 -
$\begingroup$ thanks so much! $\endgroup$ Commented Jan 27, 2021 at 11:08