Example #1
0
void register_node_type_reroute(bNodeTreeType *ttype)
{
	/* frame type is used for all tree types, needs dynamic allocation */
	bNodeType *ntype= MEM_callocN(sizeof(bNodeType), "frame node type");
	
	node_type_base(ttype, ntype, NODE_REROUTE, "Reroute", NODE_CLASS_LAYOUT, 0);
	node_type_socket_templates(ntype, node_reroute_in, node_reroute_out);
	node_type_internal_connect(ntype, node_reroute_internal_connect);
	node_type_update(ntype, node_reroute_update, NULL);
	
	ntype->needs_free = 1;
	nodeRegisterType(ttype, ntype);
}
Example #2
0
void register_node_type_cmp_viewer(bNodeTreeType *ttype)
{
	static bNodeType ntype;

	node_type_base(ttype, &ntype, CMP_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW);
	node_type_socket_templates(&ntype, cmp_node_viewer_in, NULL);
	node_type_size(&ntype, 80, 60, 200);
	node_type_init(&ntype, node_composit_init_viewer);
	node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
	node_type_exec(&ntype, node_composit_exec_viewer);
	node_type_internal_connect(&ntype, NULL);

	nodeRegisterType(ttype, &ntype);
}
Example #3
0
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 for this node. */
	node_type_internal_connect(&ntype, NULL);

	nodeRegisterType(ttype, &ntype);
}
void register_node_type_sh_output(bNodeTreeType *ttype)
{
	static bNodeType ntype;

	node_type_base(ttype, &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);
	node_type_gpu(&ntype, gpu_shader_output);

	/* Do not allow muting output node. */
	node_type_internal_connect(&ntype, NULL);

	nodeRegisterType(ttype, &ntype);
}
Example #5
0
/* node type definition */
void register_node_type_sh_output_world(bNodeTreeType *ttype)
{
	static bNodeType ntype;

	node_type_base(ttype, &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);
	node_type_storage(&ntype, "", NULL, NULL);
	node_type_exec(&ntype, NULL);
	node_type_gpu(&ntype, NULL);

	/* Do not allow muting output node. */
	node_type_internal_connect(&ntype, NULL);

	nodeRegisterType(ttype, &ntype);
}