From 0a83817672a6ec908eb5f4dd85a48ffa6e97736c Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sat, 12 Feb 2011 17:54:24 +0000 Subject: 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. --- source/blender/makesrna/intern/rna_particle.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'source/blender/makesrna') 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); -- cgit v1.2.3