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.
This commit is contained in:
Sebastián Barschkis 2020-05-14 10:30:11 +02:00
parent de6a866114
commit 13769bcbe5
13 changed files with 21 additions and 21 deletions

View File

@ -123,7 +123,7 @@ class PHYSICS_PT_field_settings(PhysicButtonsPanel, Panel):
col.prop(field, "use_object_coords")
col.prop(field, "use_2d_force")
elif field.type == 'SMOKE_FLOW':
elif field.type == 'FLUID_FLOW':
col = flow.column()
col.prop(field, "strength")
col.prop(field, "flow")

View File

@ -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);
}

View File

@ -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) {

View File

@ -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);

View File

@ -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. */

View File

@ -336,7 +336,7 @@ set(ICON_NAMES
force_boid
force_turbulence
force_drag
force_smokeflow
force_fluidflow
image_plane
image_background
image_reference

View File

@ -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)

View File

@ -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},
};

View File

@ -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,

View File

@ -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},
};

View File

@ -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) {