Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Duroure <julien.duroure@gmail.com>2022-10-04 10:29:10 +0300
committerJulien Duroure <julien.duroure@gmail.com>2022-10-04 10:29:10 +0300
commiteb3dcfc70c7f0a7f4050509c7cded9a657e2f560 (patch)
tree7362559db13030da2da623d8ade065f25b28d4de /io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py
parent70ee1a5b6600e9a5d33ee9d9c2f2e910c7c99301 (diff)
glTF exporter: Various hooks and fixed to better animation filtering / management
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.py4
1 files changed, 4 insertions, 0 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 88b19731..180327a2 100644
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_tree.py
@@ -289,6 +289,7 @@ class VExportTree:
self.filter_tag()
export_user_extensions('gather_tree_filter_tag_hook', self.export_settings, self)
self.filter_perform()
+ self.remove_filtered_nodes()
def recursive_filter_tag(self, uuid, parent_keep_tag):
@@ -404,6 +405,9 @@ class VExportTree:
return True
+ def remove_filtered_nodes(self):
+ self.nodes = {k:n for (k, n) in self.nodes.items() if n.keep_tag is True}
+
def search_missing_armature(self):
for n in [n for n in self.nodes.values() if hasattr(n, "armature_needed") is True]:
candidates = [i for i in self.nodes.values() if i.blender_type == VExportNode.ARMATURE and i.blender_object.name == n.armature_needed]