node warning fixes

This commit is contained in:
2009-11-11 06:01:42 +00:00
parent bf50cc8b39
commit 7206437c72
2 changed files with 3 additions and 51 deletions

View File

@@ -94,48 +94,6 @@
#include "node_intern.h"
/* autocomplete callback for buttons */
static void autocomplete_vcol(bContext *C, char *str, void *arg_v)
{
Mesh *me;
CustomDataLayer *layer;
AutoComplete *autocpl;
int a;
if(str[0]==0)
return;
autocpl= autocomplete_begin(str, 32);
/* search if str matches the beginning of name */
for(me= G.main->mesh.first; me; me=me->id.next)
for(a=0, layer= me->fdata.layers; a<me->fdata.totlayer; a++, layer++)
if(layer->type == CD_MCOL)
autocomplete_do_name(autocpl, layer->name);
autocomplete_end(autocpl, str);
}
static int verify_valid_vcol_name(char *str)
{
Mesh *me;
CustomDataLayer *layer;
int a;
if(str[0]==0)
return 1;
/* search if str matches the name */
for(me= G.main->mesh.first; me; me=me->id.next)
for(a=0, layer= me->fdata.layers; a<me->fdata.totlayer; a++, layer++)
if(layer->type == CD_MCOL)
if(strcmp(layer->name, str)==0)
return 1;
return 0;
}
/* ****************** GENERAL CALLBACKS FOR NODES ***************** */
static void node_ID_title_cb(bContext *C, void *node_v, void *unused_v)
@@ -197,7 +155,6 @@ static void node_buts_group(uiLayout *layout, bContext *C, PointerRNA *ptr)
static void node_buts_value(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
bNode *node= ptr->data;
PointerRNA sockptr;
PropertyRNA *prop;
@@ -211,7 +168,6 @@ static void node_buts_value(uiLayout *layout, bContext *C, PointerRNA *ptr)
static void node_buts_rgb(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
uiLayout *col;
bNode *node= ptr->data;
PointerRNA sockptr;
PropertyRNA *prop;
@@ -413,11 +369,6 @@ static void node_browse_text_cb(bContext *C, void *ntree_v, void *node_v)
node->menunr= 0;
}
static void node_texmap_cb(bContext *C, void *texmap_v, void *unused_v)
{
init_mapping(texmap_v);
}
static void node_shader_buts_material(uiLayout *layout, bContext *C, PointerRNA *ptr)
{
bNode *node= ptr->data;

View File

@@ -567,6 +567,8 @@ static uiBlock *socket_vector_menu(bContext *C, ARegion *ar, void *socket_v)
layout= uiLayoutColumn(uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, sock->locx, sock->locy-8, 140, 20, U.uistyles.first), 0);
uiItemR(layout, "", 0, &ptr, "default_value", UI_ITEM_R_EXPAND);
return block;
}
/* not a callback */
@@ -764,8 +766,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
RNA_pointer_create(&ntree->id, &RNA_NodeSocket, sock, &ptr);
if(node->block && sock->link==NULL) {
float *butpoin= sock->ns.vec;
if(sock->type==SOCK_VALUE) {
bt=uiDefButR(node->block, NUM, B_NODE_EXEC, sock->name,
(short)sock->locx+NODE_DYS, (short)(sock->locy)-9, (short)node->width-NODE_DY, 17,