Cycles: tag shading nodes as being compatible with the old/new shading system,
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 12 Oct 2011 15:54:53 +0000 (15:54 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 12 Oct 2011 15:54:53 +0000 (15:54 +0000)
so they only appear in the list when needed. Old shading nodes were previously
disabled entirely, breaking internal renderer compatibility.

62 files changed:
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/intern/node.c
source/blender/editors/space_node/node_header.c
source/blender/nodes/NOD_shader.h
source/blender/nodes/intern/node_common.c
source/blender/nodes/shader/nodes/node_shader_add_shader.c
source/blender/nodes/shader/nodes/node_shader_attribute.c
source/blender/nodes/shader/nodes/node_shader_background.c
source/blender/nodes/shader/nodes/node_shader_blend_weight.c
source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c
source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.c
source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c
source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c
source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.c
source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.c
source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.c
source/blender/nodes/shader/nodes/node_shader_camera.c
source/blender/nodes/shader/nodes/node_shader_common.c
source/blender/nodes/shader/nodes/node_shader_curves.c
source/blender/nodes/shader/nodes/node_shader_dynamic.c
source/blender/nodes/shader/nodes/node_shader_emission.c
source/blender/nodes/shader/nodes/node_shader_fresnel.c
source/blender/nodes/shader/nodes/node_shader_geom.c
source/blender/nodes/shader/nodes/node_shader_geometry.c
source/blender/nodes/shader/nodes/node_shader_holdout.c
source/blender/nodes/shader/nodes/node_shader_hueSatVal.c
source/blender/nodes/shader/nodes/node_shader_invert.c
source/blender/nodes/shader/nodes/node_shader_light_path.c
source/blender/nodes/shader/nodes/node_shader_mapping.c
source/blender/nodes/shader/nodes/node_shader_material.c
source/blender/nodes/shader/nodes/node_shader_math.c
source/blender/nodes/shader/nodes/node_shader_mixRgb.c
source/blender/nodes/shader/nodes/node_shader_mix_shader.c
source/blender/nodes/shader/nodes/node_shader_normal.c
source/blender/nodes/shader/nodes/node_shader_output.c
source/blender/nodes/shader/nodes/node_shader_output_lamp.c
source/blender/nodes/shader/nodes/node_shader_output_material.c
source/blender/nodes/shader/nodes/node_shader_output_texture.c
source/blender/nodes/shader/nodes/node_shader_output_world.c
source/blender/nodes/shader/nodes/node_shader_rgb.c
source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c
source/blender/nodes/shader/nodes/node_shader_squeeze.c
source/blender/nodes/shader/nodes/node_shader_tex_blend.c
source/blender/nodes/shader/nodes/node_shader_tex_clouds.c
source/blender/nodes/shader/nodes/node_shader_tex_coord.c
source/blender/nodes/shader/nodes/node_shader_tex_distnoise.c
source/blender/nodes/shader/nodes/node_shader_tex_environment.c
source/blender/nodes/shader/nodes/node_shader_tex_image.c
source/blender/nodes/shader/nodes/node_shader_tex_magic.c
source/blender/nodes/shader/nodes/node_shader_tex_marble.c
source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c
source/blender/nodes/shader/nodes/node_shader_tex_noise.c
source/blender/nodes/shader/nodes/node_shader_tex_sky.c
source/blender/nodes/shader/nodes/node_shader_tex_stucci.c
source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c
source/blender/nodes/shader/nodes/node_shader_tex_wood.c
source/blender/nodes/shader/nodes/node_shader_texture.c
source/blender/nodes/shader/nodes/node_shader_valToRgb.c
source/blender/nodes/shader/nodes/node_shader_value.c
source/blender/nodes/shader/nodes/node_shader_vectMath.c
source/blender/nodes/shader/nodes/node_shader_volume_isotropic.c
source/blender/nodes/shader/nodes/node_shader_volume_transparent.c

index 92968f23396927a13b3bbd8e7d985cc6824232bd..b25bfd4975d115003743422f68a5f81e6c24a11e 100644 (file)
@@ -133,7 +133,7 @@ typedef struct bNodeType {
        char name[32];
        float width, minwidth, maxwidth;
        float height, minheight, maxheight;
-       short nclass, flag;
+       short nclass, flag, compatibility;
        
        /* templates for static sockets */
        bNodeSocketTemplate *inputs, *outputs;
@@ -236,6 +236,10 @@ typedef struct bNodeType {
 #define NODE_CLASS_SHADER                      40
 #define NODE_CLASS_LAYOUT                      100
 
+/* nodetype->compatibility */
+#define NODE_OLD_SHADING       1
+#define NODE_NEW_SHADING       2
+
 /* enum values for input/output */
 #define SOCK_IN                1
 #define SOCK_OUT       2
@@ -394,6 +398,7 @@ void                        node_type_exec_new(struct bNodeType *ntype,
                                                                   void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata, struct bNodeStack **, struct bNodeStack **));
 void                   node_type_gpu(struct bNodeType *ntype, int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out));
 void                   node_type_gpu_ext(struct bNodeType *ntype, int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node, void *nodedata, struct GPUNodeStack *in, struct GPUNodeStack *out));
