Merge branch 'blender-v2.83-release'

This commit is contained in:
2020-06-02 18:06:31 +10:00
3 changed files with 11 additions and 5 deletions

View File

@@ -49,6 +49,7 @@
#include "ED_space_api.h"
#include "WM_api.h"
#include "WM_message.h"
#include "WM_types.h"
#include "UI_interface_icons.h"
@@ -1672,11 +1673,14 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
if (t->flag & T_MODAL) {
/* do we check for parameter? */
if (transformModeUseSnap(t)) {
if (t->modifiers & MOD_SNAP) {
ts->snap_flag |= SCE_SNAP;
}
else {
ts->snap_flag &= ~SCE_SNAP;
if (!(t->modifiers & MOD_SNAP) != !(ts->snap_flag & SCE_SNAP)) {
if (t->modifiers & MOD_SNAP) {
ts->snap_flag |= SCE_SNAP;
}
else {
ts->snap_flag &= ~SCE_SNAP;
}
WM_msg_publish_rna_prop(t->mbus, &t->scene->id, ts, ToolSettings, use_snap);
}
}
}

View File

@@ -560,6 +560,7 @@ typedef struct TransInfo {
void *view;
/** Only valid (non null) during an operator called function. */
struct bContext *context;
struct wmMsgBus *mbus;
struct ScrArea *area;
struct ARegion *region;
struct Depsgraph *depsgraph;

View File

@@ -1371,6 +1371,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
bGPdata *gpd = CTX_data_gpencil_data(C);
PropertyRNA *prop;
t->mbus = CTX_wm_message_bus(C);
t->depsgraph = CTX_data_depsgraph_pointer(C);
t->scene = sce;
t->view_layer = view_layer;