[Bf-extensions-cvs] [47ab3278] master: glTF importer: Make FCurve group names consistent with Blender
Julien Duroure
noreply at git.blender.org
Tue Feb 5 13:01:29 CET 2019
Commit: 47ab32784c1865e45a6bca882da0406fddbf60ac
Author: Julien Duroure
Date: Tue Feb 5 13:00:59 2019 +0100
Branches: master
https://developer.blender.org/rBA47ab32784c1865e45a6bca882da0406fddbf60ac
glTF importer: Make FCurve group names consistent with Blender
===================================================================
M io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py
M io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py
===================================================================
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py b/io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py
index e05f1f64..5bf14826 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_animation_bone.py
@@ -41,7 +41,7 @@ class BlenderBoneAnim():
def parse_translation_channel(gltf, node, obj, bone, channel, animation):
"""Manage Location animation."""
blender_path = "pose.bones[" + json.dumps(bone.name) + "].location"
- group_name = "location"
+ group_name = bone.name
keys = BinaryData.get_data_from_accessor(gltf, animation.samplers[channel.sampler].input)
values = BinaryData.get_data_from_accessor(gltf, animation.samplers[channel.sampler].output)
@@ -92,7 +92,7 @@ class BlenderBoneAnim():
# better solution is found
# This fix is skipped when parent matrix is identity
blender_path = "pose.bones[" + json.dumps(bone.name) + "].rotation_quaternion"
- group_name = "rotation"
+ group_name = bone.name
keys = BinaryData.get_data_from_accessor(gltf, animation.samplers[channel.sampler].input)
values = BinaryData.get_data_from_accessor(gltf, animation.samplers[channel.sampler].output)
@@ -151,7 +151,7 @@ class BlenderBoneAnim():
def parse_scale_channel(gltf, node, obj, bone, channel, animation):
"""Manage scaling animation."""
blender_path = "pose.bones[" + json.dumps(bone.name) + "].scale"
- group_name = "scale"
+ group_name = bone.name
keys = BinaryData.get_data_from_accessor(gltf, animation.samplers[channel.sampler].input)
values = BinaryData.get_data_from_accessor(gltf, animation.samplers[channel.sampler].output)
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py b/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py
index 12c54e6a..d8aa33a7 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_animation_node.py
@@ -82,13 +82,13 @@ class BlenderNodeAnim():
if channel.target.path == "translation":
blender_path = "location"
- group_name = "location"
+ group_name = "Location"
num_components = 3
values = [loc_gltf_to_blender(vals) for vals in values]
elif channel.target.path == "rotation":
blender_path = "rotation_quaternion"
- group_name = "rotation"
+ group_name = "Rotation"
num_components = 4
if node.correction_needed is True:
values = [
@@ -106,7 +106,7 @@ class BlenderNodeAnim():
elif channel.target.path == "scale":
blender_path = "scale"
- group_name = "scale"
+ group_name = "Scale"
num_components = 3
values = [scale_gltf_to_blender(vals) for vals in values]
More information about the Bf-extensions-cvs
mailing list