I found a genius script, which dumps all drivers of a blend file into a text.
A resulting line looks like this one:
bpy.data.objects[“Box”].pose.bones[“LidDrv”].rotation_euler (a+0.3*b)
I need to know, from which vars “a” and “b” are build …?
How can I do access this information via Python scripting?
Hi Gorgious,
thank you VERY much for the code! It helps me more than you may think!
The resulting script is for debugging purposes of my main problem - another script I wrote to batch rename bones in a way, that everything, which depends on it will be renamed/rearranged in a way, that the whole logic of a blend file does not fall apart.
Current status:
The script renames bones and vertex groups according to some regex.
Problem: After the script has finished, a lot of drivers will be marked as “erroneous” in the driver
editor.
Interestingly when I rename a bone by hand via Blender (that is: not via script), this does not happen.
So I “need to rename the driver” (or what else action I need to perform with “the driver”) also.
How can I do that…?
Do I need any other entities in a blend file, which depends on the name of bones?
Apparently you need to explicitely update the driver once you changed its settings with python. This thread explains that changing the expression triggers an update :