diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2019-01-09 21:46:45 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2019-01-09 21:46:45 +0300 |
commit | b410a70fa9ba09bf9c1091d87f38f0ed8dae4895 (patch) | |
tree | 1d29e31952f861dbf02f8433f6e6861f5607f587 /io_scene_gltf2/blender/exp/gltf2_blender_gather_mesh.py | |
parent | 52111c31d7d0d39893b11a5242cbfe2bfbda0d12 (diff) |
glTF export: enhancement & fixes:
* implement KHR_materials_unlit export
* Fix primitive restart values
* Fix jpg uri/mime type
* Fix bug when image has no color channels
* Check animation has actions
* Ignore meshes without primitives
* Fix materials when not selected in export settings
* Improve error message for invalid animation target type
* Animation with errors are ignored, but export continues
* Export of BaseColorFactor
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_mesh.py')
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_mesh.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_mesh.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_mesh.py index f32eb733..d6058c60 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_mesh.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_mesh.py @@ -18,6 +18,7 @@ from io_scene_gltf2.blender.exp.gltf2_blender_gather_cache import cached from io_scene_gltf2.io.com import gltf2_io from io_scene_gltf2.blender.exp import gltf2_blender_gather_primitives from io_scene_gltf2.blender.exp import gltf2_blender_generate_extras +from io_scene_gltf2.io.com.gltf2_io_debug import print_console @cached @@ -38,6 +39,9 @@ def gather_mesh(blender_mesh: bpy.types.Mesh, weights=__gather_weights(blender_mesh, vertex_groups, modifiers, export_settings) ) + if len(mesh.primitives) == 0: + print_console("WARNING", "Mesh '{}' has no primitives and will be omitted.".format(mesh.name)) + return None return mesh |