Skip to content

Commit

Permalink
fix(shape): Add tangent property on shape if normal is present
Browse files Browse the repository at this point in the history
Add the tangent property to a shape if it has normals.
  • Loading branch information
LKAMinco authored Apr 28, 2024
1 parent 566951f commit a30ac03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion addon/i3dio/node_classes/merge_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self, id_: int, merge_group_object: [bpy.types.Object, None], i3d:

# Override default shape behaviour to use the merge group mesh name instead of the blender objects name
def add_shape(self):
self.shape_id = self.i3d.add_shape(EvaluatedMesh(self.i3d, self.blender_object), self.merge_group_name, True)
self.shape_id = self.i3d.add_shape(EvaluatedMesh(self.i3d, self.blender_object), self.merge_group_name, True, tangent=self.tangent)
self.xml_elements['IndexedTriangleSet'] = self.i3d.shapes[self.shape_id].element

def add_mergegroup_child(self, child: MergeGroupChild):
Expand Down
2 changes: 1 addition & 1 deletion addon/i3dio/node_classes/skinned_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def add_shape(self):
# Use a ChainMap to easily combine multiple bone mappings and get around any problems with multiple bones
# named the same as a ChainMap just gets the bone from the first armature added
self.shape_id = self.i3d.add_shape(EvaluatedMesh(self.i3d, self.blender_object), self.skinned_mesh_name,
bone_mapping=self.bone_mapping)
bone_mapping=self.bone_mapping, tangent=self.tangent)
self.xml_elements['IndexedTriangleSet'] = self.i3d.shapes[self.shape_id].element

def populate_xml_element(self):
Expand Down

0 comments on commit a30ac03

Please sign in to comment.