[Bf-extensions-cvs] [e54ec6a] fbx_io_development: - add special case handling to parent an object to a posebone
Jens Ch. Restemeier
noreply at git.blender.org
Thu Jul 31 08:35:56 CEST 2014
Commit: e54ec6a7cd28d42b421d049b4608a12877d9dcdc
Author: Jens Ch. Restemeier
Date: Wed Jul 30 15:53:24 2014 +0100
Branches: fbx_io_development
https://developer.blender.org/rBAe54ec6a7cd28d42b421d049b4608a12877d9dcdc
- add special case handling to parent an object to a posebone
===================================================================
M io_scene_fbx/import_fbx.py
===================================================================
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index b7f3a69..3c3c41b 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -1906,6 +1906,8 @@ def load(operator, context, filepath="",
_(); del _
def _():
+ from bpy.types import PoseBone
+
# Parent objects, after we created them...
for fbx_uuid, fbx_item in fbx_table_nodes.items():
if fbx_uuid in fbx_objects_parent_ignore:
@@ -1925,7 +1927,12 @@ def load(operator, context, filepath="",
fbx_lnk_item,
fbx_lnk_type) in connection_filter_forward(fbx_uuid, b'Model'):
- blen_data.parent = fbx_lnk_item
+ if isinstance(fbx_lnk_item, PoseBone):
+ blen_data.parent = fbx_lnk_item.id_data # Not sure if this is the correct way to get the armature owning a PoseBone..
+ blen_data.parent_bone = fbx_lnk_item.name
+ blen_data.parent_type = 'BONE'
+ else:
+ blen_data.parent = fbx_lnk_item
_(); del _
def _():
More information about the Bf-extensions-cvs
mailing list