Fix convert-mesh script
This commit is contained in:
parent
2b46b38da2
commit
463cb5372b
1 changed files with 31 additions and 28 deletions
|
|
@ -190,13 +190,14 @@ if armature is not None:
|
|||
bones.append((p, tuple(b.head_local), tuple(map(tuple, b.matrix_local.to_3x3()))))
|
||||
|
||||
poses = []
|
||||
for index, pose in enumerate(bpy.data.objects['armature'].pose_library.pose_markers):
|
||||
if armature is not None:
|
||||
for index, pose in enumerate(bpy.data.objects['armature'].pose_library.pose_markers):
|
||||
print("Found pose", pose.name)
|
||||
|
||||
# [rotation, scale, translation]
|
||||
data = []
|
||||
for i in range(len(bone_names)):
|
||||
data.append([[None, None, None, None], [None, None, None], [None, None, None]])
|
||||
data.append([[1.0, 0.0, 0.0, 0.0], [1.0, 1.0, 1.0], [0.0, 0.0, 0.0]])
|
||||
|
||||
marker = armature.pose_library.pose_markers[index]
|
||||
frame = marker.frame
|
||||
|
|
@ -245,6 +246,8 @@ def to_bytes(obj):
|
|||
if type(obj) == str:
|
||||
b = obj.encode('utf-8')
|
||||
return struct.pack('<I', len(b)) + b
|
||||
print("Type", type(obj), "not supported")
|
||||
sys.exit(1)
|
||||
|
||||
SECTION_MESH = 1
|
||||
SECTION_BONES = 2
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue