keep both vert colors and shape keys
This commit is contained in:
parent
4522055fac
commit
cb2cf0c9b4
|
@ -1316,7 +1316,7 @@ class ArmoryExporter:
|
||||||
num_colors = len(exportMesh.vertex_colors)
|
num_colors = len(exportMesh.vertex_colors)
|
||||||
has_col = self.get_export_vcols(bobject.data) and num_colors > 0
|
has_col = self.get_export_vcols(bobject.data) and num_colors > 0
|
||||||
# Check if shape keys were exported
|
# Check if shape keys were exported
|
||||||
has_morph_target = self.get_shape_keys(bobject.data) and not has_col
|
has_morph_target = self.get_shape_keys(bobject.data)
|
||||||
if(has_morph_target):
|
if(has_morph_target):
|
||||||
num_uv_layers -= 1
|
num_uv_layers -= 1
|
||||||
morph_uv_index = self.get_morph_uv_index(bobject.data)
|
morph_uv_index = self.get_morph_uv_index(bobject.data)
|
||||||
|
@ -1614,9 +1614,6 @@ Make sure the mesh only has tris/quads.""")
|
||||||
|
|
||||||
shape_keys = ArmoryExporter.get_shape_keys(mesh)
|
shape_keys = ArmoryExporter.get_shape_keys(mesh)
|
||||||
if shape_keys:
|
if shape_keys:
|
||||||
if self.get_export_vcols(bobject.data):
|
|
||||||
log.warn(oid + ' has vertex colors. Shape keys are not supported for objects with vertex colors')
|
|
||||||
shape_keys = False
|
|
||||||
# Save the morph state
|
# Save the morph state
|
||||||
active_shape_key_index = bobject.active_shape_key_index
|
active_shape_key_index = bobject.active_shape_key_index
|
||||||
show_only_shape_key = bobject.show_only_shape_key
|
show_only_shape_key = bobject.show_only_shape_key
|
||||||
|
|
|
@ -188,8 +188,7 @@ def make_instancing_and_skinning(mat: Material, mat_users: Dict[Material, List[O
|
||||||
for bo in mat_users[mat]:
|
for bo in mat_users[mat]:
|
||||||
if mat.arm_custom_material == '':
|
if mat.arm_custom_material == '':
|
||||||
# Morph Targets
|
# Morph Targets
|
||||||
if arm.utils.export_morph_targets(bo) and not arm.utils.export_vcols(bo):
|
if arm.utils.export_morph_targets(bo):
|
||||||
print("sk and no vcol")
|
|
||||||
global_elems.append({'name': 'morph', 'data': 'short2norm'})
|
global_elems.append({'name': 'morph', 'data': 'short2norm'})
|
||||||
# GPU Skinning
|
# GPU Skinning
|
||||||
if arm.utils.export_bone_data(bo):
|
if arm.utils.export_bone_data(bo):
|
||||||
|
|
Loading…
Reference in a new issue