[Bf-blender-cvs] [026fdb3] fluid-mantaflow: some variables from previous commit were not renamed. fixed that.
Sebastián Barschkis
noreply at git.blender.org
Mon May 23 23:45:48 CEST 2016
Commit: 026fdb3eaa1216bcf756ba219b2e6f92e2e3dd83
Author: Sebastián Barschkis
Date: Mon May 9 00:22:19 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB026fdb3eaa1216bcf756ba219b2e6f92e2e3dd83
some variables from previous commit were not renamed. fixed that.
===================================================================
M intern/mantaflow/extern/manta_smoke_API.h
M intern/mantaflow/intern/SMOKE.cpp
M intern/mantaflow/intern/manta_smoke_API.cpp
M source/blender/blenkernel/intern/smoke.c
M source/blender/makesdna/DNA_smoke_types.h
===================================================================
diff --git a/intern/mantaflow/extern/manta_smoke_API.h b/intern/mantaflow/extern/manta_smoke_API.h
index 0f0fdee..e28c9eb 100644
--- a/intern/mantaflow/extern/manta_smoke_API.h
+++ b/intern/mantaflow/extern/manta_smoke_API.h
@@ -41,7 +41,7 @@ struct SMOKE *smoke_init(int *res, struct SmokeModifierData *smd);
void smoke_free(struct SMOKE *smoke);
size_t smoke_get_index(int x, int max_x, int y, int max_y, int z /*, int max_z */);
size_t smoke_get_index2d(int x, int max_x, int y /*, int max_y, int z, int max_z */);
-void smoke_manta_export(struct SMOKE* manta, SmokeModifierData *smd);
+void smoke_manta_export(struct SMOKE* smoke, SmokeModifierData *smd);
void smoke_step(struct SMOKE *smoke, SmokeModifierData *smd);
void smoke_dissolve(struct SMOKE *smoke, int speed, int log);
void smoke_dissolve_wavelet(struct SMOKE *smoke, int speed, int log);
diff --git a/intern/mantaflow/intern/SMOKE.cpp b/intern/mantaflow/intern/SMOKE.cpp
index 717c2f1..f0c637d 100644
--- a/intern/mantaflow/intern/SMOKE.cpp
+++ b/intern/mantaflow/intern/SMOKE.cpp
@@ -563,7 +563,7 @@ void SMOKE::exportScript(SmokeModifierData *smd)
manta_script += manta_step;
// Fill in missing variables in script
- std::string final_script = MANTA::parseScript(manta_script, smd);
+ std::string final_script = SMOKE::parseScript(manta_script, smd);
// Add standalone mode (loop, gui, ...)
final_script += standalone;
diff --git a/intern/mantaflow/intern/manta_smoke_API.cpp b/intern/mantaflow/intern/manta_smoke_API.cpp
index 3b4c7f3..cd4f7b4 100644
--- a/intern/mantaflow/intern/manta_smoke_API.cpp
+++ b/intern/mantaflow/intern/manta_smoke_API.cpp
@@ -34,19 +34,19 @@
#include "spectrum.h"
extern "C" int *smoke_get_manta_flags(struct SMOKE *smoke) {
- return manta->getMantaFlags();
+ return smoke->getMantaFlags();
}
extern "C" SMOKE *smoke_init(int *res, struct SmokeModifierData *smd)
{
SMOKE *smoke = new SMOKE(res, smd);
- return manta;
+ return smoke;
}
extern "C" void smoke_free(SMOKE *smoke)
{
- delete manta;
- manta = NULL;
+ delete smoke;
+ smoke = NULL;
}
extern "C" size_t smoke_get_index(int x, int max_x, int y, int max_y, int z /*, int max_z */)
@@ -59,19 +59,19 @@ extern "C" size_t smoke_get_index2d(int x, int max_x, int y /*, int max_y, int z
return x + y * max_x;
}
-extern "C" void smoke_manta_export(SMOKE* manta, SmokeModifierData *smd)
+extern "C" void smoke_manta_export(SMOKE* smoke, SmokeModifierData *smd)
{
- if (!manta && !smd) return;
- manta->exportScript(smd);
- manta->exportGrids(smd);
+ if (!smoke && !smd) return;
+ smoke->exportScript(smd);
+ smoke->exportGrids(smd);
}
extern "C" void smoke_step(SMOKE *smoke, SmokeModifierData *smd)
{
- manta->step(smd);
- manta->updatePointers(smd);
- if (manta->usingHighRes())
- manta->updatePointersHigh(smd);
+ smoke->step(smd);
+ smoke->updatePointers(smd);
+ if (smoke->usingHighRes())
+ smoke->updatePointersHigh(smd);
}
static void data_dissolve(float *density, float *heat, float *r, float *g, float *b, int total_cells, int speed, int log)
@@ -130,138 +130,138 @@ static void data_dissolve(float *density, float *heat, float *r, float *g, float
extern "C" void smoke_dissolve(SMOKE *smoke, int speed, int log)
{
- data_dissolve(manta->getDensity(), manta->getHeat(), manta->getColorR(), manta->getColorG(), manta->getColorB(), manta->getTotalCells(), speed, log);
+ data_dissolve(smoke->getDensity(), smoke->getHeat(), smoke->getColorR(), smoke->getColorG(), smoke->getColorB(), smoke->getTotalCells(), speed, log);
}
extern "C" void smoke_dissolve_wavelet(SMOKE *smoke, int speed, int log)
{
- data_dissolve(manta->getDensityHigh(), 0, manta->getColorRHigh(), manta->getColorGHigh(), manta->getColorBHigh(), manta->getTotalCellsHigh(), speed, log);
+ data_dissolve(smoke->getDensityHigh(), 0, smoke->getColorRHigh(), smoke->getColorGHigh(), smoke->getColorBHigh(), smoke->getTotalCellsHigh(), speed, log);
}
extern "C" void smoke_export(SMOKE *smoke, float *dt, float *dx, float **dens, float **react, float **flame, float **fuel, float **heat,
float **smoke_inflow, float **vx, float **vy, float **vz, float **r, float **g, float **b, unsigned char **obstacles)
{
- *dens = manta->getDensity();
+ *dens = smoke->getDensity();
if (fuel)
- *fuel = manta->getFuel();
+ *fuel = smoke->getFuel();
if (react)
- *react = manta->getReact();
+ *react = smoke->getReact();
if (flame)
- *flame = manta->getFlame();
+ *flame = smoke->getFlame();
if( heat)
- *heat = manta->getHeat();
- if (manta_inflow)
- *smoke_inflow = manta->getDensityInflow();
- *vx = manta->getVelocityX();
- *vy = manta->getVelocityY();
- *vz = manta->getVelocityZ();
+ *heat = smoke->getHeat();
+ if (smoke_inflow)
+ *smoke_inflow = smoke->getDensityInflow();
+ *vx = smoke->getVelocityX();
+ *vy = smoke->getVelocityY();
+ *vz = smoke->getVelocityZ();
if (r)
- *r = manta->getColorR();
+ *r = smoke->getColorR();
if (g)
- *g = manta->getColorG();
+ *g = smoke->getColorG();
if (b)
- *b = manta->getColorB();
- *obstacles = manta->getObstacles();
- *dt = 1; //dummy value, not needed for manta
- *dx = 1; //dummy value, not needed for manta
+ *b = smoke->getColorB();
+ *obstacles = smoke->getObstacles();
+ *dt = 1; //dummy value, not needed for smoke
+ *dx = 1; //dummy value, not needed for smoke
}
extern "C" void smoke_turbulence_export(SMOKE *smoke, float **dens, float **react, float **flame, float **fuel,
float **r, float **g, float **b , float **tcu, float **tcv, float **tcw, float **tcu2, float **tcv2, float **tcw2)
{
- if (!manta && !manta->usingHighRes())
+ if (!smoke && !smoke->usingHighRes())
return;
- *dens = manta->getDensityHigh();
+ *dens = smoke->getDensityHigh();
if (fuel)
- *fuel = manta->getFuelHigh();
+ *fuel = smoke->getFuelHigh();
if (react)
- *react = manta->getReactHigh();
+ *react = smoke->getReactHigh();
if (flame)
- *flame = manta->getFlameHigh();
+ *flame = smoke->getFlameHigh();
if (r)
- *r = manta->getColorRHigh();
+ *r = smoke->getColorRHigh();
if (g)
- *g = manta->getColorGHigh();
+ *g = smoke->getColorGHigh();
if (b)
- *b = manta->getColorBHigh();
- *tcu = manta->getTextureU();
- *tcv = manta->getTextureV();
- *tcw = manta->getTextureW();
+ *b = smoke->getColorBHigh();
+ *tcu = smoke->getTextureU();
+ *tcv = smoke->getTextureV();
+ *tcw = smoke->getTextureW();
- *tcu2 = manta->getTextureU2();
- *tcv2 = manta->getTextureV2();
- *tcw2 = manta->getTextureW2();
+ *tcu2 = smoke->getTextureU2();
+ *tcv2 = smoke->getTextureV2();
+ *tcw2 = smoke->getTextureW2();
}
extern "C" float *smoke_get_density(SMOKE *smoke)
{
- return manta->getDensity();
+ return smoke->getDensity();
}
extern "C" float *smoke_get_fuel(SMOKE *smoke)
{
- return manta->getFuel();
+ return smoke->getFuel();
}
extern "C" float *smoke_get_react(SMOKE *smoke)
{
- return manta->getReact();
+ return smoke->getReact();
}
extern "C" float *smoke_get_heat(SMOKE *smoke)
{
- return manta->getHeat();
+ return smoke->getHeat();
}
extern "C" float *smoke_get_velocity_x(SMOKE *smoke)
{
- return manta->getVelocityX();
+ return smoke->getVelocityX();
}
extern "C" float *smoke_get_velocity_y(SMOKE *smoke)
{
- return manta->getVelocityY();
+ return smoke->getVelocityY();
}
extern "C" float *smoke_get_velocity_z(SMOKE *smoke)
{
- return manta->getVelocityZ();
+ return smoke->getVelocityZ();
}
extern "C" float *smoke_get_force_x(SMOKE *smoke)
{
- return manta->getForceX();
+ return smoke->getForceX();
}
extern "C" float *smoke_get_force_y(SMOKE *smoke)
{
- return manta->getForceY();
+ return smoke->getForceY();
}
extern "C" float *smoke_get_force_z(SMOKE *smoke)
{
- return manta->getForceZ();
+ return smoke->getForceZ();
}
extern "C" float *smoke_get_flame(SMOKE *smoke)
{
- return manta->getFlame();
+ return smoke->getFlame();
}
extern "C" float *smoke_get_color_r(SMOKE *smoke)
{
- return manta->getColorR();
+ return smoke->getColorR();
}
extern "C" float *smoke_get_color_g(SMOKE *smoke)
{
- return manta->getColorG();
+ return smoke->getColorG();
}
extern "C" float *smoke_get_color_b(SMOKE *smoke)
{
- return manta->getColorB();
+ return smoke->getColorB();
}
static void get_rgba(float *r, float *g, float *b, float *a, int total_cells, float *data, int sequential)
@@ -292,12 +292,12 @@ static void get_rgba(float *r, float *g, float *b, float *a, int total_cells, fl
extern "C" void smoke_get_rgba(SMOKE *smoke, float *data, int sequential)
{
- get_rgba(manta->getColorR(), manta->getColorG(), manta->getColorB(), manta->getDensity(), manta->getTotalCells(), data, sequential);
+ get_rgba(smoke->getColorR(), smoke->getColorG(), smoke->getColorB(), smoke->getDensity(), smoke->getTotalCells(), data, sequential);
}
extern "C" void smoke_turbulence_get_rgba(SMOKE *smoke, float *data, int sequential)
{
- get_rgba(manta->getColorRHigh(), manta->getColorGHigh(), manta->getColorBHigh(), manta->getDensityHigh(), manta->getTotalCellsHigh(), data, sequential);
+ get_rgba(smoke->getColorRHigh(), smoke->getColorGHigh(), smoke->getColorBHigh(), smoke->getDensityHigh(), smoke->getTotalCellsHigh(), data, sequential);
}
/* get a single color premultiplied voxel grid */
@@ -329,80 +329,80 @@ static void get_rgba_from_density(float color[3], float *a, int total_cells, flo
extern "C" void smoke_get_rgba_from_density(SMOKE *smoke, float color[3], float *data, int sequential)
{
- get_rgba_from_density(color, manta->getDensity(), manta->getTotalCells(), data, sequential);
+ get_rgba_from_density(color, smoke->getDensity(), smoke->getTotalCells(), data, sequential);
}
extern "C" void smoke_turbulence_get_rgba_from_density(SMOKE *smoke, float color[3], float *data, int sequential)
{
- get_rgba_from_density(color, manta->getDensityHigh(), manta->getTotalCellsHigh(), data, sequential);
+ get_rgba_from_density(color, smoke->getDensityHigh(), smoke->getTotalCellsHigh(), data, sequential);
}
extern "C" float *smoke_turbulence_get_density(SMOKE *smoke)
{
- return (manta && manta->usingHighRes()) ? manta->getDensityHigh() : NULL;
+ return (smoke && smoke->usingHighRes()) ? smoke->getDensityHigh(
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list