Differential D13303 Diff 45854 source/blender/nodes/composite/nodes/node_composite_planetrackdeform.cc
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_planetrackdeform.cc
| Show All 17 Lines | |||||
| */ | */ | ||||
| /** \file | /** \file | ||||
| * \ingroup cmpnodes | * \ingroup cmpnodes | ||||
| */ | */ | ||||
| #include "node_composite_util.hh" | #include "node_composite_util.hh" | ||||
| static bNodeSocketTemplate cmp_node_planetrackdeform_in[] = { | namespace blender::nodes { | ||||
| {SOCK_RGBA, N_("Image"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE}, {-1, ""}}; | |||||
| static bNodeSocketTemplate cmp_node_planetrackdeform_out[] = { | static void cmp_node_planetrackdeform_declare(NodeDeclarationBuilder &b) | ||||
| {SOCK_RGBA, N_("Image")}, | { | ||||
| {SOCK_FLOAT, N_("Plane")}, | b.add_input<decl::Color>(N_("Image")); | ||||
| {-1, ""}, | b.add_output<decl::Color>(N_("Image")); | ||||
| }; | b.add_output<decl::Float>(N_("Plane")); | ||||
| } | |||||
| } // namespace blender::nodes | |||||
| static void init(bNodeTree *UNUSED(ntree), bNode *node) | static void init(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| NodePlaneTrackDeformData *data = (NodePlaneTrackDeformData *)MEM_callocN( | NodePlaneTrackDeformData *data = (NodePlaneTrackDeformData *)MEM_callocN( | ||||
| sizeof(NodePlaneTrackDeformData), "node plane track deform data"); | sizeof(NodePlaneTrackDeformData), "node plane track deform data"); | ||||
| data->motion_blur_samples = 16; | data->motion_blur_samples = 16; | ||||
| data->motion_blur_shutter = 0.5f; | data->motion_blur_shutter = 0.5f; | ||||
| node->storage = data; | node->storage = data; | ||||
| } | } | ||||
| void register_node_type_cmp_planetrackdeform(void) | void register_node_type_cmp_planetrackdeform() | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| cmp_node_type_base( | cmp_node_type_base( | ||||
| &ntype, CMP_NODE_PLANETRACKDEFORM, "Plane Track Deform", NODE_CLASS_DISTORT, 0); | &ntype, CMP_NODE_PLANETRACKDEFORM, "Plane Track Deform", NODE_CLASS_DISTORT, 0); | ||||
| node_type_socket_templates(&ntype, cmp_node_planetrackdeform_in, cmp_node_planetrackdeform_out); | ntype.declare = blender::nodes::cmp_node_planetrackdeform_declare; | ||||
| node_type_init(&ntype, init); | node_type_init(&ntype, init); | ||||
| node_type_storage( | node_type_storage( | ||||
| &ntype, "NodePlaneTrackDeformData", node_free_standard_storage, node_copy_standard_storage); | &ntype, "NodePlaneTrackDeformData", node_free_standard_storage, node_copy_standard_storage); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||