sort metadata
parent
8f7cff2db0
commit
ef4f8f527b
|
@ -621,6 +621,10 @@ class VSETB_OT_load_projects(Operator):
|
|||
metadata_type.name = metadata_data['name']
|
||||
metadata_type.field_name = metadata_data['field_name']
|
||||
#metadata_type['choices'] = metadata_data['choices']
|
||||
|
||||
if prefs.sort_metadata_items:
|
||||
metadata_data['choices'].sort()
|
||||
|
||||
for choice in metadata_data['choices']:
|
||||
choice_item = metadata_type.choices.add()
|
||||
choice_item.name = choice
|
||||
|
|
|
@ -100,6 +100,7 @@ class VSETB_Prefs(AddonPreferences):
|
|||
trackers : PointerProperty(type=Trackers)
|
||||
expand_settings: BoolProperty(default=False)
|
||||
config_path : StringProperty(subtype='FILE_PATH')
|
||||
sort_metadata_items : BoolProperty(default=True)
|
||||
|
||||
@property
|
||||
def tracker(self):
|
||||
|
@ -111,26 +112,27 @@ class VSETB_Prefs(AddonPreferences):
|
|||
|
||||
layout = self.layout
|
||||
|
||||
layout.prop(self, 'config_path', text='Config Path')
|
||||
layout.prop(self, "sort_metadata_items", text='Sort Metadata Items')
|
||||
|
||||
col = layout.column(align=True)
|
||||
box = col.box()
|
||||
row = box.row(align=True)
|
||||
icon = "DISCLOSURE_TRI_DOWN" if self.expand_settings else "DISCLOSURE_TRI_RIGHT"
|
||||
row.prop(self, 'expand_settings', icon=icon, emboss=False, text='')
|
||||
row.label(icon='PREFERENCES')
|
||||
row.label(text='Settings')
|
||||
row.label(text='Tracker')
|
||||
subrow = row.row()
|
||||
subrow.alignment = 'RIGHT'
|
||||
subrow.operator("vse_toolbox.reload_addon", text='Reload Addon')
|
||||
|
||||
if self.expand_settings:
|
||||
box.prop(self, 'config_path', text='Config Path')
|
||||
box.prop(settings, 'tracker_name', text='Tracker')
|
||||
self.tracker.draw_prefs(box)
|
||||
#row = box.row()
|
||||
box.operator("vse_toolbox.tracker_connect", text='Connect')
|
||||
|
||||
|
||||
|
||||
classes = [
|
||||
Trackers,
|
||||
VSETB_Prefs,
|
||||
|
|
|
@ -124,6 +124,7 @@ class SpreadsheetCell(PropertyGroup):
|
|||
enabled : BoolProperty(default=True)
|
||||
field_name : StringProperty()
|
||||
type : EnumProperty(items=[(t, t, "") for t in ('METADATA', 'SHOT', 'ASSET_TYPE')])
|
||||
#sort : BoolProperty(default=True)
|
||||
|
||||
|
||||
class AssetType(PropertyGroup):
|
||||
|
@ -175,6 +176,7 @@ class SpreadsheetOptions(PropertyGroup):
|
|||
open_folder : BoolProperty(default=False)
|
||||
show_settings : BoolProperty(default=False)
|
||||
|
||||
|
||||
class Project(PropertyGroup):
|
||||
id : StringProperty(default='')
|
||||
|
||||
|
|
Loading…
Reference in New Issue