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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-12-17 02:00:45 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-12-17 02:00:45 +0300
commit9c82eac2c8786d5bda0a63932f30691a64b30559 (patch)
treeca02dccc79a6a5bd68ed574991446f661e633305 /source
parent5d1245cca9e50a0e124f12b2f58b4ca362c1b4cb (diff)
Cleanup: use BKE_fluid prefix for fluid API
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_fluid.h24
-rw-r--r--source/blender/blenkernel/intern/fluid.c104
-rw-r--r--source/blender/makesrna/intern/rna_fluid.c6
-rw-r--r--source/blender/makesrna/intern/rna_gpencil_modifier.c2
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c6
-rw-r--r--source/blender/modifiers/intern/MOD_fluid.c8
6 files changed, 75 insertions, 75 deletions
diff --git a/source/blender/blenkernel/BKE_fluid.h b/source/blender/blenkernel/BKE_fluid.h
index 8ada379a293..881653dc5ee 100644
--- a/source/blender/blenkernel/BKE_fluid.h
+++ b/source/blender/blenkernel/BKE_fluid.h
@@ -28,21 +28,21 @@ struct Scene;
struct FluidDomainSettings;
struct FluidModifierData;
-typedef float (*bresenham_callback)(
+typedef float (*BKE_Fluid_BresenhamFn)(
float *result, float *input, int res[3], int *pixel, float *tRay, float correct);
-struct Mesh *fluidModifier_do(struct FluidModifierData *mmd,
- struct Depsgraph *depsgraph,
- struct Scene *scene,
- struct Object *ob,
- struct Mesh *me);
+struct Mesh *BKE_fluid_modifier_do(struct FluidModifierData *mmd,
+ struct Depsgraph *depsgraph,
+ struct Scene *scene,
+ struct Object *ob,
+ struct Mesh *me);
-void fluidModifier_free(struct FluidModifierData *mmd);
-void fluidModifier_reset(struct FluidModifierData *mmd);
-void fluidModifier_createType(struct FluidModifierData *mmd);
-void fluidModifier_copy(const struct FluidModifierData *mmd,
- struct FluidModifierData *tmmd,
- const int flag);
+void BKE_fluid_modifier_free(struct FluidModifierData *mmd);
+void BKE_fluid_modifier_reset(struct FluidModifierData *mmd);
+void BKE_fluid_modifier_create_type_data(struct FluidModifierData *mmd);
+void BKE_fluid_modifier_copy(const struct FluidModifierData *mmd,
+ struct FluidModifierData *tmmd,
+ const int flag);
void BKE_fluid_reallocate_fluid(struct FluidDomainSettings *mds, int res[3], int free_old);
void BKE_fluid_reallocate_copy_fluid(struct FluidDomainSettings *mds,
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index c33d38d15d6..a996b8e8cd3 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -487,7 +487,7 @@ static void manta_set_domain_gravity(Scene *scene, FluidDomainSettings *mds)
}
}
-static bool fluidModifier_init(
+static bool BKE_fluid_modifier_init(
FluidModifierData *mmd, Depsgraph *depsgraph, Object *ob, Scene *scene, Mesh *me)
{
int scene_framenr = (int)DEG_get_ctime(depsgraph);
@@ -537,14 +537,14 @@ static bool fluidModifier_init(
}
else if (mmd->type & MOD_FLUID_TYPE_FLOW) {
if (!mmd->flow) {
- fluidModifier_createType(mmd);
+ BKE_fluid_modifier_create_type_data(mmd);
}
mmd->time = scene_framenr;
return true;
}
else if (mmd->type & MOD_FLUID_TYPE_EFFEC) {
if (!mmd->effector) {
- fluidModifier_createType(mmd);
+ BKE_fluid_modifier_create_type_data(mmd);
}
mmd->time = scene_framenr;
return true;
@@ -552,7 +552,7 @@ static bool fluidModifier_init(
return false;
}
-static void fluidModifier_freeDomain(FluidModifierData *mmd)
+static void BKE_fluid_modifier_freeDomain(FluidModifierData *mmd)
{
if (mmd->domain) {
if (mmd->domain->fluid) {
@@ -587,7 +587,7 @@ static void fluidModifier_freeDomain(FluidModifierData *mmd)
}
}
-static void fluidModifier_freeFlow(FluidModifierData *mmd)
+static void BKE_fluid_modifier_freeFlow(FluidModifierData *mmd)
{
if (mmd->flow) {
if (mmd->flow->mesh) {
@@ -606,7 +606,7 @@ static void fluidModifier_freeFlow(FluidModifierData *mmd)
}
}
-static void fluidModifier_freeEffector(FluidModifierData *mmd)
+static void BKE_fluid_modifier_freeEffector(FluidModifierData *mmd)
{
if (mmd->effector) {
if (mmd->effector->mesh) {
@@ -625,7 +625,7 @@ static void fluidModifier_freeEffector(FluidModifierData *mmd)
}
}
-static void fluidModifier_reset_ex(struct FluidModifierData *mmd, bool need_lock)
+static void BKE_fluid_modifier_reset_ex(struct FluidModifierData *mmd, bool need_lock)
{
if (!mmd) {
return;
@@ -665,23 +665,23 @@ static void fluidModifier_reset_ex(struct FluidModifierData *mmd, bool need_lock
}
}
-void fluidModifier_reset(struct FluidModifierData *mmd)
+void BKE_fluid_modifier_reset(struct FluidModifierData *mmd)
{
- fluidModifier_reset_ex(mmd, true);
+ BKE_fluid_modifier_reset_ex(mmd, true);
}
-void fluidModifier_free(FluidModifierData *mmd)
+void BKE_fluid_modifier_free(FluidModifierData *mmd)
{
if (!mmd) {
return;
}
- fluidModifier_freeDomain(mmd);
- fluidModifier_freeFlow(mmd);
- fluidModifier_freeEffector(mmd);
+ BKE_fluid_modifier_freeDomain(mmd);
+ BKE_fluid_modifier_freeFlow(mmd);
+ BKE_fluid_modifier_freeEffector(mmd);
}
-void fluidModifier_createType(struct FluidModifierData *mmd)
+void BKE_fluid_modifier_create_type_data(struct FluidModifierData *mmd)
{
if (!mmd) {
return;
@@ -689,7 +689,7 @@ void fluidModifier_createType(struct FluidModifierData *mmd)
if (mmd->type & MOD_FLUID_TYPE_DOMAIN) {
if (mmd->domain) {
- fluidModifier_freeDomain(mmd);
+ BKE_fluid_modifier_freeDomain(mmd);
}
/* domain object data */
@@ -862,7 +862,7 @@ void fluidModifier_createType(struct FluidModifierData *mmd)
}
else if (mmd->type & MOD_FLUID_TYPE_FLOW) {
if (mmd->flow) {
- fluidModifier_freeFlow(mmd);
+ BKE_fluid_modifier_freeFlow(mmd);
}
/* flow object data */
@@ -905,7 +905,7 @@ void fluidModifier_createType(struct FluidModifierData *mmd)
}
else if (mmd->type & MOD_FLUID_TYPE_EFFEC) {
if (mmd->effector) {
- fluidModifier_freeEffector(mmd);
+ BKE_fluid_modifier_freeEffector(mmd);
}
/* effector object data */
@@ -924,14 +924,14 @@ void fluidModifier_createType(struct FluidModifierData *mmd)
}
}
-void fluidModifier_copy(const struct FluidModifierData *mmd,
- struct FluidModifierData *tmmd,
- const int flag)
+void BKE_fluid_modifier_copy(const struct FluidModifierData *mmd,
+ struct FluidModifierData *tmmd,
+ const int flag)
{
tmmd->type = mmd->type;
tmmd->time = mmd->time;
- fluidModifier_createType(tmmd);
+ BKE_fluid_modifier_create_type_data(tmmd);
if (tmmd->domain) {
FluidDomainSettings *tmds = tmmd->domain;
@@ -4055,15 +4055,15 @@ static void manta_guiding(
BLI_mutex_unlock(&object_update_lock);
}
-static void fluidModifier_processFlow(FluidModifierData *mmd,
- Depsgraph *depsgraph,
- Scene *scene,
- Object *ob,
- Mesh *me,
- const int scene_framenr)
+static void BKE_fluid_modifier_processFlow(FluidModifierData *mmd,
+ Depsgraph *depsgraph,
+ Scene *scene,
+ Object *ob,
+ Mesh *me,
+ const int scene_framenr)
{
if (scene_framenr >= mmd->time) {
- fluidModifier_init(mmd, depsgraph, ob, scene, me);
+ BKE_fluid_modifier_init(mmd, depsgraph, ob, scene, me);
}
if (mmd->flow) {
@@ -4078,19 +4078,19 @@ static void fluidModifier_processFlow(FluidModifierData *mmd,
}
else if (scene_framenr < mmd->time) {
mmd->time = scene_framenr;
- fluidModifier_reset_ex(mmd, false);
+ BKE_fluid_modifier_reset_ex(mmd, false);
}
}
-static void fluidModifier_processEffector(FluidModifierData *mmd,
- Depsgraph *depsgraph,
- Scene *scene,
- Object *ob,
- Mesh *me,
- const int scene_framenr)
+static void BKE_fluid_modifier_processEffector(FluidModifierData *mmd,
+ Depsgraph *depsgraph,
+ Scene *scene,
+ Object *ob,
+ Mesh *me,
+ const int scene_framenr)
{
if (scene_framenr >= mmd->time) {
- fluidModifier_init(mmd, depsgraph, ob, scene, me);
+ BKE_fluid_modifier_init(mmd, depsgraph, ob, scene, me);
}
if (mmd->effector) {
@@ -4105,16 +4105,16 @@ static void fluidModifier_processEffector(FluidModifierData *mmd,
}
else if (scene_framenr < mmd->time) {
mmd->time = scene_framenr;
- fluidModifier_reset_ex(mmd, false);
+ BKE_fluid_modifier_reset_ex(mmd, false);
}
}
-static void fluidModifier_processDomain(FluidModifierData *mmd,
- Depsgraph *depsgraph,
- Scene *scene,
- Object *ob,
- Mesh *me,
- const int scene_framenr)
+static void BKE_fluid_modifier_processDomain(FluidModifierData *mmd,
+ Depsgraph *depsgraph,
+ Scene *scene,
+ Object *ob,
+ Mesh *me,
+ const int scene_framenr)
{
FluidDomainSettings *mds = mmd->domain;
Object *guiding_parent = NULL;
@@ -4128,10 +4128,10 @@ static void fluidModifier_processDomain(FluidModifierData *mmd,
/* Reset fluid if no fluid present (obviously)
* or if timeline gets reset to startframe */
if (!mds->fluid || is_startframe) {
- fluidModifier_reset_ex(mmd, false);
+ BKE_fluid_modifier_reset_ex(mmd, false);
}
- fluidModifier_init(mmd, depsgraph, ob, scene, me);
+ BKE_fluid_modifier_init(mmd, depsgraph, ob, scene, me);
/* ensure that time parameters are initialized correctly before every step */
float fps = scene->r.frs_sec / scene->r.frs_sec_base;
@@ -4398,23 +4398,23 @@ static void fluidModifier_processDomain(FluidModifierData *mmd,
mmd->time = scene_framenr;
}
-static void fluidModifier_process(
+static void BKE_fluid_modifier_process(
FluidModifierData *mmd, Depsgraph *depsgraph, Scene *scene, Object *ob, Mesh *me)
{
const int scene_framenr = (int)DEG_get_ctime(depsgraph);
if ((mmd->type & MOD_FLUID_TYPE_FLOW)) {
- fluidModifier_processFlow(mmd, depsgraph, scene, ob, me, scene_framenr);
+ BKE_fluid_modifier_processFlow(mmd, depsgraph, scene, ob, me, scene_framenr);
}
else if (mmd->type & MOD_FLUID_TYPE_EFFEC) {
- fluidModifier_processEffector(mmd, depsgraph, scene, ob, me, scene_framenr);
+ BKE_fluid_modifier_processEffector(mmd, depsgraph, scene, ob, me, scene_framenr);
}
else if (mmd->type & MOD_FLUID_TYPE_DOMAIN) {
- fluidModifier_processDomain(mmd, depsgraph, scene, ob, me, scene_framenr);
+ BKE_fluid_modifier_processDomain(mmd, depsgraph, scene, ob, me, scene_framenr);
}
}
-struct Mesh *fluidModifier_do(
+struct Mesh *BKE_fluid_modifier_do(
FluidModifierData *mmd, Depsgraph *depsgraph, Scene *scene, Object *ob, Mesh *me)
{
/* Lock so preview render does not read smoke data while it gets modified. */
@@ -4422,7 +4422,7 @@ struct Mesh *fluidModifier_do(
BLI_rw_mutex_lock(mmd->domain->fluid_mutex, THREAD_LOCK_WRITE);
}
- fluidModifier_process(mmd, depsgraph, scene, ob, me);
+ BKE_fluid_modifier_process(mmd, depsgraph, scene, ob, me);
if ((mmd->type & MOD_FLUID_TYPE_DOMAIN) && mmd->domain) {
BLI_rw_mutex_unlock(mmd->domain->fluid_mutex);
@@ -4483,7 +4483,7 @@ static void bresenham_linie_3D(int x1,
int y2,
int z2,
float *tRay,
- bresenham_callback cb,
+ BKE_Fluid_BresenhamFn cb,
float *result,
float *input,
int res[3],
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index 44cfa99aa13..11897ab5e2a 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -91,7 +91,7 @@ static void rna_Fluid_reset(Main *bmain, Scene *scene, PointerRNA *ptr)
# ifdef WITH_FLUID
{
FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data;
- fluidModifier_reset(settings->mmd);
+ BKE_fluid_modifier_reset(settings->mmd);
}
# endif
@@ -105,7 +105,7 @@ static void rna_Fluid_reset_dependency(Main *bmain, Scene *scene, PointerRNA *pt
FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data;
# ifdef WITH_FLUID
- fluidModifier_reset(settings->mmd);
+ BKE_fluid_modifier_reset(settings->mmd);
# endif
if (settings->mmd && settings->mmd->domain) {
@@ -1597,7 +1597,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_text(
prop,
"Fractional Obstacles",
- "Fractional obstacles improve and smoothen the fluid-obstacle boundary.");
+ "Fractional obstacles improve and smoothen the fluid-obstacle boundary");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "fractions_threshold", PROP_FLOAT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 59baf7e4cbf..2f59cde7e94 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -43,7 +43,7 @@
#include "BKE_mesh_mapping.h"
#include "BKE_mesh_remap.h"
#include "BKE_multires.h"
-#include "BKE_fluid.h" /* For fluidModifier_free & fluidModifier_createType */
+#include "BKE_fluid.h" /* For BKE_fluid_modifier_free & BKE_fluid_modifier_create_type_data */
#include "RNA_access.h"
#include "RNA_define.h"
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index d83d85591d7..0aa3cc1ea94 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -45,7 +45,7 @@
#include "BKE_mesh_remap.h"
#include "BKE_multires.h"
#include "BKE_ocean.h"
-#include "BKE_fluid.h" /* For fluidModifier_free & fluidModifier_createType */
+#include "BKE_fluid.h" /* For BKE_fluid_modifier_free & BKE_fluid_modifier_create_type_data */
#include "RNA_access.h"
#include "RNA_define.h"
@@ -1038,8 +1038,8 @@ static void rna_fluid_set_type(Main *bmain, Scene *scene, PointerRNA *ptr)
}
# ifdef WITH_FLUID
- fluidModifier_free(mmd); /* XXX TODO: completely free all 3 pointers */
- fluidModifier_createType(mmd); /* create regarding of selected type */
+ BKE_fluid_modifier_free(mmd); /* XXX TODO: completely free all 3 pointers */
+ BKE_fluid_modifier_create_type_data(mmd); /* create regarding of selected type */
# endif
switch (mmd->type) {
diff --git a/source/blender/modifiers/intern/MOD_fluid.c b/source/blender/modifiers/intern/MOD_fluid.c
index 7d9695b8013..a24c2299cd8 100644
--- a/source/blender/modifiers/intern/MOD_fluid.c
+++ b/source/blender/modifiers/intern/MOD_fluid.c
@@ -66,8 +66,8 @@ static void copyData(const ModifierData *md, ModifierData *target, const int fla
const FluidModifierData *mmd = (const FluidModifierData *)md;
FluidModifierData *tmmd = (FluidModifierData *)target;
- fluidModifier_free(tmmd);
- fluidModifier_copy(mmd, tmmd, flag);
+ BKE_fluid_modifier_free(tmmd);
+ BKE_fluid_modifier_copy(mmd, tmmd, flag);
#endif /* WITH_FLUID */
}
@@ -78,7 +78,7 @@ static void freeData(ModifierData *md)
#else
FluidModifierData *mmd = (FluidModifierData *)md;
- fluidModifier_free(mmd);
+ BKE_fluid_modifier_free(mmd);
#endif /* WITH_FLUID */
}
@@ -117,7 +117,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph);
- result = fluidModifier_do(mmd, ctx->depsgraph, scene, ctx->object, me);
+ result = BKE_fluid_modifier_do(mmd, ctx->depsgraph, scene, ctx->object, me);
return result ? result : me;
#endif /* WITH_FLUID */
}