Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_composite.c
| Show All 37 Lines | |||||
| /* **************** COMPOSITE ******************** */ | /* **************** COMPOSITE ******************** */ | ||||
| static bNodeSocketTemplate cmp_node_composite_in[] = { | static bNodeSocketTemplate cmp_node_composite_in[] = { | ||||
| { SOCK_RGBA, 1, N_("Image"), 0.0f, 0.0f, 0.0f, 1.0f}, | { SOCK_RGBA, 1, N_("Image"), 0.0f, 0.0f, 0.0f, 1.0f}, | ||||
| { SOCK_FLOAT, 1, N_("Alpha"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE}, | { SOCK_FLOAT, 1, N_("Alpha"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE}, | ||||
| { SOCK_FLOAT, 1, N_("Z"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE}, | { SOCK_FLOAT, 1, N_("Z"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE}, | ||||
| { -1, 0, "" } | { -1, 0, "" } | ||||
| }; | }; | ||||
| static void init(const bContext *C, PointerRNA *ptr) | |||||
| { | |||||
| Scene *scene = CTX_data_scene(C); | |||||
| bNode *node = ptr->data; | |||||
| node->id = &scene->id; | |||||
| } | |||||
| void register_node_type_cmp_composite(void) | void register_node_type_cmp_composite(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| cmp_node_type_base(&ntype, CMP_NODE_COMPOSITE, "Composite", NODE_CLASS_OUTPUT, NODE_PREVIEW); | cmp_node_type_base(&ntype, CMP_NODE_COMPOSITE, "Composite", NODE_CLASS_OUTPUT, NODE_PREVIEW); | ||||
| node_type_socket_templates(&ntype, cmp_node_composite_in, NULL); | node_type_socket_templates(&ntype, cmp_node_composite_in, NULL); | ||||
| ntype.initfunc_api = init; | |||||
| /* Do not allow muting for this node. */ | /* Do not allow muting for this node. */ | ||||
| node_type_internal_links(&ntype, NULL); | node_type_internal_links(&ntype, NULL); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||