[Bf-blender-cvs] [7bb03d9] openvdb: Merge branch 'master' into openvdb

Kévin Dietrich noreply at git.blender.org
Sat Jan 23 09:14:44 CET 2016


Commit: 7bb03d99f60193177853d36073c24da306c72491
Author: Kévin Dietrich
Date:   Sat Jan 23 09:12:43 2016 +0100
Branches: openvdb
https://developer.blender.org/rB7bb03d99f60193177853d36073c24da306c72491

Merge branch 'master' into openvdb

Conflicts:
	CMakeLists.txt
	build_files/cmake/Modules/FindOpenVDB.cmake
	intern/openvdb/CMakeLists.txt
	intern/openvdb/intern/openvdb_dense_convert.cc
	intern/openvdb/intern/openvdb_dense_convert.h
	intern/openvdb/intern/openvdb_reader.cc
	intern/openvdb/intern/openvdb_reader.h
	intern/openvdb/intern/openvdb_writer.cc
	intern/openvdb/intern/openvdb_writer.h
	intern/openvdb/openvdb_capi.cc
	intern/openvdb/openvdb_capi.h
	intern/openvdb/openvdb_util.cc
	intern/openvdb/openvdb_util.h
	source/blender/blenkernel/CMakeLists.txt
	source/blender/python/intern/CMakeLists.txt
	source/blender/python/intern/bpy_app_openvdb.c

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



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

diff --cc CMakeLists.txt
index d86f1de,4ec5053..0210cd8
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@@ -242,8 -242,8 +242,8 @@@ option(WITH_OPENSUBDIV    "Enable OpenS
  option(WITH_SUBSURF_WERROR  "Treat warnings as errors in subsurf code" OFF)
  mark_as_advanced(WITH_COMPOSITOR_WERROR)
  
 -option(WITH_OPENVDB       "Enable features relying on OpenVDB" OFF)
 -option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" OFF)
 +option(WITH_OPENVDB       "Enable features relying on OpenVDB" ON)
- option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enble if OpenVDB was built with blosc support" OFF)
++option(WITH_OPENVDB_BLOSC "Enable blosc compression for OpenVDB, only enable if OpenVDB was built with blosc support" ON)
  
  # GHOST Windowing Library Options
  option(WITH_GHOST_DEBUG   "Enable debugging output for the GHOST library" OFF)
diff --cc intern/openvdb/openvdb_capi.cc
index b0873e8,ef4f8c8..e7d8b83
--- a/intern/openvdb/openvdb_capi.cc
+++ b/intern/openvdb/openvdb_capi.cc
@@@ -33,40 -33,14 +33,41 @@@ struct OpenVDBVectorGrid { int unused; 
  
  int OpenVDB_getVersionHex()
  {
-     return openvdb::OPENVDB_LIBRARY_VERSION;
+ 	return openvdb::OPENVDB_LIBRARY_VERSION;
  }
  
 +void OpenVDB_get_grid_info(const char *filename, OpenVDBGridInfoCallback cb, void *userdata)
 +{
 +	Timer(__func__);
 +
 +	using namespace openvdb;
 +
 +	initialize();
 +
 +	io::File file(filename);
 +	file.open();
 +
 +	GridPtrVecPtr grids = file.getGrids();
 +	int grid_num = grids->size();
 +
 +	for (size_t i = 0; i < grid_num; ++i) {
 +		GridBase::ConstPtr grid = (*grids)[i];
 +
 +		Name name = grid->getName();
 +		Name value_type = grid->valueType();
 +		bool is_color = false;
 +		if (grid->getMetadata< TypedMetadata<bool> >("is_color"))
 +			is_color = grid->metaValue<bool>("is_color");
 +
 +		cb(userdata, name.c_str(), value_type.c_str(), is_color);
 +	}
 +}
 +
- OpenVDBFloatGrid *OpenVDB_export_grid_fl(OpenVDBWriter *writer,
-                                          const char *name, float *data,
-                                          const int res[3], float matrix[4][4],
-                                          OpenVDBFloatGrid *mask)
+ OpenVDBFloatGrid *OpenVDB_export_grid_fl(
+         OpenVDBWriter *writer,
+         const char *name, float *data,
+         const int res[3], float matrix[4][4],
+         OpenVDBFloatGrid *mask)
  {
  	Timer(__func__);




More information about the Bf-blender-cvs mailing list