void register_node_type_sh_group(void)
{
	static bNodeType ntype;
	
	/* NB: cannot use sh_node_type_base for node group, because it would map the node type
	 * to the shared NODE_GROUP integer type id.
	 */
	node_type_base_custom(&ntype, "ShaderNodeGroup", "Group", NODE_CLASS_GROUP, NODE_CONST_OUTPUT);
	ntype.type = NODE_GROUP;
	ntype.poll = sh_node_poll_default;
	ntype.poll_instance = node_group_poll_instance;
	ntype.update_internal_links = node_update_internal_links_default;
	ntype.ext.srna = RNA_struct_find("ShaderNodeGroup");
	BLI_assert(ntype.ext.srna != NULL);
	RNA_struct_blender_type_set(ntype.ext.srna, &ntype);
	
	node_type_compatibility(&ntype, NODE_OLD_SHADING | NODE_NEW_SHADING);
	node_type_socket_templates(&ntype, NULL, NULL);
	node_type_size(&ntype, 140, 60, 400);
	node_type_label(&ntype, node_group_label);
	node_type_update(&ntype, NULL, node_group_verify);
	node_type_exec(&ntype, group_initexec, group_freeexec, group_execute);
	node_type_gpu(&ntype, gpu_group_execute);
	
	nodeRegisterType(&ntype);
}
Exemple #2
0
/* custom1 = mix type */
void register_node_type_cmp_mix_rgb(void)
{
	static bNodeType ntype;

	cmp_node_type_base(&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_label(&ntype, node_blend_label);

	nodeRegisterType(&ntype);
}
void register_node_type_tex_mix_rgb(void)
{
	static bNodeType ntype;

	tex_node_type_base(&ntype, TEX_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, 0);
	node_type_socket_templates(&ntype, inputs, outputs);
	node_type_label(&ntype, node_blend_label);
	node_type_exec(&ntype, NULL, NULL, exec);

	nodeRegisterType(&ntype);
}
Exemple #4
0
void register_node_type_cmp_filter(ListBase *lb)
{
	static bNodeType ntype;

	node_type_base(&ntype, CMP_NODE_FILTER, "Filter", NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS);
	node_type_socket_templates(&ntype, cmp_node_filter_in, cmp_node_filter_out);
	node_type_size(&ntype, 80, 40, 120);
	node_type_label(&ntype, node_filter_label);
	node_type_exec(&ntype, node_composit_exec_filter);

	nodeRegisterType(lb, &ntype);
}
Exemple #5
0
/* custom1 = mix type */
void register_node_type_cmp_mix_rgb(ListBase *lb)
{
	static bNodeType ntype;

	node_type_base(&ntype, CMP_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_PREVIEW|NODE_OPTIONS,
		cmp_node_mix_rgb_in, cmp_node_mix_rgb_out);
	node_type_size(&ntype, 110, 60, 120);
	node_type_label(&ntype, node_blend_label);
	node_type_exec(&ntype, node_composit_exec_mix_rgb);

	nodeRegisterType(lb, &ntype);
}
Exemple #6
0
void register_node_type_cmp_math(ListBase *lb)
{
	static bNodeType ntype;

	node_type_base(&ntype, CMP_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
	node_type_socket_templates(&ntype, cmp_node_math_in, cmp_node_math_out);
	node_type_size(&ntype, 120, 110, 160);
	node_type_label(&ntype, node_math_label);
	node_type_exec(&ntype, node_composit_exec_math);

	nodeRegisterType(lb, &ntype);
}
Exemple #7
0
void register_node_type_tex_math(void)
{
	static bNodeType ntype;

	tex_node_type_base(&ntype, TEX_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, 0);
	node_type_socket_templates(&ntype, inputs, outputs);
	node_type_label(&ntype, node_math_label);
	node_type_storage(&ntype, "node_math", NULL, NULL);
	node_type_exec(&ntype, NULL, NULL, exec);

	nodeRegisterType(&ntype);
}
Exemple #8
0
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,
		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(lb, &ntype);
}
Exemple #9
0
void register_node_type_tex_math(ListBase *lb)
{
	static bNodeType ntype;
	
	node_type_base(&ntype, TEX_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
	node_type_socket_templates(&ntype, inputs, outputs);
	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, exec);
	
	nodeRegisterType(lb, &ntype);
}
Exemple #10
0
void register_node_type_cmp_moviedistortion(bNodeTreeType *ttype)
{
	static bNodeType ntype;

	node_type_base(ttype, &ntype, CMP_NODE_MOVIEDISTORTION, "Movie Distortion", NODE_CLASS_DISTORT, NODE_OPTIONS);
	node_type_socket_templates(&ntype, cmp_node_moviedistortion_in, cmp_node_moviedistortion_out);
	node_type_size(&ntype, 140, 100, 320);
	node_type_label(&ntype, label);
	node_type_exec(&ntype, exec);
	node_type_storage(&ntype, NULL, storage_free, storage_copy);

	nodeRegisterType(ttype, &ntype);
}
void register_node_type_cmp_moviedistortion(void)
{
	static bNodeType ntype;

	cmp_node_type_base(&ntype, CMP_NODE_MOVIEDISTORTION, "Movie Distortion", NODE_CLASS_DISTORT, 0);
	node_type_socket_templates(&ntype, cmp_node_moviedistortion_in, cmp_node_moviedistortion_out);
	node_type_label(&ntype, label);

	ntype.initfunc_api = init;
	node_type_storage(&ntype, NULL, storage_free, storage_copy);

	nodeRegisterType(&ntype);
}
void register_node_type_sh_math(void)
{
	static bNodeType ntype;

	sh_node_type_base(&ntype, SH_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, 0);
	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_label(&ntype, node_math_label);
	node_type_storage(&ntype, "", NULL, NULL);
	node_type_exec(&ntype, NULL, NULL, node_shader_exec_math);
	node_type_gpu(&ntype, gpu_shader_math);

	nodeRegisterType(&ntype);
}
Exemple #13
0
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,
		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);
	node_type_storage(&ntype, "node_vect_math", NULL, NULL);
	node_type_exec(&ntype, node_shader_exec_vect_math);
	node_type_gpu(&ntype, gpu_shader_vect_math);

	nodeRegisterType(lb, &ntype);
}
Exemple #14
0
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);
}
Exemple #15
0
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);
}
/* 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);
}
/* 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_compatibility(&ntype, NODE_NEW_SHADING);
	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);

	nodeRegisterType(&ntype);
}
void register_node_type_cmp_group(ListBase *lb)
{
	static bNodeType ntype;

	node_type_base(&ntype, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS|NODE_CONST_OUTPUT);
	node_type_socket_templates(&ntype, NULL, NULL);
	node_type_size(&ntype, 120, 60, 200);
	node_type_label(&ntype, node_group_label);
	node_type_init(&ntype, node_group_init);
	node_type_valid(&ntype, node_group_valid);
	node_type_template(&ntype, node_group_template);
	node_type_update(&ntype, NULL, node_group_verify);
	node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
	node_type_exec_new(&ntype, group_initexec, group_freeexec, group_execute);
	
	nodeRegisterType(lb, &ntype);
}
void register_node_type_cmp_whileloop(ListBase *lb)
{
	static bNodeType ntype;

	node_type_base(&ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS);
	node_type_socket_templates(&ntype, NULL, NULL);
	node_type_size(&ntype, 120, 60, 200);
	node_type_label(&ntype, node_group_label);
	node_type_init(&ntype, node_whileloop_init);
	node_type_valid(&ntype, node_group_valid);
	node_type_template(&ntype, node_whileloop_template);
	node_type_update(&ntype, NULL, node_group_verify);
	node_type_tree(&ntype, node_whileloop_init_tree, node_loop_update_tree);
	node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
	node_type_exec_new(&ntype, group_initexec, group_freeexec, whileloop_execute);
	
	nodeRegisterType(lb, &ntype);
}
void register_node_type_sh_forloop(bNodeTreeType *ttype)
{
	static bNodeType ntype;

	node_type_base(ttype, &ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS);
	node_type_socket_templates(&ntype, NULL, NULL);
	node_type_size(&ntype, 120, 60, 200);
	node_type_label(&ntype, node_group_label);
	node_type_init(&ntype, node_forloop_init);
	node_type_valid(&ntype, node_group_valid);
	node_type_template(&ntype, node_forloop_template);
	node_type_update(&ntype, NULL, node_group_verify);
	node_type_tree(&ntype, node_forloop_init_tree, node_loop_update_tree);
	node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
	node_type_exec_new(&ntype, group_initexec, group_freeexec, forloop_execute);
	
	nodeRegisterType(ttype, &ntype);
}
Exemple #21
0
void register_node_type_cmp_group(void)
{
	static bNodeType ntype;
	
	/* NB: cannot use sh_node_type_base for node group, because it would map the node type
	 * to the shared NODE_GROUP integer type id.
	 */
	node_type_base_custom(&ntype, "CompositorNodeGroup", "Group", NODE_CLASS_GROUP, NODE_OPTIONS | NODE_CONST_OUTPUT);
	ntype.type = NODE_GROUP;
	ntype.poll = cmp_node_poll_default;
	ntype.poll_instance = node_group_poll_instance;
	ntype.update_internal_links = node_update_internal_links_default;
	ntype.ext.srna = RNA_struct_find("CompositorNodeGroup");
	BLI_assert(ntype.ext.srna != NULL);
	RNA_struct_blender_type_set(ntype.ext.srna, &ntype);
	
	node_type_socket_templates(&ntype, NULL, NULL);
	node_type_size(&ntype, 120, 60, 200);
	node_type_label(&ntype, node_group_label);
	node_type_update(&ntype, NULL, node_group_verify);

	nodeRegisterType(&ntype);
}