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:
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r--source/blender/editors/space_node/drawnode.c98
-rw-r--r--source/blender/editors/space_node/node_buttons.c6
-rw-r--r--source/blender/editors/space_node/node_draw.c33
-rw-r--r--source/blender/editors/space_node/node_edit.c37
-rw-r--r--source/blender/editors/space_node/node_header.c4
-rw-r--r--source/blender/editors/space_node/node_intern.h2
-rw-r--r--source/blender/editors/space_node/node_select.c12
-rw-r--r--source/blender/editors/space_node/node_state.c8
-rw-r--r--source/blender/editors/space_node/space_node.c12
9 files changed, 114 insertions, 98 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 5e0926da216..78ae82c57b0 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -77,7 +77,7 @@ void node_buts_group(uiLayout *layout, bContext *C, PointerRNA *ptr)
uiTemplateIDBrowse(layout, C, ptr, "node_tree", NULL, NULL, "");
}
-static void node_buts_value(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_value(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
PointerRNA sockptr;
PropertyRNA *prop;
@@ -89,7 +89,7 @@ static void node_buts_value(uiLayout *layout, bContext *C, PointerRNA *ptr)
uiItemR(layout, &sockptr, "default_value", 0, "", 0);
}
-static void node_buts_rgb(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
PointerRNA sockptr;
@@ -104,7 +104,7 @@ static void node_buts_rgb(uiLayout *layout, bContext *C, PointerRNA *ptr)
uiItemR(col, &sockptr, "default_value", 0, "", 0);
}
-static void node_buts_mix_rgb(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_mix_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *row;
@@ -116,7 +116,7 @@ static void node_buts_mix_rgb(uiLayout *layout, bContext *C, PointerRNA *ptr)
uiItemR(row, ptr, "use_alpha", 0, "", ICON_IMAGE_RGB_ALPHA);
}
-static void node_buts_time(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_time(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *row;
#if 0
@@ -138,12 +138,12 @@ static void node_buts_time(uiLayout *layout, bContext *C, PointerRNA *ptr)
uiItemR(row, ptr, "frame_end", 0, "End", 0);
}
-static void node_buts_colorramp(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_colorramp(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiTemplateColorRamp(layout, ptr, "color_ramp", 0);
}
-static void node_buts_curvevec(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_curvevec(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiTemplateCurveMapping(layout, ptr, "mapping", 'v', 0, 0);
}
@@ -154,7 +154,7 @@ void node_curvemap_sample(float *col)
_sample_col= col;
}
-static void node_buts_curvecol(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_curvecol(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
bNode *node= ptr->data;
CurveMapping *cumap= node->storage;
@@ -169,7 +169,7 @@ static void node_buts_curvecol(uiLayout *layout, bContext *C, PointerRNA *ptr)
uiTemplateCurveMapping(layout, ptr, "mapping", 'c', 0, 0);
}
-static void node_buts_normal(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_normal(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiBlock *block= uiLayoutAbsoluteBlock(layout);
bNode *node= ptr->data;
@@ -212,7 +212,7 @@ static void node_browse_tex_cb(bContext *C, void *ntree_v, void *node_v)
node->menunr= 0;
}
#endif
-static void node_dynamic_update_cb(bContext *C, void *ntree_v, void *node_v)
+static void node_dynamic_update_cb(bContext *C, void *UNUSED(ntree_v), void *node_v)
{
Main *bmain= CTX_data_main(C);
Material *ma;
@@ -244,7 +244,7 @@ static void node_dynamic_update_cb(bContext *C, void *ntree_v, void *node_v)
// XXX BIF_preview_changed(ID_MA);
}
-static void node_buts_texture(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_texture(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
bNode *node= ptr->data;
@@ -263,7 +263,7 @@ static void node_buts_texture(uiLayout *layout, bContext *C, PointerRNA *ptr)
}
}
-static void node_buts_math(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_buts_math(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "operation", 0, "", 0);
}
@@ -312,7 +312,7 @@ static void node_shader_buts_material(uiLayout *layout, bContext *C, PointerRNA
uiItemR(col, ptr, "invert_normal", 0, NULL, 0);
}
-static void node_shader_buts_mapping(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_shader_buts_mapping(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *row;
@@ -338,7 +338,7 @@ static void node_shader_buts_mapping(uiLayout *layout, bContext *C, PointerRNA *
}
-static void node_shader_buts_vect_math(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_shader_buts_vect_math(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "operation", 0, "", 0);
}
@@ -524,7 +524,7 @@ static void node_composit_buts_renderlayers(uiLayout *layout, bContext *C, Point
}
-static void node_composit_buts_blur(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_blur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -548,7 +548,7 @@ static void node_composit_buts_blur(uiLayout *layout, bContext *C, PointerRNA *p
}
}
-static void node_composit_buts_dblur(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_dblur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -572,7 +572,7 @@ static void node_composit_buts_dblur(uiLayout *layout, bContext *C, PointerRNA *
uiItemR(layout, ptr, "zoom", 0, NULL, 0);
}
-static void node_composit_buts_bilateralblur(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_bilateralblur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -582,7 +582,7 @@ static void node_composit_buts_bilateralblur(uiLayout *layout, bContext *C, Poin
uiItemR(col, ptr, "sigma_space", 0, NULL, 0);
}
-static void node_composit_buts_defocus(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_defocus(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *sub, *col;
@@ -614,7 +614,7 @@ static void node_composit_buts_defocus(uiLayout *layout, bContext *C, PointerRNA
}
/* qdn: glare node */
-static void node_composit_buts_glare(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_glare(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "glare_type", 0, "", 0);
uiItemR(layout, ptr, "quality", 0, "", 0);
@@ -644,7 +644,7 @@ static void node_composit_buts_glare(uiLayout *layout, bContext *C, PointerRNA *
}
}
-static void node_composit_buts_tonemap(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_tonemap(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -663,7 +663,7 @@ static void node_composit_buts_tonemap(uiLayout *layout, bContext *C, PointerRNA
}
}
-static void node_composit_buts_lensdist(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_lensdist(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -676,7 +676,7 @@ static void node_composit_buts_lensdist(uiLayout *layout, bContext *C, PointerRN
uiItemR(col, ptr, "use_fit", 0, NULL, 0);
}
-static void node_composit_buts_vecblur(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_vecblur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -692,17 +692,17 @@ static void node_composit_buts_vecblur(uiLayout *layout, bContext *C, PointerRNA
uiItemR(layout, ptr, "use_curved", 0, NULL, 0);
}
-static void node_composit_buts_filter(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_filter(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "filter_type", 0, "", 0);
}
-static void node_composit_buts_flip(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_flip(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "axis", 0, "", 0);
}
-static void node_composit_buts_crop(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_crop(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -723,7 +723,7 @@ static void node_composit_buts_crop(uiLayout *layout, bContext *C, PointerRNA *p
}
}
-static void node_composit_buts_splitviewer(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_splitviewer(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *row, *col;
@@ -733,7 +733,7 @@ static void node_composit_buts_splitviewer(uiLayout *layout, bContext *C, Pointe
uiItemR(col, ptr, "factor", 0, NULL, 0);
}
-static void node_composit_buts_map_value(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_map_value(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *sub, *col;
@@ -754,7 +754,7 @@ static void node_composit_buts_map_value(uiLayout *layout, bContext *C, PointerR
uiItemR(sub, ptr, "max", 0, "", 0);
}
-static void node_composit_buts_alphaover(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_alphaover(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -763,7 +763,7 @@ static void node_composit_buts_alphaover(uiLayout *layout, bContext *C, PointerR
uiItemR(col, ptr, "premul", 0, NULL, 0);
}
-static void node_composit_buts_hue_sat(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_hue_sat(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -773,12 +773,12 @@ static void node_composit_buts_hue_sat(uiLayout *layout, bContext *C, PointerRNA
uiItemR(col, ptr, "color_value", UI_ITEM_R_SLIDER, NULL, 0);
}
-static void node_composit_buts_dilateerode(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_dilateerode(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "distance", 0, NULL, 0);
}
-static void node_composit_buts_diff_matte(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_diff_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -787,7 +787,7 @@ static void node_composit_buts_diff_matte(uiLayout *layout, bContext *C, Pointer
uiItemR(col, ptr, "falloff", UI_ITEM_R_SLIDER, NULL, 0);
}
-static void node_composit_buts_distance_matte(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_distance_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -796,7 +796,7 @@ static void node_composit_buts_distance_matte(uiLayout *layout, bContext *C, Poi
uiItemR(col, ptr, "falloff", UI_ITEM_R_SLIDER, NULL, 0);
}
-static void node_composit_buts_color_spill(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_color_spill(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *row, *col;
@@ -822,7 +822,7 @@ static void node_composit_buts_color_spill(uiLayout *layout, bContext *C, Pointe
}
}
-static void node_composit_buts_chroma_matte(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_chroma_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -836,7 +836,7 @@ static void node_composit_buts_chroma_matte(uiLayout *layout, bContext *C, Point
/*uiItemR(col, ptr, "shadow_adjust", UI_ITEM_R_SLIDER, NULL, 0); Removed for now*/
}
-static void node_composit_buts_color_matte(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_color_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -846,7 +846,7 @@ static void node_composit_buts_color_matte(uiLayout *layout, bContext *C, Pointe
uiItemR(col, ptr, "color_value", UI_ITEM_R_SLIDER, NULL, 0);
}
-static void node_composit_buts_channel_matte(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_channel_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col, *row;
@@ -872,7 +872,7 @@ static void node_composit_buts_channel_matte(uiLayout *layout, bContext *C, Poin
uiItemR(col, ptr, "limit_min", UI_ITEM_R_SLIDER, NULL, 0);
}
-static void node_composit_buts_luma_matte(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_luma_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -881,17 +881,17 @@ static void node_composit_buts_luma_matte(uiLayout *layout, bContext *C, Pointer
uiItemR(col, ptr, "limit_min", UI_ITEM_R_SLIDER, NULL, 0);
}
-static void node_composit_buts_map_uv(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_map_uv(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "alpha", 0, NULL, 0);
}
-static void node_composit_buts_id_mask(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_id_mask(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "index", 0, NULL, 0);
}
-static void node_composit_buts_file_output(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_file_output(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col, *row;
@@ -916,17 +916,17 @@ static void node_composit_buts_file_output(uiLayout *layout, bContext *C, Pointe
uiItemR(row, ptr, "frame_end", 0, "End", 0);
}
-static void node_composit_buts_scale(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_scale(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "space", 0, "", 0);
}
-static void node_composit_buts_rotate(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_rotate(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "filter_type", 0, "", 0);
}
-static void node_composit_buts_invert(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_invert(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -935,17 +935,17 @@ static void node_composit_buts_invert(uiLayout *layout, bContext *C, PointerRNA
uiItemR(col, ptr, "invert_alpha", 0, NULL, 0);
}
-static void node_composit_buts_premulkey(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_premulkey(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "mapping", 0, "", 0);
}
-static void node_composit_buts_view_levels(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_view_levels(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "channel", UI_ITEM_R_EXPAND, NULL, 0);
}
-static void node_composit_buts_colorbalance(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_colorbalance(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *split, *col, *row;
@@ -990,7 +990,7 @@ static void node_composit_buts_colorbalance(uiLayout *layout, bContext *C, Point
}
-static void node_composit_buts_huecorrect(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_composit_buts_huecorrect(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiTemplateCurveMapping(layout, ptr, "mapping", 'h', 0, 0);
}
@@ -1143,7 +1143,7 @@ static void node_composit_set_butfunc(bNodeType *ntype)
/* ****************** BUTTON CALLBACKS FOR TEXTURE NODES ***************** */
-static void node_texture_buts_bricks(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_texture_buts_bricks(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiLayout *col;
@@ -1156,7 +1156,7 @@ static void node_texture_buts_bricks(uiLayout *layout, bContext *C, PointerRNA *
uiItemR(col, ptr, "squash_frequency", 0, "Frequency", 0);
}
-static void node_texture_buts_proc(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
PointerRNA tex_ptr;
bNode *node= ptr->data;
@@ -1215,7 +1215,7 @@ static void node_texture_buts_image(uiLayout *layout, bContext *C, PointerRNA *p
uiTemplateID(layout, C, ptr, "image", NULL, "IMAGE_OT_open", NULL);
}
-static void node_texture_buts_output(uiLayout *layout, bContext *C, PointerRNA *ptr)
+static void node_texture_buts_output(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "filepath", 0, "", 0);
}
diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c
index 11319d817c7..954018bfd4f 100644
--- a/source/blender/editors/space_node/node_buttons.c
+++ b/source/blender/editors/space_node/node_buttons.c
@@ -63,7 +63,7 @@
#define B_NOP 1
#define B_REDR 2
-static void do_node_region_buttons(bContext *C, void *arg, int event)
+static void do_node_region_buttons(bContext *C, void *UNUSED(arg), int event)
{
//SpaceNode *snode= CTX_wm_space_node(C);
@@ -75,7 +75,7 @@ static void do_node_region_buttons(bContext *C, void *arg, int event)
}
/* poll callback for active node */
-static int active_node_poll(const bContext *C, PanelType *pt)
+static int active_node_poll(const bContext *C, PanelType *UNUSED(pt))
{
SpaceNode *snode= CTX_wm_space_node(C);
@@ -135,7 +135,7 @@ void node_buttons_register(ARegionType *art)
BLI_addtail(&art->paneltypes, pt);
}
-static int node_properties(bContext *C, wmOperator *op)
+static int node_properties(bContext *C, wmOperator *UNUSED(op))
{
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= node_has_buttons_region(sa);
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 0b33196c646..a81d6e3b0ce 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -111,7 +111,7 @@ static int has_nodetree(bNodeTree *ntree, bNodeTree *lookup)
return 0;
}
-void ED_node_generic_update(Main *bmain, Scene *scene, bNodeTree *ntree, bNode *node)
+void ED_node_generic_update(Main *bmain, bNodeTree *ntree, bNode *node)
{
Material *ma;
Tex *tex;
@@ -309,7 +309,7 @@ static void node_update(const bContext *C, bNodeTree *ntree, bNode *node)
}
/* based on settings in node, sets drawing rect info. each redraw! */
-static void node_update_hidden(const bContext *C, bNode *node)
+static void node_update_hidden(bNode *node)
{
bNodeSocket *nsock;
float rad, drad, hiddenrad= HIDDEN_RAD;
@@ -392,7 +392,7 @@ static void node_update_group(const bContext *C, bNodeTree *ntree, bNode *gnode)
node->locy+= gnode->locy;
if(node->flag & NODE_HIDDEN)
- node_update_hidden(C, node);
+ node_update_hidden(node);
else
node_update(C, ntree, node);
node->locx-= gnode->locx;
@@ -483,7 +483,7 @@ static void node_draw_mute_line(View2D *v2d, SpaceNode *snode, bNode *node)
/* nice AA filled circle */
/* this might have some more generic use */
-static void circle_draw(float x, float y, float size, int type, int col[3])
+static void circle_draw(float x, float y, float size, int col[3])
{
/* 16 values of sin function */
static float si[16] = {
@@ -538,11 +538,11 @@ static void socket_circle_draw(bNodeSocket *sock, float size)
else {
col[0]= 100; col[1]= 200; col[2]= 100;
}
-
- circle_draw(sock->locx, sock->locy, size, sock->type, col);
+
+ circle_draw(sock->locx, sock->locy, size, col);
}
-static void node_sync_cb(bContext *C, void *snode_v, void *node_v)
+static void node_sync_cb(bContext *UNUSED(C), void *snode_v, void *node_v)
{
SpaceNode *snode= snode_v;
@@ -1031,9 +1031,14 @@ static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bN
else
BLI_strncpy(showname, ngroup->id.name+2, sizeof(showname));
- // XXX this shows some scaling artifacts
- UI_DrawString(rect.xmin+8.0f, rect.ymax+5.0f, showname);
-
+
+ uiDefBut(gnode->block, LABEL, 0, showname, (short)(rect.xmin+15), (short)(rect.ymax),
+ (int)(rect.xmax - rect.xmin-18.0f), NODE_DY, NULL, 0, 0, 0, 0, "");
+ uiEndBlock(C, gnode->block);
+ uiDrawBlock(C, gnode->block);
+ gnode->block= NULL;
+
+
/* links from groupsockets to the internal nodes */
node_draw_group_links(&ar->v2d, snode, gnode);
@@ -1045,6 +1050,8 @@ static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bN
if(!(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL)))
socket_circle_draw(sock, NODE_SOCKSIZE);
+
+
/* and finally the whole tree */
node_draw_nodetree(C, ar, snode, ngroup);
}
@@ -1059,7 +1066,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
UI_ThemeClearColor(TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
//uiFreeBlocksWin(&sa->uiblocks, sa->win);
@@ -1071,7 +1078,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
snode->aspect= (v2d->cur.xmax - v2d->cur.xmin)/((float)ar->winx);
// XXX snode->curfont= uiSetCurFont_ext(snode->aspect);
- UI_view2d_constant_grid_draw(C, v2d);
+ UI_view2d_constant_grid_draw(v2d);
/* backdrop */
draw_nodespace_back_pix(ar, snode, color_manage);
@@ -1096,7 +1103,7 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
if(node->flag & NODE_GROUP_EDIT)
node_update_group(C, snode->nodetree, node);
else if(node->flag & NODE_HIDDEN)
- node_update_hidden(C, node);
+ node_update_hidden(node);
else
node_update(C, snode->nodetree, node);
}
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 968391f271e..b8bfed2b75e 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -98,7 +98,7 @@ static int compo_breakjob(void *cjv)
}
/* called by compo, wmJob sends notifier */
-static void compo_redrawjob(void *cjv, char *str)
+static void compo_redrawjob(void *cjv, char *UNUSED(str))
{
CompoJob *cj= cjv;
@@ -541,7 +541,7 @@ void snode_make_group_editable(SpaceNode *snode, bNode *gnode)
ntreeSolveOrder(snode->nodetree);
}
-static int node_group_edit_exec(bContext *C, wmOperator *op)
+static int node_group_edit_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode = CTX_wm_space_node(C);
bNode *gnode;
@@ -556,7 +556,7 @@ static int node_group_edit_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int node_group_edit_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int node_group_edit_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
SpaceNode *snode = CTX_wm_space_node(C);
bNode *gnode;
@@ -1100,7 +1100,7 @@ static void node_link_viewer(SpaceNode *snode, bNode *tonode)
}
-static int node_active_link_viewer(bContext *C, wmOperator *op)
+static int node_active_link_viewer(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode= CTX_wm_space_node(C);
bNode *node;
@@ -1472,12 +1472,21 @@ bNode *node_add_node(SpaceNode *snode, Scene *scene, int type, float locx, float
/* ****************** Duplicate *********************** */
-static int node_duplicate_exec(bContext *C, wmOperator *op)
+static int node_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode= CTX_wm_space_node(C);
+ bNode *node;
ED_preview_kill_jobs(C);
+ /* simple id user adjustment, node internal functions dont touch this
+ * but operators and readfile.c do. */
+ for(node= snode->edittree->nodes.first; node; node= node->next) {
+ if(node->flag & SELECT) {
+ id_us_plus(node->id);
+ }
+ }
+
ntreeCopyTree(snode->edittree, 1); /* 1 == internally selected nodes */
ntreeSolveOrder(snode->edittree);
@@ -1851,7 +1860,7 @@ void NODE_OT_links_cut(wmOperatorType *ot)
// XXX some code needing updating to operators...
/* goes over all scenes, reads render layers */
-static int node_read_renderlayers_exec(bContext *C, wmOperator *op)
+static int node_read_renderlayers_exec(bContext *C, wmOperator *UNUSED(op))
{
Main *bmain= CTX_data_main(C);
SpaceNode *snode= CTX_wm_space_node(C);
@@ -1893,7 +1902,7 @@ void NODE_OT_read_renderlayers(wmOperatorType *ot)
ot->flag= 0;
}
-static int node_read_fullsamplelayers_exec(bContext *C, wmOperator *op)
+static int node_read_fullsamplelayers_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode= CTX_wm_space_node(C);
Scene *curscene= CTX_data_scene(C);
@@ -2015,7 +2024,7 @@ static void node_flag_toggle_exec(SpaceNode *snode, int toggle_flag)
}
}
-static int node_hide_exec(bContext *C, wmOperator *op)
+static int node_hide_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode= CTX_wm_space_node(C);
@@ -2045,7 +2054,7 @@ void NODE_OT_hide_toggle(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int node_preview_exec(bContext *C, wmOperator *op)
+static int node_preview_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode= CTX_wm_space_node(C);
@@ -2077,7 +2086,7 @@ void NODE_OT_preview_toggle(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int node_socket_toggle_exec(bContext *C, wmOperator *op)
+static int node_socket_toggle_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode= CTX_wm_space_node(C);
bNode *node;
@@ -2128,7 +2137,7 @@ void NODE_OT_hide_socket_toggle(wmOperatorType *ot)
/* ****************** Mute operator *********************** */
-static int node_mute_exec(bContext *C, wmOperator *op)
+static int node_mute_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode= CTX_wm_space_node(C);
bNode *node;
@@ -2170,7 +2179,7 @@ void NODE_OT_mute_toggle(wmOperatorType *ot)
/* ****************** Delete operator ******************* */
-static int node_delete_exec(bContext *C, wmOperator *op)
+static int node_delete_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode= CTX_wm_space_node(C);
bNode *node, *next;
@@ -2211,7 +2220,7 @@ void NODE_OT_delete(wmOperatorType *ot)
/* ****************** Show Cyclic Dependencies Operator ******************* */
-static int node_show_cycles_exec(bContext *C, wmOperator *op)
+static int node_show_cycles_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode= CTX_wm_space_node(C);
@@ -2255,7 +2264,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
errno= 0;
- ima= BKE_add_image_file(path, scene ? scene->r.cfra : 1);
+ ima= BKE_add_image_file(path);
if(!ima) {
BKE_reportf(op->reports, RPT_ERROR, "Can't read: \"%s\", %s.", path, errno ? strerror(errno) : "Unsupported image format");
diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c
index 0711ef66497..64e4bc4cbc8 100644
--- a/source/blender/editors/space_node/node_header.c
+++ b/source/blender/editors/space_node/node_header.c
@@ -55,7 +55,7 @@
/* ************************ add menu *********************** */
-static void do_node_add(bContext *C, void *arg, int event)
+static void do_node_add(bContext *C, void *UNUSED(arg), int event)
{
SpaceNode *snode= CTX_wm_space_node(C);
bNode *node;
@@ -202,7 +202,7 @@ static void node_menu_add(const bContext *C, Menu *menu)
}
}
-void node_menus_register(ARegionType *art)
+void node_menus_register(void)
{
MenuType *mt;
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index 77fda0627e7..cba491deb01 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -41,7 +41,7 @@ ARegion *node_has_buttons_region(ScrArea *sa);
/* node_header.c */
void node_header_buttons(const bContext *C, ARegion *ar);
-void node_menus_register(struct ARegionType *art);
+void node_menus_register(void);
/* node_draw.c */
void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d);
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index ec08cdf07ac..402e1b2d1cd 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -241,7 +241,7 @@ void NODE_OT_select_border(wmOperatorType *ot)
/* ****** Select/Deselect All ****** */
-static int node_select_all_exec(bContext *C, wmOperator *op)
+static int node_select_all_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode = CTX_wm_space_node(C);
bNode *first = snode->edittree->nodes.first;
@@ -282,7 +282,7 @@ void NODE_OT_select_all(wmOperatorType *ot)
/* ****** Select Linked To ****** */
-static int node_select_linked_to_exec(bContext *C, wmOperator *op)
+static int node_select_linked_to_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode = CTX_wm_space_node(C);
bNodeLink *link;
@@ -322,7 +322,7 @@ void NODE_OT_select_linked_to(wmOperatorType *ot)
/* ****** Select Linked From ****** */
-static int node_select_linked_from_exec(bContext *C, wmOperator *op)
+static int node_select_linked_from_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode = CTX_wm_space_node(C);
bNodeLink *link;
@@ -362,7 +362,7 @@ void NODE_OT_select_linked_from(wmOperatorType *ot)
/* ****** Select Same Type ****** */
-static int node_select_same_type_exec(bContext *C, wmOperator *op)
+static int node_select_same_type_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -388,7 +388,7 @@ void NODE_OT_select_same_type(wmOperatorType *ot)
/* ****** Select The Next/Prev Node Of The Same Type ****** */
-static int node_select_same_type_next_exec(bContext *C, wmOperator *op)
+static int node_select_same_type_next_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -412,7 +412,7 @@ void NODE_OT_select_same_type_next(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int node_select_same_type_prev_exec(bContext *C, wmOperator *op)
+static int node_select_same_type_prev_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode = CTX_wm_space_node(C);
diff --git a/source/blender/editors/space_node/node_state.c b/source/blender/editors/space_node/node_state.c
index b4f09f960d6..48801d4369d 100644
--- a/source/blender/editors/space_node/node_state.c
+++ b/source/blender/editors/space_node/node_state.c
@@ -140,7 +140,7 @@ static int do_header_node(SpaceNode *snode, bNode *node, float mx, float my)
return 0;
}
-static int do_header_hidden_node(SpaceNode *snode, bNode *node, float mx, float my)
+static int do_header_hidden_node(bNode *node, float mx, float my)
{
rctf totr= node->totr;
@@ -164,7 +164,7 @@ static int node_toggle_visibility(SpaceNode *snode, ARegion *ar, short *mval)
for(next_node(snode->edittree); (node=next_node(NULL));) {
if(node->flag & NODE_HIDDEN) {
- if(do_header_hidden_node(snode, node, mx, my)) {
+ if(do_header_hidden_node(node, mx, my)) {
ED_region_tag_redraw(ar);
return 1;
}
@@ -227,7 +227,7 @@ void NODE_OT_visibility_toggle(wmOperatorType *ot)
/* **************** View All Operator ************** */
-static void snode_home(ScrArea *sa, ARegion *ar, SpaceNode* snode)
+static void snode_home(ScrArea *UNUSED(sa), ARegion *ar, SpaceNode* snode)
{
bNode *node;
rctf *cur, *tot;
@@ -278,7 +278,7 @@ static void snode_home(ScrArea *sa, ARegion *ar, SpaceNode* snode)
UI_view2d_curRect_validate(&ar->v2d);
}
-static int node_view_all_exec(bContext *C, wmOperator *op)
+static int node_view_all_exec(bContext *C, wmOperator *UNUSED(op))
{
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= CTX_wm_region(C);
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index c94fcb52e38..d38e2af734b 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -89,7 +89,7 @@ ARegion *node_has_buttons_region(ScrArea *sa)
/* ******************** default callbacks for node space ***************** */
-static SpaceLink *node_new(const bContext *C)
+static SpaceLink *node_new(const bContext *UNUSED(C))
{
ARegion *ar;
SpaceNode *snode;
@@ -145,14 +145,14 @@ static SpaceLink *node_new(const bContext *C)
}
/* not spacelink itself */
-static void node_free(SpaceLink *sl)
+static void node_free(SpaceLink *UNUSED(sl))
{
}
/* spacetype; init callback */
-static void node_init(struct wmWindowManager *wm, ScrArea *sa)
+static void node_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(sa))
{
}
@@ -306,7 +306,7 @@ static void node_main_area_draw(const bContext *C, ARegion *ar)
/* ************* dropboxes ************* */
-static int node_drop_poll(bContext *C, wmDrag *drag, wmEvent *event)
+static int node_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(event))
{
if(drag->type==WM_DRAG_ID) {
ID *id= (ID *)drag->poin;
@@ -345,7 +345,7 @@ static void node_dropboxes(void)
/* add handlers, stuff you only do once or on area/region changes */
-static void node_header_area_init(wmWindowManager *wm, ARegion *ar)
+static void node_header_area_init(wmWindowManager *UNUSED(wm), ARegion *ar)
{
ED_region_header_init(ar);
}
@@ -452,7 +452,7 @@ void ED_spacetype_node(void)
BLI_addhead(&st->regiontypes, art);
- node_menus_register(art);
+ node_menus_register();
/* regions: listview/buttons */
art= MEM_callocN(sizeof(ARegionType), "spacetype node region");