automerge and multires cant coexist, added note in the menu to say this and stopped automerge from running and popping up an annoying error when multires is enabled.
This commit is contained in:
@@ -134,14 +134,15 @@ void EM_select_mirrored(void)
|
||||
|
||||
void EM_automerge(int update) {
|
||||
int len;
|
||||
if (G.scene->automerge) {
|
||||
if (G.obedit && G.obedit->type==OB_MESH) {
|
||||
len = removedoublesflag(1, 1, G.scene->toolsettings->doublimit);
|
||||
if (len) {
|
||||
G.totvert -= len; /* saves doing a countall */
|
||||
if (update) {
|
||||
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
|
||||
}
|
||||
if ((G.scene->automerge) &&
|
||||
(G.obedit && G.obedit->type==OB_MESH) &&
|
||||
(((Mesh*)G.obedit->data)->mr==NULL)
|
||||
) {
|
||||
len = removedoublesflag(1, 1, G.scene->toolsettings->doublimit);
|
||||
if (len) {
|
||||
G.totvert -= len; /* saves doing a countall */
|
||||
if (update) {
|
||||
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3136,11 +3136,11 @@ static uiBlock *view3d_edit_meshmenu(void *arg_unused)
|
||||
|
||||
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
||||
|
||||
if(G.scene->automerge) {
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "AutoMerge Editing", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, "");
|
||||
} else {
|
||||
uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "AutoMerge Editing", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, "");
|
||||
}
|
||||
/* PITA but we should let users know that automerge cant work with multires :/ */
|
||||
uiDefIconTextBut(block, BUTM, 1,
|
||||
G.scene->automerge ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT,
|
||||
((Mesh*)G.obedit->data)->mr ? "AutoMerge Editing (multires disables)" : "AutoMerge Editing",
|
||||
0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, "");
|
||||
|
||||
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user