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.
Details
- Reviewers
Sergey Sharybin (sergey)
Diff Detail
- Repository
- rB Blender
- Branch
- clear_tracked
Event Timeline
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? | |
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.
@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.
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.