[Bf-extensions-cvs] [8edb670] master: FBX: More small fixes.
Bastien Montagne
noreply at git.blender.org
Wed Apr 2 20:11:54 CEST 2014
Commit: 8edb6704c83ea603c41125ba7311cd3599a397d8
Author: Bastien Montagne
Date: Wed Apr 2 19:57:10 2014 +0200
https://developer.blender.org/rBA8edb6704c83ea603c41125ba7311cd3599a397d8
FBX: More small fixes.
===================================================================
M io_scene_fbx/export_fbx_bin.py
M io_scene_fbx/json2fbx.py
===================================================================
diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py
index 130c0d9..4d21b07 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -450,7 +450,6 @@ def elem_props_template_init(templates, template_type):
if template_type in templates:
tmpl = templates[template_type]
written = tmpl.written[0]
- print(template_type, written)
props = tmpl.properties
ret = OrderedDict((name, [val, ptype, anim, written]) for name, (val, ptype, anim) in props.items())
return ret or OrderedDict()
@@ -1230,9 +1229,11 @@ def fbx_data_mesh_elements(root, me, scene_data):
geom.add_string(fbx_name_class(me.name.encode(), b"Geometry"))
geom.add_string(b"Mesh")
- tmpl = scene_data.templates[b"Geometry"]
+ tmpl = elem_props_template_init(scene_data.templates, b"Geometry")
props = elem_properties(geom)
+ elem_props_template_finalize(tmpl, props)
+
# Custom properties.
if scene_data.settings.use_custom_properties:
fbx_data_element_custom_properties(props, me)
diff --git a/io_scene_fbx/json2fbx.py b/io_scene_fbx/json2fbx.py
index f979c42..7240da9 100755
--- a/io_scene_fbx/json2fbx.py
+++ b/io_scene_fbx/json2fbx.py
@@ -99,8 +99,7 @@ def parse_json_rec(fbx_root, json_node):
d = eval('b"""' + d + '"""')
e.add_bytes(d)
elif dt == "S":
- d = d.encode()
- d.replace(b"::", b"\x00\x01")
+ d = d.encode().replace(b"::", b"\x00\x01")
e.add_string(d)
elif dt == "i":
e.add_int32_array(d)
More information about the Bf-extensions-cvs
mailing list