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>2019-09-20 23:38:00 +0300
committerJulien Duroure <julien.duroure@gmail.com>2019-09-20 23:38:43 +0300
commit4e69d972bd4fea632b75ac60b302672f6b289c4e (patch)
tree3e16239fb490801771a7e47e60409923cd71726e
parentb58094246600c2c27ee5cf6a56d662c3977d6d4c (diff)
glTF exporter: sanity check action / multiple armature with different bone names
-rwxr-xr-xio_scene_gltf2/__init__.py2
-rwxr-xr-xio_scene_gltf2/blender/exp/gltf2_blender_gather_cache.py6
2 files changed, 6 insertions, 2 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 5114367c..28bd34f2 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": (0, 9, 71),
+ "version": (0, 9, 72),
'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_gather_cache.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_cache.py
index 53375779..59b30bd1 100755
--- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_cache.py
+++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_cache.py
@@ -79,13 +79,17 @@ def bonecache(func):
if not hasattr(func, "__current_action_name"):
func.__current_action_name = None
+ func.__current_armature_name = None
func.__bonecache = {}
- if args[6] != func.__current_action_name:
+ if args[6] != func.__current_action_name or args[0] != func.__current_armature_name:
result = func(*args)
func.__bonecache = result
func.__current_action_name = args[6]
+ func.__current_armature_name = args[0]
+ print("Using cache (first) for bone ", pose_bone_if_armature.name)
return result[args[7]][pose_bone_if_armature.name]
else:
+ print("Using cache for bone ", pose_bone_if_armature.name)
return func.__bonecache[args[7]][pose_bone_if_armature.name]
return wrapper_bonecache