diff options
author | Joshua Leung <aligorith@gmail.com> | 2015-01-19 06:38:32 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2015-01-19 09:11:18 +0300 |
commit | 32ffc63d20908c6433e0e92488be3b5568f81f69 (patch) | |
tree | 78eff17a0e82a1d7ef1bafafe5f54cb09ca1f187 /source/blender/editors/gpencil/gpencil_select.c | |
parent | 0a128af21d6d06ddeb1acbccacda1fdde1843fd0 (diff) |
Bugfix T43293: Crash when editing shared GPencil datablock in VSE
The problem here was that when a Grease Pencil datablock is shared between
the 3D view and another one of the editors, all the strokes were getting handled
by the editing operators, even if those strokes could not be displayed/used
in that context. As a result, the coordinate conversion methods would fail,
as some of the needed data would not be set.
The fix here involves not including any offending strokes in such cases...
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_select.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_select.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c index 7967d6a4d95..9ba77a4244e 100644 --- a/source/blender/editors/gpencil/gpencil_select.c +++ b/source/blender/editors/gpencil/gpencil_select.c @@ -136,11 +136,14 @@ static int gpencil_select_all_exec(bContext *C, wmOperator *op) bGPDspoint *pt; int i; - for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) { - pt->flag &= ~GP_SPOINT_SELECT; + /* only edit strokes that are valid in this view... */ + if (ED_gpencil_stroke_can_use(C, gps)) { + for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) { + pt->flag &= ~GP_SPOINT_SELECT; + } + + gps->flag &= ~GP_STROKE_SELECT; } - - gps->flag &= ~GP_STROKE_SELECT; } } } |