diff options
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_view.c | 7 |
3 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 0cb4fc0ef7f..d61ba5f1181 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -2133,7 +2133,7 @@ void draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d) short zbuf = v3d->zbuf; RegionView3D *rv3d = ar->regiondata; - setwinmatrixview3d(ar, v3d, NULL); /* 0= no pick rect */ + setwinmatrixview3d(ar, v3d, NULL); setviewmatrixview3d(scene, v3d, rv3d); /* note: calls BKE_object_where_is_calc for camera... */ mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat); @@ -2168,7 +2168,7 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *)) U.glalphaclip = 0.5; /* not that nice but means we wont zoom into billboards */ U.obcenter_dia = 0; - setwinmatrixview3d(ar, v3d, NULL); /* 0= no pick rect */ + setwinmatrixview3d(ar, v3d, NULL); setviewmatrixview3d(scene, v3d, rv3d); /* note: calls BKE_object_where_is_calc for camera... */ mult_m4_m4m4(rv3d->persmat, rv3d->winmat, rv3d->viewmat); @@ -2456,7 +2456,7 @@ void ED_view3d_update_viewmat(Scene *scene, View3D *v3d, ARegion *ar, float view if (winmat) copy_m4_m4(rv3d->winmat, winmat); else - setwinmatrixview3d(ar, v3d, NULL); /* NULL= no pickrect */ + setwinmatrixview3d(ar, v3d, NULL); /* setup view matrix */ if (viewmat) diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 3017891183e..5beeda9f220 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -177,7 +177,7 @@ int ED_view3d_boundbox_clip(RegionView3D * rv3d, float obmat[][4], struct BoundB void view3d_smooth_view(struct bContext *C, struct View3D *v3d, struct ARegion *ar, struct Object *, struct Object *, float *ofs, float *quat, float *dist, float *lens); -void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect); /* rect: for picking */ +void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect); void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d); void fly_modal_keymap(struct wmKeyConfig *keyconf); diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index 7c6645ce8ac..c16f04f01f3 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -658,7 +658,10 @@ int ED_view3d_viewplane_get(View3D *v3d, RegionView3D *rv3d, int winx, int winy, return params.is_ortho; } -void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect) /* rect: for picking */ +/*! + * \param rect for picking, NULL not to use. + */ +void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect) { RegionView3D *rv3d = ar->regiondata; rctf viewplane; @@ -691,7 +694,7 @@ void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect) /* rect: for if (orth) wmOrtho(rect->xmin, rect->xmax, rect->ymin, rect->ymax, -clipend, clipend); else wmFrustum(rect->xmin, rect->xmax, rect->ymin, rect->ymax, clipsta, clipend); - + } else { if (orth) wmOrtho(x1, x2, y1, y2, clipsta, clipend); |