diff options
author | Julien Duroure <julien.duroure@gmail.com> | 2020-04-18 10:19:13 +0300 |
---|---|---|
committer | Julien Duroure <julien.duroure@gmail.com> | 2020-04-18 10:19:13 +0300 |
commit | 15d56ea627d9f07b02521dfce09e9dce01647ef1 (patch) | |
tree | fc7284030db40484bb64e150c81377d3cc590330 /io_scene_gltf2 | |
parent | 18a0f95a848247fce2143903b520f4433ecd7163 (diff) |
glTF exporter: export extra for bones
Diffstat (limited to 'io_scene_gltf2')
-rwxr-xr-x | io_scene_gltf2/__init__.py | 2 | ||||
-rwxr-xr-x | io_scene_gltf2/blender/exp/gltf2_blender_gather_joints.py | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 4a7b9f3c..df89d6e6 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, 2, 65), + "version": (1, 2, 66), 'blender': (2, 83, 9), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_joints.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_joints.py index a95efb91..f7eed77f 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_joints.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_joints.py @@ -21,7 +21,7 @@ from io_scene_gltf2.io.com import gltf2_io_debug from io_scene_gltf2.blender.exp import gltf2_blender_extract from io_scene_gltf2.blender.com import gltf2_blender_math from io_scene_gltf2.blender.exp import gltf2_blender_gather_skins - +from ..com.gltf2_blender_extras import generate_extras @cached def gather_joint(blender_object, blender_bone, export_settings): @@ -71,7 +71,7 @@ def gather_joint(blender_object, blender_bone, export_settings): camera=None, children=children, extensions=None, - extras=None, + extras=__gather_extras(blender_bone, export_settings), matrix=None, mesh=None, name=blender_bone.name, @@ -81,3 +81,8 @@ def gather_joint(blender_object, blender_bone, export_settings): translation=translation, weights=None ) + +def __gather_extras(blender_bone, export_settings): + if export_settings['gltf_extras']: + return generate_extras(blender_bone.bone) + return None |