Tracking: Cleanup of transform code
This commit is contained in:
@@ -5976,27 +5976,23 @@ static void special_aftertrans_update__movieclip(bContext *C, TransInfo *t)
|
||||
{
|
||||
SpaceClip *sc = t->sa->spacedata.first;
|
||||
MovieClip *clip = ED_space_clip_get_clip(sc);
|
||||
MovieTrackingPlaneTrack *plane_track;
|
||||
ListBase *plane_tracks_base = BKE_tracking_get_active_plane_tracks(&clip->tracking);
|
||||
int framenr = ED_space_clip_get_clip_frame_number(sc);
|
||||
|
||||
for (plane_track = plane_tracks_base->first;
|
||||
const int framenr = ED_space_clip_get_clip_frame_number(sc);
|
||||
/* Update coordinates of modified plane tracks. */
|
||||
for (MovieTrackingPlaneTrack *plane_track = plane_tracks_base->first;
|
||||
plane_track;
|
||||
plane_track = plane_track->next)
|
||||
{
|
||||
bool do_update = false;
|
||||
|
||||
if (plane_track->flag & PLANE_TRACK_HIDDEN) {
|
||||
continue;
|
||||
}
|
||||
|
||||
do_update |= PLANE_TRACK_VIEW_SELECTED(plane_track) != 0;
|
||||
if (do_update == false) {
|
||||
if ((plane_track->flag & PLANE_TRACK_AUTOKEY) == 0) {
|
||||
int i;
|
||||
for (i = 0; i < plane_track->point_tracksnr; i++) {
|
||||
MovieTrackingTrack *track = plane_track->point_tracks[i];
|
||||
|
||||
if (TRACK_VIEW_SELECTED(sc, track)) {
|
||||
do_update = true;
|
||||
break;
|
||||
@@ -6004,15 +6000,14 @@ static void special_aftertrans_update__movieclip(bContext *C, TransInfo *t)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (do_update) {
|
||||
BKE_tracking_track_plane_from_existing_motion(plane_track, framenr);
|
||||
}
|
||||
}
|
||||
|
||||
if (t->scene->nodetree) {
|
||||
/* tracks can be used for stabilization nodes,
|
||||
* flush update for such nodes */
|
||||
if (t->scene->nodetree != NULL) {
|
||||
/* Tracks can be used for stabilization nodes,
|
||||
* flush update for such nodes.
|
||||
*/
|
||||
nodeUpdateID(t->scene->nodetree, &clip->id);
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_NODES, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user