Thanks for the response… I’ve understood your explanation and will work on it as soon as I have time. It made perfect sense.
I’ve actually managed to make it work right after I posted my question, by just ignoring the “len” variable. So for example, my Y expression was just “1-cos(max(RotX,0))” But it only worked because I used it on a newly created bone, which had a lenght of 1… scaling it messed everything up.
What I find intriguing is that on the video he shows the entire process, and he simply doesn’t create a custom property or the “len” variable itself. Could he perhaps have purposefuly cut out this part of the video/process? Maybe, but checking a little further, I’ve come across the Driver manual, which shows something called Driver_namespace, which is a list of builtin functions that you can use on the driver’s scripted expressions. You can check the list on the python console:
Among the functions listed are well known ones like sin, cos, tan… as well as the others shown on the video expression: mat and guess what… len! So according to the blender manual and the list inside blender, “len” is some property or function that you can use to work with drivers.
So this makes me wonder if somehow on blender 2.5 (the video’s version), a “len” attribute was used, and worked on that version… while on recent versions it doesn’t and we must resort to creating a variable ourselves.
Edit: check it out: