[Bf-extensions-cvs] [76fc4142] master: glTF importer: size of bone at creation are now based on armature scale

Julien Duroure noreply at git.blender.org
Sat Dec 14 08:45:16 CET 2019


Commit: 76fc4142b518189b602ff69b4c43ebbfb1b23441
Author: Julien Duroure
Date:   Sat Dec 14 08:44:53 2019 +0100
Branches: master
https://developer.blender.org/rBA76fc4142b518189b602ff69b4c43ebbfb1b23441

glTF importer: size of bone at creation are now based on armature scale

===================================================================

M	io_scene_gltf2/__init__.py
M	io_scene_gltf2/blender/imp/gltf2_blender_skin.py

===================================================================

diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py
index 7a3cd13a..7b080697 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, 1, 24),
+    "version": (1, 1, 25),
     'blender': (2, 81, 6),
     'location': 'File > Import-Export',
     'description': 'Import-Export as glTF 2.0',
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_skin.py b/io_scene_gltf2/blender/imp/gltf2_blender_skin.py
index 0f512188..1d88e0e7 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_skin.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_skin.py
@@ -129,7 +129,7 @@ class BlenderSkin():
         bone = obj.data.edit_bones.new(name)
         pynode.blender_bone_name = bone.name
         pynode.blender_armature_name = pyskin.blender_armature_name
-        bone.tail = Vector((0.0, 1.0, 0.0))  # Needed to keep bone alive
+        bone.tail = Vector((0.0, 1.0 / obj.matrix_world.to_scale()[1], 0.0))  # Needed to keep bone alive
         # Custom prop on edit bone
         set_extras(bone, pynode.extras)



More information about the Bf-extensions-cvs mailing list