This code had been refactored but not tested with the no-armature workflow
This commit is contained in:
Colin Basnett
2023-09-05 23:35:39 -07:00
parent 83e65687ac
commit da39c14464

View File

@@ -147,6 +147,8 @@ def build_psk(context, options: PskBuildOptions) -> Psk:
# Temporarily force the armature into the rest position.
# We will undo this later.
old_pose_position = None
if armature_object is not None:
old_pose_position = armature_object.data.pose_position
armature_object.data.pose_position = 'REST'
@@ -164,6 +166,7 @@ def build_psk(context, options: PskBuildOptions) -> Psk:
mesh_object.vertex_groups.new(name=vertex_group.name)
# Restore the previous pose position on the armature.
if old_pose_position is not None:
armature_object.data.pose_position = old_pose_position
vertex_offset = len(psk.points)