VSE: Image transform tools
Add tools for image manipulation in sequencer preview region. This includes: - Translate, rotate and resize operators, tools and gizmos - Origin for image transformation - Median point and individual origins pivot modes - Select and Box select operator works in preview - Image overlay drawing ref T90156 Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D12105
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
#include "MEM_guardedalloc.h"
|
||||
#include "readfile.h"
|
||||
|
||||
#include "SEQ_iterator.h"
|
||||
#include "SEQ_sequencer.h"
|
||||
|
||||
#include "RNA_access.h"
|
||||
@@ -774,6 +775,14 @@ static void version_geometry_nodes_change_legacy_names(bNodeTree *ntree)
|
||||
}
|
||||
}
|
||||
}
|
||||
static bool seq_transform_origin_set(Sequence *seq, void *UNUSED(user_data))
|
||||
{
|
||||
StripTransform *transform = seq->strip->transform;
|
||||
if (seq->strip->transform != NULL) {
|
||||
transform->origin[0] = transform->origin[1] = 0.5f;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/* NOLINTNEXTLINE: readability-function-size */
|
||||
void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
||||
@@ -1290,6 +1299,27 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
||||
}
|
||||
}
|
||||
|
||||
if (!MAIN_VERSION_ATLEAST(bmain, 300, 24)) {
|
||||
LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
|
||||
SequencerToolSettings *sequencer_tool_settings = SEQ_tool_settings_ensure(scene);
|
||||
sequencer_tool_settings->pivot_point = V3D_AROUND_CENTER_MEDIAN;
|
||||
|
||||
if (scene->ed != NULL) {
|
||||
SEQ_for_each_callback(&scene->ed->seqbase, seq_transform_origin_set, NULL);
|
||||
}
|
||||
}
|
||||
LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
|
||||
LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
|
||||
LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
|
||||
if (sl->spacetype == SPACE_SEQ) {
|
||||
SpaceSeq *sseq = (SpaceSeq *)sl;
|
||||
sseq->preview_overlay.flag |= SEQ_PREVIEW_SHOW_OUTLINE_SELECTED;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Versioning code until next subversion bump goes here.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user