[Bf-extensions-cvs] [3a264229] master: FBX export: skip special properties when exporting custom properties
Philipp Oeser
noreply at git.blender.org
Thu Dec 13 11:52:51 CET 2018
Commit: 3a264229d2d37aee3c673545df122e41dc481723
Author: Philipp Oeser
Date: Thu Dec 13 11:49:37 2018 +0100
Branches: master
https://developer.blender.org/rBA3a264229d2d37aee3c673545df122e41dc481723
FBX export: skip special properties when exporting custom properties
'_RNA_UI' (and rna runtime properties) should not be included, these
would have been included as string properties causing errors on reimport
backport rBAe4f4053de64e (fix for T59202) from 2.8 branch
Differential Revision: https://developer.blender.org/D4068
===================================================================
M io_scene_fbx/export_fbx_bin.py
===================================================================
diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py
index e82ceadd..ed1109e7 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -533,7 +533,17 @@ def fbx_data_element_custom_properties(props, bid):
"""
Store custom properties of blender ID bid (any mapping-like object, in fact) into FBX properties props.
"""
- for k, v in bid.items():
+ items = bid.items()
+
+ if not items:
+ return
+
+ rna_properties = {prop.identifier for prop in bid.bl_rna.properties if prop.is_runtime}
+
+ for k, v in items:
+ if k == '_RNA_UI' or k in rna_properties:
+ continue
+
list_val = getattr(v, "to_list", lambda: None)()
if isinstance(v, str):
More information about the Bf-extensions-cvs
mailing list