Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2015-10-23 06:02:35 +0300
committerJoshua Leung <aligorith@gmail.com>2015-10-23 06:02:35 +0300
commitf49c833d00c344fa56e78a6095ae599da679f822 (patch)
treedc975a302d2681f2f49223cc83f52579e55e723a /source/blender/editors/transform/transform_conversions.c
parentdcc538c95a8e950e627d6ddc5e6993d5a89dc352 (diff)
Code Cleanup: Removed the need to set the "gpencil_strokes" property on transform ops when editing GP Strokes
Now that we've got a dedicated mode for this, we can now safely check this from the context settings and set the relevant flags internally instead.
Diffstat (limited to 'source/blender/editors/transform/transform_conversions.c')
-rw-r--r--source/blender/editors/transform/transform_conversions.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 3dc14855a80..f14ce671c08 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -7885,6 +7885,7 @@ void createTransData(bContext *C, TransInfo *t)
{
Scene *scene = t->scene;
Object *ob = OBACT;
+ bGPdata *gpd = CTX_data_gpencil_data(C);
/* if tests must match recalcData for correct updates */
if (t->options & CTX_TEXTURE) {
@@ -7901,8 +7902,9 @@ void createTransData(bContext *C, TransInfo *t)
sort_trans_data_dist(t);
}
}
- else if (t->options & CTX_GPENCIL_STROKES) {
- t->flag |= T_POINTS; // XXX...
+ else if ((t->options & CTX_GPENCIL_STROKES) || ((gpd) && (gpd->flag & GP_DATA_STROKE_EDITMODE))) {
+ t->options |= CTX_GPENCIL_STROKES;
+ t->flag |= T_POINTS;
createTransGPencil(C, t);
if (t->data && (t->flag & T_PROP_EDIT)) {