I am trying to "enable" a contraint by the state of another constraint using drivers. I want to be able to check if a contraint is enabled or not and then set the state of another constraint. For example I have a "Shrinkwrap" and a "Child of" constraint and I want to set up a driver to the "Child of" constraint using a scripted expression. In the expression I want to chech if the other ("Shrinkwrap") constraint is enabled or not and then set the "Child of" constraint accordingly. I am attempting to do that by setting a scripted expression as follows:
False if pose.bones["Bone.003"].constraints["Shrinkwrap"].enabled ==True else True
The problem is that I get an error saying:
'''NameError: name 'pose' is not defined'''
which should not be the case as "pose" is a module loaded with blender at start up.Is there a way to make this work, or am I approaching this the wrong way?