Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/annotate_draw.c
| Show First 20 Lines • Show All 1,050 Lines • ▼ Show 20 Lines | void ED_annotation_draw_2dimage(const bContext *C) | ||||
| wmWindowManager *wm = CTX_wm_manager(C); | wmWindowManager *wm = CTX_wm_manager(C); | ||||
| ScrArea *sa = CTX_wm_area(C); | ScrArea *sa = CTX_wm_area(C); | ||||
| ARegion *ar = CTX_wm_region(C); | ARegion *ar = CTX_wm_region(C); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| int offsx, offsy, sizex, sizey; | int offsx, offsy, sizex, sizey; | ||||
| int dflag = GP_DRAWDATA_NOSTATUS; | int dflag = GP_DRAWDATA_NOSTATUS; | ||||
| bGPdata *gpd = ED_gpencil_data_get_active(C); // XXX | bGPdata *gpd = ED_annotation_data_get_active(C); // XXX | ||||
| if (gpd == NULL) { | if (gpd == NULL) { | ||||
| return; | return; | ||||
| } | } | ||||
| /* calculate rect */ | /* calculate rect */ | ||||
| switch (sa->spacetype) { | switch (sa->spacetype) { | ||||
| case SPACE_IMAGE: /* image */ | case SPACE_IMAGE: /* image */ | ||||
| case SPACE_CLIP: /* clip */ | case SPACE_CLIP: /* clip */ | ||||
| ▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d) | ||||
| ARegion *ar = CTX_wm_region(C); | ARegion *ar = CTX_wm_region(C); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| int dflag = 0; | int dflag = 0; | ||||
| /* check that we have grease-pencil stuff to draw */ | /* check that we have grease-pencil stuff to draw */ | ||||
| if (sa == NULL) { | if (sa == NULL) { | ||||
| return; | return; | ||||
| } | } | ||||
| bGPdata *gpd = ED_gpencil_data_get_active(C); // XXX | bGPdata *gpd = ED_annotation_data_get_active(C); | ||||
| if (gpd == NULL) { | if (gpd == NULL) { | ||||
| return; | return; | ||||
| } | } | ||||
| /* special hack for Image Editor */ | /* special hack for Image Editor */ | ||||
| /* FIXME: the opengl poly-strokes don't draw at right thickness when done this way, | /* FIXME: the opengl poly-strokes don't draw at right thickness when done this way, | ||||
| * so disabled. */ | * so disabled. */ | ||||
| if (ELEM(sa->spacetype, SPACE_IMAGE, SPACE_CLIP)) { | if (ELEM(sa->spacetype, SPACE_IMAGE, SPACE_CLIP)) { | ||||
| ▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines | |||||