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:
authorCampbell Barton <ideasman42@gmail.com>2010-03-03 14:40:12 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-03-03 14:40:12 +0300
commit0dfb6c4d0b3b8079744f05297cfbd445f8369f75 (patch)
tree8f30dd1fd1c36184a3fd1d2e6c49d2ca88573b6c /source/blender/editors/space_view3d/drawobject.c
parent7e05205296057d6295d4dd4b3195b14fc06a3256 (diff)
bugfix [#21428] Particle number display offset
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index b594fba90b9..052edc66ed0 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -3383,6 +3383,9 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
glMultMatrixf(mat);
}
+ /* needed for text display */
+ invert_m4_m4(ob->imat, ob->obmat);
+
totpart=psys->totpart;
//if(part->flag&PART_GLOB_TIME)
@@ -3694,6 +3697,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
}
if((part->draw & PART_DRAW_NUM || part->draw & PART_DRAW_HEALTH) && !(G.f & G_RENDER_SHADOW)){
+ float vec_txt[3];
char *val_pos= val;
val[0]= '\0';
@@ -3705,7 +3709,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
/* in path drawing state.co is the end point */
/* use worldspace beause object matrix is alredy applied */
- view3d_cached_text_draw_add(state.co[0], state.co[1], state.co[2], val, 10, V3D_CACHE_TEXT_WORLDSPACE);
+ mul_v3_m4v3(vec_txt, ob->imat, state.co);
+ view3d_cached_text_draw_add(vec_txt[0], vec_txt[1], vec_txt[2], val, 10, V3D_CACHE_TEXT_WORLDSPACE);
}
}
}