diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index dd43e487d92..20b72334695 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -2133,7 +2133,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) else if (t->options & CTX_MASK) { ts->proportional_mask = proportional != 0; } - else { + else if ((t->options & CTX_CURSOR) == 0) { ts->proportional_objects = proportional != 0; } } diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c index c17a726576a..0c49d67f7a2 100644 --- a/source/blender/editors/transform/transform_convert.c +++ b/source/blender/editors/transform/transform_convert.c @@ -2391,7 +2391,6 @@ void createTransData(bContext *C, TransInfo *t) /* if tests must match recalcData for correct updates */ if (t->options & CTX_CURSOR) { t->flag |= T_CURSOR; - t->obedit_type = -1; if (t->spacetype == SPACE_IMAGE) { createTransCursor_image(t); @@ -2407,7 +2406,6 @@ void createTransData(bContext *C, TransInfo *t) } else if (t->options & CTX_TEXTURE) { t->flag |= T_TEXTURE; - t->obedit_type = -1; createTransTexspace(t); countAndCleanTransDataContainer(t); diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index afaca361372..0df0b70a56a 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1416,8 +1416,8 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve { Scene *sce = CTX_data_scene(C); ViewLayer *view_layer = CTX_data_view_layer(C); - const eObjectMode object_mode = OBACT(view_layer) ? OBACT(view_layer)->mode : OB_MODE_OBJECT; - const short object_type = OBACT(view_layer) ? OBACT(view_layer)->type : -1; + Object *obact = OBACT(view_layer); + const eObjectMode object_mode = obact ? obact->mode : OB_MODE_OBJECT; ToolSettings *ts = CTX_data_tool_settings(C); ARegion *ar = CTX_wm_region(C); ScrArea *sa = CTX_wm_area(C); @@ -1437,9 +1437,13 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve t->flag = 0; - t->obedit_type = ((object_mode == OB_MODE_EDIT) || (object_mode == OB_MODE_EDIT_GPENCIL)) ? - object_type : - -1; + if (obact && !(t->options & (CTX_CURSOR | CTX_TEXTURE)) && + ELEM(object_mode, OB_MODE_EDIT, OB_MODE_EDIT_GPENCIL)) { + t->obedit_type = obact->type; + } + else { + t->obedit_type = -1; + } /* Many kinds of transform only use a single handle. */ if (t->data_container == NULL) { @@ -1776,7 +1780,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve } } } - else if ((t->obedit_type == -1) && ts->proportional_objects) { + else if (!(t->options & CTX_CURSOR) && ts->proportional_objects) { t->flag |= T_PROP_EDIT; } }