[Bf-blender-cvs] [12ad531] fluid-mantaflow: more outflow ui customizations
Sebastián Barschkis
noreply at git.blender.org
Sat Aug 6 13:01:06 CEST 2016
Commit: 12ad5310db39161da79aa2b5809afa8a71e90074
Author: Sebastián Barschkis
Date: Sun Jul 31 20:42:35 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB12ad5310db39161da79aa2b5809afa8a71e90074
more outflow ui customizations
===================================================================
M release/scripts/startup/bl_ui/properties_physics_smoke.py
M source/blender/makesdna/DNA_smoke_types.h
M source/blender/makesrna/intern/rna_smoke.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index d466218..e60c888 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -78,21 +78,24 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
layout.prop(flow, "smoke_flow_type", expand=False)
layout.prop(flow, "smoke_flow_behavior", expand=False)
- if flow.smoke_flow_type != 'LIQUID':
- split = layout.split()
+ split = layout.split()
- col = split.column()
+ col = split.column()
+ if flow.smoke_flow_type in {'SMOKE', 'BOTH', 'FIRE'}:
col.label(text="Initial Values:")
col.prop(flow, "use_absolute")
- if flow.smoke_flow_type in {'SMOKE', 'BOTH'}:
- col.prop(flow, "density")
- col.prop(flow, "temperature")
- col.prop(flow, "smoke_color")
- if flow.smoke_flow_type in {'FIRE', 'BOTH'}:
- col.prop(flow, "fuel_amount")
- col = split.column()
- col.label(text="Sampling:")
- col.prop(flow, "subframes")
+ if flow.smoke_flow_type in {'SMOKE', 'BOTH'}:
+ col.prop(flow, "density")
+ col.prop(flow, "temperature")
+ col.prop(flow, "smoke_color")
+ if flow.smoke_flow_type in {'FIRE', 'BOTH'}:
+ col.prop(flow, "fuel_amount")
+
+ col = split.column()
+ col.label(text="Sampling:")
+ if flow.smoke_flow_behavior == 'INFLOW':
+ col.prop(flow, "use_inflow")
+ col.prop(flow, "subframes")
elif md.smoke_type == 'COLLISION':
coll = md.coll_settings
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index a95eb71..0c06ed5 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -223,6 +223,7 @@ typedef struct SmokeDomainSettings {
#define MOD_SMOKE_FLOW_INITVELOCITY (1<<2) /* passes particles speed to the smoke */
#define MOD_SMOKE_FLOW_TEXTUREEMIT (1<<3) /* use texture to control emission speed */
#define MOD_SMOKE_FLOW_USE_PART_SIZE (1<<4) /* use specific size for particles instead of closest cell */
+#define MOD_SMOKE_FLOW_USE_INFLOW (1<<5) /* control when to apply inflow */
typedef struct SmokeFlowSettings {
struct SmokeModifierData *smd; /* for fast RNA access */
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 180dbc9..5243b05 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -953,6 +953,11 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Set Size", "Set particle size in simulation cells or use nearest cell");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
+ prop = RNA_def_property(srna, "use_inflow", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_USE_INFLOW);
+ RNA_def_property_ui_text(prop, "Use inflow", "Control when to apply inflow");
+ RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_reset");
+
prop = RNA_def_property(srna, "subframes", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 50);
RNA_def_property_ui_range(prop, 0, 10, 1, -1);
More information about the Bf-blender-cvs
mailing list