[Bf-blender-cvs] [39c8edad54b] fluid-mantaflow: replaced WITH_SMOKE macro with WITH_MANTA in entire project

Sebastián Barschkis noreply at git.blender.org
Mon Apr 2 15:21:36 CEST 2018


Commit: 39c8edad54b487011922c490244bb48318a12537
Author: Sebastián Barschkis
Date:   Mon Apr 2 15:21:29 2018 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB39c8edad54b487011922c490244bb48318a12537

replaced WITH_SMOKE macro with WITH_MANTA in entire project

for a mantaflow build, one now only has to enable the WITH_MANTA macro

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

M	CMakeLists.txt
M	source/blender/blenkernel/CMakeLists.txt
M	source/blender/blenkernel/intern/pointcache.c
M	source/blender/blenkernel/intern/smoke.c
M	source/blender/editors/space_view3d/CMakeLists.txt
M	source/blender/editors/space_view3d/drawvolume.c
M	source/blender/gpu/CMakeLists.txt
M	source/blender/gpu/intern/gpu_draw.c
M	source/blender/makesrna/intern/CMakeLists.txt
M	source/blender/makesrna/intern/rna_smoke.c
M	source/blender/python/intern/CMakeLists.txt
M	source/blender/python/intern/bpy_app_build_options.c
M	source/blender/render/CMakeLists.txt
M	source/blender/render/intern/source/voxeldata.c

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 18632f6fc4f..884f3fff2ee 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -243,7 +243,6 @@ else()
 endif()
 option(WITH_PLAYER        "Build Player" OFF)
 option(WITH_OPENCOLORIO   "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
-option(WITH_MOD_MANTA     "Enable Mantaflow Framework" ON)
 
 # Compositor
 option(WITH_COMPOSITOR         "Enable the tile based nodal compositor" ON)
@@ -310,7 +309,7 @@ endif()
 
 # Modifiers
 option(WITH_MOD_FLUID           "Enable Elbeem Modifier (Fluid Simulation)" ON)
-option(WITH_MOD_SMOKE           "Enable Smoke Modifier (Smoke Simulation)" ON)
+option(WITH_MOD_MANTA           "Enable Mantaflow Fluid Simulation Framework" ON)
 option(WITH_MOD_REMESH          "Enable Remesh Modifier" ON)
 # option(WITH_MOD_CLOTH_ELTOPO    "Enable Experimental cloth solver" OFF)  # this is now only available in a branch
 # mark_as_advanced(WITH_MOD_CLOTH_ELTOPO)
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 6fd7bf8bbe7..1bc177345b3 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -433,10 +433,6 @@ if(WITH_MOD_FLUID)
 	add_definitions(-DWITH_MOD_FLUID)
 endif()
 
-if(WITH_MOD_SMOKE)
-	add_definitions(-DWITH_SMOKE)
-endif()
-
 if(WITH_MOD_MANTA)
 	add_definitions(-DWITH_MANTA)
 endif()
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index a2b5b0f03a1..e1c598fbd88 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -76,7 +76,7 @@
 #endif
 
 /* both in intern */
-#ifdef WITH_SMOKE
+#ifdef WITH_MANTA
 #ifdef WITH_MANTA
 #	include "manta_fluid_API.h"
 #endif
@@ -555,7 +555,7 @@ static void ptcache_cloth_error(void *cloth_v, const char *message)
 	modifier_setError(&clmd->modifier, "%s", message);
 }
 
