diff options
author | Hans Goudey <h.goudey@me.com> | 2022-11-11 04:14:48 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-11-11 04:41:13 +0300 |
commit | 9465b109af0b70244a36f9e68493e316d9f8b56f (patch) | |
tree | c4d933bf09f8313071556063156538ec3356b24c /source/blender/editors/space_node/node_edit.cc | |
parent | 026d21a225521670c6b5083da9da61227da69e65 (diff) | |
parent | ca1642cd0c5cdf634fe2022c955d93983de95934 (diff) |
Merge branch 'master' into refactor-mesh-position-genericrefactor-mesh-position-generic
Diffstat (limited to 'source/blender/editors/space_node/node_edit.cc')
-rw-r--r-- | source/blender/editors/space_node/node_edit.cc | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/source/blender/editors/space_node/node_edit.cc b/source/blender/editors/space_node/node_edit.cc index 48b3d711bdf..7982b47f363 100644 --- a/source/blender/editors/space_node/node_edit.cc +++ b/source/blender/editors/space_node/node_edit.cc @@ -89,8 +89,8 @@ struct CompoJob { Depsgraph *compositor_depsgraph; bNodeTree *localtree; /* Jon system integration. */ - const short *stop; - short *do_update; + const bool *stop; + bool *do_update; float *progress; }; @@ -166,7 +166,7 @@ static int compo_get_recalc_flags(const bContext *C) } /* called by compo, only to check job 'stop' value */ -static int compo_breakjob(void *cjv) +static bool compo_breakjob(void *cjv) { CompoJob *cj = (CompoJob *)cjv; @@ -250,8 +250,8 @@ static void compo_progressjob(void *cjv, float progress) static void compo_startjob(void *cjv, /* Cannot be const, this function implements wm_jobs_start_callback. * NOLINTNEXTLINE: readability-non-const-parameter. */ - short *stop, - short *do_update, + bool *stop, + bool *do_update, float *progress) { CompoJob *cj = (CompoJob *)cjv; @@ -502,6 +502,7 @@ void ED_node_shader_default(const bContext *C, ID *id) } ma->nodetree = ntreeCopyTree(bmain, ma_default->nodetree); + ma->nodetree->owner_id = &ma->id; BKE_ntree_update_main_tree(bmain, ma->nodetree, nullptr); } else if (ELEM(GS(id->name), ID_WO, ID_LA)) { @@ -736,26 +737,7 @@ void ED_node_set_active( * - current image is not a Render Result or ViewerNode (want to keep looking at these) */ if (node->id != nullptr && GS(node->id->name) == ID_IM) { 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) { - continue; - } - SpaceImage *sima = (SpaceImage *)sl; - if (sima->pin) { - continue; - } - if (sima->image && - ELEM(sima->image->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE)) { - continue; - } - ED_space_image_set(bmain, sima, image, true); - } - } - } + ED_space_image_sync(bmain, image, true); } if (r_active_texture_changed) { |