Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastián Barschkis <sebbas@sebbas.org>2020-03-04 19:32:47 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-03-04 20:46:48 +0300
commitbf8a73b4a7f85c0ef9e38576b8b486aacfa40ae9 (patch)
treeae2d5ac28927085cb9e87efa3abdf6830f2468ae
parent6958ec3f7fc23b0ad605c0cfbdbb38417e89f81f (diff)
Fluid: Naming cleanup for flags grid
Use flags instead of obstacle to avoid confusion with obstacle levelset grid.
-rw-r--r--intern/mantaflow/extern/manta_fluid_API.h4
-rw-r--r--intern/mantaflow/intern/MANTA_main.cpp4
-rw-r--r--intern/mantaflow/intern/MANTA_main.h6
-rw-r--r--intern/mantaflow/intern/manta_fluid_API.cpp8
-rw-r--r--source/blender/blenkernel/intern/fluid.c2
5 files changed, 12 insertions, 12 deletions
diff --git a/intern/mantaflow/extern/manta_fluid_API.h b/intern/mantaflow/extern/manta_fluid_API.h
index 4ebedeb5e38..249eb2b4780 100644
--- a/intern/mantaflow/extern/manta_fluid_API.h
+++ b/intern/mantaflow/extern/manta_fluid_API.h
@@ -112,7 +112,7 @@ void manta_smoke_export(struct MANTA *smoke,
float **r,
float **g,
float **b,
- int **obstacles,
+ int **flags,
float **shadow);
void manta_smoke_turbulence_export(struct MANTA *smoke,
float **dens,
@@ -152,7 +152,7 @@ float *manta_smoke_get_shadow(struct MANTA *fluid);
float *manta_smoke_get_color_r(struct MANTA *smoke);
float *manta_smoke_get_color_g(struct MANTA *smoke);
float *manta_smoke_get_color_b(struct MANTA *smoke);
-int *manta_smoke_get_obstacle(struct MANTA *smoke);
+int *manta_smoke_get_flags(struct MANTA *smoke);
float *manta_smoke_get_density_in(struct MANTA *smoke);
float *manta_smoke_get_heat_in(struct MANTA *smoke);
float *manta_smoke_get_color_r_in(struct MANTA *smoke);
diff --git a/intern/mantaflow/intern/MANTA_main.cpp b/intern/mantaflow/intern/MANTA_main.cpp
index 89e505fcf97..34efe7a8c2d 100644
--- a/intern/mantaflow/intern/MANTA_main.cpp
+++ b/intern/mantaflow/intern/MANTA_main.cpp
@@ -103,7 +103,7 @@ MANTA::MANTA(int *res, FluidModifierData *mmd) : mCurrentID(++solverID)
mColorR = nullptr;
mColorG = nullptr;
mColorB = nullptr;
- mObstacle = nullptr;
+ mFlags = nullptr;
mDensityIn = nullptr;
mHeatIn = nullptr;
mColorRIn = nullptr;
@@ -3005,7 +3005,7 @@ void MANTA::updatePointers()
std::string mesh_ext2 = "_" + mesh2;
std::string noise_ext = "_" + noise;
- mObstacle = (int *)pyObjectToPointer(callPythonFunction("flags" + solver_ext, func));
+ mFlags = (int *)pyObjectToPointer(callPythonFunction("flags" + solver_ext, func));
mPhiIn = (float *)pyObjectToPointer(callPythonFunction("phiIn" + solver_ext, func));
mVelocityX = (float *)pyObjectToPointer(callPythonFunction("x_vel" + solver_ext, func));
mVelocityY = (float *)pyObjectToPointer(callPythonFunction("y_vel" + solver_ext, func));
diff --git a/intern/mantaflow/intern/MANTA_main.h b/intern/mantaflow/intern/MANTA_main.h
index 105beaf6e20..8c99a64bf03 100644
--- a/intern/mantaflow/intern/MANTA_main.h
+++ b/intern/mantaflow/intern/MANTA_main.h
@@ -246,9 +246,9 @@ struct MANTA {
{
return mForceZ;
}
- inline int *getObstacle()
+ inline int *getFlags()
{
- return mObstacle;
+ return mFlags;
}
inline float *getNumObstacle()
{
@@ -785,7 +785,7 @@ struct MANTA {
float *mForceX;
float *mForceY;
float *mForceZ;
- int *mObstacle;
+ int *mFlags;
float *mNumObstacle;
float *mNumGuide;
diff --git a/intern/mantaflow/intern/manta_fluid_API.cpp b/intern/mantaflow/intern/manta_fluid_API.cpp
index 82bfed7cf61..47a643928e9 100644
--- a/intern/mantaflow/intern/manta_fluid_API.cpp
+++ b/intern/mantaflow/intern/manta_fluid_API.cpp
@@ -363,7 +363,7 @@ void manta_smoke_export(MANTA *smoke,
float **r,
float **g,
float **b,
- int **obstacle,
+ int **flags,
float **shadow)
{
if (dens)
@@ -385,7 +385,7 @@ void manta_smoke_export(MANTA *smoke,
*g = smoke->getColorG();
if (b)
*b = smoke->getColorB();
- *obstacle = smoke->getObstacle();
+ *flags = smoke->getFlags();
if (shadow)
*shadow = smoke->getShadow();
*dt = 1; // dummy value, not needed for smoke
@@ -590,9 +590,9 @@ float *manta_smoke_get_color_b(MANTA *smoke)
return smoke->getColorB();
}
-int *manta_smoke_get_obstacle(MANTA *smoke)
+int *manta_smoke_get_flags(MANTA *smoke)
{
- return smoke->getObstacle();
+ return smoke->getFlags();
}
float *manta_smoke_get_density_in(MANTA *smoke)
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 7c5e9af728a..3df62a361f5 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -2834,7 +2834,7 @@ static void update_effectors(
data.velocity_x = manta_get_velocity_x(mds->fluid);
data.velocity_y = manta_get_velocity_y(mds->fluid);
data.velocity_z = manta_get_velocity_z(mds->fluid);
- data.flags = manta_smoke_get_obstacle(mds->fluid);
+ data.flags = manta_smoke_get_flags(mds->fluid);
data.phi_obs_in = manta_get_phiobs_in(mds->fluid);
TaskParallelSettings settings;