[Bf-blender-cvs] [949316d0a79] fluid-mantaflow: fluid particles UI update

Sebastián Barschkis noreply at git.blender.org
Tue Oct 3 14:11:10 CEST 2017


Commit: 949316d0a79373413adaaff041da6661611515ff
Author: Sebastián Barschkis
Date:   Wed Sep 27 14:55:17 2017 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB949316d0a79373413adaaff041da6661611515ff

fluid particles UI update

===================================================================

M	release/scripts/startup/bl_ui/properties_physics_smoke.py
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 79344171d84..91cb542d969 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -375,7 +375,8 @@ class PHYSICS_PT_smoke_particles(PhysicButtonsPanel, Panel):
     def poll(cls, context):
         md = context.smoke
         rd = context.scene.render
-        return md and (md.smoke_type == 'DOMAIN') and (rd.engine in cls.COMPAT_ENGINES)
+        # Fluid particles only enabled for liquids for now. Future update might include particles for gas domain, e.g. fire sparks.
+        return md and (md.smoke_type == 'DOMAIN') and (rd.engine in cls.COMPAT_ENGINES) and (md.domain_settings.smoke_domain_type in {'LIQUID'}) 
 
     def draw(self, context):
         layout = self.layout
@@ -401,10 +402,11 @@ class PHYSICS_PT_smoke_particles(PhysicButtonsPanel, Panel):
         sub.prop(domain, "particle_velocity_threshold", text="Threshold")
         sub2 = col.column()
         sub2.active = domain.use_drop_particles and domain.use_bubble_particles
-        sub2.prop(domain, "particle_bubble_rise", text="Rise")
+        #sub2.prop(domain, "particle_bubble_rise", text="Rise")
+        sub2.label()
         sub3 = col.column()
         sub3.active = domain.use_float_particles
-        sub3.prop(domain, "particle_float_amount", text="Amount")
+        sub3.prop(domain, "particle_float_amount", text="Initial")
         sub4 = col.column()
         sub4.active = domain.use_tracer_particles
         sub4.prop(domain, "particle_tracer_amount", text="Amount")
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 4d3229980ac..653626b89a0 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -1374,13 +1374,13 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
 	prop = RNA_def_property(srna, "particle_float_amount", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_range(prop, 0.0, 1.0);
 	RNA_def_property_ui_range(prop, 0.0, 1.0, 0.02, 5);
-	RNA_def_property_ui_text(prop, "Amount", "Amount of float particles (probability of sampling a new particle in a cell)");
+	RNA_def_property_ui_text(prop, "Initial", "Initial amount of float particles (probability of sampling a particle in a cell)");
 	RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
 
 	prop = RNA_def_property(srna, "particle_tracer_amount", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_range(prop, 0.0, 1.0);
 	RNA_def_property_ui_range(prop, 0.0, 1.0, 0.02, 5);
-	RNA_def_property_ui_text(prop, "Amount", "Amount of tracer particles (probability of sampling a new particle in a cell)");
+	RNA_def_property_ui_text(prop, "Amount", "Amount of tracer particles (probability of sampling a particle in a cell)");
 	RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
 
 	prop = RNA_def_property(srna, "guiding_alpha", PROP_FLOAT, PROP_NONE);



More information about the Bf-blender-cvs mailing list