37 .default_value({0.8f, 0.8f, 0.8f, 1.0f})
41 .
description(
"Invert stabilization to reintroduce motion to the image")
42 .compositor_expects_single_value();
84 if (
input.is_single_value() || !movie_clip) {
89 const int width =
input.domain().size.x;
90 const int height =
input.domain().size.y;
95 float scale, rotation;
97 movie_clip, frame_number, width, height, translation, &scale, &rotation);
106 output.transform(transformation);
150 ntype.
ui_name =
"Stabilize 2D";
151 ntype.
ui_description =
"Stabilize footage using 2D stabilization motion tracking settings";
154 ntype.
declare = file_ns::cmp_node_stabilize2d_declare;
155 ntype.
draw_buttons = file_ns::node_composit_buts_stabilize2d;
Scene * CTX_data_scene(const bContext *C)
float BKE_movieclip_remap_scene_to_clip_frame(const struct MovieClip *clip, float framenr)
#define NODE_CLASS_DISTORT
#define CMP_NODE_STABILIZE2D
void BKE_tracking_stabilization_data_get(struct MovieClip *clip, int framenr, int width, int height, float translation[2], float *scale, float *angle)
#define BLI_assert_unreachable()
@ CMP_NODE_INTERPOLATION_NEAREST
@ CMP_NODE_INTERPOLATION_BILINEAR
@ CMP_NODE_INTERPOLATION_BICUBIC
#define NOD_REGISTER_NODE(REGISTER_FUNC)
void uiTemplateID(uiLayout *layout, const bContext *C, PointerRNA *ptr, blender::StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int filter=UI_TEMPLATE_ID_FILTER_ALL, bool live_icon=false, std::optional< blender::StringRef > text=std::nullopt)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
const bNode & bnode() const
NodeOperation(Context &context, DNode node)
Result & get_result(StringRef identifier)
Context & context() const
Result & get_input(StringRef identifier) const
T get_single_value_default(const T &default_value) const
Interpolation get_interpolation()
bool do_inverse_stabilization()
MovieClip * get_movie_clip()
NodeOperation(Context &context, DNode node)
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_composit_buts_stabilize2d(uiLayout *layout, bContext *C, PointerRNA *ptr)
static NodeOperation * get_compositor_operation(Context &context, DNode node)
static void cmp_node_stabilize2d_declare(NodeDeclarationBuilder &b)
VecBase< float, 2 > float2
MatBase< float, 3, 3 > float3x3
static void register_node_type_cmp_stabilize2d()
void cmp_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
std::string ui_description
NodeGetCompositorOperationFunction get_compositor_operation
const char * enum_name_legacy
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare
void(* initfunc_api)(const bContext *C, PointerRNA *ptr)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)