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>2012-10-04 21:52:12 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-04 21:52:12 +0400
commite77004157e483c610a6478b733a42554ab21c365 (patch)
tree49658faa8166b7176d8b3202308f97561db22bb0 /source/blender/editors/space_view3d/view3d_draw.c
parent709903c6bba4dca12a6f367000f99a83da2af034 (diff)
make ED_view3d_project_int equivalent to ED_view3d_project_short functions.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 25ad85d3db8..cb197ab93b0 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -553,32 +553,23 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit)
static void drawcursor(Scene *scene, ARegion *ar, View3D *v3d)
{
- int mx, my, co[2];
- int flag;
-
+ int co[2];
+
/* we don't want the clipping for cursor */
- flag = v3d->flag;
- v3d->flag = 0;
- ED_view3d_project_int(ar, give_cursor(scene, v3d), co);
- v3d->flag = flag;
-
- mx = co[0];
- my = co[1];
-
- if (mx != IS_CLIPPED) {
+ if (ED_view3d_project_int_global(ar, give_cursor(scene, v3d), co, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_SUCCESS) {
setlinestyle(0);
cpack(0xFF);
- circ((float)mx, (float)my, 10.0);
+ circ((float)co[0], (float)co[1], 10.0);
setlinestyle(4);
cpack(0xFFFFFF);
- circ((float)mx, (float)my, 10.0);
+ circ((float)co[0], (float)co[1], 10.0);
setlinestyle(0);
cpack(0x0);
- sdrawline(mx - 20, my, mx - 5, my);
- sdrawline(mx + 5, my, mx + 20, my);
- sdrawline(mx, my - 20, mx, my - 5);
- sdrawline(mx, my + 5, mx, my + 20);
+ sdrawline(co[0] - 20, co[1], co[0] - 5, co[1]);
+ sdrawline(co[0] + 5, co[1], co[0] + 20, co[1]);
+ sdrawline(co[0], co[1] - 20, co[0], co[1] - 5);
+ sdrawline(co[0], co[1] + 5, co[0], co[1] + 20);
}
}