diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2022-09-25 17:59:17 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2022-09-25 17:59:17 +0300 |
commit | 90732dddff7ef0b211851c067feb680f1377f8f9 (patch) | |
tree | 2174b01dbe47d506c0e9d981ed0c68e3e0b2626a /io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py | |
parent | 97bb515d3ac4062a8fb58544750a002433daffcc (diff) |
glTF exporter: option to export active collection without nested collections
Diffstat (limited to 'io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py')
-rw-r--r-- | io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py index 203e1ec5..cfeb70e2 100644 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py @@ -393,11 +393,16 @@ class VExportTree: if all([c.hide_render for c in self.nodes[uuid].blender_object.users_collection]): return False - if self.export_settings[gltf2_blender_export_keys.ACTIVE_COLLECTION]: + if self.export_settings[gltf2_blender_export_keys.ACTIVE_COLLECTION_WITH_NESTED]: found = any(x == self.nodes[uuid].blender_object for x in bpy.context.collection.all_objects) if not found: return False + if self.export_settings[gltf2_blender_export_keys.ACTIVE_COLLECTION_WITHOUT_NESTED]: + found = any(x == self.nodes[uuid].blender_object for x in bpy.context.collection.objects) + if not found: + return False + return True def search_missing_armature(self): |