Page MenuHome

Add the option to clear tracks on non-keyframed frames
Needs ReviewPublic

Authored by Lukas Stockner (lukasstockner97) on Sep 13 2015, 4:14 AM.

Details

Summary

This patch adds the option "Clear tracked" to the clearing options in the Movie Clip Editor.
When executed, it disables each selected marker on all frames except the ones on which the
marker was keyframed.
This is mainly useful when the Tracking features are used for reconstructing a scene from photos
instead of a clip. By manually placing the markers on each photo, reconstruction can be performed,
but since there is no temporal coherency, enabling and disabling each marker for each frame slows
down the workflow a lot. With this feature, the tracks are automatically enabled on the frames
where they have been placed manually.

Diff Detail

Repository
rB Blender
Branch
clear_tracked

Event Timeline

Lukas Stockner (lukasstockner97) retitled this revision from to Add the option to clear tracks on non-keyframed frames.
Sergey Sharybin (sergey) requested changes to this revision.Sep 13 2015, 9:56 AM
Sergey Sharybin (sergey) edited edge metadata.

Generally seems fine, with some minor feedback.

source/blender/blenkernel/intern/tracking.c
616

Use parenthesis even if there's single operator in the block. Would also suggest wrapping the line after &&.

625

There seems to be a temporary array involved which might be actually avoid. Did you consider simply assigning new markers array here and then do some offset magic when inserting disabled markers?

This revision now requires changes to proceed.Sep 13 2015, 9:56 AM
Lukas Stockner (lukasstockner97) edited edge metadata.

Now the temporary array is no longer needed, the non-keyframed markers are simply deleted.

@Lukas Stockner (lukasstockner97), the point was that you don't need 2 temporary arrays. Having one temp array saves you from moving too much memory.

Sergey Sharybin (sergey) requested changes to this revision.Oct 11 2015, 3:26 PM
Sergey Sharybin (sergey) edited edge metadata.

@Lukas Stockner (lukasstockner97), original patch had 2 temporary arrays, which was rather overkill.

It is faster to allocate single temporary array and copy meaningful markers in there rather than doing memmove() for each deleted marker.

realloc could be saved for after the disabled markers are inserted.

This revision now requires changes to proceed.Oct 11 2015, 3:26 PM
Lukas Stockner (lukasstockner97) edited edge metadata.

Okay, I've changed the operation to what I assume you mean, now the array that was used as a temporary storage before is used to replace the marker storage, which means that the markers are only copied once.
Regarding the disabled markers, I don't see a way to create them more intelligently without adding duplicated and ugly code, so I just continued using the util function to add them.