hi. I know basically in the driver you can also access blender API, but the space to write the code is tiny, you have only 1 line.
I need more lines, can I link something from an external file? if yes, how?
hi. I know basically in the driver you can also access blender API, but the space to write the code is tiny, you have only 1 line.
I need more lines, can I link something from an external file? if yes, how?
That one line can actually be very long- for example, this is a valid driver:
(1) if v <1.57 and v >1.2 else (2) if v <1.2 and v > .8 else (3) if v <.8 and v >.42 else (4) if v <.42 and v > 0 else (5) if v < 0 and v > -.42 else (6) if v < -.42 and v > -.8 else (7) if v < -.8 and v > -1.2 else (8) if v < -1.2 and v > -1.57 else (9)
You can also use scripting to hook in:
https://blender.stackexchange.com/questions/255745/how-to-add-a-driver-by-python-for-a-custom-property