Hi, I’m trying to see whether if some of the shape keys have drivers assigned to them, but just can’t get it done… My code is as follows:
import bpy
ob=bpy.context.object
#get every shapekey and find out whether they’re muted or not…
shape_key = ob.data.shape_keys
kbloks = shape_key.key_blocks
for shape in kbloks:
acikMi = shape.mute
if shape.animation_data.drivers is not None:
if (acikMi == True):
print (shape.name)
#Find and mute all active modifiers…
mods = ob.modifiers
for mod in mods:
mod.show_viewport = True
The line that contains “if shape.animation_data.drivers is not None:” is giving the following error:
‘ShapeKey’ Object has no attribute ‘animation_data’
What can I be doing wrong?
Thanx
AJ