[Bf-blender-cvs] [359eb35] temp_hair_modifiers: Use the final hair state also as simulation input/output in hair sim.
Lukas Tönne
noreply at git.blender.org
Mon Feb 2 17:29:52 CET 2015
Commit: 359eb359b9dae10c521e38ea69b1b0b42617dd74
Author: Lukas Tönne
Date: Mon Feb 2 16:57:06 2015 +0100
Branches: temp_hair_modifiers
https://developer.blender.org/rB359eb359b9dae10c521e38ea69b1b0b42617dd74
Use the final hair state also as simulation input/output in hair sim.
===================================================================
M source/blender/blenkernel/intern/particle_system.c
M source/blender/editors/space_view3d/drawobject.c
===================================================================
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index d87a58e..5a66d52 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -3324,7 +3324,7 @@ static void hair_create_input_dm(ParticleSimulationData *sim, int totpoint, int
medge++;
}
- hair_index += pa->totkey + 1;
+ hair_index += pa->totkey_final + 1;
}
}
@@ -3456,8 +3456,8 @@ static void do_hair_dynamics(ParticleSimulationData *sim)
totedge = 0;
LOOP_PARTICLES {
/* "out" dm contains all hairs */
- totedge += pa->totkey;
- totpoint += pa->totkey + 1; /* +1 for virtual root point */
+ totedge += pa->totkey_final;
+ totpoint += pa->totkey_final + 1; /* +1 for virtual root point */
}
realloc_roots = false; /* whether hair root info array has to be reallocated */
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 61dddd2..968ffdc 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -5554,7 +5554,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
glDisableClientState(GL_COLOR_ARRAY);
for (a = 0, pa = psys->particles; a < totpart; a++, pa++) {
- if (pa->totkey > 1) {
+ if (pa->totkey_final > 1) {
HairKey *hkey = pa->hair_final;
glVertexPointer(3, GL_FLOAT, sizeof(HairKey), hkey->world_co);
@@ -5575,7 +5575,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
glBegin(GL_LINES);
for (a = 0, pa = psys->particles; a < totpart; a++, pa++) {
- for (i = 1; i < pa->totkey; ++i) {
+ for (i = 1; i < pa->totkey_final; ++i) {
float v1[3], v2[3];
copy_v3_v3(v1, mvert[pa->hair_index + i - 1].co);
More information about the Bf-blender-cvs
mailing list