Skip to content

Commit

Permalink
Merge branch 'BST-Fix-279' of https://github.com/TiberiumFusion/Blend…
Browse files Browse the repository at this point in the history
…erSourceTools into BST-Fix-279
  • Loading branch information
TiberiumFusion committed Dec 7, 2022
2 parents e362894 + c90c1b1 commit 3ee97ca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions io_scene_valvesource/datamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,9 @@ def __repr__(self):
def __hash__(self):
return hash(tuple(self))

def __round__(self,n=0):
return type(self)([round(ord,n) for ord in self])

def tobytes(self):
return struct.pack(self.type_str,*self)

Expand Down
3 changes: 3 additions & 0 deletions io_scene_valvesource/export_smd.py
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,9 @@ def writeSMD(self, id, bake_results, name, filepath, filetype = 'smd'):
else:
anim_len = 1

# remove any unkeyed poses, e.g. from other animations in this export operation.
for posebone in self.armature.pose.bones: posebone.matrix_basis.identity()

# Start writing out the animation
for i in range(anim_len):
bpy.context.window_manager.progress_update(i / anim_len)
Expand Down
1 change: 1 addition & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def ex(do_scene):
self.assertEqual(bpy.ops.smd.compile_qc(filepath=join(C.scene.vs.export_path, blend_name + ".qc")), {'FINISHED'})

section("DMX Source 2")
C.scene.vs.export_path = join(C.scene.vs.export_path, "Source2")
C.scene.vs.export_format = 'DMX'
C.scene.vs.dmx_encoding = '9'
C.scene.vs.dmx_format = '22'
Expand Down

0 comments on commit 3ee97ca

Please sign in to comment.