Open mrwonko opened 4 months ago
for frameNum, frame in enumerate(self.frames):
# show progress bar / remaining time
if time.time() >= nextProgressDisplayTime:
....
nextProgressDisplayTime = time.time() + PROGRESS_UPDATE_INTERVAL
# absolute offset matrices by bone index
offsets: Dict[int, mathutils.Matrix] = {}
for index in hierarchyOrder:
....
pose_bone = bones[index]
# pose_bone.matrix = transformation * scaleMatrix
pose_bone.matrix = transformation
bpy.context.view_layer.update()
# in the _humanoid face, the scale gets changed. that messes the re-export up. FIXME: understand why. Is there a problem?
pose_bone.scale = [1, 1, 1]
pose_bone.keyframe_insert('location', frame = frameNum)
pose_bone.keyframe_insert('rotation_quaternion', frame = frameNum)
scene.frame_current = 1
https://discord.com/channels/200934142278369281/1103343134160728144/1225545235652935821
Maybe that way repeatedly switching out of pose mode during gla import can be avoided?