21 {0,
"SCENE", 0,
"Scene Size",
""},
27 N_(
"Pixel size scaled by scene percentage")},
28 {0,
nullptr, 0,
nullptr,
nullptr},
33 b.use_custom_socket_order();
35 b.add_output<
decl::Float>(
"Mask"_ustr).structure_type(StructureType::Dynamic);
38 template_id(&layout,
C, ptr,
"mask",
"mask.new",
nullptr,
nullptr);
45 .description(
"The source where the size of the mask is retrieved");
50 .usage_by_menu(
"Size Source"_ustr,
52 .description(
"The resolution of the mask along the X direction");
57 .usage_by_menu(
"Size Source"_ustr,
59 .description(
"The resolution of the mask along the Y direction");
62 .
description(
"Use feather information from the mask");
65 b.add_panel(
"Motion Blur"_ustr).default_closed(
true);
69 .
description(
"Use multi-sampled motion blur of the mask");
80 .description(
"Exposure for motion blur as a factor of FPS");
111 this->
context().get_frame_number(),
162 this->
get_input(
"Motion Blur Samples").get_single_value_default<int>(), 1, 64);
169 this->
get_input(
"Motion Blur Shutter").get_single_value_default<float>(), 0.0f, 1.0f);
180 this->
get_input(
"Size Source").get_single_value_default<MenuValue>().value);
185 return reinterpret_cast<Mask *
>(this->
node().
id);
200 ntype.
ui_description =
"Input mask from a mask data-block, created in the image editor";
#define NOD_REGISTER_NODE(REGISTER_FUNC)
Result & get(Context &context, Mask *mask, const Domain &domain, float aspect_ratio, bool use_feather, int frame, int motion_blur_samples, float motion_blur_shutter, bool srgb_to_linear)
StaticCacheManager & cache_manager()
virtual const RenderData & get_render_data() const
virtual Domain get_compositing_domain() const =0
NodeOperation(Context &context, const bNode &node)
const bNode & node() const
Result & get_result(StringRef identifier)
void allocate_default_remaining_outputs()
Context & context() const
Result & get_input(StringRef identifier) const
void share_data(const Result &source)
T get_single_value_default() const
CachedMaskContainer cached_masks
DeclType::Builder & add_input(UString name, UString identifier=""_ustr)
NodeOperation(Context &context, const bNode &node)
int get_motion_blur_samples()
float get_motion_blur_shutter()
Domain compute_domain() override
CMPNodeMaskFlags get_flags()
void node_register_type(bNodeType &ntype)
T clamp(const T &a, const T &min, const T &max)
T max(const T &a, const T &b)
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
static const EnumPropertyItem size_source_items[]
static NodeOperation * get_compositor_operation(Context &context, const bNode &node)
static void node_label(const bNodeTree *, const bNode *node, char *label, int label_maxncpy)
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
@ CMP_NODE_MASK_FLAG_SIZE_FIXED_SCENE
@ CMP_NODE_MASK_FLAG_SIZE_FIXED
void cmp_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
std::string ui_description
void(*) labelfunc(const bNodeTree *ntree, const bNode *node, char *label, int label_maxncpy)
NodeGetCompositorOperationFunction get_compositor_operation
const char * enum_name_legacy
NodeDeclareFunction declare