diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-11-29 06:39:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-11-29 06:45:48 +0300 |
commit | 6e24dd9a1e34cf07b369d43bd701b261a37e0798 (patch) | |
tree | 80e046f92f4316d4829179d572c53a60e7091c91 | |
parent | 559fff160ecd23e636769e1f79fa5fbfdedcd3b1 (diff) |
Fix T58125: UV Editor transform fails
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 7 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_gizmo_2d.c | 3 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index ff3d52d7ddb..c66cda57c57 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1213,9 +1213,12 @@ void initTransDataContainers_FromObjectData(TransInfo *t, Object *obact, Object bool free_objects = false; if (objects == NULL) { objects = BKE_view_layer_array_from_objects_in_mode( - t->view_layer, t->view, &objects_len, { + t->view_layer, + (t->spacetype == SPACE_VIEW3D) ? t->view : NULL, + &objects_len, { .object_mode = object_mode, - .no_dup_data = true}); + .no_dup_data = true, + }); free_objects = true; } diff --git a/source/blender/editors/transform/transform_gizmo_2d.c b/source/blender/editors/transform/transform_gizmo_2d.c index 6a6764e7a0b..7d0584e3571 100644 --- a/source/blender/editors/transform/transform_gizmo_2d.c +++ b/source/blender/editors/transform/transform_gizmo_2d.c @@ -165,11 +165,10 @@ static void gizmo2d_calc_bounds(const bContext *C, float *r_center, float *r_min if (sa->spacetype == SPACE_IMAGE) { SpaceImage *sima = sa->spacedata.first; ViewLayer *view_layer = CTX_data_view_layer(C); - View3D *v3d = CTX_wm_view3d(C); Image *ima = ED_space_image(sima); uint objects_len = 0; Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs( - view_layer, v3d, &objects_len); + view_layer, NULL, &objects_len); if (!ED_uvedit_minmax_multi(CTX_data_scene(C), ima, objects, objects_len, r_min, r_max)) { zero_v2(r_min); zero_v2(r_max); diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index c2aacafa589..eb8bdb26450 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -994,7 +994,7 @@ static void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec)) uint objects_len = 0; Object **objects = BKE_view_layer_array_from_objects_in_edit_mode_unique_data_with_uvs( - t->view_layer, t->view, &objects_len); + t->view_layer, NULL, &objects_len); float dist_sq = FLT_MAX; if (ED_uvedit_nearest_uv_multi(t->scene, ima, objects, objects_len, co, &dist_sq, t->tsnap.snapPoint)) { |