diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2015-01-13 19:24:20 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-01-20 11:30:10 +0300 |
commit | 307c4a4df92cdde64b39e7fe28ab2db80355025f (patch) | |
tree | def751e2e620e0172bf3c386b1300f60366c5c13 /source/blender/editors | |
parent | 9bf763393603a987aa95033b2da78cea501d699b (diff) |
Another crappy approach to spirals on hairs, crazy expensive though.
Conflicts:
source/blender/blenkernel/intern/particle.c
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 16 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 18 |
2 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 5a479af83b5..bed85444101 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -440,9 +440,9 @@ int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene * for (a = 0; a < totpart; a++) { key = cache[a]; - if (key->steps > 0) { - totvert += key->steps + 1; - totedge += key->steps; + if (key->segments > 0) { + totvert += key->segments + 1; + totedge += key->segments; } } @@ -450,9 +450,9 @@ int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene * for (a = 0; a < totchild; a++) { key = cache[a]; - if (key->steps > 0) { - totvert += key->steps + 1; - totedge += key->steps; + if (key->segments > 0) { + totvert += key->segments + 1; + totedge += key->segments; } } @@ -476,7 +476,7 @@ int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene * cache = psys->pathcache; for (a = 0; a < totpart; a++) { key = cache[a]; - kmax = key->steps; + kmax = key->segments; for (k = 0; k <= kmax; k++, key++, cvert++, mvert++) { copy_v3_v3(mvert->co, key->co); if (k) { @@ -495,7 +495,7 @@ int ED_object_modifier_convert(ReportList *UNUSED(reports), Main *bmain, Scene * cache = psys->childcache; for (a = 0; a < totchild; a++) { key = cache[a]; - kmax = key->steps; + kmax = key->segments; for (k = 0; k <= kmax; k++, key++, cvert++, mvert++) { copy_v3_v3(mvert->co, key->co); if (k) { diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 109dc10bcab..d9b4e8164e4 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -5144,7 +5144,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv cache = psys->pathcache; for (a = 0, pa = psys->particles; a < totpart; a++, pa++) { path = cache[a]; - if (path->steps > 0) { + if (path->segments > 0) { glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->co); if (1) { //ob_dt > OB_WIRE) { @@ -5156,7 +5156,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv } } - glDrawArrays(GL_LINE_STRIP, 0, path->steps + 1); + glDrawArrays(GL_LINE_STRIP, 0, path->segments + 1); } } @@ -5304,7 +5304,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv } } - glDrawArrays(GL_LINE_STRIP, 0, path->steps + 1); + glDrawArrays(GL_LINE_STRIP, 0, path->segments + 1); } @@ -5456,7 +5456,7 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) PTCacheEditKey *key; ParticleEditSettings *pset = PE_settings(scene); int i, k, totpoint = edit->totpoint, timed = pset->flag & PE_FADE_TIME ? pset->fade_frames : 0; - int steps = 1; + int totkeys = 1; float sel_col[3]; float nosel_col[3]; float *pathcol = NULL, *pcol; @@ -5475,10 +5475,10 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) UI_GetThemeColor3fv(TH_VERTEX, nosel_col); /* draw paths */ - steps = (*edit->pathcache)->steps + 1; + totkeys = (*edit->pathcache)->segments + 1; glEnable(GL_BLEND); - pathcol = MEM_callocN(steps * 4 * sizeof(float), "particle path color data"); + pathcol = MEM_callocN(totkeys * 4 * sizeof(float), "particle path color data"); glEnableClientState(GL_VERTEX_ARRAY); glEnableClientState(GL_COLOR_ARRAY); @@ -5498,7 +5498,7 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) glVertexPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->co); if (point->flag & PEP_HIDE) { - for (k = 0, pcol = pathcol; k < steps; k++, pcol += 4) { + for (k = 0, pcol = pathcol; k < totkeys; k++, pcol += 4) { copy_v3_v3(pcol, path->col); pcol[3] = 0.25f; } @@ -5506,7 +5506,7 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) glColorPointer(4, GL_FLOAT, 4 * sizeof(float), pathcol); } else if (timed) { - for (k = 0, pcol = pathcol, pkey = path; k < steps; k++, pkey++, pcol += 4) { + for (k = 0, pcol = pathcol, pkey = path; k < totkeys; k++, pkey++, pcol += 4) { copy_v3_v3(pcol, pkey->col); pcol[3] = 1.0f - fabsf((float)(CFRA) -pkey->time) / (float)pset->fade_frames; } @@ -5516,7 +5516,7 @@ static void draw_ptcache_edit(Scene *scene, View3D *v3d, PTCacheEdit *edit) else glColorPointer(3, GL_FLOAT, sizeof(ParticleCacheKey), path->col); - glDrawArrays(GL_LINE_STRIP, 0, path->steps + 1); + glDrawArrays(GL_LINE_STRIP, 0, path->segments + 1); } if (pathcol) { MEM_freeN(pathcol); pathcol = pcol = NULL; } |