Render sequences
This commit is contained in:
+13
-5
@@ -78,7 +78,7 @@ class VSETB_PT_strip(Panel):
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
strip = context.scene.sequence_editor.active_strip
|
||||
strip = context.active_sequence_strip
|
||||
return strip and get_channel_name(strip) == 'Shots'
|
||||
|
||||
def draw(self, context):
|
||||
@@ -221,9 +221,14 @@ class VSETB_PT_exports(VSETB_main, Panel):
|
||||
class VSETB_PT_tracker(VSETB_main, Panel):
|
||||
bl_label = "Tracker"
|
||||
bl_parent_id = "VSETB_PT_main"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.active_sequence_strip
|
||||
|
||||
def draw_header_preset(self, context):
|
||||
active_strip = context.scene.sequence_editor.active_strip
|
||||
active_strip = context.active_sequence_strip
|
||||
self.layout.label(text=active_strip.name)
|
||||
|
||||
def draw(self, context):
|
||||
@@ -232,10 +237,11 @@ class VSETB_PT_tracker(VSETB_main, Panel):
|
||||
class VSETB_PT_casting(VSETB_main, Panel):
|
||||
bl_label = "Casting"
|
||||
bl_parent_id = "VSETB_PT_tracker"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
strip = context.scene.sequence_editor.active_strip
|
||||
strip = context.active_sequence_strip
|
||||
return strip and get_channel_name(strip) == 'Shots'
|
||||
|
||||
def draw(self, context):
|
||||
@@ -287,10 +293,11 @@ class VSETB_PT_casting(VSETB_main, Panel):
|
||||
class VSETB_PT_metadata(VSETB_main, Panel):
|
||||
bl_label = "Shot Metadata"
|
||||
bl_parent_id = "VSETB_PT_tracker"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.scene.sequence_editor.active_strip and get_scene_settings().active_project
|
||||
return context.active_sequence_strip and get_scene_settings().active_project
|
||||
|
||||
def draw(self, context):
|
||||
|
||||
@@ -333,10 +340,11 @@ class VSETB_PT_metadata(VSETB_main, Panel):
|
||||
class VSETB_PT_comments(VSETB_main, Panel):
|
||||
bl_label = "Comments"
|
||||
bl_parent_id = "VSETB_PT_tracker"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
return context.scene.sequence_editor.active_strip and get_scene_settings().active_project
|
||||
return context.active_sequence_strip and get_scene_settings().active_project
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
+54
-9
@@ -19,7 +19,7 @@ from pprint import pprint as pp
|
||||
from vse_toolbox.bl_utils import get_addon_prefs, get_scene_settings
|
||||
from vse_toolbox.constants import ASSET_PREVIEWS, TRACKERS, PREVIEWS_DIR
|
||||
from vse_toolbox.file_utils import norm_str, parse
|
||||
from vse_toolbox.sequencer_utils import get_strip_sequence_name
|
||||
from vse_toolbox.sequencer_utils import get_strip_sequence_name, get_channel_name
|
||||
from vse_toolbox import constants
|
||||
|
||||
|
||||
@@ -104,6 +104,7 @@ class MetadataType(PropertyGroup):
|
||||
choices : CollectionProperty(type=PropertyGroup)#EnumProperty(items=lambda s, c: [(c, c.replace(' ', '_').upper(), '') for c in s['choices']])
|
||||
field_name : StringProperty()
|
||||
entity_type : StringProperty()
|
||||
data_type : StringProperty()
|
||||
|
||||
|
||||
class TaskType(PropertyGroup):
|
||||
@@ -117,6 +118,22 @@ class TaskStatus(PropertyGroup):
|
||||
class Metadata(CollectionPropertyGroup):
|
||||
__annotations__ = {}
|
||||
|
||||
def to_dict(self, use_name=True):
|
||||
settings = get_scene_settings()
|
||||
data = {}
|
||||
for prop in self.props():
|
||||
name = prop.name
|
||||
if not use_name:
|
||||
name = prop.identifier
|
||||
|
||||
metadata_type = settings.active_project.metadata_types[prop.name]
|
||||
value = getattr(self, prop.identifier)
|
||||
if metadata_type.data_type == 'boolean':
|
||||
value = 'true' if value else 'false'
|
||||
|
||||
data[name] = value
|
||||
|
||||
return data
|
||||
|
||||
class ShotTasks(PropertyGroup):
|
||||
__annotations__ = {}
|
||||
@@ -249,11 +266,26 @@ class Project(PropertyGroup):
|
||||
render_audio_strip_template: StringProperty(
|
||||
name="Sound Path", default="//render/sounds/{strip}.wav")
|
||||
|
||||
render_video: BoolProperty(name="Render Video", default=False)
|
||||
render_video_sequence_template : StringProperty(
|
||||
name="Sequence Path", default="//render/sequences/{sequence}.{ext}")
|
||||
|
||||
render_audio_sequence_template: StringProperty(
|
||||
name="Sound Path", default="//render/sounds/{sequence}.wav")
|
||||
|
||||
render_single_file: BoolProperty(name="Render Single File", default=False)
|
||||
render_sequence: BoolProperty(name="Render Sequences", default=False)
|
||||
render_shot: BoolProperty(name="Render Shots", default=True)
|
||||
render_selected_only: BoolProperty(name="Render Selected Only", default=True)
|
||||
|
||||
render_video: BoolProperty(name="Render Video", default=True)
|
||||
render_audio: BoolProperty(name="Render Audio", default=False)
|
||||
|
||||
render_video_per_strip: BoolProperty(name="Render video per strip", default=True)
|
||||
render_audio_per_strip: BoolProperty(name="Render audio per strip", default=False)
|
||||
render_video_per_sequence: BoolProperty(name="Render video per sequence", default=True)
|
||||
render_audio_per_sequence: BoolProperty(name="Render audio per sequence", default=False)
|
||||
|
||||
render_video_per_strip: BoolProperty(name="Render video per shot", default=True)
|
||||
render_audio_per_strip: BoolProperty(name="Render audio per shot", default=False)
|
||||
|
||||
#render_sound_format: EnumProperty(items=[(e, e, '') for e in ('mp3', 'wav')])
|
||||
|
||||
export_edl_template : StringProperty(
|
||||
@@ -606,11 +638,24 @@ class VSETB_PGT_strip_settings(PropertyGroup):
|
||||
project = settings.active_project
|
||||
strip = self.strip
|
||||
|
||||
data = parse(strip.name, template=project.shot_template)
|
||||
data['index'] = int(data['index'])
|
||||
data['sequence'] = get_strip_sequence_name(strip)
|
||||
data['strip'] = strip.name
|
||||
#data['shot'] = project.shot_template
|
||||
channel = get_channel_name(strip)
|
||||
|
||||
if channel == 'Sequences':
|
||||
data = parse(strip.name, template=project.sequence_template)
|
||||
data['index'] = int(data['index'])
|
||||
data['sequence'] = strip.name
|
||||
data['strip'] = strip.name
|
||||
#data['shot'] = project.shot_template
|
||||
|
||||
elif channel == "Shots":
|
||||
|
||||
data = parse(strip.name, template=project.shot_template)
|
||||
data['index'] = int(data['index'])
|
||||
data['sequence'] = get_strip_sequence_name(strip)
|
||||
data['strip'] = strip.name
|
||||
#data['shot'] = project.shot_template
|
||||
else:
|
||||
return {}
|
||||
|
||||
return data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user