Fix sculpt redo failing to enable dyntopo
This commit is contained in:
@@ -62,6 +62,8 @@
|
|||||||
#include "BKE_subsurf.h"
|
#include "BKE_subsurf.h"
|
||||||
#include "BKE_subdiv_ccg.h"
|
#include "BKE_subdiv_ccg.h"
|
||||||
#include "BKE_undo_system.h"
|
#include "BKE_undo_system.h"
|
||||||
|
#include "BKE_global.h"
|
||||||
|
#include "BKE_main.h"
|
||||||
|
|
||||||
#include "DEG_depsgraph.h"
|
#include "DEG_depsgraph.h"
|
||||||
|
|
||||||
@@ -1009,9 +1011,13 @@ void sculpt_undo_push_end(void)
|
|||||||
BKE_pbvh_node_layer_disp_free(unode->node);
|
BKE_pbvh_node_layer_disp_free(unode->node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* We could remove this and enforce all callers run in an operator using 'OPTYPE_UNDO'. */
|
||||||
|
wmWindowManager *wm = G_MAIN->wm.first;
|
||||||
|
if (wm->op_undo_depth == 0) {
|
||||||
UndoStack *ustack = ED_undo_stack_get();
|
UndoStack *ustack = ED_undo_stack_get();
|
||||||
BKE_undosys_step_push(ustack, NULL, NULL);
|
BKE_undosys_step_push(ustack, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------- */
|
||||||
/** \name Implements ED Undo System
|
/** \name Implements ED Undo System
|
||||||
|
Reference in New Issue
Block a user