[Bf-blender-cvs] [8c6337e587b] master: Fix missing UI updates, caused by own earlier commit

Julian Eisel noreply at git.blender.org
Thu Mar 11 18:47:58 CET 2021


Commit: 8c6337e587bd2d738398474ce6068a748bd1b85b
Author: Julian Eisel
Date:   Thu Mar 11 18:40:42 2021 +0100
Branches: master
https://developer.blender.org/rB8c6337e587bd2d738398474ce6068a748bd1b85b

Fix missing UI updates, caused by own earlier commit

Caused by 46aa70cb486d.

RNA would send property update notifiers with the owner ID as `reference` data.
Since above's commit we'd only send the notifiers to editors if the reference
data address matches the space's address. So editors wouldn't get the notifiers
at all.

The owner ID for space properties is always the screen AFAIK. So allow
notifiers with the screen as reference to be passed to editors as well, think
this is reasonable to do either way.

For example, steps to reproduce were:
* Open Asset Browser
* Mark some data-blocks of different types as assets (e.g. object & its
  material)
* Switch between the categories in the Asset Browser. The asset list wouldn't
  be updated.

===================================================================

M	source/blender/windowmanager/intern/wm_event_system.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 33ba27c849c..646aa71025c 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -577,9 +577,12 @@ void wm_event_do_notifiers(bContext *C)
         }
 
         ED_screen_areas_iter (win, screen, area) {
-          if ((note->category == NC_SPACE) && note->reference &&
-              (note->reference != area->spacedata.first)) {
-            continue;
+          if ((note->category == NC_SPACE) && note->reference) {
+            /* Filter out notifiers sent to other spaces. RNA sets the reference to the owning ID
+             * though, the screen, so let notifiers through that reference the entire screen. */
+            if ((note->reference != area->spacedata.first) && (note->reference != screen)) {
+              continue;
+            }
           }
           wmSpaceTypeListenerParams area_params = {
               .window = win,



More information about the Bf-blender-cvs mailing list