[Bf-blender-cvs] [2564e2a2ad9] master: Cleanup: RNA naming
Campbell Barton
noreply at git.blender.org
Tue Dec 17 04:50:58 CET 2019
Commit: 2564e2a2ad9605398322e3ac2c7c49cc78e0a8f0
Author: Campbell Barton
Date: Tue Dec 17 14:45:14 2019 +1100
Branches: master
https://developer.blender.org/rB2564e2a2ad9605398322e3ac2c7c49cc78e0a8f0
Cleanup: RNA naming
- Use abbreviations min/max
this is used throughout the existing API.
- Rename use_adaptive_stepping to use_adaptive_timesteps
since this is used with timesteps_min/max it's clearer
to use matching terms.
===================================================================
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 5a47a75cd83..25780ab9ad2 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -161,11 +161,11 @@ class PHYSICS_PT_settings(PhysicButtonsPanel, Panel):
col.prop(domain, "cfl_condition", text="CFL Number")
col = flow.column()
- col.prop(domain, "use_adaptive_stepping", text="Use Adaptive Stepping")
+ col.prop(domain, "use_adaptive_timesteps")
col1 = col.column(align=True)
col1.enabled = domain.use_adaptive_stepping
- col1.prop(domain, "timesteps_maximum", text="Timesteps Maximum")
- col1.prop(domain, "timesteps_minimum", text="Minimum")
+ col1.prop(domain, "timesteps_max", text="Timesteps Maximum")
+ col1.prop(domain, "timesteps_min", text="Minimum")
col.separator()
@@ -438,8 +438,8 @@ class PHYSICS_PT_liquid(PhysicButtonsPanel, Panel):
col1 = flow.column(align=True)
col1.enabled = not is_baking_any and not has_baked_data
- col1.prop(domain, "particle_maximum", text="Particles Maximum")
- col1.prop(domain, "particle_minimum", text="Minimum")
+ col1.prop(domain, "particle_max", text="Particles Maximum")
+ col1.prop(domain, "particle_min", text="Minimum")
col1 = flow.column()
col1.enabled = not is_baking_any and not has_baked_data
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c
index 5fc5b698e83..e30a288ff44 100644
--- a/source/blender/makesrna/intern/rna_fluid.c
+++ b/source/blender/makesrna/intern/rna_fluid.c
@@ -1554,7 +1554,8 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
prop, "Number", "Particle number factor (higher value results in more particles)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
- prop = RNA_def_property(srna, "particle_minimum", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_min", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "particle_minimum");
RNA_def_property_range(prop, 0, 1000);
RNA_def_property_ui_text(prop,
"Minimum",
@@ -1562,7 +1563,8 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
"least this amount of particles)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
- prop = RNA_def_property(srna, "particle_maximum", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "particle_max", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "particle_maximum");
RNA_def_property_range(prop, 0, 1000);
RNA_def_property_ui_text(prop,
"Maximum",
@@ -2094,19 +2096,21 @@ static void rna_def_fluid_domain_settings(BlenderRNA *brna)
prop, "CFL", "Maximal velocity per cell (higher value results in larger timesteps)");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
- prop = RNA_def_property(srna, "use_adaptive_stepping", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "use_adaptive_timesteps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", FLUID_DOMAIN_USE_ADAPTIVE_TIME);
- RNA_def_property_ui_text(prop, "Adaptive stepping", "Enable adaptive time-stepping");
+ RNA_def_property_ui_text(prop, "Use Adaptive Time Steps", "");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_resetCache");
- prop = RNA_def_property(srna, "timesteps_minimum", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "timesteps_min", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "timesteps_minimum");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_range(prop, 0, 100, 1, -1);
RNA_def_property_ui_text(
prop, "Minimum", "Minimum number of simulation steps to perform for one frame");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_Fluid_reset");
- prop = RNA_def_property(srna, "timesteps_maximum", PROP_INT, PROP_NONE);
+ prop = RNA_def_property(srna, "timesteps_max", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "timesteps_maximum");
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_range(prop, 0, 100, 1, -1);
RNA_def_property_ui_text(
More information about the Bf-blender-cvs
mailing list