diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 307a30127f8..7392d6fc8fc 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1924,6 +1924,9 @@ static void registerShaderNodes(ListBase *ntypelist) register_node_type_sh_tex_marble(ntypelist); register_node_type_sh_tex_clouds(ntypelist); register_node_type_sh_tex_wood(ntypelist); + register_node_type_sh_tex_stucci(ntypelist); + register_node_type_sh_tex_noise(ntypelist); + register_node_type_sh_tex_distnoise(ntypelist); register_node_type_sh_tex_musgrave(ntypelist); } diff --git a/source/blender/editors/interface/interface_node.c b/source/blender/editors/interface/interface_node.c index 6c17a1d92ba..80473025c7d 100644 --- a/source/blender/editors/interface/interface_node.c +++ b/source/blender/editors/interface/interface_node.c @@ -344,7 +344,7 @@ static void ui_node_menu_column(Main *bmain, NodeLinkArg *arg, uiLayout *layout, char name[UI_MAX_NAME_STR]; int i, j, num = 0; - if(!(ntype->compatibility & compatibility)) + if(compatibility && !(ntype->compatibility & compatibility)) continue; if(ntype->nclass != nclass) @@ -403,12 +403,14 @@ static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_ uiLayout *split, *column; NodeLinkArg *arg = (NodeLinkArg*)but->func_argN; bNodeSocket *sock = arg->sock; - int compatibility; + int compatibility= 0; - if(scene_use_new_shading_nodes(scene)) - compatibility= NODE_NEW_SHADING; - else - compatibility= NODE_OLD_SHADING; + if(arg->ntree->type == NTREE_SHADER) { + if(scene_use_new_shading_nodes(scene)) + compatibility= NODE_NEW_SHADING; + else + compatibility= NODE_OLD_SHADING; + } uiBlockSetCurLayout(block, layout); split= uiLayoutSplit(layout, 0, 0); diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c index 56a16793ece..82b78840d0f 100644 --- a/source/blender/editors/space_node/node_header.c +++ b/source/blender/editors/space_node/node_header.c @@ -175,7 +175,7 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass) SpaceNode *snode= CTX_wm_space_node(C); bNodeTree *ntree; int nodeclass= GET_INT_FROM_POINTER(arg_nodeclass); - int event, compatibility; + int event, compatibility= 0; ntree = snode->nodetree; @@ -184,10 +184,12 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass) return; } - if(scene_use_new_shading_nodes(scene)) - compatibility= NODE_NEW_SHADING; - else - compatibility= NODE_OLD_SHADING; + if(ntree->type == NTREE_SHADER) { + if(scene_use_new_shading_nodes(scene)) + compatibility= NODE_NEW_SHADING; + else + compatibility= NODE_OLD_SHADING; + } if (nodeclass==NODE_CLASS_GROUP) { bNodeTree *ngroup; @@ -219,8 +221,9 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass) uiLayoutSetFunc(layout, do_node_add_static, NULL); for (ntype=ntreeGetType(ntree->type)->node_types.first; ntype; ntype=ntype->next) { - if(ntype->nclass==nodeclass && ntype->name && (ntype->compatibility&compatibility)) - uiItemV(layout, ntype->name, 0, ntype->type); + if (ntype->nclass==nodeclass && ntype->name) + if (!compatibility || (ntype->compatibility & compatibility)) + uiItemV(layout, ntype->name, 0, ntype->type); } } } diff --git a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c index cc31d301894..4b276f0f214 100644 --- a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c +++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c @@ -119,7 +119,7 @@ void register_node_type_sh_rgbtobw(ListBase *lb) static bNodeType ntype; node_type_base(&ntype, SH_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0); - node_type_compatibility(&ntype, NODE_OLD_SHADING); + node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING); node_type_socket_templates(&ntype, sh_node_rgbtobw_in, sh_node_rgbtobw_out); node_type_size(&ntype, 80, 40, 120); node_type_exec(&ntype, node_shader_exec_rgbtobw);