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:
authorMatt Ebb <matt@mke3.net>2006-12-31 03:28:46 +0300
committerMatt Ebb <matt@mke3.net>2006-12-31 03:28:46 +0300
commit2dd1c967613bdf8e34750d4c2e851976504129bf (patch)
treec7347f32a74665c4297d123bfb53df316c5be6e1
parent91b2bc5c2344220aa395d5e7d6e2fd5c777b6218 (diff)
== Compositor ==
* Added a new top-level add menu category for compositing nodes: Distort It currently contains Translate, Rotate, Scale, Flip, Displace and Map UV Also did some cleaning up of the ordering of add node menu items to be a bit better organised.
-rw-r--r--source/blender/blenkernel/BKE_node.h5
-rw-r--r--source/blender/blenkernel/intern/node_composite.c61
-rw-r--r--source/blender/src/header_node.c32
-rw-r--r--source/blender/src/toolbox.c21
4 files changed, 74 insertions, 45 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 3da3b6678a2..7324d16c7d3 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -84,11 +84,12 @@ typedef struct bNodeType {
#define NODE_CLASS_OUTPUT 1
#define NODE_CLASS_OP_COLOR 3
#define NODE_CLASS_OP_VECTOR 4
-#define NODE_CLASS_OP_FILTER 5
+#define NODE_CLASS_OP_FILTER 5
#define NODE_CLASS_GROUP 6
#define NODE_CLASS_FILE 7
#define NODE_CLASS_CONVERTOR 8
-#define NODE_CLASS_MATTE 9
+#define NODE_CLASS_MATTE 9
+#define NODE_CLASS_DISTORT 10
/* ************** GENERIC API, TREES *************** */
diff --git a/source/blender/blenkernel/intern/node_composite.c b/source/blender/blenkernel/intern/node_composite.c
index 7ee3cc20009..301cac90a1d 100644
--- a/source/blender/blenkernel/intern/node_composite.c
+++ b/source/blender/blenkernel/intern/node_composite.c
@@ -3987,7 +3987,7 @@ static bNodeType cmp_node_translate= {
/* type code */ CMP_NODE_TRANSLATE,
/* name */ "Translate",
/* width+range */ 140, 100, 320,
- /* class+opts */ NODE_CLASS_CONVERTOR, NODE_OPTIONS,
+ /* class+opts */ NODE_CLASS_DISTORT, NODE_OPTIONS,
/* input sock */ cmp_node_translate_in,
/* output sock */ cmp_node_translate_out,
/* storage */ "",
@@ -4054,7 +4054,7 @@ static bNodeType cmp_node_flip= {
/* type code */ CMP_NODE_FLIP,
/* name */ "Flip",
/* width+range */ 140, 100, 320,
- /* class+opts */ NODE_CLASS_CONVERTOR, NODE_OPTIONS,
+ /* class+opts */ NODE_CLASS_DISTORT, NODE_OPTIONS,
/* input sock */ cmp_node_flip_in,
/* output sock */ cmp_node_flip_out,
/* storage */ "",
@@ -5099,7 +5099,7 @@ static bNodeType cmp_node_rotate= {
/* type code */ CMP_NODE_ROTATE,
/* name */ "Rotate",
/* width+range */ 140, 100, 320,
- /* class+opts */ NODE_CLASS_CONVERTOR, NODE_OPTIONS,
+ /* class+opts */ NODE_CLASS_DISTORT, NODE_OPTIONS,
/* input sock */ cmp_node_rotate_in,
/* output sock */ cmp_node_rotate_out,
/* storage */ "",
@@ -5183,7 +5183,7 @@ static bNodeType cmp_node_scale= {
/* type code */ CMP_NODE_SCALE,
/* name */ "Scale",
/* width+range */ 140, 100, 320,
- /* class+opts */ NODE_CLASS_CONVERTOR, NODE_OPTIONS,
+ /* class+opts */ NODE_CLASS_DISTORT, NODE_OPTIONS,
/* input sock */ cmp_node_scale_in,
/* output sock */ cmp_node_scale_out,
/* storage */ "",
@@ -5294,7 +5294,7 @@ static bNodeType cmp_node_mapuv= {
/* type code */ CMP_NODE_MAP_UV,
/* name */ "Map UV",
/* width+range */ 140, 100, 320,
- /* class+opts */ NODE_CLASS_CONVERTOR, NODE_OPTIONS,
+ /* class+opts */ NODE_CLASS_DISTORT, NODE_OPTIONS,
/* input sock */ cmp_node_mapuv_in,
/* output sock */ cmp_node_mapuv_out,
/* storage */ "",
@@ -5485,7 +5485,7 @@ static bNodeType cmp_node_displace= {
/* type code */ CMP_NODE_DISPLACE,
/* name */ "Displace",
/* width+range */ 140, 100, 320,
- /* class+opts */ NODE_CLASS_OP_FILTER, NODE_OPTIONS,
+ /* class+opts */ NODE_CLASS_DISTORT, NODE_OPTIONS,
/* input sock */ cmp_node_displace_in,
/* output sock */ cmp_node_displace_out,
/* storage */ "",
@@ -5497,50 +5497,59 @@ static bNodeType cmp_node_displace= {
bNodeType *node_all_composit[]= {
&node_group_typeinfo,
+
+ &cmp_node_rlayers,
+ &cmp_node_image,
+ &cmp_node_texture,
+ &cmp_node_value,
+ &cmp_node_rgb,
+ &cmp_node_time,
+
&cmp_node_composite,
&cmp_node_viewer,
+ &cmp_node_splitviewer,
&cmp_node_output_file,
- &cmp_node_rlayers,
- &cmp_node_image,
+
&cmp_node_curve_rgb,
&cmp_node_mix_rgb,
&cmp_node_hue_sat,
&cmp_node_alphaover,
- &cmp_node_value,
- &cmp_node_rgb,
+ &cmp_node_zcombine,
+
&cmp_node_normal,
&cmp_node_curve_vec,
- &cmp_node_time,
+ &cmp_node_map_value,
+
&cmp_node_filter,
&cmp_node_blur,
&cmp_node_vecblur,
- &cmp_node_map_value,
+ &cmp_node_dilateerode,
+ &cmp_node_defocus,
+
&cmp_node_valtorgb,
- &cmp_node_rgbtobw,
+ &cmp_node_rgbtobw,
+ &cmp_node_setalpha,
+ &cmp_node_idmask,
&cmp_node_seprgba,
- &cmp_node_sephsva,
&cmp_node_combrgba,
- &cmp_node_setalpha,
- &cmp_node_texture,
- &cmp_node_translate,
- &cmp_node_flip,
- &cmp_node_zcombine,
- &cmp_node_dilateerode,
+ &cmp_node_sephsva,
&cmp_node_sepyuva,
&cmp_node_combyuva,
&cmp_node_sepycca,
&cmp_node_combycca,
+
&cmp_node_diff_matte,
- &cmp_node_color_spill,
&cmp_node_chroma,
+ &cmp_node_luma,
+ &cmp_node_color_spill,
+
+ &cmp_node_translate,
&cmp_node_rotate,
&cmp_node_scale,
- &cmp_node_luma,
- &cmp_node_splitviewer,
- &cmp_node_mapuv,
- &cmp_node_idmask,
- &cmp_node_defocus,
+ &cmp_node_flip,
&cmp_node_displace,
+ &cmp_node_mapuv,
+
NULL
};
diff --git a/source/blender/src/header_node.c b/source/blender/src/header_node.c
index f32dbf0e760..2697cb0c39b 100644
--- a/source/blender/src/header_node.c
+++ b/source/blender/src/header_node.c
@@ -374,31 +374,45 @@ static uiBlock *node_add_convertermenu(void *arg_unused)
return block;
}
-static uiBlock *node_add_groupmenu(void *arg_unused)
+static uiBlock *node_add_mattemenu(void *arg_unused)
{
SpaceNode *snode= curarea->spacedata.first;
uiBlock *block;
- block= uiNewBlock(&curarea->uiblocks, "node_add_groupmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
+ block= uiNewBlock(&curarea->uiblocks, "node_add_mattemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
uiBlockSetButmFunc(block, do_node_addmenu, NULL);
- node_make_addmenu(snode, NODE_CLASS_GROUP, block);
+ node_make_addmenu(snode, NODE_CLASS_MATTE, block);
uiBlockSetDirection(block, UI_RIGHT);
uiTextBoundsBlock(block, 60);
return block;
}
-
-static uiBlock *node_add_mattemenu(void *arg_unused)
+static uiBlock *node_add_distortmenu(void *arg_unused)
{
SpaceNode *snode= curarea->spacedata.first;
uiBlock *block;
- block= uiNewBlock(&curarea->uiblocks, "node_add_mattemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
+ block= uiNewBlock(&curarea->uiblocks, "node_add_distortmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
uiBlockSetButmFunc(block, do_node_addmenu, NULL);
- node_make_addmenu(snode, NODE_CLASS_MATTE, block);
+ node_make_addmenu(snode, NODE_CLASS_DISTORT, block);
+
+ uiBlockSetDirection(block, UI_RIGHT);
+ uiTextBoundsBlock(block, 60);
+
+ return block;
+}
+static uiBlock *node_add_groupmenu(void *arg_unused)
+{
+ SpaceNode *snode= curarea->spacedata.first;
+ uiBlock *block;
+
+ block= uiNewBlock(&curarea->uiblocks, "node_add_groupmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
+ uiBlockSetButmFunc(block, do_node_addmenu, NULL);
+
+ node_make_addmenu(snode, NODE_CLASS_GROUP, block);
uiBlockSetDirection(block, UI_RIGHT);
uiTextBoundsBlock(block, 60);
@@ -431,8 +445,10 @@ static uiBlock *node_addmenu(void *arg_unused)
uiDefIconTextBlockBut(block, node_add_vectormenu, NULL, ICON_RIGHTARROW_THIN, "Vector", 0, yco-=20, 120, 19, "");
uiDefIconTextBlockBut(block, node_add_filtermenu, NULL, ICON_RIGHTARROW_THIN, "Filter", 0, yco-=20, 120, 19, "");
uiDefIconTextBlockBut(block, node_add_convertermenu, NULL, ICON_RIGHTARROW_THIN, "Convertor", 0, yco-=20, 120, 19, "");
+ uiDefIconTextBlockBut(block, node_add_mattemenu, NULL, ICON_RIGHTARROW_THIN, "Matte", 0, yco-=20, 120, 19, "");
+ uiDefIconTextBlockBut(block, node_add_distortmenu, NULL, ICON_RIGHTARROW_THIN, "Distort", 0, yco-=20, 120, 19, "");
uiDefIconTextBlockBut(block, node_add_groupmenu, NULL, ICON_RIGHTARROW_THIN, "Group", 0, yco-=20, 120, 19, "");
- uiDefIconTextBlockBut(block, node_add_mattemenu, NULL, ICON_RIGHTARROW_THIN, "Mattes", 0, yco-=20, 120, 19, "");
+
} else
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c
index c9fced04a00..7d77ad755d5 100644
--- a/source/blender/src/toolbox.c
+++ b/source/blender/src/toolbox.c
@@ -1534,8 +1534,8 @@ static TBitem tb_node_addsh[]= {
{ 0, "Output", 2, NULL},
{ 0, "Color", 3, NULL},
{ 0, "Vector", 4, NULL},
- { 0, "Convertors", 5, NULL},
- { 0, "Groups", 6, NULL},
+ { 0, "Convertor", 5, NULL},
+ { 0, "Group", 6, NULL},
{ -1, "", 0, NULL}};
static TBitem tb_node_addcomp[]= {
@@ -1543,10 +1543,11 @@ static TBitem tb_node_addcomp[]= {
{ 0, "Output", 2, NULL},
{ 0, "Color", 3, NULL},
{ 0, "Vector", 4, NULL},
- { 0, "Filters", 5, NULL},
- { 0, "Convertors", 6, NULL},
- { 0, "Groups", 7, NULL},
- { 0, "Mattes", 8, NULL},
+ { 0, "Filter", 5, NULL},
+ { 0, "Convertor", 6, NULL},
+ { 0, "Matte", 7, NULL},
+ { 0, "Distort", 8, NULL},
+ { 0, "Group", 9, NULL},
{ -1, "", 0, NULL}};
/* do_node_addmenu() in header_node.c, prototype in BSE_headerbuttons.h */
@@ -1554,7 +1555,7 @@ static TBitem tb_node_addcomp[]= {
/* dynamic toolbox sublevel */
static TBitem *node_add_sublevel(ListBase *storage, bNodeTree *ntree, int nodeclass)
{
- static TBitem _addmenu[]= { { 0, "Empty", 0, NULL}, { -1, "", 0, NULL}};
+ static TBitem _addmenu[]= { { 0, " ", 0, NULL}, { -1, "", 0, NULL}};
Link *link;
bNodeType **typedefs;
TBitem *addmenu;
@@ -2038,8 +2039,10 @@ void toolbox_n(void)
menu1[3].poin= node_add_sublevel(&storage, snode->nodetree, NODE_CLASS_OP_VECTOR);
menu1[4].poin= node_add_sublevel(&storage, snode->nodetree, NODE_CLASS_OP_FILTER);
menu1[5].poin= node_add_sublevel(&storage, snode->nodetree, NODE_CLASS_CONVERTOR);
- menu1[6].poin= node_add_sublevel(&storage, snode->nodetree, NODE_CLASS_GROUP);
- menu1[7].poin= node_add_sublevel(&storage, snode->nodetree, NODE_CLASS_MATTE);
+ menu1[6].poin= node_add_sublevel(&storage, snode->nodetree, NODE_CLASS_MATTE);
+ menu1[7].poin= node_add_sublevel(&storage, snode->nodetree, NODE_CLASS_DISTORT);
+ menu1[8].poin= node_add_sublevel(&storage, snode->nodetree, NODE_CLASS_GROUP);
+
}
dx= 96;