diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-07-20 13:14:15 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-07-20 13:18:39 +0300 |
commit | 5f25b91b65b25559fe46a447efea6728f88235b0 (patch) | |
tree | c4db82013699b6441107fa221c54e7f79cf644e3 /source | |
parent | cb6fc9d14179cff9b0b2b38cf9a1fdec5a409298 (diff) |
Dyntopo should be supported on systems without VBOs now.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 58 |
1 files changed, 19 insertions, 39 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index ee7169d887e..37b37ed4ccc 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -4773,10 +4773,6 @@ static int sculpt_dynamic_topology_toggle_exec(bContext *C, wmOperator *UNUSED(o Object *ob = CTX_data_active_object(C); SculptSession *ss = ob->sculpt; - if (!G.background && !GPU_vertex_buffer_support()) { - return OPERATOR_CANCELLED; - } - if (ss->bm) { sculpt_undo_push_begin("Dynamic topology disable"); sculpt_undo_push_node(ob, NULL, SCULPT_UNDO_DYNTOPO_END); @@ -4793,44 +4789,32 @@ static int sculpt_dynamic_topology_toggle_exec(bContext *C, wmOperator *UNUSED(o } -static int dyntopo_warning_popup(bContext *C, wmOperatorType *ot, bool vdata, bool modifiers, bool novertexbuf) +static int dyntopo_warning_popup(bContext *C, wmOperatorType *ot, bool vdata, bool modifiers) { - if (novertexbuf) { - uiPopupMenu *pup = UI_popup_menu_begin(C, IFACE_("Error!"), ICON_ERROR); - uiLayout *layout = UI_popup_menu_layout(pup); + uiPopupMenu *pup = UI_popup_menu_begin(C, IFACE_("Warning!"), ICON_ERROR); + uiLayout *layout = UI_popup_menu_layout(pup); - uiItemL(layout, "Dyntopo is not supported on this system", ICON_INFO); - uiItemL(layout, "No vertex buffer support detected", ICON_NONE); + if (vdata) { + const char *msg_error = TIP_("Vertex Data Detected!"); + const char *msg = TIP_("Dyntopo will not preserve vertex colors, UVs, or other customdata"); + uiItemL(layout, msg_error, ICON_INFO); + uiItemL(layout, msg, ICON_NONE); + uiItemS(layout); + } - uiItemFullO_ptr(layout, ot, IFACE_("OK"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0); + if (modifiers) { + const char *msg_error = TIP_("Generative Modifiers Detected!"); + const char *msg = TIP_("Keeping the modifiers will increase polycount when returning to object mode"); - UI_popup_menu_end(C, pup); + uiItemL(layout, msg_error, ICON_INFO); + uiItemL(layout, msg, ICON_NONE); + uiItemS(layout); } - else { - uiPopupMenu *pup = UI_popup_menu_begin(C, IFACE_("Warning!"), ICON_ERROR); - uiLayout *layout = UI_popup_menu_layout(pup); - - if (vdata) { - const char *msg_error = TIP_("Vertex Data Detected!"); - const char *msg = TIP_("Dyntopo will not preserve vertex colors, UVs, or other customdata"); - uiItemL(layout, msg_error, ICON_INFO); - uiItemL(layout, msg, ICON_NONE); - uiItemS(layout); - } - if (modifiers) { - const char *msg_error = TIP_("Generative Modifiers Detected!"); - const char *msg = TIP_("Keeping the modifiers will increase polycount when returning to object mode"); + uiItemFullO_ptr(layout, ot, IFACE_("OK"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0); - uiItemL(layout, msg_error, ICON_INFO); - uiItemL(layout, msg, ICON_NONE); - uiItemS(layout); - } - - uiItemFullO_ptr(layout, ot, IFACE_("OK"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, 0); + UI_popup_menu_end(C, pup); - UI_popup_menu_end(C, pup); - } return OPERATOR_INTERFACE; } @@ -4841,10 +4825,6 @@ static int sculpt_dynamic_topology_toggle_invoke(bContext *C, wmOperator *op, co Mesh *me = ob->data; SculptSession *ss = ob->sculpt; - if (!GPU_vertex_buffer_support()) { - dyntopo_warning_popup(C, op->type, false, false, true); - } - if (!ss->bm) { Scene *scene = CTX_data_scene(C); ModifierData *md; @@ -4879,7 +4859,7 @@ static int sculpt_dynamic_topology_toggle_invoke(bContext *C, wmOperator *op, co if (vdata || modifiers) { /* The mesh has customdata that will be lost, let the user confirm this is OK */ - return dyntopo_warning_popup(C, op->type, vdata, modifiers, false); + return dyntopo_warning_popup(C, op->type, vdata, modifiers); } } |