From 0e4a3bd7aaa6a0fbdee14b55d2400b817321cba0 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 25 Oct 2023 13:06:04 +0200 Subject: [PATCH 1/2] Fix: Selection input inivisible in set selection node It's much simpler to be able to control the selection with a checkbox. It can still be a field. --- .../blender/nodes/geometry/nodes/node_geo_tool_set_selection.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/nodes/geometry/nodes/node_geo_tool_set_selection.cc b/source/blender/nodes/geometry/nodes/node_geo_tool_set_selection.cc index 58b9ff246cd..b20ea71dd36 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_tool_set_selection.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_tool_set_selection.cc @@ -18,7 +18,7 @@ namespace blender::nodes::node_geo_tool_set_selection_cc { static void node_declare(NodeDeclarationBuilder &b) { b.add_input("Geometry"); - b.add_input("Selection").default_value(true).hide_value().field_on_all(); + b.add_input("Selection").default_value(true).field_on_all(); b.add_output("Geometry"); } From 4f0d8931f002a3c319a7497b110d0a7eec6cb3ae Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 26 Oct 2023 22:18:40 +1100 Subject: [PATCH 2/2] Fix undo crash with multiple scenes & windows Creating a new window then a new scene would crash on undo because the undo step loaded would not contain the new windows scene. Regression introduced since 3.6. --- source/blender/blenkernel/intern/blendfile.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/blender/blenkernel/intern/blendfile.cc b/source/blender/blenkernel/intern/blendfile.cc index f162faeff22..90e4a446e54 100644 --- a/source/blender/blenkernel/intern/blendfile.cc +++ b/source/blender/blenkernel/intern/blendfile.cc @@ -800,6 +800,19 @@ static void setup_app_data(bContext *C, wm_data_consistency_ensure(CTX_wm_manager(C), curscene, cur_view_layer); } + if (mode == LOAD_UNDO) { + /* It's possible to undo into a time before the scene existed, in this case the window's scene + * will be null. Since it doesn't make sense to remove the window, set it to the current scene. + * NOTE: Redo will restore the active scene to the window so a reasonably consistent state + * is maintained. We could do better by keeping a window/scene map for each undo step. */ + wmWindowManager *wm = static_cast(bfd->main->wm.first); + LISTBASE_FOREACH (wmWindow *, win, &wm->windows) { + if (win->scene == nullptr) { + win->scene = curscene; + } + } + } + BLI_assert(BKE_main_namemap_validate(bfd->main)); if (mode != LOAD_UI) {