-#ifdef WITH_SMOKE
+#ifdef WITH_MANTA
 /* Smoke functions */
 static int  ptcache_smoke_totpoint(void *smoke_v, int UNUSED(cfra))
 {
@@ -1335,14 +1335,14 @@ static int ptcache_mesh_write(void *smoke_v, char *filename, int cfra)
 
 #endif // WITH_MANTA
 
-#else // WITH_SMOKE
+#else // WITH_MANTA
 static int  ptcache_smoke_totpoint(void *UNUSED(smoke_v), int UNUSED(cfra)) { return 0; }
 static void ptcache_smoke_error(void *UNUSED(smoke_v), const char *UNUSED(message)) { }
 static int  ptcache_smoke_read(PTCacheFile *UNUSED(pf), void *UNUSED(smoke_v)) { return 0; }
 static int  ptcache_smoke_write(PTCacheFile *UNUSED(pf), void *UNUSED(smoke_v)) { return 0; }
-#endif // WITH_SMOKE
+#endif // WITH_MANTA
 
-#if !defined(WITH_SMOKE) || !defined(WITH_OPENVDB)
+#if !defined(WITH_MANTA) || !defined(WITH_OPENVDB)
 static int ptcache_smoke_openvdb_write(struct OpenVDBWriter *writer, void *smoke_v)
 {
 	UNUSED_VARS(writer, smoke_v);
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 7bb7cf014b4..c5f1347fc47 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -100,7 +100,7 @@
 #	include "manta_fluid_API.h"
 #endif
 
-#ifdef WITH_SMOKE
+#ifdef WITH_MANTA
 
 static ThreadMutex object_update_lock = BLI_MUTEX_INITIALIZER;
 
@@ -116,7 +116,7 @@ struct SmokeModifierData;
 #define ADD_IF_LOWER_NEG(a, b) (max_ff((a) + (b), min_ff((a), (b))))
 #define ADD_IF_LOWER(a, b) (((b) > 0) ? ADD_IF_LOWER_POS((a), (b)) : ADD_IF_LOWER_NEG((a), (b)))
 
-#else /* WITH_SMOKE */
+#else /* WITH_MANTA */
 
 /* Stubs to use when smoke is disabled */
 struct WTURBULENCE *smoke_turbulence_init(int *UNUSED(res), int UNUSED(amplify), int UNUSED(noisetype), const char *UNUSED(noisefile_path), int UNUSED(use_fire), int UNUSED(use_colors)) { return NULL; }
@@ -131,9 +131,9 @@ void smoke_initBlenderRNA(struct FLUID_3D *UNUSED(fluid), float *UNUSED(alpha),
 struct DerivedMesh *smokeModifier_do(SmokeModifierData *UNUSED(smd), Scene *UNUSED(scene), Object *UNUSED(ob), DerivedMesh *UNUSED(dm)) { return NULL; }
 float smoke_get_velocity_at(struct Object *UNUSED(ob), float UNUSED(position[3]), float UNUSED(velocity[3])) { return 0.0f; }
 
-#endif /* WITH_SMOKE */
+#endif /* WITH_MANTA */
 
-#ifdef WITH_SMOKE
+#ifdef WITH_MANTA
 
 
 void smoke_reallocate_fluid(SmokeDomainSettings *sds, int res[3], int free_old)
@@ -331,7 +331,7 @@ static int smokeModifier_init(SmokeModifierData *smd, Object *ob, Scene *scene,
 	return 2;
 }
 
-#endif /* WITH_SMOKE */
+#endif /* WITH_MANTA */
 
 static void smokeModifier_freeDomain(SmokeModifierData *smd)
 {
@@ -765,7 +765,7 @@ void smokeModifier_copy(struct SmokeModifierData *smd, struct SmokeModifierData
 	}
 }
 
-#ifdef WITH_SMOKE
+#ifdef WITH_MANTA
 
 // forward decleration
 static void smoke_calc_transparency(SmokeDomainSettings *sds, Scene *scene);
@@ -3534,4 +3534,4 @@ int smoke_get_data_flags(SmokeDomainSettings *sds)
 	return flags;
 }
 
-#endif /* WITH_SMOKE */
+#endif /* WITH_MANTA */
diff --git a/source/blender/editors/space_view3d/CMakeLists.txt b/source/blender/editors/space_view3d/CMakeLists.txt
index 2a85721aa34..1d3d36c3c7c 100644
--- a/source/blender/editors/space_view3d/CMakeLists.txt
+++ b/source/blender/editors/space_view3d/CMakeLists.txt
@@ -92,8 +92,8 @@ if(WITH_FREESTYLE)
 	add_definitions(-DWITH_FREESTYLE)
 endif()
 
-if(WITH_MOD_SMOKE)
-	add_definitions(-DWITH_SMOKE)
+if(WITH_MOD_MANTA)
+	add_definitions(-DWITH_MANTA)
 endif()
 
 if(WITH_LEGACY_DEPSGRAPH)
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index 8f1757d5d9e..6bb3f3acd31 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -1,4 +1,4 @@
-/*
+/*
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
@@ -143,7 +143,7 @@ static GPUTexture *create_field_texture(SmokeDomainSettings *sds)
 	float *field = NULL;
 
 	switch (sds->coba_field) {
-#ifdef WITH_SMOKE
+#ifdef WITH_MANTA
 		case FLUID_FIELD_DENSITY:    field = smoke_get_density(sds->fluid); break;
 		case FLUID_FIELD_HEAT:       field = smoke_get_heat(sds->fluid); break;
 		case FLUID_FIELD_FUEL:       field = smoke_get_fuel(sds->fluid); break;
@@ -666,7 +666,7 @@ void draw_smoke_volume(SmokeDomainSettings *sds, Object *ob,
 	}
 }
 
-#ifdef WITH_SMOKE
+#ifdef WITH_MANTA
 static void add_tri(float (*verts)[3], float(*colors)[3], int *offset,
                     float p1[3], float p2[3], float p3[3], float rgb[3])
 {
@@ -740,11 +740,11 @@ static void add_streamline(float (*verts)[3], float(*colors)[3], float center[3]
 }
 
 typedef void (*vector_draw_func)(float(*)[3], float(*)[3], float *, float *, float, float, int *);
-#endif  /* WITH_SMOKE */
+#endif  /* WITH_MANTA */
 
 void draw_smoke_velocity(SmokeDomainSettings *domain, float viewnormal[3])
 {
-#ifdef WITH_SMOKE
+#ifdef WITH_MANTA
 	const float *vel_x = smoke_get_velocity_x(domain->fluid);
 	const float *vel_y = smoke_get_velocity_y(domain->fluid);
 	const float *vel_z = smoke_get_velocity_z(domain->fluid);
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index d8d94246606..999db461855 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -131,8 +131,8 @@ if(WITH_GAMEENGINE)
 	add_definitions(-DWITH_GAMEENGINE)
 endif()
 
-if(WITH_MOD_SMOKE)
-	add_definitions(-DWITH_SMOKE)
+if(WITH_MOD_MANTA)
+	add_definitions(-DWITH_MANTA)
 endif()
 
 add_definitions(${GL_DEFINITIONS})
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 9cef9f5ae7f..36993785574 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -1429,7 +1429,7 @@ void GPU_free_smoke(SmokeModifierData *smd)
 
 void GPU_create_smoke(SmokeModifierData *smd, int highres)
 {
-#ifdef WITH_SMOKE
+#ifdef WITH_MANTA
 	if (smd->type & MOD_SMOKE_TYPE_DOMAIN) {
 		SmokeDomainSettings *sds = smd->domain;
 		if (!sds->tex && !highres) {
@@ -1463,12 +1463,12 @@ void GPU_create_smoke(SmokeModifierData *smd, int highres)
 
 		sds->tex_shadow = GPU_texture_create_3D(sds->res[0], sds->res[1], sds->res[2], 1, smoke_get_shadow(sds->fluid));
 	}
-#else // WITH_SMOKE
+#else // WITH_MANTA
 	(void)highres;
 	smd->domain->tex = NULL;
 	smd->domain->tex_flame = NULL;
 	smd->domain->tex_shadow = NULL;
-#endif // WITH_SMOKE
+#endif // WITH_MANTA
 }
 
 static LinkNode *image_free_queue = NULL;
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 3b95208c3a9..295bee49db6 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -250,10 +250,6 @@ if(WITH_FFTW3)
 	add_definitions(-DWITH_FFTW3)
 endif()
 
-if(WITH_MOD_SMOKE)
-	add_definitions(-DWITH_SMOKE)
-endif()
-
 if(WITH_MOD_MANTA)
 	add_definitions(-DWITH_MANTA)
 endif()
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 1f6f84c981e..48303b99e35 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -522,7 +522,7 @@ static char *rna_SmokeCollSettings_path(PointerRNA *ptr)
 
 static int rna_SmokeModifier_grid_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
 {
-#ifdef WITH_SMOKE
+#ifdef WITH_MANTA
 	SmokeDomainSettings *sds = (SmokeDomainSettings *)ptr->data;
 	float *density = NULL;
 	int size = 0;
@@ -560,7 +560,7 @@ static int rna_SmokeModifier_color_grid_get_length(PointerRNA *ptr, int length[R
 
 static int rna_SmokeModifier_velocity_grid_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
 {
-#ifdef WITH_SMOKE
+#ifdef WITH_MANTA
 	SmokeDomainSettings *sds = (SmokeDomainSettings *)ptr->data;
 	float *vx = NULL;
 	float *vy = NULL;
@@ -587,7 +587,7 @@ static int rna_SmokeModifier_heat_grid_get_length(
         PointerRNA *ptr,
         int length[RNA_MAX_ARRAY_DIMENSION])
 {
-#ifdef WITH_SMOKE
+#ifdef WITH_MANTA
 	SmokeDomainSettings *sds = (SmokeDomainSettings *)ptr->data;
 	float *heat = NULL;
 	int size = 0;
@@ -608,7 +608,7 @@ static int rna_SmokeModifier_heat_grid_get_length(
 
 static void rna_Sm

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list