diff options
author | Janne Karhu <jhkarh@gmail.com> | 2011-02-04 18:48:13 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2011-02-04 18:48:13 +0300 |
commit | 4e8a8d1e8f59c2b97ce064d52fdab290ca8b2f3d (patch) | |
tree | 49b40239e1b676aa27415db051bc71e1f115e406 /source/blender/makesrna | |
parent | b407702c5f13a0d2cf77d6728722d6f909e4d19e (diff) |
Improvements for particle grid distribution:
* Particles that aren't shown are now actually deleted (huge memory savings for flat objects).
* Grid distribution for flat objects is now done on the surface object surface without offset.
* Invert grid option wasn't in ui and it didn't work for non-volume grids.
* New parameter to randomize the grid point locations.
* Resolution soft/hard limits changed to even 50/250.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index cbf8c7093d7..82e2eb96002 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -1289,7 +1289,7 @@ static void rna_def_particle_settings(BlenderRNA *brna) prop= RNA_def_property(srna, "invert_grid", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", PART_GRID_INVERT); - RNA_def_property_ui_text(prop, "Invert", "Invert what is considered object and what is not"); + RNA_def_property_ui_text(prop, "Invert Grid", "Invert what is considered object and what is not"); RNA_def_property_update(prop, 0, "rna_Particle_reset"); prop= RNA_def_property(srna, "apply_effector_to_children", PROP_BOOLEAN, PROP_NONE); @@ -1684,11 +1684,17 @@ static void rna_def_particle_settings(BlenderRNA *brna) prop= RNA_def_property(srna, "grid_resolution", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "grid_res"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); - RNA_def_property_range(prop, 1, 215); /* ~10M particles in a cube */ - RNA_def_property_ui_range(prop, 1, 46, 1, 0); /* ~100k particles in a cube */ + RNA_def_property_range(prop, 1, 250); /* ~15M particles in a cube (ouch!), but could be very usable in a plane */ + RNA_def_property_ui_range(prop, 1, 50, 1, 0); /* ~100k particles in a cube */ RNA_def_property_ui_text(prop, "Resolution", "The resolution of the particle grid"); RNA_def_property_update(prop, 0, "rna_Particle_reset"); + prop= RNA_def_property(srna, "grid_random", PROP_FLOAT, PROP_NONE); + RNA_def_property_float_sdna(prop, NULL, "grid_rand"); + RNA_def_property_range(prop, 0.0f, 1.0f); + RNA_def_property_ui_text(prop, "Grid Randomness", "Add random offset to the grid locations"); + RNA_def_property_update(prop, 0, "rna_Particle_reset"); + /* initial velocity factors */ prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "normfac");//optional if prop names are the same |