[Bf-blender-cvs] [88e955d] alembic_basic_io: Remove 'rotate_matrix' property from AbcObjectWriter.

Kévin Dietrich noreply at git.blender.org
Wed Apr 6 20:42:05 CEST 2016


Commit: 88e955d5dcc6380077931ec44bf3c1b613bef5a9
Author: Kévin Dietrich
Date:   Wed Apr 6 19:30:46 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rB88e955d5dcc6380077931ec44bf3c1b613bef5a9

Remove 'rotate_matrix' property from AbcObjectWriter.

Not needed anymore.

===================================================================

M	source/blender/alembic/intern/abc_exporter.cc
M	source/blender/alembic/intern/abc_hair.cc
M	source/blender/alembic/intern/abc_object.cc
M	source/blender/alembic/intern/abc_object.h

===================================================================

diff --git a/source/blender/alembic/intern/abc_exporter.cc b/source/blender/alembic/intern/abc_exporter.cc
index ad618b4..fbcbce6 100644
--- a/source/blender/alembic/intern/abc_exporter.cc
+++ b/source/blender/alembic/intern/abc_exporter.cc
@@ -447,9 +447,7 @@ void AbcExporter::createShapeWriter(Object *ob, Object *dupliObParent)
 
 		if (enable_hair && psys->part && (psys->part->type == PART_HAIR)) {
 			m_options.export_child_hairs = enable_hair_child;
-
 			m_shapes.push_back(new AbcHairWriter(m_scene, ob, xform, m_shape_sampling_index, m_options, psys));
-			m_shapes.back()->setRotateMatrix(true);
 		}
 	}
 
@@ -464,7 +462,6 @@ void AbcExporter::createShapeWriter(Object *ob, Object *dupliObParent)
 				}
 
 				m_shapes.push_back(new AbcMeshWriter(m_scene, ob, xform, m_shape_sampling_index, m_options));
-				m_shapes.back()->setRotateMatrix(true);
 			}
 
 			break;
@@ -479,7 +476,6 @@ void AbcExporter::createShapeWriter(Object *ob, Object *dupliObParent)
 				}
 
 				m_shapes.push_back(new AbcNurbsWriter(m_scene, ob, xform, m_shape_sampling_index, m_options));
-				m_shapes.back()->setRotateMatrix(true);
 			}
 
 			break;
diff --git a/source/blender/alembic/intern/abc_hair.cc b/source/blender/alembic/intern/abc_hair.cc
index 72a6e24..fccd90b 100644
--- a/source/blender/alembic/intern/abc_hair.cc
+++ b/source/blender/alembic/intern/abc_hair.cc
@@ -208,12 +208,12 @@ void AbcHairWriter::do_write()
 						uv_values.push_back(Imath::V2f(r_uv[0], r_uv[1]));
 
 						psys_interpolate_face(mverts, face, tface, NULL, mapfw, vec, tmpnor, NULL, NULL, NULL, NULL);
-						if (m_rotate_matrix) {
-							norm_values.push_back(Imath::V3f(tmpnor[0],tmpnor[2], -tmpnor[1]));
-						}
-						else {
-							norm_values.push_back(Imath::V3f(tmpnor[0],tmpnor[1], tmpnor[2]));
+
+						if (m_options.do_convert_axis) {
+							mul_m3_v3(m_options.convert_matrix, tmpnor);
 						}
+
+						norm_values.push_back(Imath::V3f(tmpnor[0], tmpnor[1], tmpnor[2]));
 					}
 				}
 
diff --git a/source/blender/alembic/intern/abc_object.cc b/source/blender/alembic/intern/abc_object.cc
index ec4bcf0..896a631 100644
--- a/source/blender/alembic/intern/abc_object.cc
+++ b/source/blender/alembic/intern/abc_object.cc
@@ -53,7 +53,6 @@ AbcObjectWriter::AbcObjectWriter(Object *obj, AbcExportOptions &opts)
     : m_object(obj)
     , m_options(opts)
     , m_first_frame(true)
-    , m_rotate_matrix(false)
 {}
 
 AbcObjectWriter::~AbcObjectWriter()
diff --git a/source/blender/alembic/intern/abc_object.h b/source/blender/alembic/intern/abc_object.h
index ae97285..24b62e1 100644
--- a/source/blender/alembic/intern/abc_object.h
+++ b/source/blender/alembic/intern/abc_object.h
@@ -44,7 +44,6 @@ protected:
     std::vector< std::pair<std::string, IDProperty *> > m_props;
 
     bool m_first_frame;
-    bool m_rotate_matrix;
 
 public:
     AbcObjectWriter(Object *obj, AbcExportOptions &opts);
@@ -56,9 +55,6 @@ public:
 
     void write();
 
-    void setRotateMatrix(bool s) { m_rotate_matrix = s; }
-    bool getRotateMatrix() { return m_rotate_matrix; }
-
 private:
     virtual void do_write() = 0;




More information about the Bf-blender-cvs mailing list