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')
-rw-r--r--source/blender/editors/interface/interface_node.c10
-rw-r--r--source/blender/editors/space_node/node_draw.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c12
-rw-r--r--source/blender/editors/space_node/node_header.c6
4 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/editors/interface/interface_node.c b/source/blender/editors/interface/interface_node.c
index 5a1b4c0a8b8..39d3755af51 100644
--- a/source/blender/editors/interface/interface_node.c
+++ b/source/blender/editors/interface/interface_node.c
@@ -149,7 +149,7 @@ static void ui_node_sock_name(bNodeSocket *sock, char name[UI_MAX_NAME_STR])
!(node->typeinfo->flag & NODE_OPTIONS))
BLI_snprintf(name, UI_MAX_NAME_STR, "%s | %s", name, sock->link->fromsock->name);
}
- else if(sock->type == SOCK_CLOSURE)
+ else if(sock->type == SOCK_SHADER)
BLI_strncpy(name, "None", UI_MAX_NAME_STR);
else
BLI_strncpy(name, "Default", UI_MAX_NAME_STR);
@@ -252,7 +252,7 @@ static void ui_node_link(bContext *C, void *arg_p, void *event_p)
static int ui_compatible_sockets(int typeA, int typeB)
{
- if(typeA == SOCK_CLOSURE || typeB == SOCK_CLOSURE)
+ if(typeA == SOCK_SHADER || typeB == SOCK_SHADER)
return (typeA == typeB);
return (typeA == typeB);
@@ -396,7 +396,7 @@ static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_
ui_node_menu_column(bmain, arg, split, "Input", NODE_CLASS_INPUT);
ui_node_menu_column(bmain, arg, split, "Output", NODE_CLASS_OUTPUT);
- ui_node_menu_column(bmain, arg, split, "Closure", NODE_CLASS_CLOSURE);
+ ui_node_menu_column(bmain, arg, split, "Shader", NODE_CLASS_SHADER);
ui_node_menu_column(bmain, arg, split, "Texture", NODE_CLASS_TEXTURE);
ui_node_menu_column(bmain, arg, split, "Color", NODE_CLASS_OP_COLOR);
ui_node_menu_column(bmain, arg, split, "Vector", NODE_CLASS_OP_VECTOR);
@@ -438,7 +438,7 @@ void uiTemplateNodeLink(uiLayout *layout, bNodeTree *ntree, bNode *node, bNodeSo
uiBlockSetCurLayout(block, layout);
- if(sock->link || sock->type == SOCK_CLOSURE || (stype && (stype->flag & SOCK_NO_VALUE))) {
+ if(sock->link || sock->type == SOCK_SHADER || (stype && (stype->flag & SOCK_NO_VALUE))) {
char name[UI_MAX_NAME_STR];
ui_node_sock_name(sock, name);
but= uiDefMenuBut(block, ui_template_node_link_menu, NULL, name, 0, 0, UI_UNIT_X*4, UI_UNIT_Y, "");
@@ -543,7 +543,7 @@ static void ui_node_draw_input(uiLayout *layout, bContext *C, bNodeTree *ntree,
bNodeSocketType *stype = ui_node_input_socket_type(node, input);
/* input not linked, show value */
- if(input->type != SOCK_CLOSURE && (!stype || !(stype->flag & SOCK_NO_VALUE))) {
+ if(input->type != SOCK_SHADER && (!stype || !(stype->flag & SOCK_NO_VALUE))) {
if(input->type == SOCK_VECTOR) {
row = uiLayoutRow(split, 0);
col = uiLayoutColumn(row, 0);
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index faec823a314..8f243cc659f 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -882,7 +882,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
socket_circle_draw(sock, socket_size);
if(node->block && sock->link==NULL) {
- if((stype && stype->flag & SOCK_NO_VALUE) || sock->type==SOCK_CLOSURE) {
+ if((stype && stype->flag & SOCK_NO_VALUE) || sock->type==SOCK_SHADER) {
uiDefBut(node->block, LABEL, 0, sock->name, (short)(sock->locx+7), (short)(sock->locy-9.0f),
(short)(node->width-NODE_DY), NODE_DY, NULL, 0, 0, 0, 0, "");
}
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 5b19a3b1509..ca59a9ed6a9 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -274,7 +274,7 @@ void ED_node_shader_default(ID *id)
bNode *in, *out;
bNodeSocket *fromsock, *tosock;
bNodeTree *ntree;
- int output_type, closure_type;
+ int output_type, shader_type;
ntree= ntreeAddTree("Shader Nodetree", NTREE_SHADER, FALSE);
@@ -282,22 +282,22 @@ void ED_node_shader_default(ID *id)
case ID_MA:
((Material*)id)->nodetree = ntree;
output_type = SH_NODE_OUTPUT_MATERIAL;
- closure_type = SH_NODE_BSDF_DIFFUSE;
+ shader_type = SH_NODE_BSDF_DIFFUSE;
break;
case ID_WO:
((World*)id)->nodetree = ntree;
output_type = SH_NODE_OUTPUT_WORLD;
- closure_type = SH_NODE_BACKGROUND;
+ shader_type = SH_NODE_BACKGROUND;
break;
case ID_LA:
((Lamp*)id)->nodetree = ntree;
output_type = SH_NODE_OUTPUT_LAMP;
- closure_type = SH_NODE_EMISSION;
+ shader_type = SH_NODE_EMISSION;
break;
case ID_TE:
((Tex*)id)->nodetree = ntree;
output_type = SH_NODE_OUTPUT_TEXTURE;
- closure_type = SH_NODE_TEX_CLOUDS;
+ shader_type = SH_NODE_TEX_CLOUDS;
break;
default:
printf("ED_node_shader_default called on wrong ID type.\n");
@@ -307,7 +307,7 @@ void ED_node_shader_default(ID *id)
out= nodeAddNodeType(ntree, output_type, NULL, NULL);
out->locx= 300.0f; out->locy= 300.0f;
- in= nodeAddNodeType(ntree, closure_type, NULL, NULL);
+ in= nodeAddNodeType(ntree, shader_type, NULL, NULL);
in->locx= 10.0f; in->locy= 300.0f;
nodeSetActive(ntree, in);
diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c
index e31710863d5..63eab2349b2 100644
--- a/source/blender/editors/space_node/node_header.c
+++ b/source/blender/editors/space_node/node_header.c
@@ -186,13 +186,13 @@ static void node_menu_add(const bContext *C, Menu *menu)
uiItemMenuF(layout, "Input", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
uiItemMenuF(layout, "Output", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
if(scene_use_new_shading_system(scene))
- uiItemMenuF(layout, "Closure", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CLOSURE));
+ uiItemMenuF(layout, "Shader", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_SHADER));
+ if(scene_use_new_shading_system(scene))
+ uiItemMenuF(layout, "Texture", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_TEXTURE));
uiItemMenuF(layout, "Color", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
uiItemMenuF(layout, "Vector", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
uiItemMenuF(layout, "Convertor", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
uiItemMenuF(layout, "Group", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
- if(scene_use_new_shading_system(scene))
- uiItemMenuF(layout, "Texture", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_TEXTURE));
//uiItemMenuF(layout, "Dynamic", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_DYNAMIC));
}
else if(snode->treetype==NTREE_COMPOSIT) {