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:
-rw-r--r--source/blender/editors/space_node/SConscript3
-rw-r--r--source/blender/editors/space_node/drawnode.c18
-rw-r--r--source/blender/editors/space_node/node_draw.c23
-rw-r--r--source/blender/editors/space_node/node_intern.h1
4 files changed, 23 insertions, 22 deletions
diff --git a/source/blender/editors/space_node/SConscript b/source/blender/editors/space_node/SConscript
index 6c004a2b62f..f610f5db266 100644
--- a/source/blender/editors/space_node/SConscript
+++ b/source/blender/editors/space_node/SConscript
@@ -9,7 +9,8 @@ incs += ' ../../windowmanager #intern/guardedalloc #extern/glew/include'
defs = []
cf = []
if env['OURPLATFORM'] == 'win32-vc':
- #cf.append('/Wall')
cf.append('/WX')
+if env['CC'] == 'gcc':
+ cf.append('-Werror')
env.BlenderLib ( 'bf_editors_space_node', sources, Split(incs), defs, libtype=['core'], priority=[55], compileflags=cf )
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 18d9ee44e84..66eb51449d3 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -98,8 +98,8 @@
#include "UI_resources.h"
/*
-#include "RE_pipeline.h"
-#include "IMB_imbuf_types.h"*/
+#include "RE_pipeline.h"*/
+#include "IMB_imbuf_types.h"
/*#include "blendef.h"
#include "butspace.h"*/
@@ -2503,12 +2503,11 @@ static void draw_nodespace_grid(SpaceNode *snode)
glEnd();
}
+#endif
-static void draw_nodespace_back_pix(ScrArea *sa, SpaceNode *snode)
+void draw_nodespace_back_pix(ScrArea *sa, SpaceNode *snode)
{
- draw_nodespace_grid(snode);
-
if((snode->flag & SNODE_BACKDRAW) && snode->treetype==NTREE_COMPOSIT) {
Image *ima= BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
@@ -2516,9 +2515,9 @@ static void draw_nodespace_back_pix(ScrArea *sa, SpaceNode *snode)
int x, y;
/* somehow the offset has to be calculated inverse */
- glaDefine2DArea(&sa->winrct);
+ //glaDefine2DArea(&sa->winrct);
/* ortho at pixel level curarea */
- myortho2(-0.375, sa->winx-0.375, -0.375, sa->winy-0.375);
+ //myortho2(-0.375, sa->winx-0.375, -0.375, sa->winy-0.375);
x = (sa->winx-ibuf->x)/2 + snode->xof;
y = (sa->winy-ibuf->y)/2 + snode->yof;
@@ -2529,14 +2528,15 @@ static void draw_nodespace_back_pix(ScrArea *sa, SpaceNode *snode)
glaDrawPixelsSafe(x, y, ibuf->x, ibuf->y, ibuf->x, GL_RGBA, GL_FLOAT, ibuf->rect_float);
/* sort this out, this should not be needed */
- myortho2(snode->v2d.cur.xmin, snode->v2d.cur.xmax, snode->v2d.cur.ymin, snode->v2d.cur.ymax);
- bwin_clear_viewmat(sa->win); /* clear buttons view */
+ //myortho2(snode->v2d.cur.xmin, snode->v2d.cur.xmax, snode->v2d.cur.ymin, snode->v2d.cur.ymax);
+ //bwin_clear_viewmat(sa->win); /* clear buttons view */
glLoadIdentity();
}
}
}
#if 0
+#if 0
/* note: needs to be userpref or opengl profile option */
static void draw_nodespace_back_tex(ScrArea *sa, SpaceNode *snode)
{
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index cdc8c88b4d6..f00643a1214 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -503,7 +503,6 @@ static void node_sync_cb(bContext *C, void *snode_v, void *node_v)
/* ************** Socket callbacks *********** */
-#if 0
static void socket_vector_menu_cb(bContext *C, void *node_v, void *ntree_v)
{
if(node_v && ntree_v) {
@@ -511,13 +510,12 @@ static void socket_vector_menu_cb(bContext *C, void *node_v, void *ntree_v)
// addqueue(curarea->win, UI_BUT_EVENT, B_NODE_EXEC+((bNode *)node_v)->nr); XXX
}
}
-#endif
/* NOTE: this is a block-menu, needs 0 events, otherwise the menu closes */
static uiBlock *socket_vector_menu(bContext *C, uiMenuBlockHandle *handle, void *socket_v)
{
-#if 0 //XXX
- SpaceNode *snode= curarea->spacedata.first;
+ SpaceNode *snode= (SpaceNode *)CTX_wm_space_data(C);
+ ScrArea *curarea= CTX_wm_area(C);
bNode *node;
bNodeSocket *sock= socket_v;
bNodeStack *ns= &sock->ns;
@@ -534,7 +532,7 @@ static uiBlock *socket_vector_menu(bContext *C, uiMenuBlockHandle *handle, void
break;
}
- block= uiNewBlock(&curarea->uiblocks, "socket menu", UI_EMBOSS, UI_HELV, curarea->win);
+ block= uiBeginBlock(C, handle->region, "socket menu", UI_EMBOSS, UI_HELV);
/* use this for a fake extra empy space around the buttons */
uiDefBut(block, LABEL, 0, "", -4, -4, 188, 68, NULL, 0, 0, 0, 0, "");
@@ -548,12 +546,11 @@ static uiBlock *socket_vector_menu(bContext *C, uiMenuBlockHandle *handle, void
uiButSetFunc(bt, socket_vector_menu_cb, node, snode->nodetree);
uiBlockSetDirection(block, UI_TOP);
+ uiEndBlock(C, block);
- // allqueue(REDRAWNODE, 0);
+ ED_area_tag_redraw(curarea);
return block;
-#endif
-return NULL;
}
/* not a callback */
@@ -1070,6 +1067,10 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
float col[3];
View2DScrollers *scrollers;
SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C);
+ ScrArea *sa= CTX_wm_area(C);
+ int argus;
+
+ argus= 1.1f+ 2.3f;
UI_GetThemeColor3fv(TH_BACK, col);
glClearColor(col[0], col[1], col[2], 0.0);
@@ -1088,12 +1089,12 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
glEnable(GL_MAP1_VERTEX_3);
/* aspect+font, set each time */
- //snode->aspect= (snode->v2d.cur.xmax - snode->v2d.cur.xmin)/((float)sa->winx);
+ snode->aspect= (v2d->cur.xmax - v2d->cur.xmin)/((float)sa->winx);
//snode->curfont= uiSetCurFont_ext(snode->aspect);
UI_view2d_constant_grid_draw(C, v2d);
/* backdrop */
- // draw_nodespace_back_pix(sa, snode);
+ draw_nodespace_back_pix(CTX_wm_area(C), snode);
/* nodes */
snode_set_context(snode, CTX_data_scene(C));
@@ -1148,8 +1149,6 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
snode->flag &= ~SNODE_DO_PREVIEW;
}*/
-
-
/* reset view matrix */
UI_view2d_view_restore(C);
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index 4979ed2ebf3..9dbaf036122 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -44,6 +44,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d);
/* drawnode.c */
void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link);
void node_draw_link_bezier(View2D *v2d, float vec[][3], int th_col1, int th_col2, int do_shaded);
+void draw_nodespace_back_pix(ScrArea *sa, SpaceNode *snode);
/* node_edit.c */
void snode_set_context(SpaceNode *snode, Scene *scene);