Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt.c
| Show First 20 Lines • Show All 4,708 Lines • ▼ Show 20 Lines | static int sculpt_dynamic_topology_toggle_exec(bContext *C, wmOperator *UNUSED(op)) | ||||
| sculpt_undo_push_end(); | sculpt_undo_push_end(); | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| static int dyntopo_warning_popup(bContext *C, wmOperatorType *ot, bool vdata, bool modifiers) | static int dyntopo_warning_popup(bContext *C, wmOperatorType *ot, bool vdata, bool modifiers) | ||||
| { | { | ||||
| uiPopupMenu *pup = uiPupMenuBegin(C, IFACE_("Warning!"), ICON_ERROR); | uiPopupMenu *pup = UI_popup_menu_begin(C, IFACE_("Warning!"), ICON_ERROR); | ||||
| uiLayout *layout = uiPupMenuLayout(pup); | uiLayout *layout = UI_popup_menu_layout(pup); | ||||
| if (vdata) { | if (vdata) { | ||||
| const char *msg_error = TIP_("Vertex Data Detected!"); | const char *msg_error = TIP_("Vertex Data Detected!"); | ||||
| const char *msg = TIP_("Dyntopo will not preserve vertex colors, UVs, or other customdata"); | const char *msg = TIP_("Dyntopo will not preserve vertex colors, UVs, or other customdata"); | ||||
| uiItemL(layout, msg_error, ICON_INFO); | uiItemL(layout, msg_error, ICON_INFO); | ||||
| uiItemL(layout, msg, ICON_NONE); | uiItemL(layout, msg, ICON_NONE); | ||||
| uiItemS(layout); | uiItemS(layout); | ||||
| } | } | ||||
| if (modifiers) { | if (modifiers) { | ||||
| const char *msg_error = TIP_("Generative Modifiers Detected!"); | const char *msg_error = TIP_("Generative Modifiers Detected!"); | ||||
| const char *msg = TIP_("Keeping the modifiers will increase polycount when returning to object mode"); | const char *msg = TIP_("Keeping the modifiers will increase polycount when returning to object mode"); | ||||
| uiItemL(layout, msg_error, ICON_INFO); | uiItemL(layout, msg_error, ICON_INFO); | ||||
| uiItemL(layout, msg, ICON_NONE); | uiItemL(layout, msg, ICON_NONE); | ||||
| uiItemS(layout); | uiItemS(layout); | ||||
| } | } | ||||
| uiItemFullO_ptr(layout, ot, IFACE_("OK"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0); | uiItemFullO_ptr(layout, ot, IFACE_("OK"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0); | ||||
| uiPupMenuEnd(C, pup); | UI_popup_menu_end(C, pup); | ||||
| return OPERATOR_INTERFACE; | return OPERATOR_INTERFACE; | ||||
| } | } | ||||
| static int sculpt_dynamic_topology_toggle_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) | static int sculpt_dynamic_topology_toggle_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) | ||||
| { | { | ||||
| Object *ob = CTX_data_active_object(C); | Object *ob = CTX_data_active_object(C); | ||||
| ▲ Show 20 Lines • Show All 454 Lines • Show Last 20 Lines | |||||