+void                   node_type_compatibility(struct bNodeType *ntype, short compatibility);
 
 /* ************** COMMON NODES *************** */
 
index d7744852c2540e7986f4879638dc31e6cb8525ec..307a30127f8716020e81237137931d37bf014886 100644 (file)
@@ -1752,6 +1752,10 @@ void node_type_gpu_ext(struct bNodeType *ntype, int (*gpuextfunc)(struct GPUMate
        ntype->gpuextfunc = gpuextfunc;
 }
 
+void node_type_compatibility(struct bNodeType *ntype, short compatibility)
+{
+       ntype->compatibility = compatibility;
+}
 
 static bNodeType *is_nodetype_registered(ListBase *typelist, int type) 
 {
@@ -1856,20 +1860,33 @@ static void registerShaderNodes(ListBase *ntypelist)
 {
        register_node_type_frame(ntypelist);
 
+       register_node_type_sh_group(ntypelist);
+       //register_node_type_sh_forloop(ntypelist);
+       //register_node_type_sh_whileloop(ntypelist);
+
+       register_node_type_sh_output(ntypelist);
+       register_node_type_sh_material(ntypelist);
+       register_node_type_sh_camera(ntypelist);
        register_node_type_sh_value(ntypelist);
        register_node_type_sh_rgb(ntypelist);
-       register_node_type_sh_math(ntypelist);
-       register_node_type_sh_vect_math(ntypelist);
-       
-       register_node_type_sh_group(ntypelist);
-//     register_node_type_sh_forloop(ntypelist);
-//     register_node_type_sh_whileloop(ntypelist);
-       
-       //register_node_type_sh_output(ntypelist);
        register_node_type_sh_mix_rgb(ntypelist);
+       register_node_type_sh_valtorgb(ntypelist);
        register_node_type_sh_rgbtobw(ntypelist);
+       register_node_type_sh_texture(ntypelist);
+       register_node_type_sh_normal(ntypelist);
+       register_node_type_sh_geom(ntypelist);
        register_node_type_sh_mapping(ntypelist);
-       //register_node_type_sh_texture(ntypelist);
+       register_node_type_sh_curve_vec(ntypelist);
+       register_node_type_sh_curve_rgb(ntypelist);
+       register_node_type_sh_math(ntypelist);
+       register_node_type_sh_vect_math(ntypelist);
+       register_node_type_sh_squeeze(ntypelist);
+       //register_node_type_sh_dynamic(ntypelist);
+       register_node_type_sh_material_ext(ntypelist);
+       register_node_type_sh_invert(ntypelist);
+       register_node_type_sh_seprgb(ntypelist);
+       register_node_type_sh_combrgb(ntypelist);
+       register_node_type_sh_hue_sat(ntypelist);
 
        register_node_type_sh_attribute(ntypelist);
        register_node_type_sh_geometry(ntypelist);
@@ -1880,15 +1897,16 @@ static void registerShaderNodes(ListBase *ntypelist)
 
        register_node_type_sh_background(ntypelist);
        register_node_type_sh_bsdf_diffuse(ntypelist);
-       register_node_type_sh_bsdf_glass(ntypelist);
        register_node_type_sh_bsdf_glossy(ntypelist);
+       register_node_type_sh_bsdf_glass(ntypelist);
+       //register_node_type_sh_bsdf_anisotropic(ntypelist);
        register_node_type_sh_bsdf_translucent(ntypelist);
        register_node_type_sh_bsdf_transparent(ntypelist);
        register_node_type_sh_bsdf_velvet(ntypelist);
        register_node_type_sh_emission(ntypelist);
+       register_node_type_sh_holdout(ntypelist);
        register_node_type_sh_volume_transparent(ntypelist);
        register_node_type_sh_volume_isotropic(ntypelist);
-       register_node_type_sh_holdout(ntypelist);
        register_node_type_sh_mix_shader(ntypelist);
        register_node_type_sh_add_shader(ntypelist);
 
@@ -1897,19 +1915,16 @@ static void registerShaderNodes(ListBase *ntypelist)
        //register_node_type_sh_output_texture(ntypelist);
        register_node_type_sh_output_world(ntypelist);
 
-       register_node_type_sh_tex_blend(ntypelist);
-       register_node_type_sh_tex_clouds(ntypelist);
-       register_node_type_sh_tex_distnoise(ntypelist);
        register_node_type_sh_tex_image(ntypelist);
        register_node_type_sh_tex_environment(ntypelist);
-       register_node_type_sh_tex_magic(ntypelist);
-       register_node_type_sh_tex_marble(ntypelist);
-       register_node_type_sh_tex_musgrave(ntypelist);
-       register_node_type_sh_tex_noise(ntypelist);
        register_node_type_sh_tex_sky(ntypelist);
-       register_node_type_sh_tex_stucci(ntypelist);
        register_node_type_sh_tex_voronoi(ntypelist);
+       register_node_type_sh_tex_blend(ntypelist);
+       register_node_type_sh_tex_magic(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_musgrave(ntypelist);
 }
 
 static void registerTextureNodes(ListBase *ntypelist)
index d5d7929faa3b24057e503fc619deb1c30b64189d..56a16793ecee548ceea6067d3f04ab65d05ce857 100644 (file)
@@ -171,10 +171,11 @@ static int node_tree_has_type(int treetype, int nodetype)
 static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
 {
        Main *bmain= CTX_data_main(C);
+       Scene *scene= CTX_data_scene(C);
        SpaceNode *snode= CTX_wm_space_node(C);
        bNodeTree *ntree;
        int nodeclass= GET_INT_FROM_POINTER(arg_nodeclass);
-       int event;
+       int event, compatibility;
        
        ntree = snode->nodetree;
        
@@ -182,6 +183,11 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
                uiItemS(layout);
                return;
        }
+
+       if(scene_use_new_shading_nodes(scene))
+               compatibility= NODE_NEW_SHADING;
+       else
+               compatibility= NODE_OLD_SHADING;
        
        if (nodeclass==NODE_CLASS_GROUP) {
                bNodeTree *ngroup;
@@ -213,7 +219,7 @@ 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)
+                       if(ntype->nclass==nodeclass && ntype->name && (ntype->compatibility&compatibility))
                                uiItemV(layout, ntype->name, 0, ntype->type);
                }
        }
index d504b6d757bbc3f4bd634dadb4660474fd0f53f9..f013a76bf036940abd3bbffd26e22aed5fc6bcbd 100644 (file)
@@ -49,14 +49,29 @@ void register_node_type_sh_group(ListBase *lb);
 void register_node_type_sh_forloop(ListBase *lb);
 void register_node_type_sh_whileloop(ListBase *lb);
 
+void register_node_type_sh_output(ListBase *lb);
+void register_node_type_sh_material(ListBase *lb);
+void register_node_type_sh_camera(ListBase *lb);
 void register_node_type_sh_value(ListBase *lb);
 void register_node_type_sh_rgb(ListBase *lb);
-void register_node_type_sh_math(ListBase *lb);
-void register_node_type_sh_vect_math(ListBase *lb);
 void register_node_type_sh_mix_rgb(ListBase *lb);
+void register_node_type_sh_valtorgb(ListBase *lb);
 void register_node_type_sh_rgbtobw(ListBase *lb);
-void register_node_type_sh_mapping(ListBase *lb);
 void register_node_type_sh_texture(ListBase *lb);
+void register_node_type_sh_normal(ListBase *lb);
+void register_node_type_sh_geom(ListBase *lb);
+void register_node_type_sh_mapping(ListBase *lb);
+void register_node_type_sh_curve_vec(ListBase *lb);
+void register_node_type_sh_curve_rgb(ListBase *lb);
+void register_node_type_sh_math(ListBase *lb);
+void register_node_type_sh_vect_math(ListBase *lb);
+void register_node_type_sh_squeeze(ListBase *lb);
+void register_node_type_sh_dynamic(ListBase *lb);
+void register_node_type_sh_material_ext(ListBase *lb);
+void register_node_type_sh_invert(ListBase *lb);
+void register_node_type_sh_seprgb(ListBase *lb);
+void register_node_type_sh_combrgb(ListBase *lb);
+void register_node_type_sh_hue_sat(ListBase *lb);
 
 void register_node_type_sh_attribute(ListBase *lb);
 void register_node_type_sh_geometry(ListBase *lb);
index fa5a3c727c2df6b10b15879de01edbb81dd537ad..b4f2bf31515f5c61b38d9bf185ca613ac9d2acfb 100644 (file)
@@ -977,6 +977,7 @@ void register_node_type_frame(ListBase *lb)
 
        node_type_base(ntype, NODE_FRAME, "Frame", NODE_CLASS_LAYOUT, NODE_BACKGROUND);
        node_type_size(ntype, 150, 100, 0);
+       node_type_compatibility(ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
        
        ntype->needs_free = 1;
        nodeRegisterType(lb, ntype);
index 9bce5c94343b3349e40a746a2382724cb1998312..1cee889d601e91d7b82d051370088217ca544b2b 100644 (file)
@@ -57,6 +57,7 @@ void register_node_type_sh_add_shader(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_ADD_SHADER, "Add Shader", NODE_CLASS_SHADER, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_add_shader_in, sh_node_add_shader_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index 569a75ee79c1de3eb4cc8be088166ed7bb6a6ac1..131cfc3d285de4e9b072b1c53e7041507f62bfa9 100644 (file)
@@ -47,6 +47,7 @@ void register_node_type_sh_attribute(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_ATTRIBUTE, "Attribute", NODE_CLASS_INPUT, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, NULL, sh_node_attribute_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index fab2310f4f68d0268b97e0b4962f706f97b56d4e..55f77e66af96311bc14a25218b6a83d43d5ceec4 100644 (file)
@@ -53,6 +53,7 @@ void register_node_type_sh_background(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_BACKGROUND, "Background", NODE_CLASS_SHADER, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_background_in, sh_node_background_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index 1affc276c188b76ebd56b89466456cfa5d7aab4c..f214f765abf155bb352b737ff3d545430f3a5e28 100644 (file)
@@ -56,6 +56,7 @@ void register_node_type_sh_blend_weight(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_BLEND_WEIGHT, "Blend Weight", NODE_CLASS_INPUT, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_blend_weight_in, sh_node_blend_weight_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index 8ee6be6e624994fc8d081a81767deed96a89b8ae..ef590dd736185e5172d905df4539157374bb31a1 100644 (file)
@@ -58,6 +58,7 @@ void register_node_type_sh_bsdf_anisotropic(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_BSDF_ANISOTROPIC, "Glossy Anisotropic BSDF", NODE_CLASS_SHADER, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_bsdf_anisotropic_in, sh_node_bsdf_anisotropic_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index 33f9ab8f4691d56c527256af8d281bbfcee132e1..47f53ae4aa1524777e2cc9407268b6c586e0f0f3 100644 (file)
@@ -56,6 +56,7 @@ void register_node_type_sh_bsdf_diffuse(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_BSDF_DIFFUSE, "Diffuse BSDF", NODE_CLASS_SHADER, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_bsdf_diffuse_in, sh_node_bsdf_diffuse_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index c7a3de44fb25aa11643701f73f639bebf150c733..b8237e0e2769ff2c8587302f0c06d2ec304cd7bf 100644 (file)
@@ -58,6 +58,7 @@ void register_node_type_sh_bsdf_glass(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_BSDF_GLASS, "Glass BSDF", NODE_CLASS_SHADER, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_bsdf_glass_in, sh_node_bsdf_glass_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index 879ef0d8ae8d75d5f611143969648000d02b7eb5..c8f9acfa206829bf50f744e230384a589e04b7ce 100644 (file)
@@ -58,6 +58,7 @@ void register_node_type_sh_bsdf_glossy(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_BSDF_GLOSSY, "Glossy BSDF", NODE_CLASS_SHADER, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_bsdf_glossy_in, sh_node_bsdf_glossy_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index 6f02f281cff775c80df774614b9d9ab3a335feaf..4ea41b379a149fe8c7091ff5e6ca395d302718c8 100644 (file)
@@ -56,6 +56,7 @@ void register_node_type_sh_bsdf_translucent(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_BSDF_TRANSLUCENT, "Translucent BSDF", NODE_CLASS_SHADER, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_bsdf_translucent_in, sh_node_bsdf_translucent_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index 49e131b289e21df6c0fd9efa5c38354ce2b74e2d..fceb54a33699dd4ddf97aa6459d1ae56c59a85b2 100644 (file)
@@ -56,6 +56,7 @@ void register_node_type_sh_bsdf_transparent(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_BSDF_TRANSPARENT, "Transparent BSDF", NODE_CLASS_SHADER, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_bsdf_transparent_in, sh_node_bsdf_transparent_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index 49c783d046e257e03195880079a22c8e7c8809b1..cc7eb626655eed09f08745d74da5cc0bba346ca6 100644 (file)
@@ -57,6 +57,7 @@ void register_node_type_sh_bsdf_velvet(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_BSDF_VELVET, "Velvet BSDF", NODE_CLASS_SHADER, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_bsdf_velvet_in, sh_node_bsdf_velvet_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index c1e737fcb53963933471f1679c9a73b57d42f2d1..2e13cad65b6434081a7ee6f6200f4ec91d690fd0 100644 (file)
@@ -64,6 +64,7 @@ void register_node_type_sh_camera(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_CAMERA, "Camera Data", NODE_CLASS_INPUT, 0);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, NULL, sh_node_camera_out);
        node_type_size(&ntype, 95, 95, 120);
        node_type_storage(&ntype, "node_camera", NULL, NULL);
index ef40e3ce4d292fc156dd2d9bbf813ade28e4e43a..548ed91337b2f0451f219c049cd7618ae53ad306 100644 (file)
@@ -176,7 +176,7 @@ static int gpu_group_execute(GPUMaterial *mat, bNode *node, void *nodedata, GPUN
        bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
        
        group_gpu_copy_inputs(node, in, exec->stack);
-       ntreeExecGPUNodes(exec, NULL, mat, (node->flag & NODE_GROUP_EDIT));
+       ntreeExecGPUNodes(exec, mat, (node->flag & NODE_GROUP_EDIT));
        group_gpu_move_outputs(node, out, exec->stack);
        
        return 1;
@@ -187,6 +187,7 @@ void register_node_type_sh_group(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS|NODE_CONST_OUTPUT);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING|NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, NULL, NULL);
        node_type_size(&ntype, 120, 60, 200);
        node_type_label(&ntype, node_group_label);
@@ -249,6 +250,7 @@ void register_node_type_sh_forloop(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, NULL, NULL);
        node_type_size(&ntype, 120, 60, 200);
        node_type_label(&ntype, node_group_label);
@@ -311,6 +313,7 @@ void register_node_type_sh_whileloop(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, NULL, NULL);
        node_type_size(&ntype, 120, 60, 200);
        node_type_label(&ntype, node_group_label);
index 9dedeba6d398a4a30db5edb828730c4b4ce53f9a..3af065aa65ed739d3cd97ff681fd83775bafa058 100644 (file)
@@ -76,6 +76,7 @@ void register_node_type_sh_curve_vec(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, sh_node_curve_vec_in, sh_node_curve_vec_out);
        node_type_size(&ntype, 200, 140, 320);
        node_type_init(&ntype, node_shader_init_curve_vec);
@@ -130,6 +131,7 @@ void register_node_type_sh_curve_rgb(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, sh_node_curve_rgb_in, sh_node_curve_rgb_out);
        node_type_size(&ntype, 200, 140, 320);
        node_type_init(&ntype, node_shader_init_curve_rgb);
index 5aae54d858bd8d054f4426bbc8812b2021972ae5..c9ba47f07a3637d993042308e39c5dbc08992a8f 100644 (file)
@@ -768,6 +768,7 @@ void register_node_type_sh_dynamic(ListBase *lb)
        static bNodeType ntype;
        
        node_type_base(&ntype, NODE_DYNAMIC, "Dynamic", NODE_CLASS_OP_DYNAMIC, NODE_OPTIONS, NULL, NULL);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_size(&ntype, 150, 60, 300);
        node_type_init(&ntype, node_dynamic_init_cb);
        node_type_storage(&ntype, "NodeScriptDict", node_dynamic_free_storage_cb, node_dynamic_copy_cb);
@@ -783,6 +784,7 @@ void register_node_type_sh_dynamic(ListBase *lb)
        static bNodeType ntype;
        
        node_type_base(&ntype, NODE_DYNAMIC, "Dynamic", NODE_CLASS_OP_DYNAMIC, 0);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        
        nodeRegisterType(lb, &ntype);
 }
index d57c5b672a55915d57a8b7c5df15bfac3cded97a..32e17d772d7aa9c2af4d31d49d6f2d40b6894ad2 100644 (file)
@@ -57,6 +57,7 @@ void register_node_type_sh_emission(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_EMISSION, "Emission", NODE_CLASS_SHADER, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_emission_in, sh_node_emission_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index c918d8464e615af57f26faa84dcfc95cdb7a0d77..e93eac06ecaaaa430ff733f52adbbbc178f0b29b 100644 (file)
@@ -56,6 +56,7 @@ void register_node_type_sh_fresnel(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_FRESNEL, "Fresnel", NODE_CLASS_INPUT, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_fresnel_in, sh_node_fresnel_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index 9ea12ada484646fa328cf3587bb337911ff97591..4269469b27de849bcd493d53dc0d93af7925cf48 100644 (file)
@@ -141,6 +141,7 @@ void register_node_type_sh_geom(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_GEOM, "Geometry", NODE_CLASS_INPUT, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, NULL, sh_node_geom_out);
        node_type_size(&ntype, 120, 80, 160);
        node_type_init(&ntype, node_shader_init_geometry);
index 73ec0b2e5d62b32456747a81d0f25489f2250f5a..f077d700a7408c30c81027a9fab9e1f26c3fdb77 100644 (file)
@@ -59,6 +59,7 @@ void register_node_type_sh_geometry(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_GEOMETRY, "Geometry", NODE_CLASS_INPUT, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, NULL, sh_node_geometry_out);
        node_type_size(&ntype, 120, 60, 200);
        node_type_init(&ntype, NULL);
index 1f376c4941ccda1a98466bf31a704c78a7593b37..170116aa833f681e406fd5a01112b67f12f6e7fb 100644 (file)
@@ -51,6 +51,7 @@ void register_node_type_sh_holdout(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_HOLDOUT, "Holdout", NODE_CLASS_SHADER, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_holdout_in, sh_node_holdout_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index f4f69cf56fe0e15391e42d20b7a442ad4a72e0d9..2b266d01db25f619a3837d41f73dc1c84b06632c 100644 (file)
@@ -87,6 +87,7 @@ void register_node_type_sh_hue_sat(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, sh_node_hue_sat_in, sh_node_hue_sat_out);
        node_type_size(&ntype, 150, 80, 250);
        node_type_exec(&ntype, node_shader_exec_hue_sat);
index 5347d98b42e2d01502bebaf66ec7f37f99905fa1..4ac7463dac12cc3a8d4a113df5c33f14a49366d1 100644 (file)
@@ -79,6 +79,7 @@ void register_node_type_sh_invert(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, sh_node_invert_in, sh_node_invert_out);
        node_type_size(&ntype, 90, 80, 100);
        node_type_exec(&ntype, node_shader_exec_invert);
index a811259ccedfbf622636edfb6715e2108e46e931..0055257dda2365384944e3e356636804ac008e8a 100644 (file)
@@ -57,6 +57,7 @@ void register_node_type_sh_light_path(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_LIGHT_PATH, "Light Path", NODE_CLASS_INPUT, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, NULL, sh_node_light_path_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index 05432708b2905ee51f3984f2b5d93f1d50d880e0..2abc6dd3f77cc7595735f3b847e95356f859feb4 100644 (file)
@@ -93,6 +93,7 @@ void register_node_type_sh_mapping(ListBase *lb)
        static bNodeType ntype;
        
        node_type_base(&ntype, SH_NODE_MAPPING, "Mapping", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_mapping_in, sh_node_mapping_out);
        node_type_size(&ntype, 240, 160, 320);
        node_type_init(&ntype, node_shader_init_mapping);
index 21fb4db115bf2583d4ab908472698e85ebddf1f9..d30201b100e4928106cee3d0011217eb4513dfdc 100644 (file)
@@ -307,6 +307,7 @@ void register_node_type_sh_material(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_MATERIAL, "Material", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, sh_node_material_in, sh_node_material_out);
        node_type_size(&ntype, 120, 80, 240);
        node_type_init(&ntype, node_shader_init_material);
@@ -322,6 +323,7 @@ void register_node_type_sh_material_ext(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_MATERIAL_EXT, "Extended Material", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, sh_node_material_ext_in, sh_node_material_ext_out);
        node_type_size(&ntype, 120, 80, 240);
        node_type_init(&ntype, node_shader_init_material);
index 592779d68036547da3fdb90c1127c5644a1fd6e6..a09fe3db69d664eea6dacf4e4a387c4b342accd9 100644 (file)
@@ -243,6 +243,7 @@ void register_node_type_sh_math(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_math_in, sh_node_math_out);
        node_type_size(&ntype, 120, 110, 160);
        node_type_label(&ntype, node_math_label);
index ed5695edd42ca0e9b9f83ee021a7e336d9ccae8d..a7b5ac29bc5a7a813335c5c9e5db4b70a8c31fc1 100644 (file)
@@ -80,6 +80,7 @@ void register_node_type_sh_mix_rgb(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_mix_rgb_in, sh_node_mix_rgb_out);
        node_type_size(&ntype, 100, 60, 150);
        node_type_label(&ntype, node_blend_label);
index 49f536330802be2f74de5ba35a9e22038905fc86..a41a95a0fa4bd196c22429eccd3d6cf246abec63 100644 (file)
@@ -58,6 +58,7 @@ void register_node_type_sh_mix_shader(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_MIX_SHADER, "Mix Shader", NODE_CLASS_SHADER, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_mix_shader_in, sh_node_mix_shader_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index 1ce7c61c5930ee8025c86aea7c8bc95531d7f552..e40a5a8b133aa93f510ad7be9c30370bb975f1f1 100644 (file)
@@ -86,6 +86,7 @@ void register_node_type_sh_normal(ListBase *lb)
        static bNodeType ntype;
        
        node_type_base(&ntype, SH_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, sh_node_normal_in, sh_node_normal_out);
        node_type_init(&ntype, node_shader_init_normal);
        node_type_exec(&ntype, node_shader_exec_normal);
index 94990bd9cf12889e62cc3912f775e69203792979..d59534f33071602bf990f20c81dbacb5f8feae61 100644 (file)
@@ -85,6 +85,7 @@ void register_node_type_sh_output(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, sh_node_output_in, NULL);
        node_type_size(&ntype, 80, 60, 200);
        node_type_exec(&ntype, node_shader_exec_output);
index aca2aebeb240104f66d19d4fb278ac529ca880eb..4a7c033ad84db7d2e71897c62f1a7f9409cf8c76 100644 (file)
@@ -46,6 +46,7 @@ void register_node_type_sh_output_lamp(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_OUTPUT_LAMP, "Lamp Output", NODE_CLASS_OUTPUT, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_output_lamp_in, NULL);
        node_type_size(&ntype, 120, 60, 200);
        node_type_init(&ntype, NULL);
index 3d1c9c9fdf7f048e5664ebad0040c754e9179bd1..a3dbb103f219d8b92f9703d15a5ce3ee50777998 100644 (file)
@@ -58,6 +58,7 @@ void register_node_type_sh_output_material(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_OUTPUT_MATERIAL, "Material Output", NODE_CLASS_OUTPUT, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_output_material_in, NULL);
        node_type_size(&ntype, 120, 60, 200);
        node_type_init(&ntype, NULL);
index ad37746f541488d3645cc6984c9c35b457edd5ad..d436b23fb61bba01365772ed91ab9fe9e8deac18 100644 (file)
@@ -63,6 +63,7 @@ void register_node_type_sh_output_texture(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_OUTPUT_TEXTURE, "Texture Output", NODE_CLASS_OUTPUT, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_output_texture_in, NULL);
        node_type_size(&ntype, 120, 60, 200);
        node_type_init(&ntype, NULL);
index 5e42200ed28b67f087f521abe1083c88df09fa6e..7bc06401dd0850abc6811d5c448a318203a53e3b 100644 (file)
@@ -46,6 +46,7 @@ void register_node_type_sh_output_world(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_OUTPUT_WORLD, "World Output", NODE_CLASS_OUTPUT, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_output_world_in, NULL);
        node_type_size(&ntype, 120, 60, 200);
        node_type_init(&ntype, NULL);
index d612e5c228f68b9dc972a1989a0ba2b49c189183..8c03969edd23ab8a9226aa6c4c95bd0fe7264be1 100644 (file)
@@ -73,6 +73,7 @@ void register_node_type_sh_rgb(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_RGB, "RGB", NODE_CLASS_INPUT, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, NULL, sh_node_rgb_out);
        node_type_init(&ntype, node_shader_init_rgb);
        node_type_size(&ntype, 140, 80, 140);
index 15a8a4952fb11df6aa2372b485bcdc009c684ecb..db37fe44eef259e6d9fdbf756e6a93f49e97902d 100644 (file)
@@ -63,6 +63,7 @@ void register_node_type_sh_seprgb(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_SEPRGB, "Separate RGB", NODE_CLASS_CONVERTOR, 0);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, sh_node_seprgb_in, sh_node_seprgb_out);
        node_type_size(&ntype, 80, 40, 140);
        node_type_exec(&ntype, node_shader_exec_seprgb);
@@ -102,6 +103,7 @@ void register_node_type_sh_combrgb(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_COMBRGB, "Combine RGB", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, sh_node_combrgb_in, sh_node_combrgb_out);
        node_type_size(&ntype, 80, 40, 140);
        node_type_exec(&ntype, node_shader_exec_combrgb);
index b9eb116b866b85dbc6ccb6668c3635ffd7f34a3a..30550a685c2d8f2a50fb60ec8e50f51c39cd391f 100644 (file)
@@ -69,6 +69,7 @@ void register_node_type_sh_squeeze(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_SQUEEZE, "Squeeze Value", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, sh_node_squeeze_in, sh_node_squeeze_out);
        node_type_size(&ntype, 120, 110, 160);
        node_type_storage(&ntype, "node_squeeze", NULL, NULL);
index a42da334df23ef8d40327f6f9423343220f0ca29..659b0cadd5b13d8acc8652de3fe5fadb6dfbeead 100644 (file)
@@ -123,6 +123,7 @@ void register_node_type_sh_tex_blend(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEX_BLEND, "Blend Texture", NODE_CLASS_TEXTURE, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_tex_blend_in, sh_node_tex_blend_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, node_shader_init_tex_blend);
index e140a587f872e8e1670ac823d53cbe470354413d..c38dd155a7b70e717eb01681faae565bea7ed3c9 100644 (file)
@@ -106,6 +106,7 @@ void register_node_type_sh_tex_clouds(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEX_CLOUDS, "Clouds Texture", NODE_CLASS_TEXTURE, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_tex_clouds_in, sh_node_tex_clouds_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, node_shader_init_tex_clouds);
index 5fdde7e23cea1e7dd9866793bfaee4481e1389ff..0239a64110d511080226781a13570be2d29b11ae 100644 (file)
@@ -63,6 +63,7 @@ void register_node_type_sh_tex_coord(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEX_COORD, "Texture Coordinate", NODE_CLASS_INPUT, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, NULL, sh_node_tex_coord_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index f91e6ee9f3d1ea214402c3537a5eaeb73dc59bb4..c28fef9e472352b26fe5fef28ff3efae62f31d05 100644 (file)
@@ -103,6 +103,7 @@ void register_node_type_sh_tex_distnoise(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEX_DISTNOISE, "Distorted Noise Texture", NODE_CLASS_TEXTURE, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_tex_distnoise_in, sh_node_tex_distnoise_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, node_shader_init_tex_distorted_noise);
index 19271e0051bffde09e5afbc26e9f42ad37bddedc..7fbd5142e2290cd9b74b2f2025bb1e55d733d0d7 100644 (file)
@@ -103,6 +103,7 @@ void register_node_type_sh_tex_environment(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEX_ENVIRONMENT, "Environment Texture", NODE_CLASS_TEXTURE, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_tex_environment_in, sh_node_tex_environment_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, node_shader_init_tex_environment);
index 4ad6f387a7eb976a94c7dfa65736716dedee2abe..11a2c914746163c4f7e407ce88b531f82455ca1d 100644 (file)
@@ -101,6 +101,7 @@ void register_node_type_sh_tex_image(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEX_IMAGE, "Image Texture", NODE_CLASS_TEXTURE, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_tex_image_in, sh_node_tex_image_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, node_shader_init_tex_image);
index d15fff4488323347819747574fe67ac04974f40d..5ccb42d99c4a2b64601d3bc8800a0ca46fe630fe 100644 (file)
@@ -157,6 +157,7 @@ void register_node_type_sh_tex_magic(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEX_MAGIC, "Magic Texture", NODE_CLASS_TEXTURE, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_tex_magic_in, sh_node_tex_magic_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, node_shader_init_tex_magic);
index fe707ee635993caa7ce3432b1a6b917efe743a4c..5b9b30080383b79bae3f36eff35ab9585519546a 100644 (file)
@@ -111,6 +111,7 @@ void register_node_type_sh_tex_marble(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEX_MARBLE, "Marble Texture", NODE_CLASS_TEXTURE, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_tex_marble_in, sh_node_tex_marble_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, node_shader_init_tex_marble);
index a0a24559518d437b6a2d1b69dbfa457531bebb79..f8586b5e9aca6ae8bf6ce4c8dff7bd26133e90fa 100644 (file)
@@ -276,6 +276,7 @@ void register_node_type_sh_tex_musgrave(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEX_MUSGRAVE, "Musgrave Texture", NODE_CLASS_TEXTURE, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_tex_musgrave_in, sh_node_tex_musgrave_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, node_shader_init_tex_musgrave);
index 9785c4473f56b58119535548f8015b86899f72bd..32f88e998a5bde069ebf1d00bd70cc699afd2168 100644 (file)
@@ -88,6 +88,7 @@ void register_node_type_sh_tex_noise(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEX_NOISE, "Noise Texture", NODE_CLASS_TEXTURE, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_tex_noise_in, sh_node_tex_noise_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index 6c155458245953d69571411e99586cd7854a1196..b43f7bd29245377b0cdb37e3be6f95a9998fc22d 100644 (file)
@@ -70,6 +70,7 @@ void register_node_type_sh_tex_sky(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEX_SKY, "Sky Texture", NODE_CLASS_TEXTURE, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_tex_sky_in, sh_node_tex_sky_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, node_shader_init_tex_sky);
index 22ea8d320474d32274e71b94d3fb3f6521d103a6..4540e2c982b4ebb9ffeb6f535a02d0f51e851ea6 100644 (file)
@@ -106,6 +106,7 @@ void register_node_type_sh_tex_stucci(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEX_STUCCI, "Stucci Texture", NODE_CLASS_TEXTURE, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_tex_stucci_in, sh_node_tex_stucci_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, node_shader_init_tex_stucci);
index 16c694575c1c6f19b0ab5674885c92377eb5b79f..b942aa00fb427df06cc5bc48bf8ffea9cbf3a01f 100644 (file)
@@ -152,6 +152,7 @@ void register_node_type_sh_tex_voronoi(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEX_VORONOI, "Voronoi Texture", NODE_CLASS_TEXTURE, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_tex_voronoi_in, sh_node_tex_voronoi_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, node_shader_init_tex_voronoi);
index 5ae695243794413c2dea58ce44e0b906a2d97901..4fb11743882af9b09b33fb35ce4e6db93604857c 100644 (file)
@@ -113,6 +113,7 @@ void register_node_type_sh_tex_wood(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEX_WOOD, "Wood Texture", NODE_CLASS_TEXTURE, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_tex_wood_in, sh_node_tex_wood_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, node_shader_init_tex_wood);
index 0971682080029edc9488a23783269180a11e2674..5403a11e9924d794ca600739ac5bbff93a86174c 100644 (file)
@@ -138,6 +138,7 @@ void register_node_type_sh_texture(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, sh_node_texture_in, sh_node_texture_out);
        node_type_size(&ntype, 120, 80, 240);
        node_type_exec(&ntype, node_shader_exec_texture);
index 5c1d3096a6e36f4bdc28c1d7fe3c79a9df13c304..cc31d301894835e328ab0f97d4ccfc1e8e822492 100644 (file)
@@ -78,6 +78,7 @@ void register_node_type_sh_valtorgb(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, sh_node_valtorgb_in, sh_node_valtorgb_out);
        node_type_size(&ntype, 240, 200, 300);
        node_type_init(&ntype, node_shader_init_valtorgb);
@@ -118,6 +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_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);
index 119a36643083069bb3ad8a514f31ddf7b764899c..1552e8fbf428cf4392f596ce989510ec86af9126 100644 (file)
@@ -73,6 +73,7 @@ void register_node_type_sh_value(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, NULL, sh_node_value_out);
        node_type_init(&ntype, node_shader_init_value);
        node_type_size(&ntype, 80, 50, 120);
index ca31d879e3e71992cc32b3484c1c3e379357e7a6..c8f9f5ec7e3dde32bd24515ece3858a64ebe4719 100644 (file)
@@ -137,6 +137,7 @@ void register_node_type_sh_vect_math(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_VECT_MATH, "Vector Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_vect_math_in, sh_node_vect_math_out);
        node_type_size(&ntype, 80, 75, 140);
        node_type_label(&ntype, node_vect_math_label);
index e5579c1bf0b04ef33b7d84a6c759287de67c59b9..bc27478f309ada936b3544cce1fb0e53f91adc81 100644 (file)
@@ -46,7 +46,7 @@ static void node_shader_exec_volume_isotropic(void *UNUSED(data), bNode *UNUSED(
 {
 }
 
-static int node_shader_gpu_volume_isotropic(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out)
+static int node_shader_gpu_volume_isotropic(GPUMaterial *UNUSED(mat), bNode *UNUSED(node), GPUNodeStack *UNUSED(in), GPUNodeStack *UNUSED(out))
 {
        return 0;
 }
@@ -57,6 +57,7 @@ void register_node_type_sh_volume_isotropic(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_VOLUME_ISOTROPIC, "Isotropic Volume", NODE_CLASS_SHADER, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_volume_isotropic_in, sh_node_volume_isotropic_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);
index b2e9e22789a81ca34e9edc7daca1075eaeebbc92..d931736d15a3b64d9a9ba9c5e7a3410f8248fc0d 100644 (file)
@@ -46,7 +46,7 @@ static void node_shader_exec_volume_transparent(void *UNUSED(data), bNode *UNUSE
 {
 }
 
-static int node_shader_gpu_volume_transparent(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out)
+static int node_shader_gpu_volume_transparent(GPUMaterial *UNUSED(mat), bNode *UNUSED(node), GPUNodeStack *UNUSED(in), GPUNodeStack *UNUSED(out))
 {
        return 0;
 }
@@ -57,6 +57,7 @@ void register_node_type_sh_volume_transparent(ListBase *lb)
        static bNodeType ntype;
 
        node_type_base(&ntype, SH_NODE_VOLUME_TRANSPARENT, "Transparent Volume", NODE_CLASS_SHADER, 0);
+       node_type_compatibility(&ntype, NODE_NEW_SHADING);
        node_type_socket_templates(&ntype, sh_node_volume_transparent_in, sh_node_volume_transparent_out);
        node_type_size(&ntype, 150, 60, 200);
        node_type_init(&ntype, NULL);