Age | Commit message (Collapse) | Author |
|
Use function `sequence_editor.display_stack(meta_strip)` to set
displayed timeline content.
To view top-level timeline, that does not belong to any meta strip, pass
`None` as argument.
Differential Revision: https://developer.blender.org/D12048
|
|
This patch makes it possible to manipulate strips without need to use
update functions to recalculate effect and meta strips.
Prior to this change function `SEQ_time_update_sequence` had to be used
to update mainly effects and meta strips. This was implemented in a way
that relied on sorted list of strips, which can't always be done and in
rare cases this approach failed.
In case of meta strips, `seqbase` had to be passed and compared with
"active" one to determine whether meta strip should be updated or not.
This is especially weak system that is prone to bugs when functions are
used by python API functions.
Finally, other strip types had startdisp` and `enddisp` fields updated
by this function and a lot of code relied on these fields even if strip
start, length and offsets are available. This is completely
unnecessary.
Implemented changes:
All effects and meta strips are updated when strip handles are moved or
strip is translated, without need to call any update function.
Function `SEQ_time_update_sequence` has been split to
`SEQ_time_update_meta_strip_range` and
`seq_time_update_effects_strip_range`. These functions should be only
used within sequencer module code. Meta update is used for versioning,
which is only reason for it not being declared internally.
Sequence fields `startdisp` and `enddisp` are now only used for
effects to store strip start and end points. These fields should be
used only internally within sequencer module code.
Use function `SEQ_time_*_handle_frame_get` to get strip start and end
points.
To update effects and meta strips with reasonable performance, cache
for "parent" meta strip and attached effects is added to
`SequenceLookup` cache, so it shares invalidation mechanisms.
All caches are populated during single iteration.
There should be no functional changes.
Differential Revision: https://developer.blender.org/D14990
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
- Move functions that handle animation to own file - `animation.c`
- Refactor `SEQ_offset_animdata` and `SEQ_free_animdata` functions
- Add function `SEQ_fcurves_by_strip_get` to provide more granular
and explicit way for operators to handle animation
- Remove function `SEQ_dupe_animdata`, do curve duplication explicitly
in operator code, which makes more sense to do. Further this function
was also used for renaming strips which makes no sense.
- Refactor usage of function `SEQ_free_animdata` and remove XXX comment.
Now this functiuon is no longer called when `Sequence` data is freed
implicitly, it is done explicitly in high level function
`SEQ_edit_remove_flagged_sequences`
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D13852
|
|
MSVC used to warn about const mismatch for arguments passed by value.
Remove these as newer versions of MSVC no longer show this warning.
|
|
Ref T92709
|
|
Differential Revision: https://developer.blender.org/D12661
|
|
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
|
|
Callers that require lazy initialization can use SEQ_editing_ensure.
|
|
Add mode to overwrite strips on overlap instead of resolving overlap.
When overlap is created, 3 things can happen:
- On partial overlap, handles of overlapped strip are moved
- On complete overlap with smaller strip, overlapped strip is split
- On complete overlap with larger strip, overlapped strip is removed
This mode can be enabled in header.
Reviewed By: fsiddi, mano-wii
Differential Revision: https://developer.blender.org/D11805
|
|
|
|
We now use a for_each function with callback to iterate through all sequences in the scene.
This has the benefit that we now only loop over the sequences in the scene once.
Before we would loop over them twice and allocate memory to store temporary data.
The allocation of temporary data lead to unintentional memory leaks if the code used returns to exit out of the iteration loop.
The new for_each callback method doesn't allocate any temporary data and only iterates though all sequences once.
Reviewed By: Richard Antalik, Bastien Montagne
Differential Revision: http://developer.blender.org/D12278
|
|
|
|
Change snapping behavior to snap strip edges when they are close to snap point.
Default behavior is, that each transformed strip is snapped to any other strip.
Implement snapping controls in sequencer tool settings. These controls include:
- Snapping on/off
- Ability to snap to playhead and strip hold offset points
- Filter snap points by excluding sound or muted strips
- Control snapping distance
Snapping controls are placed in timeline header similar to 3D viewport
Reviewed By: mano-wii
Differential Revision: https://developer.blender.org/D11646
|
|
Use lookup string callback function for `sequences_all` RNA property
`rna_SequenceEditor_sequences_all_lookup_string` using a GHash for faster lookups.
When names are changed or strips are added/removed the lookup is tagged invalid.
The next time the lookup is used it will rebuild it.
Reviewed By: sergey, jbakker
Differential Revision: https://developer.blender.org/D11544
|
|
Remove unused flag `SEQ_DUPE_ANIM` and code used by this flag.
Remove flag `SEQ_DUPE_CONTEXT` and refactor code, to split operator
logic from duplication code.
Reduce indentation level in for loop.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D11318
|
|
|
|
Tool settings for sequencer were not initialized, which caused crash
when adding strips.
There was fix for same issue in versioning rB0f81dafe6cec, but
subversion was not bumped, so files with uninitialized tool settings
may still exist.
Add `SEQ_tool_settings_get()` accessor function that will initialize
tool settings if they are missing. Change operator code to use
`SEQ_tool_settings_fit_method_get()` function instead of accessing
tool settings directly
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D11383
|
|
References to `SEQ_CACHE_COST_MAX` were removed in 38b77ef8b221.
|
|
Move low level logic to module code and versioning logic to versioning code.
Metas strip position was handled in diffrent way compared to other strips.
This was introduced in c8b0d25794be as bugfix for T28158.
I disagree with such design. Meta strips should be handled in same way as
any other strips.
I have tested this change and haven't found any problems.
No problems after checking T28158 as well.
There should be no functional changes on user level.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D9972
|
|
|
|
|
|
|
|
API functions get SEQ_ prefix.
Intern functions get seq_ prefix
Functions also have appropriate category included in name.
|
|
Crash on null dereference in `SEQ_timeline_boundbox()`. This function was
generalized in rB9e4a4c2e996c to work on arbitrary `seqbase`.
Fixed by refactoring `SEQ_timeline_boundbox()` functions to return default
sane values if `seqbase` is `NULL`
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D9878
|
|
This commit resolves problem introduced in e1665c3d3190 - it was
difficult to import media at their original resolution.
This is done by using original resolution as reference for scale.
All crop and strip transform values and their animation is converted
form old files.
To make both workflows easy to use, sequencer tool settings have been
created with preset for preffered scaling method. This setting is in
sequencer timeline header and add image or movie strip operator
properties.
Two new operators have been added:
`sequencer.strip_transform_fit` operator with 3 options: Scale To Fit,
Scale to Fill and Stretch To Fill.
Operator can fail if strip image or video is not loaded currently, this
case should be either sanitized or data loaded on demand.
`sequencer.strip_transform_clear` operator with 4 options:
Clear position, scale, rotation and all (previous 3 options combined).
Reviewed By: sergey, fsiddi
Differential Revision: https://developer.blender.org/D9582
|
|
|
|
Logic was broken into finding gaps and ofsetting strips.
Functions were modified so they work on explicitly defined seqbase,
so they can be used as python API functions.
Functional changes:
- Improve performance by calculating gap length and offseting strips
at once. Previously strips were offset by one frame.
- Calculate gap from start frame. Previously gap was considered only
inbetween strips.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9730
|
|
Move RNA enums and utility functions closer to operator definition.
No functional changes.
|
|
Code was rewritten to work on per-sequence basis returning reference to
created strip.
There should be no functional changes.
Selection logic is left as is for now. I could simplify it, but it
belongs to operator, not split logic.
Reviewed By: sergey
Differential Revision: developer.blender.org/D9592
|
|
Variables renaned:
- cfra -> timeline_frame
- nr -> frame index
- cfra_over -> overlap_frame
Function seq_give_stripelem_index was renamed to seq_give_frame_index.
|
|
Ref T76372.
|
|
|
|
Map frame for cached raw images to strip input media frame range. This
means that static images or extended frame range of movies will only
generate one cache entry.
timeline_frame is stored in cache key as a reference - on what frame
was this entry created, so we don't have to reverse lookup frame range.
Since each media frame corresponds to one cache frame with same frame
index key, there is no need to invalidate raw cache when changing time
remapping properties like use_reverse_frames or strobe
No changes are needed for disk cache, since invalidating raw entry
assumes all data will be invalidated.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9462
|
|
Replace BKE_sequencer wirh SEQ_render or SEQ_proxy prefixes.
In cases where function is very generic, only SEQ prefix is used.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9439
|
|
Move functions closely related to rendering images and proxies into
render.c and proxy.c files. render.h and proxy.h are created for
functions used internally.
There should be no functional changes.
|
|
This patch changes behavior of strip transform and crop feature.
Purpose of this change is to allow display arbitrary portion of input
image, simplify user interface and workflow.
Offset and Crop values in old files are converted in versioning.
Offset animation is also converted. Crop animation and animation of
crop or offset enable properties is not taken into account
Changes in behavior and interface:
- If image is added to timeline it is scaled to fit inside preview area
while maintaining aspect ratio. Image is centered. This is considered
as a baseline for further transformation.
- Scale and rotation was added, so it is possible to transform image at
it's original resolution.
- Crop will not affect image transformation (does not move image).
- Values of Crop and Transform Position are in pixels, these values are
corrected if preview is fraction of project resolution.
- Transform and Mirror panel has been removed and new Transform panel
and Crop panel is moved to Adjust panel. Mirror is now part of new
Transform panel.
Technical changes:
- Preprocessing stage must work on duplicated image, because original is
cached. Previously Crop and Offset could run at once and required only
one duplication of image. This is not the case with new algorithms, so
duplication on demand is implemented. Transformation can read original
image and will output new image that is safe to modify. It should be
possible to add crop step to transform algorithm, so that Crop won't
require previous duplication though.
- Use Crop and Use Translation checkboxes were removed. Individual
values are compared to default values to check if image needs to be
processed. In case of transform this will be done also if resolution of
source.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8393
|
|
This reverts commit 0277579b2850f0ba097741ca22eb8ae9ccd9bcea.
This commit caused build errors on Linux.
|
|
This patch changes behavior of strip transform and crop feature.
Purpose of this change is to allow display arbitrary portion of input
image, simplify user interface and workflow.
Offset and Crop values in old files are converted in versioning.
Offset animation is also converted. Crop animation and animation of
crop or offset enable properties is not taken into account
Changes in behavior and interface:
- If image is added to timeline it is scaled to fit inside preview area
while maintaining aspect ratio. Image is centered. This is considered
as a baseline for further transformation.
- Scale and rotation was added, so it is possible to transform image at
it's original resolution.
- Crop will not affect image transformation (does not move image).
- Values of Crop and Transform Position are in pixels, these values are
corrected if preview is fraction of project resolution.
- Transform and Mirror panel has been removed and new Transform panel
and Crop panel is moved to Adjust panel. Mirror is now part of new
Transform panel.
Technical changes:
- Preprocessing stage must work on duplicated image, because original is
cached. Previously Crop and Offset could run at once and required only
one duplication of image. This is not the case with new algorithms, so
duplication on demand is implemented. Transformation can read original
image and will output new image that is safe to modify. It should be
possible to add crop step to transform algorithm, so that Crop won't
require previous duplication though.
- Use Crop and Use Translation checkboxes were removed. Individual
values are compared to default values to check if image needs to be
processed. In case of transform this will be done also if resolution of
source.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8393
|
|
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9349
|