2.5
* fix some warnings to satisfy scons/msvc
This commit is contained in:
@@ -2512,7 +2512,7 @@ void draw_nodespace_back_pix(ScrArea *sa, SpaceNode *snode)
|
|||||||
Image *ima= BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
|
Image *ima= BKE_image_verify_viewer(IMA_TYPE_COMPOSITE, "Viewer Node");
|
||||||
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
|
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
|
||||||
if(ibuf) {
|
if(ibuf) {
|
||||||
int x, y;
|
float x, y;
|
||||||
/* somehow the offset has to be calculated inverse */
|
/* somehow the offset has to be calculated inverse */
|
||||||
|
|
||||||
//glaDefine2DArea(&sa->winrct);
|
//glaDefine2DArea(&sa->winrct);
|
||||||
|
@@ -103,9 +103,9 @@ extern void ui_draw_tria_icon(float x, float y, float aspect, char dir);
|
|||||||
// XXX butspace.h
|
// XXX butspace.h
|
||||||
#define B_NODE_EXEC 3610
|
#define B_NODE_EXEC 3610
|
||||||
|
|
||||||
#if 0 // XXX
|
|
||||||
static void snode_drawstring(void *curfont, SpaceNode *snode, char *str, int okwidth)
|
static void snode_drawstring(void *curfont, SpaceNode *snode, char *str, int okwidth)
|
||||||
{
|
{
|
||||||
|
#if 0 // XXX
|
||||||
char drawstr[NODE_MAXSTR];
|
char drawstr[NODE_MAXSTR];
|
||||||
int width;
|
int width;
|
||||||
|
|
||||||
@@ -126,8 +126,8 @@ static void snode_drawstring(void *curfont, SpaceNode *snode, char *str, int okw
|
|||||||
if(len==0) return;
|
if(len==0) return;
|
||||||
}
|
}
|
||||||
UI_DrawString(curfont, drawstr, 0);
|
UI_DrawString(curfont, drawstr, 0);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static void node_scaling_widget(int color_id, float aspect, float xmin, float ymin, float xmax, float ymax)
|
static void node_scaling_widget(int color_id, float aspect, float xmin, float ymin, float xmax, float ymax)
|
||||||
{
|
{
|
||||||
@@ -514,8 +514,8 @@ static void socket_vector_menu_cb(bContext *C, void *node_v, void *ntree_v)
|
|||||||
/* NOTE: this is a block-menu, needs 0 events, otherwise the menu closes */
|
/* 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)
|
static uiBlock *socket_vector_menu(bContext *C, uiMenuBlockHandle *handle, void *socket_v)
|
||||||
{
|
{
|
||||||
SpaceNode *snode= (SpaceNode *)CTX_wm_space_data(C);
|
#if 0 //XXX
|
||||||
ScrArea *curarea= CTX_wm_area(C);
|
SpaceNode *snode= curarea->spacedata.first;
|
||||||
bNode *node;
|
bNode *node;
|
||||||
bNodeSocket *sock= socket_v;
|
bNodeSocket *sock= socket_v;
|
||||||
bNodeStack *ns= &sock->ns;
|
bNodeStack *ns= &sock->ns;
|
||||||
@@ -532,7 +532,7 @@ static uiBlock *socket_vector_menu(bContext *C, uiMenuBlockHandle *handle, void
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
block= uiBeginBlock(C, handle->region, "socket menu", UI_EMBOSS, UI_HELV);
|
block= uiNewBlock(&curarea->uiblocks, "socket menu", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
|
|
||||||
/* use this for a fake extra empy space around the buttons */
|
/* use this for a fake extra empy space around the buttons */
|
||||||
uiDefBut(block, LABEL, 0, "", -4, -4, 188, 68, NULL, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, "", -4, -4, 188, 68, NULL, 0, 0, 0, 0, "");
|
||||||
@@ -546,11 +546,12 @@ static uiBlock *socket_vector_menu(bContext *C, uiMenuBlockHandle *handle, void
|
|||||||
uiButSetFunc(bt, socket_vector_menu_cb, node, snode->nodetree);
|
uiButSetFunc(bt, socket_vector_menu_cb, node, snode->nodetree);
|
||||||
|
|
||||||
uiBlockSetDirection(block, UI_TOP);
|
uiBlockSetDirection(block, UI_TOP);
|
||||||
uiEndBlock(C, block);
|
|
||||||
|
|
||||||
ED_area_tag_redraw(curarea);
|
// allqueue(REDRAWNODE, 0);
|
||||||
|
|
||||||
return block;
|
return block;
|
||||||
|
#endif
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* not a callback */
|
/* not a callback */
|
||||||
@@ -1067,13 +1068,9 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
|
|||||||
float col[3];
|
float col[3];
|
||||||
View2DScrollers *scrollers;
|
View2DScrollers *scrollers;
|
||||||
SpaceNode *snode= (SpaceNode*)CTX_wm_space_data(C);
|
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);
|
UI_GetThemeColor3fv(TH_BACK, col);
|
||||||
glClearColor(col[0], col[1], col[2], 0.0);
|
glClearColor(col[0], col[1], col[2], 0);
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
UI_view2d_view_ortho(C, v2d);
|
UI_view2d_view_ortho(C, v2d);
|
||||||
@@ -1089,12 +1086,12 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
|
|||||||
glEnable(GL_MAP1_VERTEX_3);
|
glEnable(GL_MAP1_VERTEX_3);
|
||||||
|
|
||||||
/* aspect+font, set each time */
|
/* aspect+font, set each time */
|
||||||
snode->aspect= (v2d->cur.xmax - v2d->cur.xmin)/((float)sa->winx);
|
//snode->aspect= (snode->v2d.cur.xmax - snode->v2d.cur.xmin)/((float)sa->winx);
|
||||||
//snode->curfont= uiSetCurFont_ext(snode->aspect);
|
//snode->curfont= uiSetCurFont_ext(snode->aspect);
|
||||||
|
|
||||||
UI_view2d_constant_grid_draw(C, v2d);
|
UI_view2d_constant_grid_draw(C, v2d);
|
||||||
/* backdrop */
|
/* backdrop */
|
||||||
draw_nodespace_back_pix(CTX_wm_area(C), snode);
|
// draw_nodespace_back_pix(sa, snode);
|
||||||
|
|
||||||
/* nodes */
|
/* nodes */
|
||||||
snode_set_context(snode, CTX_data_scene(C));
|
snode_set_context(snode, CTX_data_scene(C));
|
||||||
@@ -1149,6 +1146,8 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
|
|||||||
snode->flag &= ~SNODE_DO_PREVIEW;
|
snode->flag &= ~SNODE_DO_PREVIEW;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* reset view matrix */
|
/* reset view matrix */
|
||||||
UI_view2d_view_restore(C);
|
UI_view2d_view_restore(C);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user