[Bf-extensions-cvs] [80e4d25] master: Minor import fixes (wrong string/bytes prop handling, previous fix re meshes was a bit too aggressive, forgot lamps, cameras & co).
Bastien Montagne
noreply at git.blender.org
Wed Feb 4 16:13:33 CET 2015
Commit: 80e4d25bfb79b07f38f32818885d6c5886e5e7dd
Author: Bastien Montagne
Date: Wed Feb 4 14:44:45 2015 +0100
Branches: master
https://developer.blender.org/rBA80e4d25bfb79b07f38f32818885d6c5886e5e7dd
Minor import fixes (wrong string/bytes prop handling, previous fix re meshes was a bit too aggressive, forgot lamps, cameras & co).
===================================================================
M io_scene_fbx/export_fbx_bin.py
M io_scene_fbx/import_fbx.py
===================================================================
diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py
index c7f004a..3140242 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -2612,7 +2612,7 @@ def fbx_definitions_elements(root, scene_data):
def fbx_objects_elements(root, scene_data):
"""
- Data (objects, geometry, material, textures, armatures, etc.
+ Data (objects, geometry, material, textures, armatures, etc.).
"""
objects = elem_empty(root, b"Objects")
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index 07652cf..93e8fde 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -85,7 +85,7 @@ def elem_find_first_bytes(elem, id_search, decode=True):
fbx_item = elem_find_first(elem, id_search)
if fbx_item is not None:
assert(len(fbx_item.props) == 1)
- assert(fbx_item.props_type[0] == data_types.STRING)
+ assert(fbx_item.props_type[0] == data_types.BYTES)
return fbx_item.props[0]
return None
@@ -677,8 +677,8 @@ def blen_read_animations(fbx_tmpl_astack, fbx_tmpl_alayer, stacks, scene):
def blen_read_geom_layerinfo(fbx_layer):
return (
elem_find_first_string(fbx_layer, b'Name'),
- elem_find_first_bytes(fbx_layer, b'MappingInformationType'),
- elem_find_first_bytes(fbx_layer, b'ReferenceInformationType'),
+ elem_find_first_string(fbx_layer, b'MappingInformationType'),
+ elem_find_first_string(fbx_layer, b'ReferenceInformationType'),
)
@@ -2244,7 +2244,7 @@ def load(operator, context, filepath="",
fbx_sdata, bl_data = p_item = fbx_table_nodes.get(c_src, (None, None))
if fbx_sdata is None:
continue
- if fbx_sdata.id != b'Geometry':
+ if fbx_sdata.id not in {b'Geometry', b'NodeAttribute'}:
continue
parent.bl_data = bl_data
else:
More information about the Bf-extensions-cvs
mailing list