Sybren A. Stüvel
b9f565881e
VSE: Python API, allow creation of VSE Movie strips with missing file
...
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
2020-07-13 15:09:18 +02:00
..
2020-07-13 15:09:18 +02:00
2020-05-08 18:22:41 +02:00
2020-04-03 18:25:52 +02:00
2020-07-09 17:56:05 +02:00
2020-06-13 16:20:09 +10:00
2020-04-03 12:13:51 +02:00
2020-05-08 18:22:41 +02:00
2020-07-13 11:27:09 +02:00
2020-06-13 16:20:09 +10:00
2020-03-02 15:07:49 +01:00
2020-03-03 17:34:21 +01:00
2020-03-17 15:02:05 +01:00
2019-04-17 06:21:24 +02:00
2020-07-10 18:03:21 +02:00
2020-05-29 17:48:26 +02:00
2020-06-18 15:49:10 +10:00
2020-03-06 17:26:32 +01:00
2020-03-02 15:07:49 +01:00
2020-05-15 16:50:38 +02:00
2020-06-02 16:01:14 +02:00
2020-03-09 12:49:04 +01:00
2020-03-02 15:07:49 +01:00
2020-05-28 16:42:31 +10:00
2020-03-02 15:07:49 +01:00
2020-05-09 17:15:43 +10:00
2020-07-06 14:44:30 -03:00
2020-06-17 17:06:05 +02:00
2020-03-19 09:33:58 +01:00
2020-03-29 17:11:41 +11:00
2020-06-16 16:59:52 +02:00
2020-06-25 12:10:18 +03:00
2020-05-08 18:22:41 +02:00
2019-06-05 15:17:53 +02:00
2020-07-13 11:27:09 +02:00
2020-06-24 11:50:01 -04:00
2020-03-02 15:07:49 +01:00
2020-05-09 17:15:43 +10:00
2020-05-09 17:15:43 +10:00
2020-07-13 11:27:09 +02:00
2020-07-10 14:23:13 +02:00
2020-03-19 09:33:58 +01:00
2020-03-02 15:07:49 +01:00
2020-03-19 09:33:58 +01:00
2020-07-06 16:52:28 +02:00
2020-05-08 18:22:41 +02:00
2020-03-02 15:07:49 +01:00
2020-03-02 15:07:49 +01:00
2020-05-25 23:07:30 +10:00
2020-03-02 15:07:49 +01:00
2020-03-02 15:07:49 +01:00
2020-06-19 12:17:02 +03:00
2020-05-08 18:22:41 +02:00
2020-07-13 11:27:09 +02:00
2020-07-13 11:27:09 +02:00
2020-03-06 20:07:02 +01:00
2019-04-17 06:21:24 +02:00
2020-06-19 16:47:12 +10:00
2020-05-06 18:14:05 +02:00
2020-06-16 15:28:46 +02:00
2020-06-19 14:42:08 -04:00
2020-06-19 10:10:11 +02:00
2020-03-20 12:19:09 +11:00
2020-03-02 15:07:49 +01:00
2020-06-20 13:50:12 +10:00
2020-07-07 12:49:13 +10:00
2019-08-25 16:45:47 +10:00
2020-05-08 18:22:41 +02:00
2020-03-09 18:09:23 +01:00
2020-03-02 15:07:49 +01:00
2020-03-06 12:52:52 +01:00
2020-04-03 18:25:52 +02:00
2020-06-13 16:20:09 +10:00
2020-04-09 21:46:22 +02:00
2020-07-09 17:56:05 +02:00
2020-06-19 17:01:20 +02:00
2020-05-25 15:28:15 +02:00
2020-05-08 18:22:41 +02:00
2020-05-08 18:22:41 +02:00
2020-05-25 10:45:39 +02:00
2020-03-06 12:19:11 +01:00
2020-03-09 16:56:53 +01:00
2020-03-05 16:30:12 +01:00
2020-06-29 17:28:04 +02:00
2020-04-05 13:53:32 +10:00
2020-04-23 17:41:21 +02:00
2020-03-02 15:07:49 +01:00
2020-03-06 16:23:23 +01:00
2020-03-02 15:07:49 +01:00
2020-07-13 11:27:09 +02:00
2020-03-02 15:07:49 +01:00
2020-03-02 15:07:49 +01:00
2020-06-23 16:28:50 +02:00
2020-06-24 22:13:27 +10:00
2020-03-02 15:07:49 +01:00
2020-06-12 14:39:49 +10:00
2020-07-13 11:27:09 +02:00
2020-07-01 13:12:24 +10:00
2020-03-09 16:56:53 +01:00
2020-05-09 17:15:43 +10:00
2020-05-26 12:33:28 +02:00
2020-07-12 10:01:37 +02:00
2020-07-08 22:30:23 +02:00
2020-07-07 18:23:33 +02:00
2020-07-13 11:27:09 +02:00
2019-09-20 12:09:22 +10:00
2020-07-09 17:56:05 +02:00
2020-03-17 10:12:47 -06:00
2020-03-02 15:07:49 +01:00
2020-03-20 12:19:44 +11:00
2020-07-02 16:36:39 -04:00
2020-07-09 11:46:28 +02:00
2020-07-13 11:27:09 +02:00
2020-07-13 11:27:09 +02:00
2020-03-20 12:19:09 +11:00
2020-05-08 18:22:41 +02:00
2020-04-05 13:53:32 +10:00
2020-06-10 19:45:52 +02:00
2020-06-25 23:14:36 +10:00
2020-04-05 23:39:20 +02:00
2020-07-13 15:09:18 +02:00
2020-06-19 15:07:13 -04:00
2020-03-11 21:39:56 +11:00
2020-05-27 10:52:07 +10:00
2020-03-02 15:07:49 +01:00
2020-05-03 15:30:35 +02:00
2020-03-08 20:10:07 +01:00
2020-03-02 15:07:49 +01:00
2020-07-09 17:48:24 +02:00
2020-04-03 12:38:04 +11:00
2020-04-01 09:32:46 +02:00
2020-03-30 12:26:45 +02:00
2020-03-02 15:07:49 +01:00
2020-03-02 15:07:49 +01:00
2020-05-18 17:06:48 +02:00
2020-07-02 16:36:39 -04:00
2020-05-08 18:22:41 +02:00
2020-03-06 20:07:02 +01:00
2020-05-13 19:52:19 +02:00
2020-04-20 16:26:31 +02:00
2020-06-27 15:43:20 +10:00
2019-05-01 11:13:14 +10:00
2020-03-20 12:19:09 +11:00
2020-04-05 21:27:30 +02:00
2020-05-26 20:32:21 +02:00
2020-03-06 12:19:11 +01:00
2020-03-13 17:27:11 +11:00
2020-03-13 17:27:11 +11:00
2020-07-07 18:23:33 +02:00
2020-03-19 09:33:58 +01:00
2020-03-02 15:07:49 +01:00
2020-03-02 15:07:49 +01:00