void register_node_type_frame(void) { /* frame type is used for all tree types, needs dynamic allocation */ bNodeType *ntype = MEM_callocN(sizeof(bNodeType), "frame node type"); node_type_base(ntype, NODE_FRAME, "Frame", NODE_CLASS_LAYOUT, NODE_BACKGROUND); node_type_init(ntype, node_frame_init); node_type_storage(ntype, "NodeFrame", node_free_standard_storage, node_copy_standard_storage); node_type_size(ntype, 150, 100, 0); node_type_compatibility(ntype, NODE_OLD_SHADING | NODE_NEW_SHADING); ntype->needs_free = 1; nodeRegisterType(ntype); }
void register_node_type_group_output(void) { /* used for all tree types, needs dynamic allocation */ bNodeType *ntype = MEM_callocN(sizeof(bNodeType), "node type"); node_type_base(ntype, NODE_GROUP_OUTPUT, "Group Output", NODE_CLASS_INTERFACE, 0); node_type_size(ntype, 140, 80, 400); node_type_init(ntype, node_group_output_init); node_type_update(ntype, node_group_output_update, node_group_output_verify); node_type_compatibility(ntype, NODE_OLD_SHADING | NODE_NEW_SHADING); ntype->needs_free = 1; nodeRegisterType(ntype); }
/* node type definition */ void register_node_type_sh_bsdf_diffuse(void) { static bNodeType ntype; sh_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_preset(&ntype, NODE_SIZE_MIDDLE); node_type_init(&ntype, NULL); node_type_storage(&ntype, "", NULL, NULL); node_type_gpu(&ntype, node_shader_gpu_bsdf_diffuse); nodeRegisterType(&ntype); }
void register_node_type_sh_material_ext(void) { static bNodeType ntype; sh_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); node_type_exec(&ntype, NULL, NULL, node_shader_exec_material); node_type_gpu(&ntype, gpu_shader_material); nodeRegisterType(&ntype); }
void register_node_type_cmp_output_file(bNodeTreeType *ttype) { static bNodeType ntype; node_type_base(ttype, &ntype, CMP_NODE_OUTPUT_FILE, "File Output", NODE_CLASS_OUTPUT, NODE_OPTIONS|NODE_PREVIEW); node_type_socket_templates(&ntype, NULL, NULL); node_type_size(&ntype, 140, 80, 300); node_type_init(&ntype, init_output_file); node_type_storage(&ntype, "NodeImageMultiFile", free_output_file, copy_output_file); node_type_update(&ntype, update_output_file, NULL); node_type_exec(&ntype, exec_output_file); nodeRegisterType(ttype, &ntype); }
/* node type definition */ void register_node_type_sh_tex_brick(void) { static bNodeType ntype; sh_node_type_base(&ntype, SH_NODE_TEX_BRICK, "Brick Texture", NODE_CLASS_TEXTURE, 0); node_type_compatibility(&ntype, NODE_NEW_SHADING); node_type_socket_templates(&ntype, sh_node_tex_brick_in, sh_node_tex_brick_out); node_type_size_preset(&ntype, NODE_SIZE_MIDDLE); node_type_init(&ntype, node_shader_init_tex_brick); node_type_storage(&ntype, "NodeTexBrick", node_free_standard_storage, node_copy_standard_storage); node_type_gpu(&ntype, node_shader_gpu_tex_brick); nodeRegisterType(&ntype); }
/* node type definition */ void register_node_type_sh_bsdf_anisotropic(void) { static bNodeType ntype; sh_node_type_base(&ntype, SH_NODE_BSDF_ANISOTROPIC, "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_preset(&ntype, NODE_SIZE_MIDDLE); node_type_init(&ntype, node_shader_init_anisotropic); node_type_storage(&ntype, "", NULL, NULL); node_type_gpu(&ntype, node_shader_gpu_bsdf_anisotropic); nodeRegisterType(&ntype); }
/* node type definition */ void register_node_type_sh_bsdf_hair(void) { static bNodeType ntype; sh_node_type_base(&ntype, SH_NODE_BSDF_HAIR, "Hair BSDF", NODE_CLASS_SHADER, 0); node_type_compatibility(&ntype, NODE_NEW_SHADING); node_type_socket_templates(&ntype, sh_node_bsdf_hair_in, sh_node_bsdf_hair_out); node_type_size(&ntype, 150, 60, 200); node_type_init(&ntype, NULL); node_type_storage(&ntype, "", NULL, NULL); node_type_gpu(&ntype, node_shader_gpu_bsdf_hair); nodeRegisterType(&ntype); }
void register_node_type_cmp_splitviewer(void) { static bNodeType ntype; cmp_node_type_base(&ntype, CMP_NODE_SPLITVIEWER, "Split Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS); node_type_socket_templates(&ntype, cmp_node_splitviewer_in, NULL); node_type_init(&ntype, node_composit_init_splitviewer); node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage); /* Do not allow muting for this node. */ node_type_internal_links(&ntype, NULL); nodeRegisterType(&ntype); }
/* node type definition */ void register_node_type_sh_tex_sky(void) { static bNodeType ntype; sh_node_type_base(&ntype, SH_NODE_TEX_SKY, "Sky Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS); 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); node_type_storage(&ntype, "NodeTexSky", node_free_standard_storage, node_copy_standard_storage); node_type_gpu(&ntype, node_shader_gpu_tex_sky); nodeRegisterType(&ntype); }
/* custom1 = mix type */ void register_node_type_cmp_mix_rgb(bNodeTreeType *ttype) { static bNodeType ntype; node_type_base(ttype, &ntype, CMP_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_PREVIEW|NODE_OPTIONS); node_type_socket_templates(&ntype, cmp_node_mix_rgb_in, cmp_node_mix_rgb_out); node_type_size(&ntype, 110, 60, 120); node_type_label(&ntype, node_blend_label); #ifdef WITH_COMPOSITOR_LEGACY node_type_exec(&ntype, node_composit_exec_mix_rgb); #endif nodeRegisterType(ttype, &ntype); }
void register_node_type_sh_gamma(void) { static bNodeType ntype; sh_node_type_base(&ntype, SH_NODE_GAMMA, "Gamma", NODE_CLASS_OP_COLOR, 0); node_type_compatibility(&ntype, NODE_OLD_SHADING | NODE_NEW_SHADING); node_type_socket_templates(&ntype, sh_node_gamma_in, sh_node_gamma_out); node_type_init(&ntype, NULL); node_type_storage(&ntype, "", NULL, NULL); node_type_exec(&ntype, NULL, NULL, node_shader_exec_gamma); node_type_gpu(&ntype, node_shader_gpu_gamma); nodeRegisterType(&ntype); }
void register_node_type_sh_vect_math(void) { static bNodeType ntype; sh_node_type_base(&ntype, SH_NODE_VECT_MATH, "Vector Math", NODE_CLASS_CONVERTOR, 0); 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_label(&ntype, node_vect_math_label); node_type_storage(&ntype, "", NULL, NULL); node_type_exec(&ntype, NULL, NULL, node_shader_exec_vect_math); node_type_gpu(&ntype, gpu_shader_vect_math); nodeRegisterType(&ntype); }
void register_node_type_sh_oct_portal_mat(void) { static bNodeType ntype; if(ntype.type != SH_NODE_OCT_PORTAL_MAT) node_type_base(&ntype, SH_NODE_OCT_PORTAL_MAT, "Octane Portal Material", NODE_CLASS_OCT_SHADER, 0); node_type_compatibility(&ntype, NODE_NEW_SHADING); node_type_socket_templates(&ntype, sh_node_in, sh_node_out); node_type_size(&ntype, 100, 160, 200); node_type_init(&ntype, 0); node_type_storage(&ntype, "", NULL, NULL); node_type_gpu(&ntype, node_shader_gpu_oct_portal_mat); ntype.update_internal_links = node_update_internal_links_default; nodeRegisterType(&ntype); } /* register_node_type_sh_oct_portal_mat() */
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_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); node_type_storage(&ntype, "node_math", NULL, NULL); node_type_exec(&ntype, node_shader_exec_math); node_type_gpu(&ntype, gpu_shader_math); nodeRegisterType(lb, &ntype); }
/* node type definition */ void register_node_type_sh_bsdf_glossy(void) { static bNodeType ntype; sh_node_type_base(&ntype, SH_NODE_BSDF_GLOSSY, "Glossy BSDF", NODE_CLASS_SHADER, NODE_OPTIONS); 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); node_type_storage(&ntype, "", NULL, NULL); node_type_gpu(&ntype, node_shader_gpu_bsdf_glossy); nodeRegisterType(&ntype); }
/* node type definition */ void register_node_type_sh_output_light(void) { static bNodeType ntype; sh_node_type_base(&ntype, SH_NODE_OUTPUT_LIGHT, "Light Output", NODE_CLASS_OUTPUT, 0); node_type_socket_templates(&ntype, sh_node_output_light_in, NULL); node_type_init(&ntype, NULL); node_type_storage(&ntype, "", NULL, NULL); /* Do not allow muting output node. */ node_type_internal_links(&ntype, NULL); nodeRegisterType(&ntype); }
/* node type definition */ void register_node_type_sh_fresnel(void) { static bNodeType ntype; sh_node_type_base(&ntype, SH_NODE_FRESNEL, "Fresnel", NODE_CLASS_INPUT, 0); node_type_compatibility(&ntype, NODE_NEW_SHADING | NODE_OLD_SHADING); node_type_socket_templates(&ntype, sh_node_fresnel_in, sh_node_fresnel_out); node_type_init(&ntype, NULL); node_type_storage(&ntype, "", NULL, NULL); node_type_gpu(&ntype, node_shader_gpu_fresnel); node_type_exec(&ntype, NULL, NULL, node_shader_exec_fresnel); nodeRegisterType(&ntype); }
void register_node_type_sh_mix_rgb(bNodeTreeType *ttype) { static bNodeType ntype; node_type_base(ttype, &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); node_type_exec(&ntype, node_shader_exec_mix_rgb); node_type_gpu(&ntype, gpu_shader_mix_rgb); nodeRegisterType(ttype, &ntype); }
/* node type definition */ void register_node_type_sh_bsdf_refraction(void) { static bNodeType ntype; sh_node_type_base(&ntype, SH_NODE_BSDF_REFRACTION, "Refraction BSDF", NODE_CLASS_SHADER, NODE_OPTIONS); node_type_compatibility(&ntype, NODE_NEW_SHADING); node_type_socket_templates(&ntype, sh_node_bsdf_refraction_in, sh_node_bsdf_refraction_out); node_type_size(&ntype, 150, 60, 200); node_type_init(&ntype, NULL); node_type_storage(&ntype, "", NULL, NULL); node_type_gpu(&ntype, node_shader_gpu_bsdf_refraction); nodeRegisterType(&ntype); }
void register_node_type_sh_mapping(bNodeTreeType *ttype) { static bNodeType ntype; node_type_base(ttype, &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); node_type_storage(&ntype, "TexMapping", node_free_standard_storage, node_copy_standard_storage); node_type_exec(&ntype, node_shader_exec_mapping); node_type_gpu(&ntype, gpu_shader_mapping); nodeRegisterType(ttype, &ntype); }
/* node type definition */ void register_node_type_sh_subsurface_scattering(void) { static bNodeType ntype; sh_node_type_base(&ntype, SH_NODE_SUBSURFACE_SCATTERING, "Subsurface Scattering", NODE_CLASS_SHADER, 0); node_type_compatibility(&ntype, NODE_NEW_SHADING); node_type_socket_templates(&ntype, sh_node_subsurface_scattering_in, sh_node_subsurface_scattering_out); node_type_size_preset(&ntype, NODE_SIZE_MIDDLE); node_type_init(&ntype, node_shader_init_subsurface_scattering); node_type_storage(&ntype, "", NULL, NULL); node_type_gpu(&ntype, node_shader_gpu_subsurface_scattering); node_type_update(&ntype, node_shader_update_subsurface_scattering, NULL); nodeRegisterType(&ntype); }
/* node type definition */ void register_node_type_sh_bsdf_velvet(bNodeTreeType *ttype) { static bNodeType ntype; node_type_base(ttype, &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); node_type_storage(&ntype, "", NULL, NULL); node_type_exec(&ntype, NULL); node_type_gpu(&ntype, node_shader_gpu_bsdf_velvet); nodeRegisterType(ttype, &ntype); }
void register_node_type_sh_valtorgb(void) { static bNodeType ntype; sh_node_type_base(&ntype, SH_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, 0); node_type_compatibility(&ntype, NODE_OLD_SHADING | NODE_NEW_SHADING); node_type_socket_templates(&ntype, sh_node_valtorgb_in, sh_node_valtorgb_out); node_type_init(&ntype, node_shader_init_valtorgb); node_type_size_preset(&ntype, NODE_SIZE_LARGE); node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage); node_type_exec(&ntype, NULL, NULL, node_shader_exec_valtorgb); node_type_gpu(&ntype, gpu_shader_valtorgb); nodeRegisterType(&ntype); }
void register_node_type_cmp_splitviewer(bNodeTreeType *ttype) { static bNodeType ntype; node_type_base(ttype, &ntype, CMP_NODE_SPLITVIEWER, "SplitViewer", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS); node_type_socket_templates(&ntype, cmp_node_splitviewer_in, NULL); node_type_size(&ntype, 140, 100, 320); node_type_init(&ntype, node_composit_init_splitviewer); node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage); node_type_exec(&ntype, node_composit_exec_splitviewer); /* Do not allow muting this node. */ node_type_mute(&ntype, NULL, NULL); nodeRegisterType(ttype, &ntype); }
/* node type definition */ void register_node_type_sh_tex_environment(bNodeTreeType *ttype) { static bNodeType ntype; node_type_base(ttype, &ntype, SH_NODE_TEX_ENVIRONMENT, "Environment Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS); 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); node_type_storage(&ntype, "NodeTexEnvironment", node_free_standard_storage, node_copy_standard_storage); node_type_exec(&ntype, NULL); node_type_gpu(&ntype, node_shader_gpu_tex_environment); nodeRegisterType(ttype, &ntype); }
/* node type definition */ void register_node_type_sh_tex_environment(void) { static bNodeType ntype; sh_node_type_base(&ntype, SH_NODE_TEX_ENVIRONMENT, "Environment Texture", NODE_CLASS_TEXTURE, 0); node_type_socket_templates(&ntype, sh_node_tex_environment_in, sh_node_tex_environment_out); node_type_init(&ntype, node_shader_init_tex_environment); node_type_storage( &ntype, "NodeTexEnvironment", node_free_standard_storage, node_copy_standard_storage); node_type_gpu(&ntype, node_shader_gpu_tex_environment); node_type_label(&ntype, node_image_label); node_type_size_preset(&ntype, NODE_SIZE_LARGE); nodeRegisterType(&ntype); }
/* node type definition */ void register_node_type_sh_light_path(bNodeTreeType *ttype) { static bNodeType ntype; node_type_base(ttype, &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); node_type_storage(&ntype, "", NULL, NULL); node_type_exec(&ntype, NULL); node_type_gpu(&ntype, node_shader_gpu_light_path); nodeRegisterType(ttype, &ntype); }
void register_node_type_cmp_keying(bNodeTreeType *ttype) { static bNodeType ntype; node_type_base(ttype, &ntype, CMP_NODE_KEYING, "Keying", NODE_CLASS_MATTE, NODE_OPTIONS); node_type_socket_templates(&ntype, cmp_node_keying_in, cmp_node_keying_out); node_type_size(&ntype, 140, 100, 320); node_type_init(&ntype, node_composit_init_keying); node_type_storage(&ntype, "NodeKeyingData", node_free_standard_storage, node_copy_standard_storage); #ifdef WITH_COMPOSITOR_LEGACY node_type_exec(&ntype, node_composit_exec_keying); #endif nodeRegisterType(ttype, &ntype); }
void register_node_type_cmp_movieclip(bNodeTreeType *ttype) { static bNodeType ntype; node_type_base(ttype, &ntype, CMP_NODE_MOVIECLIP, "Movie Clip", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS); node_type_socket_templates(&ntype, NULL, cmp_node_movieclip_out); node_type_size(&ntype, 120, 80, 300); node_type_init(&ntype, init); node_type_storage(&ntype, "MovieClipUser", node_free_standard_storage, node_copy_standard_storage); #ifdef WITH_COMPOSITOR_LEGACY node_type_exec(&ntype, node_composit_exec_movieclip); #endif nodeRegisterType(ttype, &ntype); }