Use of LIMIT_ROTATION and LIMIT_LOCATION constraint cause bake action to fail
Copprhead opened this issue · 1 comments
Copprhead commented
For both constraints, the "target" property is checked to exist. As these constraint types don't have that property the script aborts.
Fixed it in edmbakeaction.py by adding dedicated case for these constraints that doesn't check the target property:
if c.type=='LIMIT_ROTATION' and not c.mute:
rotationkeyframedBones[b.name]=1
if (c.type=='TRACK_TO'
or c.type=='LOCKED_TRACK'
or c.type=='DAMPED_TRACK'
or c.type=='TRANSFORM'
or c.type=='COPY_TRANSFORMS'
#or c.type=='LIMIT_ROTATION'
or c.type=='COPY_ROTATION') and not c.mute:
if c.target!=None:
if c.target.type=='ARMATURE':
if c.subtarget!=None:
rotationkeyframedBones[b.name]=1
else:
rotationkeyframedBones[b.name]=1
if c.type=='LIMIT_LOCATION' and not c.mute:
locationkeyframedBones[b.name]=1
if (c.type=='COPY_LOCATION'
or c.type=='TRANSFORM'
#or c.type=='LIMIT_LOCATION'
or c.type=='COPY_TRANSFORMS'
or c.type=='LIMIT_DISTANCE') and not c.mute:
if c.target!=None:
if c.target.type=='ARMATURE':
if c.subtarget!=None:
locationkeyframedBones[b.name]=1
else:
locationkeyframedBones[b.name]=1
tobi-be commented
Thank you