Revision: 36484 http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36484 Author: campbellbarton Date: 2011-05-04 12:59:24 +0000 (Wed, 04 May 2011) Log Message: ----------- drawing in 3d camera view conversion between mouse/camera view border was broken.
Modified Paths: -------------- trunk/blender/source/blender/editors/gpencil/gpencil_paint.c Modified: trunk/blender/source/blender/editors/gpencil/gpencil_paint.c =================================================================== --- trunk/blender/source/blender/editors/gpencil/gpencil_paint.c 2011-05-04 12:31:01 UTC (rev 36483) +++ trunk/blender/source/blender/editors/gpencil/gpencil_paint.c 2011-05-04 12:59:24 UTC (rev 36484) @@ -1124,6 +1124,21 @@ /* set 'initial run' flag, which is only used to denote when a new stroke is starting */ p->flags |= GP_PAINTFLAG_FIRSTRUN; + + /* when drawing in the camera view, in 2D space, set the subrect */ + if (!(p->gpd->flag & GP_DATA_VIEWALIGN)) { + if (p->sa->spacetype == SPACE_VIEW3D) { + View3D *v3d= p->sa->spacedata.first; + RegionView3D *rv3d= p->ar->regiondata; + + /* for camera view set the subrect */ + if (rv3d->persp == RV3D_CAMOB) { + view3d_calc_camera_border(p->scene, p->ar, NULL, v3d, &p->subrect_data, -1); /* negative shift */ + p->subrect= &p->subrect_data; + } + } + } + /* check if points will need to be made in view-aligned space */ if (p->gpd->flag & GP_DATA_VIEWALIGN) { switch (p->sa->spacetype) { _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs