From 13769bcbe5ccce70736ff73107d9284396043379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Barschkis?= Date: Thu, 14 May 2020 10:30:11 +0200 Subject: Fluid: Rename smoke flow forces to fluid flow forces Better to use more general term since in theory these forces can be used for smoke and liquid. --- source/blender/blenkernel/intern/effect.c | 6 +++--- source/blender/blenkernel/intern/fluid.c | 2 +- .../depsgraph/intern/builder/deg_builder_relations.cc | 2 +- source/blender/depsgraph/intern/depsgraph_physics.cc | 6 +++--- source/blender/editors/datafiles/CMakeLists.txt | 2 +- source/blender/editors/include/UI_icons.h | 2 +- source/blender/editors/object/object_add.c | 2 +- source/blender/makesdna/DNA_object_force_types.h | 4 ++-- source/blender/makesrna/intern/rna_object_force.c | 12 ++++++------ source/blender/modifiers/intern/MOD_fluid.c | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) (limited to 'source') diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index bfb03dea39c..fe2c9ed51b8 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -113,7 +113,7 @@ PartDeflect *BKE_partdeflect_new(int type) case PFIELD_TEXTURE: pd->f_size = 1.0f; break; - case PFIELD_SMOKEFLOW: + case PFIELD_FLUIDFLOW: pd->f_flow = 1.0f; break; } @@ -1024,7 +1024,7 @@ static void do_physical_effector(EffectorCache *eff, mul_v3_fl(force, -efd->falloff * fac * (strength * fac + damp)); break; - case PFIELD_SMOKEFLOW: + case PFIELD_FLUIDFLOW: zero_v3(force); #ifdef WITH_FLUID if (pd->f_source) { @@ -1046,7 +1046,7 @@ static void do_physical_effector(EffectorCache *eff, if (pd->flag & PFIELD_DO_LOCATION) { madd_v3_v3fl(total_force, force, 1.0f / point->vel_to_sec); - if (ELEM(pd->forcefield, PFIELD_HARMONIC, PFIELD_DRAG, PFIELD_SMOKEFLOW) == 0 && + if (ELEM(pd->forcefield, PFIELD_HARMONIC, PFIELD_DRAG, PFIELD_FLUIDFLOW) == 0 && pd->f_flow != 0.0f) { madd_v3_v3fl(total_force, point->vel, -pd->f_flow * efd->falloff); } diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index 6e4c343eac3..fddc6b5e0ee 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -3196,7 +3196,7 @@ static void update_effectors( { ListBase *effectors; /* make sure smoke flow influence is 0.0f */ - mds->effector_weights->weight[PFIELD_SMOKEFLOW] = 0.0f; + mds->effector_weights->weight[PFIELD_FLUIDFLOW] = 0.0f; effectors = BKE_effectors_create(depsgraph, ob, NULL, mds->effector_weights); if (effectors) { diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 8f977e07f17..ae90ad8a281 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -433,7 +433,7 @@ void DepsgraphRelationBuilder::add_particle_forcefield_relations(const Operation } /* Smoke flow relations. */ - if (relation->pd->forcefield == PFIELD_SMOKEFLOW && relation->pd->f_source) { + if (relation->pd->forcefield == PFIELD_FLUIDFLOW && relation->pd->f_source) { ComponentKey trf_key(&relation->pd->f_source->id, NodeType::TRANSFORM); add_relation(trf_key, key, "Smoke Force Domain"); ComponentKey eff_key(&relation->pd->f_source->id, NodeType::GEOMETRY); diff --git a/source/blender/depsgraph/intern/depsgraph_physics.cc b/source/blender/depsgraph/intern/depsgraph_physics.cc index a9391e5fe8b..44c3d23ace4 100644 --- a/source/blender/depsgraph/intern/depsgraph_physics.cc +++ b/source/blender/depsgraph/intern/depsgraph_physics.cc @@ -141,11 +141,11 @@ void DEG_add_forcefield_relations(DepsNodeHandle *handle, } /* Smoke flow relations. */ - if (relation->pd->forcefield == PFIELD_SMOKEFLOW && relation->pd->f_source != nullptr) { + if (relation->pd->forcefield == PFIELD_FLUIDFLOW && relation->pd->f_source != nullptr) { DEG_add_object_pointcache_relation( - handle, relation->pd->f_source, DEG_OB_COMP_TRANSFORM, "Smoke Force Domain"); + handle, relation->pd->f_source, DEG_OB_COMP_TRANSFORM, "Fluid Force Domain"); DEG_add_object_pointcache_relation( - handle, relation->pd->f_source, DEG_OB_COMP_GEOMETRY, "Smoke Force Domain"); + handle, relation->pd->f_source, DEG_OB_COMP_GEOMETRY, "Fluid Force Domain"); } /* Absorption forces need collision relation. */ diff --git a/source/blender/editors/datafiles/CMakeLists.txt b/source/blender/editors/datafiles/CMakeLists.txt index 3e9d2def78e..1a5b3d6ac45 100644 --- a/source/blender/editors/datafiles/CMakeLists.txt +++ b/source/blender/editors/datafiles/CMakeLists.txt @@ -336,7 +336,7 @@ set(ICON_NAMES force_boid force_turbulence force_drag - force_smokeflow + force_fluidflow image_plane image_background image_reference diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h index 6fdef4a06e0..452a1fca111 100644 --- a/source/blender/editors/include/UI_icons.h +++ b/source/blender/editors/include/UI_icons.h @@ -428,7 +428,7 @@ DEF_ICON(FORCE_CURVE) DEF_ICON(FORCE_BOID) DEF_ICON(FORCE_TURBULENCE) DEF_ICON(FORCE_DRAG) -DEF_ICON(FORCE_SMOKEFLOW) +DEF_ICON(FORCE_FLUIDFLOW) DEF_ICON_BLANK(673) DEF_ICON_BLANK(674) DEF_ICON(RIGID_BODY) diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 0e609b5e903..74fba4d0cf9 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -146,7 +146,7 @@ static const EnumPropertyItem field_type_items[] = { {PFIELD_BOID, "BOID", ICON_FORCE_BOID, "Boid", ""}, {PFIELD_TURBULENCE, "TURBULENCE", ICON_FORCE_TURBULENCE, "Turbulence", ""}, {PFIELD_DRAG, "DRAG", ICON_FORCE_DRAG, "Drag", ""}, - {PFIELD_SMOKEFLOW, "SMOKE", ICON_FORCE_SMOKEFLOW, "Smoke Flow", ""}, + {PFIELD_FLUIDFLOW, "FLUID", ICON_FORCE_FLUIDFLOW, "Fluid Flow", ""}, {0, NULL, 0, NULL, NULL}, }; diff --git a/source/blender/makesdna/DNA_object_force_types.h b/source/blender/makesdna/DNA_object_force_types.h index 73cfcddf984..85520f5a930 100644 --- a/source/blender/makesdna/DNA_object_force_types.h +++ b/source/blender/makesdna/DNA_object_force_types.h @@ -59,8 +59,8 @@ typedef enum ePFieldType { PFIELD_TURBULENCE = 11, /** Linear & quadratic drag. */ PFIELD_DRAG = 12, - /** Force based on smoke simulation air flow. */ - PFIELD_SMOKEFLOW = 13, + /** Force based on fluid simulation velocities. */ + PFIELD_FLUIDFLOW = 13, /* Keep last. */ NUM_PFIELD_TYPES, diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index e79c186aae4..3317ae91f98 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -1332,7 +1332,7 @@ static void rna_def_effector_weight(BlenderRNA *brna) RNA_def_property_float_sdna(prop, NULL, "weight[13]"); RNA_def_property_range(prop, -200.0f, 200.0f); RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3); - RNA_def_property_ui_text(prop, "Smoke Flow", "Smoke Flow effector weight"); + RNA_def_property_ui_text(prop, "Fluid Flow", "Fluid Flow effector weight"); RNA_def_property_update(prop, 0, "rna_EffectorWeight_update"); } @@ -1396,11 +1396,11 @@ static void rna_def_field(BlenderRNA *brna) "Turbulence", "Create turbulence with a noise field"}, {PFIELD_DRAG, "DRAG", ICON_FORCE_DRAG, "Drag", "Create a force that dampens motion"}, - {PFIELD_SMOKEFLOW, - "SMOKE_FLOW", - ICON_FORCE_SMOKEFLOW, - "Smoke Flow", - "Create a force based on smoke simulation air flow"}, + {PFIELD_FLUIDFLOW, + "FLUID_FLOW", + ICON_FORCE_FLUIDFLOW, + "Fluid Flow", + "Create a force based on fluid simulation velocities"}, {0, NULL, 0, NULL, NULL}, }; diff --git a/source/blender/modifiers/intern/MOD_fluid.c b/source/blender/modifiers/intern/MOD_fluid.c index 4880bd06ee9..d3f05ee714f 100644 --- a/source/blender/modifiers/intern/MOD_fluid.c +++ b/source/blender/modifiers/intern/MOD_fluid.c @@ -159,7 +159,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte ctx->object, mmd->domain->effector_weights, true, - PFIELD_SMOKEFLOW, + PFIELD_FLUIDFLOW, "Fluid Force Field"); if (mmd->domain->guide_parent != NULL) { -- cgit v1.2.3