Bugfix for node editor refreshing too often when moving nodes,
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 20 Oct 2009 20:00:12 +0000 (20:00 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 20 Oct 2009 20:00:12 +0000 (20:00 +0000)
split up notifier in redraw/refresh.

source/blender/editors/space_node/space_node.c
source/blender/editors/transform/transform.c
source/blender/makesrna/intern/rna_space.c
source/blender/windowmanager/WM_types.h

index 41140eae776978d3bb85838c54b3be3415022eb8..77a8210a2a5e2f8df05291b1b31b357c1bc472f0 100644 (file)
@@ -171,6 +171,8 @@ static void node_area_listener(ScrArea *sa, wmNotifier *wmn)
                case NC_SPACE:
                        if(wmn->data==ND_SPACE_NODE)
                                ED_area_tag_refresh(sa);
+                       else if(wmn->data==ND_SPACE_NODE_VIEW)
+                               ED_area_tag_redraw(sa);
                        break;
        }
 }
index 4c24d36616229452db218666952d73b2b0296e28..1319fdc0bc4fcb8193f4f7d81836d838b2b7958d 100644 (file)
@@ -322,7 +322,7 @@ static void viewRedrawForce(bContext *C, TransInfo *t)
        else if(t->spacetype == SPACE_NODE)
        {
                //ED_area_tag_redraw(t->sa);
-               WM_event_add_notifier(C, NC_SPACE|ND_SPACE_NODE, NULL);
+               WM_event_add_notifier(C, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
        }
        else if(t->spacetype == SPACE_SEQ)
        {
index b989c83fbc38c9da131e0a0b553cbc8ba210b335..86d546b3fe0fc1a2a73fe9f4759d6c5db037ed85 100644 (file)
@@ -1624,7 +1624,7 @@ static void rna_def_space_node(BlenderRNA *brna)
        prop= RNA_def_property(srna, "backdrop", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW);
        RNA_def_property_ui_text(prop, "Backdrop", "Use active Viewer Node output as backdrop for compositing nodes.");
-       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
+       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
 }
 
 static void rna_def_space_logic(BlenderRNA *brna)
index 0ef7e9670dccdb3ad269128520d569f0a69a8f72..d326fadeba4c57ff028b94b49ae8a1672b8909c0 100644 (file)
@@ -227,6 +227,7 @@ typedef struct wmNotifier {
 #define ND_SPACE_DOPESHEET             (13<<16)
 #define ND_SPACE_NLA                   (14<<16)
 #define ND_SPACE_SEQUENCER             (15<<16)
+#define ND_SPACE_NODE_VIEW             (16<<16)
 
 /* subtype, 256 entries too */
 #define NOTE_SUBTYPE           0x0000FF00