86 float marker_pos_ofs[2], parmask_pos[2];
115 rna_Mask_update_data(bmain,
scene,
ptr);
135 static void rna_MaskParent_id_type_set(
PointerRNA *
ptr,
int value)
159 return mask->masklay_act;
162 static void rna_Mask_layer_active_index_set(
PointerRNA *
ptr,
int value)
166 mask->masklay_act = value;
169 static void rna_Mask_layer_active_index_range(
184 char name_esc[
sizeof(masklay->
name) * 2];
214 static void rna_MaskLayer_name_set(
PointerRNA *
ptr,
const char *value)
218 char oldname[
sizeof(masklay->
name)], newname[
sizeof(masklay->
name)];
257 static void rna_MaskLayer_active_spline_point_set(
PointerRNA *
ptr,
267 for (spline = masklay->
splines.
first; spline; spline = spline->next) {
268 if (point >= spline->points && point < spline->points + spline->tot_point) {
276 static void rna_MaskSplinePoint_handle1_get(
PointerRNA *
ptr,
float *values)
283 static void rna_MaskSplinePoint_handle1_set(
PointerRNA *
ptr,
const float *values)
290 static void rna_MaskSplinePoint_handle2_get(
PointerRNA *
ptr,
float *values)
297 static void rna_MaskSplinePoint_handle2_set(
PointerRNA *
ptr,
const float *values)
304 static void rna_MaskSplinePoint_ctrlpoint_get(
PointerRNA *
ptr,
float *values)
311 static void rna_MaskSplinePoint_ctrlpoint_set(
PointerRNA *
ptr,
const float *values)
318 static int rna_MaskSplinePoint_handle_type_get(
PointerRNA *
ptr)
329 for (mask_layer =
mask->masklayers.first; mask_layer; mask_layer = mask_layer->
next) {
332 if (point >= spline->
points && point < spline->points + spline->
tot_point) {
350 static void rna_MaskSplinePoint_handle_type_set(
PointerRNA *
ptr,
int value)
356 bezt->
h1 = bezt->
h2 = value;
357 mask_point_check_stick(point);
361 static int rna_MaskSplinePoint_handle_left_type_get(
PointerRNA *
ptr)
369 static void rna_MaskSplinePoint_handle_left_type_set(
PointerRNA *
ptr,
int value)
376 mask_point_check_stick(point);
380 static int rna_MaskSplinePoint_handle_right_type_get(
PointerRNA *
ptr)
388 static void rna_MaskSplinePoint_handle_right_type_set(
PointerRNA *
ptr,
int value)
395 mask_point_check_stick(point);
416 "Mask layer '%s' not found in mask '%s'",
428 static void rna_Mask_layers_clear(
Mask *
mask)
447 static void rna_MaskLayer_spline_remove(
ID *
id,
457 reports,
RPT_ERROR,
"Mask layer '%s' does not contain spline given", mask_layer->
name);
466 static void rna_Mask_start_frame_set(
PointerRNA *
ptr,
int value)
478 static void rna_Mask_end_frame_set(
PointerRNA *
ptr,
int value)
493 int active_point_index = -1;
494 int i, spline_shape_index;
500 for (layer =
mask->masklayers.first; layer; layer = layer->
next) {
520 if (active_point_index >= 0) {
526 for (i = 0; i <
count; i++) {
541 static void rna_MaskSpline_point_remove(
ID *
id,
550 int active_point_index = -1;
553 for (layer =
mask->masklayers.first; layer; layer = layer->
next) {
565 if (point < spline->points || point >= spline->
points + spline->
tot_point) {
574 point_index = point - spline->
points;
577 "remove mask point");
580 memcpy(new_point_array + point_index,
581 spline->
points + point_index + 1,
585 spline->
points = new_point_array;
588 if (active_point_index >= 0) {
589 if (active_point_index == point_index) {
592 else if (active_point_index < point_index) {
616 {
ID_MC,
"MOVIECLIP", ICON_SEQUENCE,
"Movie Clip",
""},
636 prop,
NULL,
"rna_MaskParent_id_set",
"rna_MaskParent_id_typef",
NULL);
638 prop,
"ID",
"ID-block to which masking element would be parented to or to its property");
659 prop,
"Parent",
"Name of parent object in specified data-block to which parenting happens");
668 "Name of parent sub-object in specified data-block to which parenting happens");
680 srna,
"Mask Spline UW Point",
"Single point in spline segment defining feather");
709 {
HD_AUTO,
"AUTO", 0,
"Auto",
""},
710 {
HD_VECT,
"VECTOR", 0,
"Vector",
""},
711 {
HD_ALIGN,
"ALIGNED", 0,
"Aligned Single",
""},
713 {
HD_FREE,
"FREE", 0,
"Free",
""},
721 srna,
"Mask Spline Point",
"Single point in spline used for defining mask");
727 prop,
"rna_MaskSplinePoint_handle1_get",
"rna_MaskSplinePoint_handle1_set",
NULL);
734 prop,
"rna_MaskSplinePoint_ctrlpoint_get",
"rna_MaskSplinePoint_ctrlpoint_set",
NULL);
741 prop,
"rna_MaskSplinePoint_handle2_get",
"rna_MaskSplinePoint_handle2_set",
NULL);
748 prop,
"rna_MaskSplinePoint_handle_type_get",
"rna_MaskSplinePoint_handle_type_set",
NULL);
756 "rna_MaskSplinePoint_handle_left_type_get",
757 "rna_MaskSplinePoint_handle_left_type_set",
766 "rna_MaskSplinePoint_handle_right_type_get",
767 "rna_MaskSplinePoint_handle_right_type_set",
812 parm =
RNA_def_pointer(func,
"spline",
"MaskSpline",
"",
"The newly created spline");
820 parm =
RNA_def_pointer(func,
"spline",
"MaskSpline",
"",
"The spline to remove");
828 prop,
"rna_MaskLayer_active_spline_get",
"rna_MaskLayer_active_spline_set",
NULL,
NULL);
836 "rna_MaskLayer_active_spline_point_get",
837 "rna_MaskLayer_active_spline_point_set",
859 func,
"count", 1, 0, INT_MAX,
"Number",
"Number of points to add to the spline", 0, INT_MAX);
867 parm =
RNA_def_pointer(func,
"point",
"MaskSplinePoint",
"",
"The point to remove");
886 "Calculate feather offset as a second curve"},
903 prop,
"Feather Offset",
"The method used for calculating the feather offset");
911 prop,
"Weight Interpolation",
"The type of weight interpolation for spline");
933 prop,
"Self Intersection Check",
"Prevent feather from self-intersections");
980 "rna_MaskLayer_splines_begin",
981 "rna_iterator_listbase_next",
982 "rna_iterator_listbase_end",
983 "rna_iterator_listbase_get",
1048 prop,
"Calculate Holes",
"Calculate holes when filling overlapping curves");
1054 prop,
"Calculate Overlap",
"Calculate self intersections and overlap before filling");
1074 parm =
RNA_def_pointer(func,
"layer",
"MaskLayer",
"",
"New mask layer");
1080 parm =
RNA_def_pointer(func,
"layer",
"MaskLayer",
"",
"Shape to be removed");
1092 prop,
"rna_Mask_layer_active_get",
"rna_Mask_layer_active_set",
NULL,
NULL);
1111 "rna_Mask_layers_begin",
1112 "rna_iterator_listbase_next",
1113 "rna_iterator_listbase_end",
1114 "rna_iterator_listbase_get",
1128 "rna_Mask_layer_active_index_get",
1129 "rna_Mask_layer_active_index_set",
1130 "rna_Mask_layer_active_index_range");
1132 prop,
"Active Shape Index",
"Index of active layer in list of all mask's layers");
void BKE_mask_layer_shape_changed_add(struct MaskLayer *masklay, int index, bool do_init, bool do_init_interpolate)
void BKE_mask_layer_remove(struct Mask *mask, struct MaskLayer *masklay)
bool BKE_mask_spline_remove(struct MaskLayer *mask_layer, struct MaskSpline *spline)
void BKE_mask_layer_free_list(struct ListBase *masklayers)
void BKE_mask_calc_handle_point(struct MaskSpline *spline, struct MaskSplinePoint *point)
struct MaskLayer * BKE_mask_layer_new(struct Mask *mask, const char *name)
struct MaskLayer * BKE_mask_layer_active(struct Mask *mask)
void BKE_mask_layer_active_set(struct Mask *mask, struct MaskLayer *masklay)
void BKE_mask_layer_rename(struct Mask *mask, struct MaskLayer *masklay, char *oldname, char *newname)
void BKE_mask_calc_handle_point_auto(struct MaskSpline *spline, struct MaskSplinePoint *point, const bool do_recalc_length)
Resets auto handles even for non-auto bezier points.
int BKE_mask_layer_shape_spline_to_index(struct MaskLayer *masklay, struct MaskSpline *spline)
void BKE_mask_coord_from_movieclip(struct MovieClip *clip, struct MovieClipUser *user, float r_co[2], const float co[2])
void BKE_mask_layer_shape_changed_remove(struct MaskLayer *masklay, int index, int count)
void BKE_mask_parent_init(struct MaskParent *parent)
struct MaskSpline * BKE_mask_spline_add(struct MaskLayer *masklay)
float BKE_movieclip_remap_scene_to_clip_frame(const struct MovieClip *clip, float framenr)
void BKE_movieclip_user_set_frame(struct MovieClipUser *user, int framenr)
void BKE_report(ReportList *reports, ReportType type, const char *message)
void BKE_reportf(ReportList *reports, ReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
struct MovieTrackingTrack * BKE_tracking_track_get_named(struct MovieTracking *tracking, struct MovieTrackingObject *object, const char *name)
struct MovieTrackingPlaneTrack * BKE_tracking_plane_track_get_named(struct MovieTracking *tracking, struct MovieTrackingObject *object, const char *name)
struct MovieTrackingPlaneMarker * BKE_tracking_plane_marker_get(struct MovieTrackingPlaneTrack *plane_track, int framenr)
struct MovieTrackingObject * BKE_tracking_object_get_named(struct MovieTracking *tracking, const char *name)
struct MovieTrackingMarker * BKE_tracking_marker_get(struct MovieTrackingTrack *track, int framenr)
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
MINLINE void sub_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void add_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void zero_v2(float r[2])
size_t size_t char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
size_t size_t char size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, const size_t dst_maxncpy) ATTR_NONNULL()
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
#define BLT_I18NCONTEXT_ID_CURVE
void DEG_id_tag_update(struct ID *id, int flag)
@ MASK_LAYERFLAG_FILL_OVERLAP
@ MASK_LAYERFLAG_FILL_DISCRETE
@ MASK_PARENT_PLANE_TRACK
@ MASK_PARENT_POINT_TRACK
#define MASK_RESTRICT_SELECT
#define MASK_RESTRICT_RENDER
#define MASK_RESTRICT_VIEW
@ MASK_BLEND_MERGE_SUBTRACT
@ MASK_SPLINE_OFFSET_SMOOTH
@ MASK_SPLINE_OFFSET_EVEN
@ MASK_SPLINE_INTERP_EASE
@ MASK_SPLINE_INTERP_LINEAR
@ MASK_SPLINE_NOINTERSECT
Object is a sort of wrapper for general info.
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
#define MEM_recallocN(vmemh, len)
Group RGB to Bright Vector Camera CLAMP
#define RNA_POINTER_INVALIDATE(ptr)
StructRNA * ID_code_to_RNA_type(short idcode)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb, IteratorSkipFunc skip)
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
void rna_def_animdata_common(StructRNA *srna)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
void RNA_def_property_array(PropertyRNA *prop, int length)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
static const EnumPropertyItem parent_type_items[]
static void rna_def_mask(BlenderRNA *brna)
static void rna_def_maskSplinePoints(BlenderRNA *brna)
static void rna_def_mask_layer(BlenderRNA *brna)
static void rna_def_masklayers(BlenderRNA *brna, PropertyRNA *cprop)
static void rna_def_mask_splines(BlenderRNA *brna)
static void rna_def_maskSpline(BlenderRNA *brna)
static void rna_def_maskSplinePointUW(BlenderRNA *brna)
void RNA_def_mask(BlenderRNA *brna)
static void rna_def_maskSplinePoint(BlenderRNA *brna)
static void rna_def_maskParent(BlenderRNA *brna)
const EnumPropertyItem rna_enum_proportional_falloff_curve_only_items[]
struct MaskSplinePoint * act_point
struct MaskSpline * act_spline
float parent_corners_orig[4][2]
struct MovieTracking tracking
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
void WM_main_add_notifier(unsigned int type, void *reference)