Fix: Missing Metadata Strip Media #288
@ -121,6 +121,20 @@ class KITSU_addon_preferences(bpy.types.AddonPreferences):
|
||||
how some of the operators work.
|
||||
"""
|
||||
|
||||
def get_metadatastrip_file(self) -> str:
|
||||
res_dir = bkglobals.RES_DIR_PATH
|
||||
return res_dir.joinpath("metastrip.mp4").as_posix()
|
||||
|
||||
metadatastrip_file: bpy.props.StringProperty( # type: ignore
|
||||
name="Metadata Strip File",
|
||||
description=(
|
||||
"Filepath to black .mp4 file that will be used as metastrip for shots in the sequence editor"
|
||||
),
|
||||
default="",
|
||||
subtype="FILE_PATH",
|
||||
get=get_metadatastrip_file,
|
||||
)
|
||||
|
||||
def get_datadir(self) -> Path:
|
||||
"""Returns a Path where persistent application data can be stored.
|
||||
|
||||
|
@ -1807,7 +1807,7 @@ class KITSU_OT_sqe_pull_edit(bpy.types.Operator):
|
||||
# Create new strip.
|
||||
strip = context.scene.sequence_editor.sequences.new_movie(
|
||||
shot.name,
|
||||
"",
|
||||
addon_prefs.metadatastrip_file,
|
||||
channel,
|
||||
frame_start,
|
||||
)
|
||||
@ -2012,7 +2012,7 @@ class KITSU_OT_sqe_create_metadata_strip(bpy.types.Operator):
|
||||
# on the first try, EDIT: seems to work maybe per python overlaps of sequences possible?
|
||||
metadata_strip = context.scene.sequence_editor.sequences.new_movie(
|
||||
f"{strip.name}{bkglobals.DELIMITER}metadata{bkglobals.SPACE_REPLACER}strip",
|
||||
"",
|
||||
addon_prefs.metadatastrip_file,
|
||||
strip.channel + 1,
|
||||
strip.frame_final_start,
|
||||
)
|
||||
|
@ -57,10 +57,11 @@ def create_metadata_strip(
|
||||
strip_range = range(strip.frame_final_start, strip.frame_final_end)
|
||||
channel = strip.channel + 1
|
||||
|
||||
addon_prefs = prefs.addon_prefs_get(context)
|
||||
# Create new metadata strip.
|
||||
metadata_strip = context.scene.sequence_editor.sequences.new_movie(
|
||||
f"{strip.name}_metadata-strip",
|
||||
"",
|
||||
addon_prefs.metadatastrip_file,
|
||||
strip.channel + 1,
|
||||
strip.frame_final_start,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user