Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/gpencil/gpencil_edit.c
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| ot->cancel = WM_gesture_lasso_cancel; | ot->cancel = WM_gesture_lasso_cancel; | ||||
| /* flag */ | /* flag */ | ||||
| ot->flag = OPTYPE_UNDO | OPTYPE_USE_EVAL_DATA; | ot->flag = OPTYPE_UNDO | OPTYPE_USE_EVAL_DATA; | ||||
| /* properties */ | /* properties */ | ||||
| WM_operator_properties_gesture_lasso(ot); | WM_operator_properties_gesture_lasso(ot); | ||||
| } | } | ||||
| bool ED_object_gpencil_exit(struct Main *bmain, Object *ob) | |||||
| { | |||||
| bool ok = false; | |||||
| if (ob) { | |||||
| bGPdata *gpd = (bGPdata *)ob->data; | |||||
| gpd->flag &= ~(GP_DATA_STROKE_PAINTMODE | GP_DATA_STROKE_EDITMODE | GP_DATA_STROKE_SCULPTMODE | | |||||
| GP_DATA_STROKE_WEIGHTMODE); | |||||
| ob->restore_mode = ob->mode; | |||||
| ob->mode &= ~(OB_MODE_PAINT_GPENCIL | OB_MODE_EDIT_GPENCIL | OB_MODE_SCULPT_GPENCIL | | |||||
| OB_MODE_WEIGHT_GPENCIL); | |||||
| /* Inform all CoW versions that we changed the mode. */ | |||||
| DEG_id_tag_update_ex(bmain, &ob->id, ID_RECALC_COPY_ON_WRITE); | |||||
| ok = true; | |||||
| } | |||||
| return ok; | |||||
| } | |||||
| Context not available. | |||||