[Bf-blender-cvs] [88b14fdf605] blender-v2.82-release: Fluid: Updated UI
Sebastián Barschkis
noreply at git.blender.org
Wed Jan 29 19:22:35 CET 2020
Commit: 88b14fdf6057452e962b14f853303d7928430588
Author: Sebastián Barschkis
Date: Wed Jan 29 12:41:48 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rB88b14fdf6057452e962b14f853303d7928430588
Fluid: Updated UI
UI updates include:
- More descriptive tool tips
- Removed texture panel for liquid flow objects
- Adjusted alignment for some smoke / fire parameters
===================================================================
M release/scripts/startup/bl_ui/properties_physics_fluid.py
M source/blender/makesrna/intern/rna_fluid.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py
index c1b8ae1a36a..28c9895f53b 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -105,6 +105,16 @@ class PhysicButtonsPanel:
if (flow.flow_behavior == 'OUTFLOW'):
return True
+ @staticmethod
+ def poll_fluid_flow_liquid(context):
+ if not PhysicButtonsPanel.poll_fluid_flow(context):
+ return False
+
+ md = context.fluid
+ flow = md.flow_settings
+ if (flow.flow_type == 'LIQUID'):
+ return True
+
class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
bl_label = "Fluid"
@@ -323,9 +333,9 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False)
flow.enabled = not is_baking_any and not has_baked_data
- col = flow.column()
- col.prop(domain, "alpha")
- col.prop(domain, "beta", text="Temperature Diff.")
+ col = flow.column(align=True)
+ col.prop(domain, "alpha", text="Buoyancy Density")
+ col.prop(domain, "beta", text="Heat")
col = flow.column()
col.prop(domain, "vorticity")
@@ -399,14 +409,12 @@ class PHYSICS_PT_fire(PhysicButtonsPanel, Panel):
col = flow.column()
col.prop(domain, "burning_rate", text="Reaction Speed")
- col = flow.column()
+ col = flow.column(align=True)
col.prop(domain, "flame_smoke", text="Flame Smoke")
- col = flow.column()
- col.prop(domain, "flame_vorticity", text="Flame Vorticity")
- col = flow.column()
- col.prop(domain, "flame_ignition", text="Temperature Ignition")
- col = flow.column()
- col.prop(domain, "flame_max_temp", text="Maximum Temperature")
+ col.prop(domain, "flame_vorticity", text="Vorticity")
+ col = flow.column(align=True)
+ col.prop(domain, "flame_max_temp", text="Temperature Maximum")
+ col.prop(domain, "flame_ignition", text="Minimum")
col = flow.column()
col.prop(domain, "flame_smoke_color", text="Flame Color")
@@ -495,10 +503,10 @@ class PHYSICS_PT_flow_source(PhysicButtonsPanel, Panel):
col = grid.column()
if flow.flow_source == 'MESH':
col.prop(flow, "use_plane_init", text="Is Planar")
- col.prop(flow, "surface_distance", text="Surface Thickness")
+ col.prop(flow, "surface_distance", text="Surface Emission")
if flow.flow_type in {'SMOKE', 'BOTH', 'FIRE'}:
col = grid.column()
- col.prop(flow, "volume_density", text="Volume Density")
+ col.prop(flow, "volume_density", text="Volume Emission")
if flow.flow_source == 'PARTICLES':
col.prop(flow, "use_particle_size", text="Set Size")
@@ -562,6 +570,9 @@ class PHYSICS_PT_flow_texture(PhysicButtonsPanel, Panel):
if PhysicButtonsPanel.poll_fluid_flow_outflow(context):
return False
+ if PhysicButtonsPanel.poll_fluid_flow_liquid(context):
+ return False
+
return (context.engine in cls.COMPAT_ENGINES)
def draw_header(self, context):
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index b82a1027577..3c29f8ec8c0 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -166,12 +166,8 @@ static void rna_Fluid_flip_parts_update(Main *bmain, Scene *scene, PointerRNA *p
}
if (ob->type == OB_MESH && !exists) {
- rna_Fluid_parts_create(bmain,
- ptr,
- "FlipParticleSettings",
- "FLIP Particles",
- "FLIP Particle System",
- PART_FLUID_FLIP);
+ rna_Fluid_parts_create(
+ bmain, ptr, "LiquidParticleSettings", "Liquid", "Liquid Particle System", PART_FLUID_FLIP);
mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_FLIP;
}
else {
@@ -189,12 +185,8 @@ static void rna_Fluid_spray_parts_update(Main *bmain, Scene *UNUSED(scene), Poin
bool exists = rna_Fluid_parts_exists(ptr, PART_FLUID_SPRAY);
if (ob->type == OB_MESH && !exists) {
- rna_Fluid_parts_create(bmain,
- ptr,
- "SprayParticleSettings",
- "Spray Particles",
- "Spray Particle System",
- PART_FLUID_SPRAY);
+ rna_Fluid_parts_create(
+ bmain, ptr, "SprayParticleSettings", "Spray", "Spray Particle System", PART_FLUID_SPRAY);
mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_SPRAY;
}
else {
@@ -214,7 +206,7 @@ static void rna_Fluid_bubble_parts_update(Main *bmain, Scene *UNUSED(scene), Poi
rna_Fluid_parts_create(bmain,
ptr,
"BubbleParticleSettings",
- "Bubble Particles",
+ "Bubbles",
"Bubble Particle System",
PART_FLUID_BUBBLE);
mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_BUBBLE;
@@ -233,12 +225,8 @@ static void rna_Fluid_foam_parts_update(Main *bmain, Scene *UNUSED(scene), Point
bool exists = rna_Fluid_parts_exists(ptr, PART_FLUID_FOAM);
if (ob->type == OB_MESH && !exists) {
- rna_Fluid_parts_create(bmain,
- ptr,
- "FoamParticleSettings",
- "Foam Particles",
- "Foam Particle System",
- PART_FLUID_FOAM);
+ rna_Fluid_parts_create(
+ bmain, ptr, "FoamParticleSettings", "Foam", "Foam Particle System", PART_FLUID_FOAM);
mmd->domain->particle_type |= FLUID_DOMAIN_PARTICLE_FOAM;
}
else {
@@ -996,13 +984,13 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
"MODULAR",
0,
"Modular",
- "Bake every stage of the simulation on its own. Pausing and resuming possible"},
+ "Bake every stage of the simulation separately. Pausing and resuming possible"},
{FLUID_DOMAIN_CACHE_FINAL,
"FINAL",
0,
"Final",
- "Bake the entire simulation at once. Only produces the most essential cache files. Pausing "
- "and resuming not possible"},
+ "Bake the entire simulation at once. Only generates the most essential cache files. "
+ "Pausing and resuming not possible"},
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem smoke_data_depth_items[] = {
@@ -1032,7 +1020,7 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
0,
"Domain",
"Use a fluid domain for guiding (domain needs to be baked already so that velocities can "
- "be extracted but can be of any type)"},
+ "be extracted). Guiding domain can be of any type (i.e. gas or liquid)"},
{FLUID_DOMAIN_GUIDE_SRC_EFFECTOR,
"EFFECTOR",
0,
@@ -1288,7 +1276,11 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "maxres");
RNA_def_property_range(prop, 6, 10000);
RNA_def_property_ui_range(prop, 24, 10000, 2, -1);
- RNA_def_property_ui_text(prop, "Max Res", "Resolution used for the fluid domain");
+ RNA_def_property_ui_text(
+ prop,
+ "Maximum Resolution",
+ "Resolution used for the fluid domain. Value corresponds to the longest domain side "
+ "(resolution for other domain sides is calculated automatically)");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
@@ -1344,8 +1336,8 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_range(prop, -5.0, 5.0, 0.02, 5);
RNA_def_property_ui_text(
prop,
- "Density",
- "How much density affects smoke motion (higher value results in faster rising smoke)");
+ "Buoyancy Density",
+ "Buoyant force based on smoke density (higher value results in faster rising smoke)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "beta", PROP_FLOAT, PROP_NONE);
@@ -1354,21 +1346,24 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_range(prop, -5.0, 5.0, 0.02, 5);
RNA_def_property_ui_text(
prop,
- "Heat",
- "How much heat affects smoke motion (higher value results in faster rising smoke)");
+ "Buoyancy Heat",
+ "Buoyant force based on smoke heat (higher value results in faster rising smoke)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "diss_speed");
RNA_def_property_range(prop, 1.0, 10000.0);
RNA_def_property_ui_range(prop, 1.0, 10000.0, 1, -1);
- RNA_def_property_ui_text(prop, "Dissolve Speed", "Dissolve Speed");
+ RNA_def_property_ui_text(
+ prop,
+ "Dissolve Speed",
+ "Determine how quickly the smoke dissolves (higher value makes smoke disappear faster)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "vorticity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vorticity");
RNA_def_property_range(prop, 0.0, 4.0);
- RNA_def_property_ui_text(prop, "Vorticity", "Amount of turbulence/rotation in fluid");
+ RNA_def_property_ui_text(prop, "Vorticity", "Amount of turbulence and rotation in smoke");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
prop = RNA_def_property(srna, "highres_sampling", PROP_ENUM, PROP_NONE);
@@ -1378,12 +1373,15 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_dissolve_smoke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_b
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list