40 for (
int i = 0; i < spline->tot_point; i++) {
44 point->parent.id =
nullptr;
59 ot->name =
"Clear Parent";
60 ot->description =
"Clear the mask's parenting";
61 ot->idname =
"MASK_OT_parent_clear";
84 int framenr, parent_type;
85 float parmask_pos[2], orig_corners[4][2];
86 const char *sub_parent_name;
88 if (
ELEM(
nullptr, sc, clip)) {
96 if (tracking_object ==
nullptr) {
100 if ((track = tracking_object->
active_track) !=
nullptr) {
102 float marker_pos_ofs[2];
108 sub_parent_name = track->
name;
110 memset(orig_corners, 0,
sizeof(orig_corners));
116 sub_parent_name = plane_track->
name;
118 memcpy(orig_corners, plane_marker->
corners,
sizeof(orig_corners));
130 for (
int i = 0; i < spline->tot_point; i++) {
136 point->parent.type = parent_type;
141 memcpy(
point->parent.parent_corners_orig,
143 sizeof(
point->parent.parent_corners_orig));
158 ot->name =
"Make Parent";
159 ot->description =
"Set the mask's parenting";
160 ot->idname =
"MASK_OT_parent_set";
Mask * CTX_data_edit_mask(const bContext *C)
SpaceClip * CTX_wm_space_clip(const bContext *C)
#define MASKPOINT_ISSEL_ANY(p)
void BKE_mask_coord_from_movieclip(struct MovieClip *clip, struct MovieClipUser *user, float r_co[2], const float co[2])
struct MovieTrackingMarker * BKE_tracking_marker_get(struct MovieTrackingTrack *track, int framenr)
struct MovieTrackingObject * BKE_tracking_object_get_active(const struct MovieTracking *tracking)
struct MovieTrackingPlaneMarker * BKE_tracking_plane_marker_get(struct MovieTrackingPlaneTrack *plane_track, int framenr)
#define LISTBASE_FOREACH(type, var, list)
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void zero_v2(float r[2])
#define STRNCPY(dst, src)
void DEG_id_tag_update(ID *id, unsigned int flags)
@ MASK_PARENT_PLANE_TRACK
@ MASK_PARENT_POINT_TRACK
MovieClip * ED_space_clip_get_clip(const SpaceClip *sc)
bool ED_space_clip_maskedit_mask_poll(bContext *C)
int ED_space_clip_get_clip_frame_number(const SpaceClip *sc)
bool ED_maskedit_mask_visible_splines_poll(bContext *C)
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a point
static int mask_parent_set_exec(bContext *C, wmOperator *)
static int mask_parent_clear_exec(bContext *C, wmOperator *)
void MASK_OT_parent_clear(wmOperatorType *ot)
void MASK_OT_parent_set(wmOperatorType *ot)
ccl_device_inline float4 mask(const int4 mask, const float4 a)
struct MovieTracking tracking
MovieTrackingPlaneTrack * active_plane_track
MovieTrackingTrack * active_track
struct MovieClipUser user
void WM_event_add_notifier(const bContext *C, uint type, void *reference)