diff options
Diffstat (limited to 'source/blender/editors/transform/transform_convert_sculpt.c')
-rw-r--r-- | source/blender/editors/transform/transform_convert_sculpt.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/transform/transform_convert_sculpt.c b/source/blender/editors/transform/transform_convert_sculpt.c index 95958b816ab..f4f2e2a1c6e 100644 --- a/source/blender/editors/transform/transform_convert_sculpt.c +++ b/source/blender/editors/transform/transform_convert_sculpt.c @@ -10,6 +10,7 @@ #include "BLI_math.h" #include "BKE_context.h" +#include "BKE_layer.h" #include "BKE_lib_id.h" #include "BKE_paint.h" #include "BKE_report.h" @@ -33,7 +34,8 @@ static void createTransSculpt(bContext *C, TransInfo *t) return; } - Object *ob = OBACT(t->view_layer); + BKE_view_layer_synced_ensure(t->scene, t->view_layer); + Object *ob = BKE_view_layer_active_object_get(t->view_layer); SculptSession *ss = ob->sculpt; { @@ -85,7 +87,7 @@ static void createTransSculpt(bContext *C, TransInfo *t) copy_m3_m4(td->axismtx, ob->obmat); BLI_assert(!(t->options & CTX_PAINT_CURVE)); - ED_sculpt_init_transform(C, ob); + ED_sculpt_init_transform(C, ob, t->mval, t->undo_name); } /** \} */ @@ -96,7 +98,8 @@ static void createTransSculpt(bContext *C, TransInfo *t) static void recalcData_sculpt(TransInfo *t) { - Object *ob = OBACT(t->view_layer); + BKE_view_layer_synced_ensure(t->scene, t->view_layer); + Object *ob = BKE_view_layer_active_object_get(t->view_layer); ED_sculpt_update_modal_transform(t->context, ob); } @@ -108,7 +111,8 @@ static void special_aftertrans_update__sculpt(bContext *C, TransInfo *t) return; } - Object *ob = OBACT(t->view_layer); + BKE_view_layer_synced_ensure(t->scene, t->view_layer); + Object *ob = BKE_view_layer_active_object_get(t->view_layer); BLI_assert(!(t->options & CTX_PAINT_CURVE)); ED_sculpt_end_transform(C, ob); } |