Fix T72948: Smooth active tool gizmo vibrates
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_global.h"
|
||||
|
||||
#include "ED_screen.h"
|
||||
#include "ED_transform.h"
|
||||
@@ -61,6 +62,11 @@ static bool WIDGETGROUP_tool_generic_poll(const bContext *C, wmGizmoGroupType *g
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Without this, refreshing the gizmo jitters in some cases with edit-mesh smooth. See T72948. */
|
||||
if (G.moving & G_TRANSFORM_EDIT) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "BLI_string.h"
|
||||
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_layer.h"
|
||||
|
||||
#include "RNA_access.h"
|
||||
@@ -176,6 +177,8 @@ static void op_generic_value_exit(wmOperator *op)
|
||||
MEM_freeN(cd->objects_xform);
|
||||
MEM_freeN(cd);
|
||||
}
|
||||
|
||||
G.moving &= ~G_TRANSFORM_EDIT;
|
||||
}
|
||||
|
||||
static void op_generic_value_restore(wmOperator *op)
|
||||
@@ -228,6 +231,8 @@ static int op_generic_value_invoke(bContext *C, wmOperator *op, const wmEvent *e
|
||||
op->customdata = cd;
|
||||
|
||||
WM_event_add_modal_handler(C, op);
|
||||
G.moving |= G_TRANSFORM_EDIT;
|
||||
|
||||
return OPERATOR_RUNNING_MODAL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user