When exporting, if an object has a parent bone with the same name, add its geometry to the parent bone's model and discard the object itself.

This commit is contained in:
William Herald Snyder
2022-09-29 15:18:58 -04:00
parent 7cfa101d42
commit 5692a60907
2 changed files with 69 additions and 41 deletions

View File

@@ -12,6 +12,14 @@ from .msh_model_utilities import *
from .crc import *
def get_bone_world_matrix(armature: bpy.types.Object, bone_name: str) -> Matrix:
if bone_name in armature.data.bones:
return armature.matrix_world @ armature.data.bones[bone_name].matrix_local
else:
return None
def has_preserved_skeleton(armature : bpy.types.Armature):
return len(armature.data.swbf_msh_skel) > 0