[Bf-blender-cvs] [c9c4498] alembic_basic_io: Remove usage of boost::progress.

Kévin Dietrich noreply at git.blender.org
Tue May 24 11:53:27 CEST 2016


Commit: c9c4498a7bd22e85f259e90019ba80443a36ca2b
Author: Kévin Dietrich
Date:   Tue May 24 11:52:59 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rBc9c4498a7bd22e85f259e90019ba80443a36ca2b

Remove usage of boost::progress.

Progress report will eventually be done through the job system.

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

M	source/blender/alembic/CMakeLists.txt
M	source/blender/alembic/intern/abc_exporter.cc

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

diff --git a/source/blender/alembic/CMakeLists.txt b/source/blender/alembic/CMakeLists.txt
index 8916cf6..b7843a0 100644
--- a/source/blender/alembic/CMakeLists.txt
+++ b/source/blender/alembic/CMakeLists.txt
@@ -41,7 +41,6 @@ set(INC
 set(INC_SYS
 	${ALEMBIC_INCLUDE_DIRS}
 	${HDF5_INCLUDE_DIRS}
-	${Boost_INCLUDE_DIRS}
 	${OPENEXR_INCLUDE_DIRS}
 	${PYTHON_INCLUDE_DIRS}
 )
diff --git a/source/blender/alembic/intern/abc_exporter.cc b/source/blender/alembic/intern/abc_exporter.cc
index 7f2eacb..b4aed98 100644
--- a/source/blender/alembic/intern/abc_exporter.cc
+++ b/source/blender/alembic/intern/abc_exporter.cc
@@ -27,8 +27,6 @@
 #include <Alembic/AbcCoreHDF5/All.h>
 #include <Alembic/AbcCoreOgawa/All.h>
 
-#include <boost/progress.hpp>
-
 #include "abc_camera.h"
 #include "abc_mesh.h"
 #include "abc_nurbs.h"
@@ -172,13 +170,13 @@ void AbcExporter::operator()()
 
 	Alembic::Abc::TimeSamplingPtr shapeTime;
 
-	if ((m_settings.shape_frame_step == m_settings.xform_frame_step) || (m_settings.startframe == m_settings.endframe))
+	if ((m_settings.shape_frame_step == m_settings.xform_frame_step) ||
+	    (m_settings.startframe == m_settings.endframe))
 	{
 		shapeTime = transTime;
 		m_shape_sampling_index = m_trans_sampling_index;
 	}
-	else
-	{
+	else {
 		shapeTime = createTimeSampling(m_settings.startframe, m_settings.endframe,
 		                               m_settings.shape_frame_step, m_settings.shutter_open,
 		                               m_settings.shutter_close);
@@ -208,14 +206,12 @@ void AbcExporter::operator()()
 
 	/* export all frames */
 
-	/* TODO : replace this with some kind of progress report */
-	std::cout << "Exporting Alembic archive: " << m_filename << std::endl;
-	boost::progress_timer timer;
-	boost::progress_display progress(allFrames.size());
+	/* TODO : progress report */
+	std::set<double>::const_iterator begin = allFrames.begin();
+	std::set<double>::const_iterator end = allFrames.begin();
 
-	for (std::set<double>::const_iterator it(allFrames.begin()), e(allFrames.end()); it != e; ++it)
-	{
-		double f = *it;
+	for (; begin != end; ++begin) {
+		double f = *begin;
 		setCurrentFrame(f);
 
 		if (shapeFrames.count(f) != 0) {
@@ -223,23 +219,24 @@ void AbcExporter::operator()()
 				m_shapes[i]->write();
 		}
 
-		if (xformFrames.count(f) != 0) {
-			for (std::map<std::string, AbcTransformWriter*>::iterator xit = m_xforms.begin(), xe = m_xforms.end(); xit != xe; ++xit)
-				xit->second->write();
+		if (xformFrames.count(f) == 0) {
+			continue;
+		}
 
-			/* Save the archive 's bounding box. */
-			Imath::Box3d bounds;
+		std::map<std::string, AbcTransformWriter *>::iterator xit, xe;
+		for (xit = m_xforms.begin(), xe = m_xforms.end(); xit != xe; ++xit) {
+			xit->second->write();
+		}
 
-			for (std::map<std::string, AbcTransformWriter*>::iterator xit = m_xforms.begin(), xe = m_xforms.end(); xit != xe; ++xit)
-			{
-				Imath::Box3d box = xit->second->bounds();
-				bounds.extendBy(box);
-			}
+		/* Save the archive 's bounding box. */
+		Imath::Box3d bounds;
 
-			archiveBoxProp.set(bounds);
+		for (xit = m_xforms.begin(), xe = m_xforms.end(); xit != xe; ++xit) {
+			Imath::Box3d box = xit->second->bounds();
+			bounds.extendBy(box);
 		}
 
-		++progress;
+		archiveBoxProp.set(bounds);
 	}
 }




More information about the Bf-blender-cvs mailing list