Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-10-17Cleanup: replace BLI_join_dirfile with BLI_path_joinCampbell Barton
These functions are almost identical, the main difference being BLI_join_dirfile didn't trim existing slashes when joining paths however this isn't an important difference that warrants a separate function.
2022-10-07Cleanup: redundant parenthesisCampbell Barton
2022-08-02Fix T100049: Crash when render finishesRichard Antalik
Caused by NULL dereference of `Editing` before NULL check was done.
2022-06-29VSE: Improved Retiming systemRichard Antalik
Patch implements better way to control playback speed than it is possible to do with speed effect. Speed factor property can be set in Time panel. There are 2 layers of control: Option to retime movie to match scene FPS rate. Custom speed factor to control playback rate. Since playback rate is strip property, it is now possible to manipulate strip as normal one even if it is retimed. To facilitate manipulation, some functions need to consider speed factor and apply necessary corrections to strip offset or strip start. These corrections may need to be float numbers, so start and offsets must be float as well. Sound strips now use speed factor instead of pitch. This means, that strips will change length to match usable length. In addition, it is possible to group movie and sound strip and change speed of meta strip.
2022-06-13Fix T93500: Sequence.fps returns 0 when proxy is usedRichard Antalik
Caused by `seq_open_anim_file` early returning if anim struct exists, exen if it's not initialized. To ensure `anim` struct is initialized when `openfile` argument is true, don't do early return.
2022-06-02VSE: Make time operations self-containedRichard Antalik
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
2022-05-17Fix T98021: Crash when using scene strip as sequencer inputRichard Antalik
Issue was caused by treating such strip as meta and using `seq->channels` directly, which is not valid for scene strips. Pointer to channels is now provided by function `SEQ_get_seqbase_from_sequence`.
2022-04-04VSE: Add channel headersRichard Antalik
This patch adds channel region to VSE timeline area for drawing channel headers. It is synchronizedwith timeline region. 3 basic features are implemented - channel visibility, locking and name. Channel data is stored in `SeqTimelineChannel` which can be top-level owned by `Editing`, or it is owned by meta strip to support nesting. Strip properties are completely independent and channel properties are applied on top of particular strip property, thus overriding it. Implementation is separate from channel regions in other editors. This is mainly because style and topology is quite different in VSE. But also code seems to be much more readable this way. Currently channels use functions similar to VSE timeline to draw background to provide illusion of transparency, but only for background and sfra/efra regions. Great portion of this patch is change from using strip visibility and lock status to include channel state - this is facilitated by functions `SEQ_transform_is_locked` and `SEQ_render_is_muted` Originally this included changes in D14263, but patch was split for easier review. Reviewed By: fsiddi, Severin Differential Revision: https://developer.blender.org/D13836
2022-02-11File headers: SPDX License migrationCampbell Barton
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
2022-02-09Cleanup: simplify copyright headers for sequence & imbufCampbell Barton
2022-01-19Cleanup: VSE animation handlingRichard Antalik
- 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
2021-12-21Fix T94280: Crash when splitting meta stripRichard Antalik
This happens because in `SEQ_time_update_sequence` function `SEQ_get_meta_by_seqbase` returns uninitialized value. This isn't nice, but it shouldn't happen in first place. Problem is, that `SEQ_edit_strip_split` does move strips into detached `ListBase`, so other functions can't see them anymore. Detached `ListBase` is used solely to preserve relationships during duplication. Move strips to original `ListBase` immediately after duplication and return `NULL` if `SEQ_get_meta_by_seqbase` can't find meta strip. Splitting itself can still rely on fact, that number of original and duplicated strips is same and they are placed next to each other in exactly same order at the end of original `ListBase`.
2021-12-08Cleanup: move public doc-strings into headers for 'sequencer'Campbell Barton
Ref T92709
2021-10-07Fix T91972: Meta changes length when adding stripRichard Antalik
`SequencesMeta.new_movie()` API function caused meta strip to change length. Similar issue has been fixed in transform code by checking if `MetaStack` exists. `MetaStack` is not used when changing data in python. Provide `seqbase` to `SEQ_time_update_sequence()` so the function can check if change happens inside of meta strip. This patch also merges `seq_time_update_sequence_bounds()` into `SEQ_time_update_sequence()`. This is because same issue applies for both functions and it is confusing to have more time update functions.re if this will lead anywhere. Reviewed By: sergey Differential Revision: https://developer.blender.org/D12763
2021-09-21VSE strip thumbnailsAditya Y Jeppu
Draw thumbnails as strip overlay. This works for movie and image strips. To draw thumbnails, this overlay has to be enabled and strips must be tall enough. The thumbnails are loaded from source file using separate thread and stored in cache. Drawing code uses only images stored in cache, and if any is missing, background rendering job is started. If job can not render thumbnail, to prevent endless loop of creating job for missing image it sets `SEQ_FLAG_SKIP_THUMBNAILS` bit of `Sequence` flag. To prevent visual glitches during timeline panning and zooming, `View2D` flag `V2D_IS_NAVIGATING` is implemented. If bit is set, drawing code will look for set of evenly distributed thumbnails that should be guaranteed to exist and also set of previously displayed thumbnails. Due to volatile nature of cache these thumbnails can be missing anyway, in which case no new thumbnails will be drawn for particular strip. Cache capacity is limited to 5000 thumbnails and performs cleanup of non visible images when limit is reached. ref T89143 Reviewed By: ISS Differential Revision: https://developer.blender.org/D12266
2021-09-02Cleanup: remove redundant alloc argument to SEQ_editing_getCampbell Barton
Callers that require lazy initialization can use SEQ_editing_ensure.
2021-08-25Cleanup and remove SEQ_ALL_BEGIN macroSebastian Parborg
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
2021-08-24VSE: Add Sequence.parent_meta() python API functionFĂ©lix
This function can be used to find metastrip parent of nested strip. Reviewed By: ISS Differential Revision: https://developer.blender.org/D11985
2021-06-30Cleanup: use const arguments for accessor functionsCampbell Barton
2021-06-16VSE: Improve animation evaluation performanceRichard Antalik
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
2021-06-02VSE: Add strip-time intersection test functionRichard Antalik
Use SEQ_time_strip_intersects_frame function to test if strip intersects with frame. Note: There are cases where this function should not be used. For example splitting strips require at least 1 frame "inside" strip. Another example is drawing, where playhead technically doesn't intersect strip, but it is rendered, because current frame has "duration" or "thickness" of 1 frame. Reviewed By: sergey Differential Revision: https://developer.blender.org/D11320
2021-05-19VSE: Refactor sorting functionsRichard Antalik
Recently `SEQ_sort()` function was split so functionality is provided on per-seqbase basis. After discussion about this split, it turned out, that per-seqbase operation is only that should be provided, because RNA API functions need to be able to access arbitrary seqbase Remove recently introduced function `seq_sort_seqbase` and change `SEQ_sort` function to operate on seqbase. Reviewed By: sergey Differential Revision: https://developer.blender.org/D11297
2021-05-19VSE: Better handling of effect strip splittingRichard Antalik
Splitting of effect strip alone wasn't handled properly. Previously this resulted in duplicating effect strip, and it was broken at least from 2.79. Change in rB8ec6b34b8eb2 was intended to allow splitting strips individually, so it can be used as RNA API function but also so it requires as little glue logic as possible. This is fixed by splitting all dependent strips at once in 2 separate ListBases for left and right strips. Strips can be finally moved into original `ListBase`. With this fix it is still possible to split strips individually with little glue logic. RNA API function could return list of split strips as well, currently at least one strip in chain will be provided so chain can be reconstructed on python side. Reviewed By: sergey Differential Revision: https://developer.blender.org/D10209
2021-05-06Cleanup: VSE: move functions from incorrect fileRichard Antalik
`SEQ_recursive_apply` and `SEQ_seqbase_recursive_apply` were incorrectly refactored into `iterator.c` file, but they aren't part and don't use sequencer iterator. Functions are moved to `utils.c` file.
2020-12-19Cleanup: Split SEQ_sequencer.h fileRichard Antalik
2020-12-19Cleanup: Rename BKE_sequencer functionsRichard Antalik
API functions get SEQ_ prefix. Intern functions get seq_ prefix Functions also have appropriate category included in name.
2020-12-18Cleanup: Various clang tidy warningsHans Goudey
There are more in the new mesh fairing code and in the poisson distribution code, this commit doesn't fix those.
2020-12-16VSE: Improve motion-picture workflowRichard Antalik
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
2020-11-16Cleanup: split sequencer.c fileRichard Antalik
Move most functions into separate files. File sequencer.c is reserved for alloc, free and duplicating functions. There should be no functional changes.