fix for episode to work
parent
0a8e5f9c79
commit
93134f25a9
|
@ -317,12 +317,14 @@ class VSETB_OT_load_projects(Operator):
|
||||||
tracker.connect()
|
tracker.connect()
|
||||||
|
|
||||||
for project_data in tracker.get_projects():
|
for project_data in tracker.get_projects():
|
||||||
|
|
||||||
|
|
||||||
project = settings.projects.add()
|
project = settings.projects.add()
|
||||||
project.type = project_data['production_type']
|
project.type = project_data['production_type'].upper().replace(' ', '')
|
||||||
project.name = project_data['name']
|
project.name = project_data['name']
|
||||||
project.id = project_data['id']
|
project.id = project_data['id']
|
||||||
|
|
||||||
if project.type == 'TV Show':
|
if project.type == 'TVSHOW':
|
||||||
for episode_data in tracker.get_episodes(project_data):
|
for episode_data in tracker.get_episodes(project_data):
|
||||||
episode = project.episodes.add()
|
episode = project.episodes.add()
|
||||||
episode.name = episode_data['name']
|
episode.name = episode_data['name']
|
||||||
|
|
|
@ -35,7 +35,7 @@ class VSETB_PT_main(VSETB_main, Panel):
|
||||||
col.prop(settings, 'project_name', text='Project')
|
col.prop(settings, 'project_name', text='Project')
|
||||||
|
|
||||||
if project:
|
if project:
|
||||||
if project.type == 'TV Shows':
|
if project.type == 'TVSHOW':
|
||||||
col.prop(project, 'episode_name', text='Episodes')
|
col.prop(project, 'episode_name', text='Episodes')
|
||||||
|
|
||||||
#col.separator()
|
#col.separator()
|
||||||
|
|
|
@ -149,7 +149,7 @@ class Project(PropertyGroup):
|
||||||
|
|
||||||
for metadata_type in self.metadata_types:
|
for metadata_type in self.metadata_types:
|
||||||
prop_name = metadata_type.name
|
prop_name = metadata_type.name
|
||||||
if metadata_type['choices']:
|
if metadata_type.get('choices'):
|
||||||
prop = bpy.props.EnumProperty(items=[(c, c.replace(' ', '_').upper(), '') for c in metadata_type['choices']])
|
prop = bpy.props.EnumProperty(items=[(c, c.replace(' ', '_').upper(), '') for c in metadata_type['choices']])
|
||||||
else:
|
else:
|
||||||
prop = bpy.props.StringProperty()
|
prop = bpy.props.StringProperty()
|
||||||
|
|
|
@ -8,6 +8,7 @@ from pathlib import Path
|
||||||
from vse_toolbox.bl_utils import get_scene_settings, get_strip_settings
|
from vse_toolbox.bl_utils import get_scene_settings, get_strip_settings
|
||||||
from vse_toolbox.constants import SOUND_SUFFIXES
|
from vse_toolbox.constants import SOUND_SUFFIXES
|
||||||
|
|
||||||
|
|
||||||
def new_text_strip(name='Text', channel=0, start=0, end=50, text='Text', font_size=48,
|
def new_text_strip(name='Text', channel=0, start=0, end=50, text='Text', font_size=48,
|
||||||
x=0.5, y=0.5, align_x='CENTER', align_y='CENTER', select=False,
|
x=0.5, y=0.5, align_x='CENTER', align_y='CENTER', select=False,
|
||||||
box_color=None, box_margin=0.005):
|
box_color=None, box_margin=0.005):
|
||||||
|
@ -85,7 +86,7 @@ def rename_strips(
|
||||||
project = settings.active_project
|
project = settings.active_project
|
||||||
episode_name = ''
|
episode_name = ''
|
||||||
if settings.active_episode:
|
if settings.active_episode:
|
||||||
episode_name = episode.name
|
episode_name = settings.active_episode.name
|
||||||
|
|
||||||
prev_sequence_name = None
|
prev_sequence_name = None
|
||||||
strip_number = 0
|
strip_number = 0
|
||||||
|
|
Loading…
Reference in New Issue