Import Shots for mu
This commit is contained in:
+21
-3
@@ -3,7 +3,7 @@
|
||||
from pathlib import Path
|
||||
|
||||
import bpy
|
||||
from bpy.types import Panel
|
||||
from bpy.types import Panel, Menu
|
||||
from bl_ui.utils import PresetPanel
|
||||
|
||||
from vse_toolbox.bl_utils import (get_addon_prefs, get_scene_settings, get_strip_settings)
|
||||
@@ -185,6 +185,7 @@ class VSETB_PT_imports(VSETB_main, Panel):
|
||||
#row = col.row(align=True)
|
||||
#col.operator('vse_toolbox.import_files', text='Import', icon='IMPORT')
|
||||
col.operator('vse_toolbox.import_spreadsheet', text='Import Spreadsheet', icon='SPREADSHEET')
|
||||
col.operator("vse_toolbox.import_shots", text='Import Shots', icon="FILE_MOVIE")
|
||||
|
||||
|
||||
class VSETB_PT_presets(PresetPanel, Panel):
|
||||
@@ -396,6 +397,20 @@ def context_menu_prop(self, context):
|
||||
layout.operator('vse_toolbox.copy_metadata', icon='PASTEDOWN', text='Copy metadata to selected').metadata = button_prop.name
|
||||
|
||||
|
||||
class VSETB_MT_main_menu(Menu):
|
||||
bl_label = "Vse Toolbox"
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator('vse_toolbox.open_shot_dir', text='Open Shot', icon='FILE_FOLDER')
|
||||
|
||||
|
||||
def draw_vse_toolbox_menu(self, context):
|
||||
self.layout.menu("VSETB_MT_main_menu")
|
||||
|
||||
|
||||
|
||||
classes = (
|
||||
VSETB_PT_main,
|
||||
VSETB_PT_imports,
|
||||
@@ -406,7 +421,8 @@ classes = (
|
||||
VSETB_PT_comments,
|
||||
VSETB_PT_presets,
|
||||
VSETB_PT_exports,
|
||||
VSETB_PT_strip
|
||||
VSETB_PT_strip,
|
||||
VSETB_MT_main_menu
|
||||
)
|
||||
|
||||
def register():
|
||||
@@ -414,9 +430,11 @@ def register():
|
||||
bpy.utils.register_class(cls)
|
||||
|
||||
bpy.types.UI_MT_button_context_menu.append(context_menu_prop)
|
||||
bpy.types.SEQUENCER_MT_editor_menus.append(draw_vse_toolbox_menu)
|
||||
|
||||
def unregister():
|
||||
for cls in reversed(classes):
|
||||
bpy.utils.unregister_class(cls)
|
||||
|
||||
bpy.types.UI_MT_button_context_menu.remove(context_menu_prop)
|
||||
bpy.types.UI_MT_button_context_menu.remove(context_menu_prop)
|
||||
bpy.types.SEQUENCER_MT_editor_menus.remove(draw_vse_toolbox_menu)
|
||||
+9
-1
@@ -109,6 +109,7 @@ class MetadataType(PropertyGroup):
|
||||
|
||||
class TaskType(PropertyGroup):
|
||||
color : FloatVectorProperty(subtype='COLOR')
|
||||
import_enabled : BoolProperty(default=False)
|
||||
|
||||
|
||||
class TaskStatus(PropertyGroup):
|
||||
@@ -297,6 +298,7 @@ class Project(PropertyGroup):
|
||||
asset_types : CollectionProperty(type=AssetType)
|
||||
metadata_types : CollectionProperty(type=MetadataType)
|
||||
task_types : CollectionProperty(type=TaskType)
|
||||
task_type_index : IntProperty()
|
||||
task_statuses : CollectionProperty(type=TaskStatus)
|
||||
|
||||
spreadsheet_import: PointerProperty(type=SpreadsheetImport)
|
||||
@@ -304,6 +306,12 @@ class Project(PropertyGroup):
|
||||
|
||||
type : StringProperty()
|
||||
|
||||
import_source: EnumProperty(items=[(i, i.title(), '') for i in ('DISK', 'TRACKER')])
|
||||
import_task: EnumProperty(items=[(i, i.title(), '') for i in ('LAST', 'SELECTED', 'ALL')], default='LAST')
|
||||
|
||||
shot_dir_template: StringProperty(
|
||||
name="Shot Template", default="$PROJECT_ROOT/sequences/{sequence}/sh{index:04d}")
|
||||
|
||||
@property
|
||||
def active_episode(self):
|
||||
return self.episodes.get(self.episode_name)
|
||||
@@ -582,7 +590,7 @@ class VSETB_PGT_scene_settings(PropertyGroup):
|
||||
|
||||
shot_channel_name : StringProperty(
|
||||
name="Shot Channel Name", default="Shots")
|
||||
|
||||
|
||||
@property
|
||||
def active_project(self):
|
||||
settings = get_scene_settings()
|
||||
|
||||
Reference in New Issue
Block a user