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-10-16 20:14:36 +0400
committerJanne Karhu <jhkarh@gmail.com>2011-10-16 20:14:36 +0400
commit8fae0c6d7e0d24bfa6c12e2121c5fa7a62440141 (patch)
tree4a4cee0c037b0a76815c2f8d6021d1520cb268b1 /source/blender/makesrna
parent6d5891e7eaa490794461ab02538dfb5f7037faef (diff)
Particle dupliobject rotation changes:
There has been quite a bit of fuss about particle dupliobject rotation in 2.59, so here are some changes to make things work a bit more consistently and predictably in 2.60. Much of the confusion has been about what the "Initial rotation" for particles actually means. Simply put it's just a vector that that the particles (and the dupliobjects) are aligned to and around which they can be rotated with the phase controls. I've now renamed these controls under a label "Rotation axis". In 2.59 and previous versions the dupliobject's global x-axis was aligned to the particle rotation axis for non-hair particles. This meant that the object's own rotation (in addition to the particle rotation) could effect the dupliobjects' rotations. This old behavior can still be used with the "Rotation" option in the particle render panel when object/group is set as the visualization. This option is also activated automatically for old files to maintain backwards compatibility. Now the default dupliobject rotations ignore the object's own rotation completely and align the object's tracking axis to the particle rotation axis. The tracking axis can be found under the Object tab -> Animation Hacks panel. In 2.58 the way of calculating the rotation for hair didn't work as intended and enabled many non-functional combinations of options. For this reason I removed most of the rotation options for hair in 2.59. Now the options have been reimplemented better and the dupliobject's tracking axis is aligned to the hair direction by default (Rotation axis = Velocity / Hair). All the other axis options work too along with the phase controls.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_particle.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 49005e56367..43d5f87f0d5 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -1478,7 +1478,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
static EnumPropertyItem rot_mode_items[] = {
{0, "NONE", 0, "None", ""},
{PART_ROT_NOR, "NOR", 0, "Normal", ""},
- {PART_ROT_VEL, "VEL", 0, "Velocity", ""},
+ {PART_ROT_VEL, "VEL", 0, "Velocity / Hair", ""},
{PART_ROT_GLOB_X, "GLOB_X", 0, "Global X", ""},
{PART_ROT_GLOB_Y, "GLOB_Y", 0, "Global Y", ""},
{PART_ROT_GLOB_Z, "GLOB_Z", 0, "Global Z", ""},
@@ -1733,7 +1733,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "rotmode");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_enum_items(prop, rot_mode_items);
- RNA_def_property_ui_text(prop, "Rotation", "Particles initial rotation");
+ RNA_def_property_ui_text(prop, "Rotation", "Particle rotation axis");
RNA_def_property_update(prop, 0, "rna_Particle_reset");
prop= RNA_def_property(srna, "angular_velocity_mode", PROP_ENUM, PROP_NONE);
@@ -1798,7 +1798,12 @@ static void rna_def_particle_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_global_dupli", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_GLOBAL_OB);
- RNA_def_property_ui_text(prop, "Use Global", "Use object's global coordinates for duplication");
+ RNA_def_property_ui_text(prop, "Global", "Use object's global coordinates for duplication");
+ RNA_def_property_update(prop, 0, "rna_Particle_redo");
+
+ prop= RNA_def_property(srna, "use_rotation_dupli", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "draw", PART_DRAW_ROTATE_OB);
+ RNA_def_property_ui_text(prop, "Rotation", "Use object's rotation for duplication (global x-axis is aligned particle rotation axis)");
RNA_def_property_update(prop, 0, "rna_Particle_redo");
prop= RNA_def_property(srna, "use_render_adaptive", PROP_BOOLEAN, PROP_NONE);