[Bf-blender-cvs] [c135f41] gooseberry_farm: Gooseberry farm: Enable ALembic on windows platform

Sergey Sharybin noreply at git.blender.org
Thu Jun 18 20:56:42 CEST 2015


Commit: c135f41ac582488bef82bc25970fce39c7fcdd1c
Author: Sergey Sharybin
Date:   Thu Jun 18 20:55:20 2015 +0500
Branches: gooseberry_farm
https://developer.blender.org/rBc135f41ac582488bef82bc25970fce39c7fcdd1c

Gooseberry farm: Enable ALembic on windows platform

Also do some nnoying fixes for stupidness of MSVC which
was searchinh for symbols in the wrong namespaces.

Should be backported to Alembic or Gooseberry branches
but that'd happen from another operation system on this
laptop,

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

M	build_files/scons/config/win64-vc-config.py
M	source/blender/pointcache/alembic/abc_customdata.cpp
M	source/blender/pointcache/alembic/abc_customdata.h
M	source/blender/pointcache/alembic/abc_writer.h

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

diff --git a/build_files/scons/config/win64-vc-config.py b/build_files/scons/config/win64-vc-config.py
index 9ac0173..758ee18 100644
--- a/build_files/scons/config/win64-vc-config.py
+++ b/build_files/scons/config/win64-vc-config.py
@@ -219,6 +219,19 @@ BF_OPENGL_LIB = 'opengl32 glu32'
 BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
                          '${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
                          '${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
+# Alembic
+WITH_BF_HDF5 = False
+WITH_BF_ALEMBIC = True
+WITH_BF_STATICALEMBIC = True
+BF_ALEMBIC = '${LIBDIR}/alembic'
+BF_ALEMBIC_INC = '${BF_ALEMBIC}/include'
+BF_ALEMBIC_LIBPATH = '${BF_ALEMBIC}/lib/static'
+BF_ALEMBIC_LIB_STATIC = '${BF_ALEMBIC_LIBPATH}/AlembicAbcGeom.lib ${BF_ALEMBIC_LIBPATH}/AlembicAbc.lib ' + \
+    '${BF_ALEMBIC_LIBPATH}/AlembicAbcCollection.lib ${BF_ALEMBIC_LIBPATH}/AlembicAbcCoreFactory.lib ' + \
+    '${BF_ALEMBIC_LIBPATH}/AlembicAbcCoreOgawa.lib ${BF_ALEMBIC_LIBPATH}/AlembicAbcMaterial.lib ' + \
+    '${BF_ALEMBIC_LIBPATH}/AlembicOgawa.lib ${BF_ALEMBIC_LIBPATH}/AlembicAbcCoreAbstract.lib ' + \
+    '${BF_ALEMBIC_LIBPATH}/AlembicUtil.lib'
+
 CC = 'cl.exe'
 CXX = 'cl.exe'
 
diff --git a/source/blender/pointcache/alembic/abc_customdata.cpp b/source/blender/pointcache/alembic/abc_customdata.cpp
index 77a9ea7..2c81f2e 100644
--- a/source/blender/pointcache/alembic/abc_customdata.cpp
+++ b/source/blender/pointcache/alembic/abc_customdata.cpp
@@ -63,7 +63,7 @@ static void write_sample(CustomDataWriter */*writer*/, OCompoundProperty &/*pare
 template <>
 void write_sample<CD_MDEFORMVERT>(CustomDataWriter *writer, OCompoundProperty &parent, const std::string &name, void *data, int num_data)
 {
-	OCompoundProperty prop = writer->add_compound_property<OCompoundProperty>(name, parent);
+	OCompoundProperty prop = writer->add_compound_property<OCompoundProperty, OCompoundProperty>(name, parent);
 	
 	OInt32ArrayProperty totweight_prop = writer->add_array_property<OInt32ArrayProperty>(name + ":totweight", prop);
 	OInt32ArrayProperty flag_prop = writer->add_array_property<OInt32ArrayProperty>(name + ":flag", prop);
diff --git a/source/blender/pointcache/alembic/abc_customdata.h b/source/blender/pointcache/alembic/abc_customdata.h
index 9da3b92..cbf1c8a 100644
--- a/source/blender/pointcache/alembic/abc_customdata.h
+++ b/source/blender/pointcache/alembic/abc_customdata.h
@@ -78,7 +78,7 @@ struct CustomDataWriter {
 			return prop;
 		}
 		else {
-			return PropertyT(it->second->asArrayPtr(), Abc::kWrapExisting);
+			return PropertyT(it->second->asArrayPtr(), ::Alembic::Abc::kWrapExisting);
 		}
 	}
 	
@@ -92,7 +92,7 @@ struct CustomDataWriter {
 			return prop;
 		}
 		else {
-			return PropertyT(it->second->asCompoundPtr(), Abc::kWrapExisting);
+			return PropertyT(it->second->asCompoundPtr(), ::Alembic::Abc::kWrapExisting);
 		}
 	}
 	
@@ -142,7 +142,7 @@ struct CustomDataReader {
 			return prop;
 		}
 		else {
-			return PropertyT(it->second->asArrayPtr(), Abc::kWrapExisting);
+			return PropertyT(it->second->asArrayPtr(), ::Alembic::Abc::kWrapExisting);
 		}
 	}
 	
@@ -156,7 +156,7 @@ struct CustomDataReader {
 			return prop;
 		}
 		else {
-			return PropertyT(it->second->asCompoundPtr(), Abc::kWrapExisting);
+			return PropertyT(it->second->asCompoundPtr(), ::Alembic::Abc::kWrapExisting);
 		}
 	}
 	
diff --git a/source/blender/pointcache/alembic/abc_writer.h b/source/blender/pointcache/alembic/abc_writer.h
index 60a25ff..99ebfbf 100644
--- a/source/blender/pointcache/alembic/abc_writer.h
+++ b/source/blender/pointcache/alembic/abc_writer.h
@@ -105,7 +105,7 @@ private:
 template <class OObjectT>
 OObjectT AbcWriterArchive::add_id_object(ID *id)
 {
-	using namespace Abc;
+	using namespace ::Alembic::Abc;
 	
 	if (!m_abc_archive)
 		return OObjectT();




More information about the Bf-blender-cvs mailing list