Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mesh/editmesh_mask_extract.c
| Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| Object *ob = CTX_data_active_object(C); | Object *ob = CTX_data_active_object(C); | ||||
| if (ob != NULL && ob->mode == OB_MODE_SCULPT) { | if (ob != NULL && ob->mode == OB_MODE_SCULPT) { | ||||
| if (ob->sculpt->bm) { | if (ob->sculpt->bm) { | ||||
| CTX_wm_operator_poll_msg_set(C, "The mask can not be extracted with dyntopo activated"); | CTX_wm_operator_poll_msg_set(C, "The mask can not be extracted with dyntopo activated"); | ||||
| return false; | return false; | ||||
| } | } | ||||
| else { | else { | ||||
| return true; | return ED_operator_object_active_editable_mesh(C); | ||||
| } | } | ||||
| } | } | ||||
| return ED_operator_object_active_editable_mesh(C); | return false; | ||||
| } | } | ||||
| static int paint_mask_extract_exec(bContext *C, wmOperator *op) | static int paint_mask_extract_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| struct Main *bmain = CTX_data_main(C); | struct Main *bmain = CTX_data_main(C); | ||||
| Object *ob = CTX_data_active_object(C); | Object *ob = CTX_data_active_object(C); | ||||
| View3D *v3d = CTX_wm_view3d(C); | View3D *v3d = CTX_wm_view3d(C); | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| ▲ Show 20 Lines • Show All 403 Lines • Show Last 20 Lines | |||||