[Bf-blender-cvs] [8c7ddbc] fluid-mantaflow: added some sanity checks for ui and outflow fields
Sebastián Barschkis
noreply at git.blender.org
Fri Aug 19 18:56:09 CEST 2016
Commit: 8c7ddbcfe667b655e5a7b3300144a63a630d362d
Author: Sebastián Barschkis
Date: Wed Aug 17 19:26:32 2016 +0200
Branches: fluid-mantaflow
https://developer.blender.org/rB8c7ddbcfe667b655e5a7b3300144a63a630d362d
added some sanity checks for ui and outflow fields
===================================================================
M release/scripts/startup/bl_ui/properties_physics_smoke.py
M source/blender/blenkernel/intern/smoke.c
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 e20c9b5..75fa457 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -262,12 +262,13 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel):
col = split.column()
col.label(text="Resolution:")
col.prop(domain, "resolution_max", text="Divisions")
- col.label(text="Render Display:")
- col.prop(domain, "render_display_mode", text="")
+ # TODO (sebbas): Disabling render display switch for now. Needs some more consideration
+ #col.label(text="Render Display:")
+ #col.prop(domain, "render_display_mode", text="")
col = split.column()
- col.label()
- col.label()
+ #col.label()
+ #col.label()
col.label(text="Viewport Display:")
col.prop(domain, "viewport_display_mode", text="")
diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c
index 0f7cbaa..98fdf3a 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -2243,7 +2243,7 @@ BLI_INLINE void apply_outflow_fields(int index, float inflow_value, float *densi
if (phi) {
phi[index] = 0.5f; // mantaflow convetion
}
- if (inflow_value < 0.f) { // only set outflow inside mesh
+ if (flags && inflow_value < 0.f) { // only set outflow inside mesh
flags[index] = 20; // mantaflow convetion (FlagOutflow | FlagEmpty)
}
@@ -2702,7 +2702,7 @@ static void update_flowsfluids(Scene *scene, Object *ob, SmokeDomainSettings *sd
}
else if (sfs->behavior == MOD_SMOKE_FLOW_BEHAVIOR_INFLOW || (sfs->behavior == MOD_SMOKE_FLOW_BEHAVIOR_GEOMETRY && smd2->time == 2)) { // inflow
// TODO (sebbas) inflow map highres?
- apply_inflow_fields(sfs, interpolated_value, inflow_map_high[index_big], index_big, bigdensity, NULL, bigfuel, bigreact, bigcolor_r, bigcolor_g, bigcolor_b, bigphi);
+ apply_inflow_fields(sfs, interpolated_value, inflow_map_high[index_big], index_big, bigdensity, NULL, bigfuel, bigreact, bigcolor_r, bigcolor_g, bigcolor_b, NULL);
}
} // hires loop
} // bigdensity
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index ee3f9e9..733c23d 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -802,15 +802,15 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "noise_pos_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noise_pos_scale");
- RNA_def_property_range(prop, 0.0, 10.0);
+ RNA_def_property_range(prop, 0.1, 10.0);
RNA_def_property_ui_range(prop, 0.1, 2.0, 1, 2);
RNA_def_property_ui_text(prop, "Scale", "Scale of noise (higher value results in larger vortices)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Smoke_resetCache");
prop = RNA_def_property(srna, "noise_time_anim", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "noise_time_anim");
- RNA_def_property_range(prop, 0.0, 10.0);
- RNA_def_property_ui_range(prop, 0.0, 2.0, 1, 2);
+ RNA_def_property_range(prop, 0.1, 10.0);
+ RNA_def_property_ui_range(prop, 0.1, 2.0, 1, 2);
RNA_def_property_ui_text(prop, "Time", "Animation time of noise");
prop = RNA_def_property(srna, "particle_randomness", PROP_FLOAT, PROP_NONE);
More information about the Bf-blender-cvs
mailing list