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/transform/transform_conversions.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/transform/transform_conversions.c')
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 5dc34d2a31a..9c59ff125dd 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -7321,6 +7321,11 @@ static void createTransGPencil(bContext *C, TransInfo *t) bGPDstroke *gps; for (gps = gpf->strokes.first; gps; gps = gps->next) { + /* skip strokes that are invalid for current view */ + if (ED_gpencil_stroke_can_use(C, gps) == false) { + continue; + } + if (propedit) { /* Proportional Editing... */ if (propedit_connected) { @@ -7424,6 +7429,11 @@ static void createTransGPencil(bContext *C, TransInfo *t) TransData *tail = td; bool stroke_ok; + /* skip strokes that are invalid for current view */ + if (ED_gpencil_stroke_can_use(C, gps) == false) { + continue; + } + /* What we need to include depends on proportional editing settings... */ if (propedit) { if (propedit_connected) { |