mirror of
https://github.com/DarklightGames/io_scene_psk_psa.git
synced 2025-01-31 11:53:47 +01:00
Fix for #47
This code had been refactored but not tested with the no-armature workflow
This commit is contained in:
parent
ea5d0c6ac2
commit
214f19ff8c
@ -154,8 +154,10 @@ def build_psk(context, options: PskBuildOptions) -> Psk:
|
||||
|
||||
# Temporarily force the armature into the rest position.
|
||||
# We will undo this later.
|
||||
old_pose_position = armature_object.data.pose_position
|
||||
armature_object.data.pose_position = 'REST'
|
||||
old_pose_position = None
|
||||
if armature_object is not None:
|
||||
old_pose_position = armature_object.data.pose_position
|
||||
armature_object.data.pose_position = 'REST'
|
||||
|
||||
depsgraph = context.evaluated_depsgraph_get()
|
||||
bm = bmesh.new()
|
||||
@ -171,7 +173,8 @@ def build_psk(context, options: PskBuildOptions) -> Psk:
|
||||
mesh_object.vertex_groups.new(name=vertex_group.name)
|
||||
|
||||
# Restore the previous pose position on the armature.
|
||||
armature_object.data.pose_position = old_pose_position
|
||||
if old_pose_position is not None:
|
||||
armature_object.data.pose_position = old_pose_position
|
||||
|
||||
vertex_offset = len(psk.points)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user