31 b.use_custom_socket_order();
32 b.allow_any_socket_order();
35 .default_value({0.8f, 0.8f, 0.8f, 1.0f})
38 .structure_type(StructureType::Dynamic);
40 .structure_type(StructureType::Dynamic)
41 .align_with_previous();
44 template_id(&layout, context, node_pointer,
"clip",
nullptr,
"CLIP_OT_open",
nullptr);
49 .
description(
"The frame to get the stabilization data at");
53 .
description(
"Invert stabilization to reintroduce motion to the image");
60 .description(
"Interpolation method");
65 .description(
"The extension mode applied to the X axis");
70 .description(
"The extension mode applied to the Y axis");
77 node->id = id_cast<ID *>(scene->clip);
109 float scale, rotation;
111 movie_clip, frame_number, width, height, translation, &
scale, &rotation);
121 output.transform(transformation);
130 this->
get_input(
"Interpolation").get_single_value_default<MenuValue>().value);
131 switch (interpolation) {
148 this->
get_input(
"Extension X").get_single_value_default<MenuValue>().value);
149 switch (extension_x) {
164 this->
get_input(
"Extension Y").get_single_value_default<MenuValue>().value);
165 switch (extension_y) {
198 ntype.
ui_name =
"Stabilize 2D";
199 ntype.
ui_description =
"Stabilize footage using 2D stabilization motion tracking settings";
#define NODE_CLASS_DISTORT
#define CMP_NODE_STABILIZE2D
#define NOD_REGISTER_NODE(REGISTER_FUNC)
NodeOperation(Context &context, const bNode &node)
const bNode & node() const
Result & get_result(StringRef identifier)
Context & context() const
Result & get_input(StringRef identifier) const
InputDescriptor & get_input_descriptor(StringRef identifier)
bool is_single_value() const
static ResultType type(gpu::TextureFormat format)
T get_single_value_default() const
DeclType::Builder & add_input(UString name, UString identifier=""_ustr)
const CompositorInputRealizationMode & compositor_realization_mode() const
Stabilize2DOperation(Context &context, const bNode &node)
Extension get_extension_mode_y()
Extension get_extension_mode_x()
bool do_inverse_stabilization()
Interpolation get_interpolation()
MovieClip * get_movie_clip()
float3x3 scale(float3x3 mat, float2 scale)
void node_register_type(bNodeType &ntype)
AngleRadianBase< float > AngleRadian
CartesianBasis invert(const CartesianBasis &basis)
MatT from_loc_rot_scale(const typename MatT::loc_type &location, const RotationT &rotation, const VecBase< typename MatT::base_type, ScaleDim > &scale)
static void node_declare(NodeDeclarationBuilder &b)
static void node_init_api(const bContext *C, PointerRNA *node_ptr)
static void node_register()
static NodeOperation * get_compositor_operation(Context &context, const bNode &node)
const EnumPropertyItem rna_enum_node_compositor_extension_items[]
void BKE_tracking_stabilization_data_get(MovieClip *clip, int framenr, int width, int height, float translation[2], float *scale, float *angle)
@ CMP_NODE_EXTENSION_MODE_REPEAT
@ CMP_NODE_EXTENSION_MODE_EXTEND
@ CMP_NODE_EXTENSION_MODE_CLIP
@ CMP_NODE_INTERPOLATION_NEAREST
@ CMP_NODE_INTERPOLATION_BICUBIC
@ CMP_NODE_INTERPOLATION_ANISOTROPIC
@ CMP_NODE_INTERPOLATION_BILINEAR
float BKE_movieclip_remap_scene_to_clip_frame(const MovieClip *clip, float framenr)
@ NODE_DEFAULT_INPUT_SCENE_FRAME
Scene * CTX_data_scene(const bContext *C)
const EnumPropertyItem rna_enum_node_compositor_interpolation_items[]
void cmp_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
std::string ui_description
void(*) initfunc_api(const bContext *C, PointerRNA *ptr)
NodeGetCompositorOperationFunction get_compositor_operation
const char * enum_name_legacy
NodeDeclareFunction declare