[Bf-extensions-cvs] [17a28df] master: Fix T43707: FBX 7.4 Binary Exporter replaces all meshes with the same name when working with linked libraries.
Bastien Montagne
noreply at git.blender.org
Tue Feb 17 15:06:57 CET 2015
Commit: 17a28df49c35da5670c2964f29f0768d650a1d0a
Author: Bastien Montagne
Date: Tue Feb 17 15:06:05 2015 +0100
Branches: master
https://developer.blender.org/rBA17a28df49c35da5670c2964f29f0768d650a1d0a
Fix T43707: FBX 7.4 Binary Exporter replaces all meshes with the same name when working with linked libraries.
Now take libname (lib namespace) into account when generating ID's name or key...
===================================================================
M io_scene_fbx/fbx_utils.py
===================================================================
diff --git a/io_scene_fbx/fbx_utils.py b/io_scene_fbx/fbx_utils.py
index fffcc09..01a5520 100644
--- a/io_scene_fbx/fbx_utils.py
+++ b/io_scene_fbx/fbx_utils.py
@@ -284,18 +284,24 @@ def get_key_from_fbx_uuid(uuid):
# Blender-specific key generators
+def get_bid_name(bid):
+ if bid.library is not None:
+ return "_L_".join((bid.name, bid.library.name))
+ return bid.name
+
+
def get_blenderID_key(bid):
if isinstance(bid, Iterable):
- return "|".join("B" + e.rna_type.name + "#" + e.name for e in bid)
+ return "|".join("B" + e.rna_type.name + "#" + get_bid_name(e) for e in bid)
else:
- return "B" + bid.rna_type.name + "#" + bid.name
+ return "B" + bid.rna_type.name + "#" + get_bid_name(bid)
def get_blenderID_name(bid):
if isinstance(bid, Iterable):
- return "|".join(e.name for e in bid)
+ return "|".join(get_bid_name(e) for e in bid)
else:
- return bid.name
+ return get_bid_name(bid)
def get_blender_empty_key(obj):
More information about the Bf-extensions-cvs
mailing list