[Bf-extensions-cvs] [b157415] fbx_io_development: Merge branch 'master' into fbx_io_development
Bastien Montagne
noreply at git.blender.org
Wed Jun 11 16:51:24 CEST 2014
Commit: b157415e716e1026c3519aef95ed4d5574a6007f
Author: Bastien Montagne
Date: Tue Jun 10 17:10:30 2014 +0200
https://developer.blender.org/rBAb157415e716e1026c3519aef95ed4d5574a6007f
Merge branch 'master' into fbx_io_development
Conflicts:
io_scene_fbx/import_fbx.py
===================================================================
===================================================================
diff --cc io_scene_fbx/import_fbx.py
index d94bb63,3d165ca..8c4c1c2
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@@ -345,33 -301,13 +360,34 @@@ def blen_read_object_transform_preproce
pst_rot = const_vector_zero_3d
rot_ord = 'XYZ'
- from mathutils import Matrix, Euler
- from math import pi
+ return FBXTransformData(loc,
+ rot, rot_ofs, rot_piv, pre_rot, pst_rot, rot_ord, rot_alt_mat,
+ sca, sca_ofs, sca_piv)
- # translation
- lcl_translation = Matrix.Translation(loc)
- # rotation
+def blen_read_object(fbx_tmpl, fbx_obj, object_data):
+ elem_name_utf8 = elem_name_ensure_class(fbx_obj)
+
+ # Object data must be created already
+ obj = bpy.data.objects.new(name=elem_name_utf8, object_data=object_data)
+
+ fbx_props = (elem_find_first(fbx_obj, b'Properties70'),
+ elem_find_first(fbx_tmpl, b'Properties70', fbx_elem_nil))
+ assert(fbx_props[0] is not None)
+
+ # ----
+ # Misc Attributes
+
+ obj.color[0:3] = elem_props_get_color_rgb(fbx_props, b'Color', (0.8, 0.8, 0.8))
++ obj.hide = not bool(elem_props_get_visibility(fbx_props, b'Visibility', 1.0))
+
+ # ----
+ # Transformation
+
+ from mathutils import Matrix
+ from math import pi
+
+ # rotation corrections
if obj.type == 'CAMERA':
rot_alt_mat = Matrix.Rotation(pi / -2.0, 4, 'Y')
elif obj.type == 'LAMP':
More information about the Bf-extensions-cvs
mailing list