Age | Commit message (Collapse) | Author |
|
Some RNA properties and operators did not invalidate cache or did it
incorrectly.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D13101
|
|
`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
|
|
On the blender side this commit fixes importing video files with audio
and video streams that do not share the same start time and duration.
Differential Revision: https://developer.blender.org/D12353
|
|
Callers that require lazy initialization can use SEQ_editing_ensure.
|
|
This function can be used to find metastrip parent of nested strip.
Reviewed By: ISS
Differential Revision: https://developer.blender.org/D11985
|
|
When splitting strips, first they are duplicated and then offsets
adjusted. This can fail on cross transitions, because some strips don't
overlap with split frame.
All strips, that relate to each other must be duplicated to ensure
correct relations after splitting, so solution is to delete non
overlapping strips from left or right side respectively.
Since cross transition don't have to overlap with source strips,
splitting such strips would lead to effect being deleted, which
could cause crash when iterating over strips in python. Therefore
splitting of such strips is now forbidden and will generate error.
Splitting of transition will also generate error solely because such
operation is illogical.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D12121
|
|
The duration and start time for audio strips were not correctly read in
audaspace.
Some video files have a "lead in" section of audio that plays before the
video starts playing back. Before this patch, we would play this lead in
audio at the same time as the video started and thus the audio would not
be in sync anymore.
Now the lead in audio is cut off and the duration should be correctly
calculated with this in mind.
If the audio starts after the video, the audio strip is shifted to
account for this, but it will also lead to cut off audio which might not
be wanted. However we don't have a simple way to solve this at this
point.
Differential Revision: http://developer.blender.org/D11917
|
|
|
|
`split_multicam` used split operator, where if more strips than
multicam were selected, all would be split, which is undesirable.
Add `Sequence.split()` RNA API function. to split individual strips.
Function accepts `frame` and `split_method arguments`. Returns right
strip after splitting.
In case when strip being split have effects, these will be split too, so
no invalid state should be created.
Selection is not handled, this is by design up to user.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D11926
|
|
Add fit_method argument to new movie and image RNA API functions.
This argument is optional.
ref T86925
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D10816
|
|
There were multiple cases that could lead to problems like moving meta
strip into itself or into it's children meta strips.
Print error string to console when invalid action is requested.
|
|
|
|
This function can be used to create empty meta strip, which is not
straightforward when using operators. Very useful for import/export
scripts.
Reviewed By: ISS
Differential Revision: https://developer.blender.org/D10661
|
|
This function can be used to move strips into meta strips with no
side effects like change of selection state.
Reviewed By: ISS
Differential Revision: https://developer.blender.org/D10759
|
|
|
|
Isolate RNA and operator logic from functions that create strips.
- Operator specific code was removed from `SeqLoadInfo` structure and
`SEQ_add_*` functions.
- Strip loading code was removed from RNA and operator functions.
- `SEQ_add_*` API was unified to work on `SeqLoadData` struct.
Only exception is image strip, which require files to be loaded
separately to strip creation itself. This is not ideal, but I think
it's acceptable.
- Some functions and variables were refactored so the code reads
better.
There are minor functional changes (coincidental bugfixes):
- Operator errors are reported per-strip. Previously they were not
reported at all?
- `new_sound()` RNA API function now create sound with length of 1
if source file does not exist. Previously it created strip with
length of 0.
- Replace selection operator property wasn't working correctly.
Fixed in this patch.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9760
|
|
|
|
API functions get SEQ_ prefix.
Intern functions get seq_ prefix
Functions also have appropriate category included in name.
|
|
This was caused by incorrect argument type in dummy function
`rna_Sequences_new_sound()`
Caused by 13ca11ac52a8
|
|
Use RNA_api_sequences() for SequenceEditor and MetaSequence
sequences member.
Defines pair of dispatch functions rna_Sequences_editing_* and
rna_Sequences_meta_* that pass pointer to seqbase to
rna_Sequences_* function.
Downside of this implementation is, that it defines 2 seemingly
different RNA collections - SequencesMeta and SequencesTopLevel
Reviewed By: mont29
Differential Revision: https://developer.blender.org/D9601
|
|
Don't allocate StripElem for movieclip, scene and mask strips. This
struct is not handled in seq_dupli function. This caused field to be
uninitialized in COW datablock.
StripElem is not allocated when adding strip with operator and it is
not needed for these strip types.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9600
|
|
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
|
|
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D9349
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
Operator logic is limited to iterating over selection and executing
same code as python API does.
Functional changes:
- No attempt to preserve effects is made. Dependant effects are deleted.
- No attempt to change meta strip boundaries.
Partially fixes T73828
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D6892
|
|
It was already possible to create Sound and Image strips that reference
non-existing files. Now it's also possible to create Movie strips
referencing missing files via the Python API call
`Sequences.new_movie()`. In this case, the duration of the strip will be
set to 1 frame.
Note that this commit does not change anything in the user interface.
The Python API of the `MovieStrip` class is extended with a function
`reload_if_needed()`. This function only performs disk I/O if the movie
strip cannot produce frames, that is either when its filepath points to
a non-existing file, or when the video sequence editor has not been
shown yet (for example because it is in an inactive workspace).
This allows for the following:
```
import bpy
scene = bpy.context.scene
vse = scene.sequence_editor_create()
filepath = bpy.path.abspath('//demo.mkv')
strip = vse.sequences.new_movie("movie", filepath,
channel=2,
frame_start=47,
file_must_exist=False)
strip.frame_final_end = 327
```
This will create a new movie strip, even when `demo.mkv` does not exist.
Once `demo.mkv` has appeared at the expected location, either
`strip.reload_if_needed()` or `strip.filepath = strip.filepath` will
load it.
Differential Revision: https://developer.blender.org/D8257
Reviewed By: Sergey, ISS
|
|
seq->strip was overwritten in python API function.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8204
|
|
|
|
Using 'name' for the full path of a file reads badly,
especially when id.name is used in related code.
|
|
|
|
This operator is written in python it is inserting keyframes to create fade
effects.
Add Sequence.invalidate() python function to invalidate strip if it is
changed in python.
Perhaps I could implement cache invalidation to actual curve manipulation.
I guess it wouldn't be very hard to do but having means to invalidate form
python is useful as well.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D7885
|
|
`seq_free_animdata()` removes fcurve pointers belonging to strips from
`Scene` CoW datablock's `AnimData` during `BKE_scene_graph_update_for_newframe`.
This causes problems with updating animation.
This worked before rBbe2e41c397ba, because `AnimData` was freed by `BKE_animdata_free()`
before `seq_free_animdata()` was executed, so it had no data to operate on and returned
on precondition `if (scene->adt == NULL || scene->adt->action == NULL)`
Reviewed By: mont29, brecht
Maniphest Tasks: T74897
Differential Revision: https://developer.blender.org/D7264
|
|
|
|
A lot of areas were querying sound information directly using audio handle
which does not exist on an original sound IDs.
This change basically makes it so it's possible to query information about
given sound ID, without worrying about whether it's loaded or not: if it is
needed to load it first it happens automatically (no automatically-opened
handles are left behind though).
While this seems a bit extreme to open files on such queries it is still
better than the old situation when all sound handles were opened on file
load, no matter if it's needed or not. Besides, none of the changed code
paths are performance critical, just handful of tools.
Fixes T65696: Sequencer fails to create a new sound sequence strip via Python
Fixes T65656: Audio strip - SHIFT K crashes Blender
Reviewers: brecht
Reviewed By: brecht
Subscribers: ISS
Maniphest Tasks: T65696, T65656
Differential Revision: https://developer.blender.org/D5061
|
|
|
|
|
|
Add invalidation to strip add functions
Add invalidation for scene and movieclip strips
Skip invalidation for sound strips
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D4989
|
|
|
|
This also fixes commit rB1fd7b380f4cf8a0489b405de2819f228a4da5ea2 which
didn't do allocation for effect strips properly.
Reviewed By: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D4970
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Needed for clan-format not to wrap onto one line.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|
|
Makes it simpler to make some changes...
Also fix order of some includes (use alphabetical please).
|
|
We were using int's for bool arguments in BKE,
just to avoid having wrapper functions.
|
|
|
|
Differential Revision: https://developer.blender.org/D2872
|
|
Practically all access to enum data is read-only.
|