diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-10-16 14:28:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-10-16 14:28:24 +0300 |
commit | a2758152e2dccb3b016e13a3de2d9e58587866ab (patch) | |
tree | d872a7ae82e682012758c12eb5d8c8e63828c00d /source/blender/editors/sculpt_paint | |
parent | 14af3e485f1207e8f4ddb6991b22e1ba2f937c45 (diff) | |
parent | 870b4b673511094cf0beaeaf07305407ccdda47a (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_hide.c | 4 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_mask.c | 6 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_utils.c | 5 |
3 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_hide.c b/source/blender/editors/sculpt_paint/paint_hide.c index d2e2df01238..0edaa176f8c 100644 --- a/source/blender/editors/sculpt_paint/paint_hide.c +++ b/source/blender/editors/sculpt_paint/paint_hide.c @@ -436,7 +436,7 @@ static int hide_show_invoke(bContext *C, wmOperator *op, const wmEvent *event) PartialVisArea area = RNA_enum_get(op->ptr, "area"); if (!ELEM(area, PARTIALVIS_ALL, PARTIALVIS_MASKED)) - return WM_border_select_invoke(C, op, event); + return WM_gesture_border_invoke(C, op, event); else return op->type->exec(C, op); } @@ -464,7 +464,7 @@ void PAINT_OT_hide_show(struct wmOperatorType *ot) /* api callbacks */ ot->invoke = hide_show_invoke; - ot->modal = WM_border_select_modal; + ot->modal = WM_gesture_border_modal; ot->exec = hide_show_exec; /* sculpt-only for now */ ot->poll = sculpt_mode_poll_view3d; diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index b7159c375cd..28b19069bfd 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -511,8 +511,6 @@ static int paint_mask_gesture_lasso_exec(bContext *C, wmOperator *op) void PAINT_OT_mask_lasso_gesture(wmOperatorType *ot) { - PropertyRNA *prop; - ot->name = "Mask Lasso Gesture"; ot->idname = "PAINT_OT_mask_lasso_gesture"; ot->description = "Add mask within the lasso as you move the brush"; @@ -525,8 +523,8 @@ void PAINT_OT_mask_lasso_gesture(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - prop = RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE); - RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath); + /* properties */ + WM_operator_properties_gesture_lasso(ot); RNA_def_enum(ot->srna, "mode", mode_items, PAINT_MASK_FLOOD_VALUE, "Mode", NULL); RNA_def_float(ot->srna, "value", 1.0, 0, 1.0, "Value", diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c index bb69a5d3db9..e9d82c24b13 100644 --- a/source/blender/editors/sculpt_paint/paint_utils.c +++ b/source/blender/editors/sculpt_paint/paint_utils.c @@ -214,7 +214,10 @@ void paint_stroke_operator_properties(wmOperatorType *ot) {0} }; - RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); + PropertyRNA *prop; + + prop = RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", ""); + RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE); RNA_def_enum(ot->srna, "mode", stroke_mode_items, BRUSH_STROKE_NORMAL, "Stroke Mode", |