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:
authorRay Molenkamp <github@lazydodo.com>2019-04-23 18:15:45 +0300
committerRay Molenkamp <github@lazydodo.com>2019-04-23 18:15:45 +0300
commit8e861725dc9e9388c1c764491676c0684b1b6f8f (patch)
tree41aeb7ff4672bbacbef62ec873366029e23a3765 /source/blender/editors/space_node
parent58a1eb9a00290adc68ea5391de9d188fc108a945 (diff)
Space_node: Add draw backdrop callback.
Add a callback to allow custom node editors to draw their own backdrop. Differential Revision: https://developer.blender.org/D4709 Reviewed by: JacquesLucke
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/drawnode.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index eb9c1cc2965..447fea8098c 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -55,6 +55,7 @@
#include "RNA_define.h"
#include "ED_node.h"
+#include "ED_space_api.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -3414,6 +3415,14 @@ void draw_nodespace_back_pix(const bContext *C,
void *lock;
ImBuf *ibuf;
+ GPU_matrix_push_projection();
+ GPU_matrix_push();
+ wmOrtho2_region_pixelspace(ar);
+ GPU_matrix_identity_set();
+ ED_region_draw_cb_draw(C, ar, REGION_DRAW_BACKDROP);
+ GPU_matrix_pop_projection();
+ GPU_matrix_pop();
+
if (!(snode->flag & SNODE_BACKDRAW) || !ED_node_is_compositor(snode)) {
return;
}