Can you please tell me if there is any possibility in Blender python API to get value from “Driven Property” item in Drivers_Editor window ?
I want to add for Drivers_Editor the ability to quickly filter the column on the left by the current driver so that every time I don't have to enter the driver name by hand. I understand that we can reach any driver for example in this way:
activeBone = bpy.context.active_bone
activeMesh = None
rig = bpy.data.objects[activeRig.name]
drv_idx = 0
for obj in bpy.data.objects:
if (obj.type == 'MESH' and rig in [m.object for m in obj.modifiers if m.type == 'ARMATURE']):
activeMesh = obj
drivers_list = []
try:
drivers_list = activeMesh.data.shape_keys.animation_data.drivers
except:
continue
if drivers_list:
for d in drivers_list:
for dv in d.driver.variables:
for dvt in dv.targets:
# if active bone name is in driver targets process driver
if activeBone.name in dvt.data_path or activeBone.name in dvt.bone_target:
drv_idx = drv_idx+1
print("drv_idx: ", drv_idx)
print("d.data_path: ", d.data_path)
But this approach is not linked to the “Open Drivers Editor” item in any way which in turn automatically displays driver properties in the right panel of Drivers_Editor.