Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/drawgpencil.c
| Show First 20 Lines • Show All 1,665 Lines • ▼ Show 20 Lines | void ED_gpencil_draw_view2d(const bContext *C, bool onlyv2d) | ||||
| } | } | ||||
| } | } | ||||
| /* draw grease-pencil sketches to specified 3d-view assuming that matrices are already set correctly | /* draw grease-pencil sketches to specified 3d-view assuming that matrices are already set correctly | ||||
| * Note: this gets called twice - first time with only3d=true to draw 3d-strokes, | * Note: this gets called twice - first time with only3d=true to draw 3d-strokes, | ||||
| * second time with only3d=false for screen-aligned strokes */ | * second time with only3d=false for screen-aligned strokes */ | ||||
| void ED_gpencil_draw_view3d(wmWindowManager *wm, | void ED_gpencil_draw_view3d(wmWindowManager *wm, | ||||
| Scene *scene, | Scene *scene, | ||||
| SceneLayer *scene_layer, | ViewLayer *view_layer, | ||||
| View3D *v3d, | View3D *v3d, | ||||
| ARegion *ar, | ARegion *ar, | ||||
| bool only3d) | bool only3d) | ||||
| { | { | ||||
| int dflag = 0; | int dflag = 0; | ||||
| RegionView3D *rv3d = ar->regiondata; | RegionView3D *rv3d = ar->regiondata; | ||||
| int offsx, offsy, winx, winy; | int offsx, offsy, winx, winy; | ||||
| /* check that we have grease-pencil stuff to draw */ | /* check that we have grease-pencil stuff to draw */ | ||||
| bGPdata *gpd = ED_gpencil_data_get_active_v3d(scene, scene_layer); | bGPdata *gpd = ED_gpencil_data_get_active_v3d(scene, view_layer); | ||||
| if (gpd == NULL) return; | if (gpd == NULL) return; | ||||
| /* when rendering to the offscreen buffer we don't want to | /* when rendering to the offscreen buffer we don't want to | ||||
| * deal with the camera border, otherwise map the coords to the camera border. */ | * deal with the camera border, otherwise map the coords to the camera border. */ | ||||
| if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_RENDER_OGL)) { | if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_RENDER_OGL)) { | ||||
| rctf rectf; | rctf rectf; | ||||
| ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &rectf, true); /* no shift */ | ED_view3d_calc_camera_border(scene, ar, v3d, rv3d, &rectf, true); /* no shift */ | ||||
| ▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines | |||||