fix bone constraints of other in-scene characters not being remapped from orig to rep

This commit is contained in:
Nathan
2026-03-13 16:56:03 -06:00
parent d9fe316833
commit e52d516d34
2 changed files with 290 additions and 0 deletions
File diff suppressed because one or more lines are too long
+9
View File
@@ -493,6 +493,15 @@ def run_retarg_relatives(orig, rep, rep_descendants, orig_to_rep):
if getattr(c, "target", None) == orig:
c.target = rep
# Retarget bone constraints on ALL armatures (other characters, etc.)
for ob in bpy.data.objects:
if ob.type != "ARMATURE" or not ob.pose:
continue
for pbone in ob.pose.bones:
for c in pbone.constraints:
if getattr(c, "target", None) == orig:
c.target = rep
# Camera DOF: retarget focus_object from orig to rep
for ob in bpy.data.objects:
if ob.type != 'CAMERA':