Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2011-02-12 20:54:24 +0300
committerJanne Karhu <jhkarh@gmail.com>2011-02-12 20:54:24 +0300
commit0a83817672a6ec908eb5f4dd85a48ffa6e97736c (patch)
tree41004d350075864cc948776010d0bd73d6d6e855 /source/blender/makesrna/intern/rna_particle.c
parentd909e61d99d760e9c5ae0c9e29804ac609bf7b5f (diff)
Small particle effectors update:
* Greetings from farsthary: particle rotation is now taken into account for particle effector direction. ** This gives all kinds of new possibilities as he shows in his blog http://farsthary.wordpress.com/2011/02/08/vortex-particle-simple-tut/. **The only modification I made to his patch was to use the actual rotated particle direction as the effector direction as this defaults to the particle velocity vector, so no actual new options are needed. * I also added an "effector amount" setting for particle effectors so that only a part of the particles can be considered as effectors. This makes it possible to create simple "farsthary vortexes" with only one particle system. * Also some tiny reorganization of the falloff min/max values for a nicer ui.
Diffstat (limited to 'source/blender/makesrna/intern/rna_particle.c')
-rw-r--r--source/blender/makesrna/intern/rna_particle.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 6648176ca24..b9b45f61688 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -1965,6 +1965,13 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Grid Randomness", "Add random offset to the grid locations");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
+ prop= RNA_def_property(srna, "effector_amount", PROP_INT, PROP_UNSIGNED);
+ /* in theory PROP_ANIMATABLE perhaps should be cleared, but animating this can give some interesting results! */
+ RNA_def_property_range(prop, 0, 10000); /* 10000 effectors will bel SLOW, but who knows */
+ RNA_def_property_ui_range(prop, 0, 100, 1, 0);
+ RNA_def_property_ui_text(prop, "Effector Amount", "How many particles are effectors (0 is all particles)");
+ 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
@@ -2073,12 +2080,6 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Random Size", "Give the particle size a random variation");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
- prop= RNA_def_property(srna, "reaction_shape", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "reactshape");
- RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "Shape", "Power of reaction strength dependence on distance to target");
- RNA_def_property_update(prop, 0, "rna_Particle_reset");
-
/* global physical properties */
prop= RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_NONE);