[Bf-extensions-cvs] [d709b463] master: glTF exporter: do not split in primitives if materials are not exported
Julien Duroure
noreply at git.blender.org
Thu Oct 31 20:25:39 CET 2019
Commit: d709b46340b558d856d03af4bb7b2241b2f95cf0
Author: Julien Duroure
Date: Thu Oct 31 20:25:04 2019 +0100
Branches: master
https://developer.blender.org/rBAd709b46340b558d856d03af4bb7b2241b2f95cf0
glTF exporter: do not split in primitives if materials are not exported
===================================================================
M io_scene_gltf2/__init__.py
M io_scene_gltf2/blender/exp/gltf2_blender_extract.py
===================================================================
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 21dd9260..7b2b102f 100755
--- a/io_scene_gltf2/__init__.py
+++ b/io_scene_gltf2/__init__.py
@@ -15,7 +15,7 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
- "version": (1, 0, 12),
+ "version": (1, 0, 13),
'blender': (2, 81, 6),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_extract.py b/io_scene_gltf2/blender/exp/gltf2_blender_extract.py
index 8a3b5195..c7758538 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_extract.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_extract.py
@@ -563,7 +563,10 @@ def extract_primitives(glTF, blender_mesh, blender_object, blender_vertex_groups
#
- if not blender_polygon.material_index in material_idx_to_primitives:
+ if export_settings['gltf_materials'] is False:
+ primitive = material_idx_to_primitives[0]
+ vertex_index_to_new_indices = material_map[0]
+ elif not blender_polygon.material_index in material_idx_to_primitives:
primitive = material_idx_to_primitives[0]
vertex_index_to_new_indices = material_map[0]
else:
More information about the Bf-extensions-cvs
mailing list