diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-08-26 16:01:15 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-08-26 16:01:15 +0400 |
commit | 043ad7bc8e8e32161563798268727c1f42c9b3d6 (patch) | |
tree | 654a3620f6ed9004f52d874cb9db223255925490 /source/blender/editors/gpencil/drawgpencil.c | |
parent | adcb21b1f4b079f892e259446bab32c1bc74304f (diff) |
2.5 - Grease Pencil Version 2 (Crude rebirth)
This commit is the start of the new Grease Pencil implementation. I've just ported the old code to make it work with operators, and to store its data in Grease-Pencil datablocks.
However, this is currently still really buggy, with only the barebones of the drawing/creation tools restored (no UI panels, no options). To use (not recommended), use D+S+move_mouse (and click when finished) for now. There are some rather serious event handling errors going on here...
Diffstat (limited to 'source/blender/editors/gpencil/drawgpencil.c')
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index 735f1ffddb9..242be943507 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -933,7 +933,7 @@ void draw_gpencil_2dimage (bContext *C, ImBuf *ibuf) /* check that we have grease-pencil stuff to draw */ if (ELEM(NULL, sa, ibuf)) return; - gpd= gpencil_data_getactive(sa); + gpd= gpencil_data_getactive(C); if (gpd == NULL) return; /* calculate rect */ @@ -1007,7 +1007,7 @@ void draw_gpencil_2dview (bContext *C, short onlyv2d) /* check that we have grease-pencil stuff to draw */ if (sa == NULL) return; - gpd= gpencil_data_getactive(sa); + gpd= gpencil_data_getactive(C); if (gpd == NULL) return; /* draw it! */ @@ -1020,14 +1020,13 @@ void draw_gpencil_2dview (bContext *C, short onlyv2d) */ void draw_gpencil_3dview (bContext *C, short only3d) { - ScrArea *sa= CTX_wm_area(C); ARegion *ar= CTX_wm_region(C); Scene *scene= CTX_data_scene(C); bGPdata *gpd; int dflag = 0; /* check that we have grease-pencil stuff to draw */ - gpd= gpencil_data_getactive(sa); + gpd= gpencil_data_getactive(C); if (gpd == NULL) return; /* draw it! */ @@ -1047,7 +1046,7 @@ void draw_gpencil_oglrender (bContext *C) /* assume gpencil data comes from v3d */ if (v3d == NULL) return; - gpd= v3d->gpd; + gpd= gpencil_data_getactive(C); if (gpd == NULL) return; /* pass 1: draw 3d-strokes ------------ > */ |