diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2018-12-13 13:49:37 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2018-12-13 13:49:37 +0300 |
commit | 3a264229d2d37aee3c673545df122e41dc481723 (patch) | |
tree | 9b59c98175d2f103924fe1025c0be32bc6de1f8b | |
parent | 6f0128c332290c6f3639d4d949d3e06bfaa71022 (diff) |
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
-rw-r--r-- | io_scene_fbx/export_fbx_bin.py | 12 |
1 files changed, 11 insertions, 1 deletions
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): |