Skip to content

Commit

Permalink
fix: pose_bones update in full Object update
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeCrassous committed Apr 14, 2021
1 parent 0f2d3c6 commit 7acbf11
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions mixer/blender_data/object_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,16 @@ def apply(

if to_blender:
if isinstance(datablock.data, T.Armature):
try:
_ = update._data["pose"].value._data["bones"]
except KeyError:
pass
else:
# Update Armature.edit_bones before Object.pose.bones
ArmatureProxy.update_edit_bones(datablock, context)
pose = update.data("pose")
if pose:
if isinstance(pose, Delta):
bones = pose.value.data("bones")
else:
# delta may be a full Object replace, thus pose is a StructProxy
bones = pose.data("bones")
if bones:
# Update Armature.edit_bones before Object.pose.bones
ArmatureProxy.update_edit_bones(datablock, context)

incoming_material_slots = update.data("material_slots")
self._fit_material_slots(datablock, incoming_material_slots, context)
Expand Down

0 comments on commit 7acbf11

Please sign in to comment.