Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-02 16:31:09 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-02 16:31:09 +0400
commita2941a464b41c73f10ef3e559f509a9d4aefd3f5 (patch)
tree35a94ad813a520e29308fc81c4b5b5e0e3587c59 /source/blender/editors/space_node/node_edit.c
parente23e125c3481d86698659f5d11bf5437255f5b97 (diff)
Fix #27098: missing 3d view updates when editing GLSL material nodes.
Diffstat (limited to 'source/blender/editors/space_node/node_edit.c')
-rw-r--r--source/blender/editors/space_node/node_edit.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 22bbd93de00..01f32b49888 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -51,6 +51,7 @@
#include "BLI_utildefines.h"
#include "BKE_context.h"
+#include "BKE_depsgraph.h"
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_library.h"
@@ -234,6 +235,11 @@ static bNode *editnode_get_active(bNodeTree *ntree)
return nodeGetActive(ntree);
}
+void snode_dag_update(bContext *UNUSED(C), SpaceNode *snode)
+{
+ DAG_id_tag_update(snode->id, 0);
+}
+
void snode_notify(bContext *C, SpaceNode *snode)
{
WM_event_add_notifier(C, NC_NODE|NA_EDITED, NULL);
@@ -912,7 +918,8 @@ static int node_group_ungroup_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
- WM_event_add_notifier(C, NC_SCENE|ND_NODES, NULL);
+ snode_notify(C, snode);
+ snode_dag_update(C, snode);
return OPERATOR_FINISHED;
}
@@ -2014,6 +2021,7 @@ static int node_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
node_tree_verify_groups(snode->nodetree);
snode_notify(C, snode);
+ snode_dag_update(C, snode);
return OPERATOR_FINISHED;
}
@@ -2169,6 +2177,7 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
ntreeSolveOrder(snode->edittree);
node_tree_verify_groups(snode->nodetree);
snode_notify(C, snode);
+ snode_dag_update(C, snode);
BLI_remlink(&snode->linkdrag, nldrag);
MEM_freeN(nldrag);
@@ -2303,6 +2312,7 @@ static int node_make_link_exec(bContext *C, wmOperator *op)
node_tree_verify_groups(snode->nodetree);
snode_notify(C, snode);
+ snode_dag_update(C, snode);
return OPERATOR_FINISHED;
}
@@ -2377,6 +2387,7 @@ static int cut_links_exec(bContext *C, wmOperator *op)
ntreeSolveOrder(snode->edittree);
node_tree_verify_groups(snode->nodetree);
snode_notify(C, snode);
+ snode_dag_update(C, snode);
return OPERATOR_FINISHED;
}
@@ -2436,6 +2447,8 @@ static int node_read_renderlayers_exec(bContext *C, wmOperator *UNUSED(op))
}
snode_notify(C, snode);
+ snode_dag_update(C, snode);
+
return OPERATOR_FINISHED;
}
@@ -2464,6 +2477,7 @@ static int node_read_fullsamplelayers_exec(bContext *C, wmOperator *UNUSED(op))
RE_MergeFullSample(re, bmain, curscene, snode->nodetree);
snode_notify(C, snode);
+ snode_dag_update(C, snode);
WM_cursor_wait(0);
return OPERATOR_FINISHED;
@@ -2572,6 +2586,7 @@ static int node_group_make_exec(bContext *C, wmOperator *op)
}
snode_notify(C, snode);
+ snode_dag_update(C, snode);
return OPERATOR_FINISHED;
}
@@ -2758,6 +2773,7 @@ static int node_mute_exec(bContext *C, wmOperator *UNUSED(op))
}
snode_notify(C, snode);
+ snode_dag_update(C, snode);
return OPERATOR_FINISHED;
}
@@ -2799,6 +2815,7 @@ static int node_delete_exec(bContext *C, wmOperator *UNUSED(op))
node_tree_verify_groups(snode->nodetree);
snode_notify(C, snode);
+ snode_dag_update(C, snode);
return OPERATOR_FINISHED;
}
@@ -2900,6 +2917,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
node->id = (ID *)ima;
snode_notify(C, snode);
+ snode_dag_update(C, snode);
return OPERATOR_FINISHED;
}