[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58232] trunk/blender/source/blender: recent changes to particle normal orientation change behavior in a way you might not want (even though in general I think its an improvement).
Campbell Barton
ideasman42 at gmail.com
Sun Jul 14 12:57:44 CEST 2013
Revision: 58232
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58232
Author: campbellbarton
Date: 2013-07-14 10:57:43 +0000 (Sun, 14 Jul 2013)
Log Message:
-----------
recent changes to particle normal orientation change behavior in a way you might not want (even though in general I think its an improvement).
split this into 2 options, added 'Normal-Tangent' orientation that makes the mesh orient towards the tangent, otherwise it uses Z-Up as before.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/particle_system.c
trunk/blender/source/blender/makesdna/DNA_particle_types.h
trunk/blender/source/blender/makesrna/intern/rna_particle.c
Modified: trunk/blender/source/blender/blenkernel/intern/particle_system.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/particle_system.c 2013-07-14 09:57:03 UTC (rev 58231)
+++ trunk/blender/source/blender/blenkernel/intern/particle_system.c 2013-07-14 10:57:43 UTC (rev 58232)
@@ -1670,7 +1670,7 @@
const bool use_boids = ((part->phystype == PART_PHYS_BOIDS) &&
(pa->boid != NULL));
const bool use_tangents = ((use_boids == false) &&
- ((part->tanfac != 0.0f) || (part->rotmode == PART_ROT_NOR)));
+ ((part->tanfac != 0.0f) || (part->rotmode == PART_ROT_NOR_TAN)));
int p = pa - psys->particles;
@@ -1833,6 +1833,7 @@
/* create vector into which rotation is aligned */
switch (part->rotmode) {
case PART_ROT_NOR:
+ case PART_ROT_NOR_TAN:
copy_v3_v3(rot_vec, nor);
use_global_space = false;
break;
@@ -1881,7 +1882,7 @@
invert_qt_qt(q_imat, q_obmat);
- if (part->rotmode != PART_ROT_NOR) {
+ if (part->rotmode != PART_ROT_NOR_TAN) {
float rot_vec_local[3];
/* rot_vec */
@@ -1893,7 +1894,7 @@
vec_to_quat(q2, rot_vec_local, OB_POSX, OB_POSZ);
}
else {
- /* (part->rotmode == PART_ROT_NOR) */
+ /* (part->rotmode == PART_ROT_NOR_TAN) */
float tmat[3][3];
/* note: utan_local is not taken from 'utan', we calculate from rot_vec/vtan */
Modified: trunk/blender/source/blender/makesdna/DNA_particle_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_particle_types.h 2013-07-14 09:57:03 UTC (rev 58231)
+++ trunk/blender/source/blender/makesdna/DNA_particle_types.h 2013-07-14 10:57:43 UTC (rev 58232)
@@ -473,6 +473,7 @@
#define PART_ROT_OB_X 6
#define PART_ROT_OB_Y 7
#define PART_ROT_OB_Z 8
+#define PART_ROT_NOR_TAN 9
/* part->avemode */
#define PART_AVE_VELOCITY 1
Modified: trunk/blender/source/blender/makesrna/intern/rna_particle.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_particle.c 2013-07-14 09:57:03 UTC (rev 58231)
+++ trunk/blender/source/blender/makesrna/intern/rna_particle.c 2013-07-14 10:57:43 UTC (rev 58232)
@@ -1887,6 +1887,7 @@
static EnumPropertyItem rot_mode_items[] = {
{0, "NONE", 0, "None", ""},
{PART_ROT_NOR, "NOR", 0, "Normal", ""},
+ {PART_ROT_NOR_TAN, "NOR_TAN", 0, "Normal-Tangent", ""},
{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", ""},
More information about the Bf-blender-cvs
mailing list