Merge branch 'blender-v3.3-release'

This commit is contained in:
Philipp Oeser 2022-08-23 11:19:08 +02:00
commit 22fdb88be5
2 changed files with 18 additions and 6 deletions

View File

@ -729,19 +729,26 @@ void ED_node_set_active(
}
}
/* Sync to Image Editor. */
/* Sync to Image Editor under the following conditions:
* - current image is not pinned
* - current image is not a Render Result or ViewerNode (want to keep looking at these) */
Image *image = (Image *)node->id;
wmWindowManager *wm = (wmWindowManager *)bmain->wm.first;
LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
const bScreen *screen = WM_window_get_active_screen(win);
LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
if (sl->spacetype == SPACE_IMAGE) {
SpaceImage *sima = (SpaceImage *)sl;
if (!sima->pin) {
ED_space_image_set(bmain, sima, image, true);
}
if (sl->spacetype != SPACE_IMAGE) {
continue;
}
SpaceImage *sima = (SpaceImage *)sl;
if (sima->pin) {
continue;
}
if (ELEM(sima->image->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE)) {
continue;
}
ED_space_image_set(bmain, sima, image, true);
}
}
}

View File

@ -1602,6 +1602,11 @@ static void deformVertsEM(ModifierData *md,
mesh_src = MOD_deform_mesh_eval_get(ctx->object, em, mesh, NULL, verts_num, false);
}
/* TODO(@campbellbarton): use edit-mode data only (remove this line). */
if (mesh_src != NULL) {
BKE_mesh_wrapper_ensure_mdata(mesh_src);
}
surfacedeformModifier_do(md, ctx, vertexCos, verts_num, ctx->object, mesh_src);
if (!ELEM(mesh_src, NULL, mesh)) {