merging if conditions for handles exclusion

also updating docstring
This commit is contained in:
Jakub Jezek 2023-10-17 15:32:42 +02:00
parent 88a1f97ad5
commit b1ea0b099d
No known key found for this signature in database
GPG key ID: 730D7C02726179A7
2 changed files with 7 additions and 7 deletions

View file

@ -258,9 +258,10 @@ def create_timeline_item(
Args:
media_pool_item (resolve.MediaPoolItem): resolve's object
source_start (int): media source input frame (sequence frame)
source_end (int): media source output frame (sequence frame)
timeline_in (int): timeline input frame (sequence frame)
timeline (resolve.Timeline)[optional]: resolve's object
source_start (int)[optional]: media source input frame (sequence frame)
source_end (int)[optional]: media source output frame (sequence frame)
Returns:
object: resolve.TimelineItem

View file

@ -418,12 +418,11 @@ class ClipLoader:
source_in = int(_clip_property("Start"))
source_out = int(_clip_property("End"))
if _clip_property("Type") == "Video":
source_in += handle_start
source_out -= handle_end
# include handles
if not self.with_handles:
if (
not self.with_handles
or _clip_property("Type") == "Video"
):
source_in += handle_start
source_out -= handle_end