add instance in panels
parent
9bc6f0cd2d
commit
3cc254bdc9
|
@ -271,6 +271,7 @@ class VSETB_OT_load_assets(Operator):
|
||||||
'props':'OBJECT_DATAMODE',
|
'props':'OBJECT_DATAMODE',
|
||||||
'sets':'SMOOTHCURVE',
|
'sets':'SMOOTHCURVE',
|
||||||
}
|
}
|
||||||
|
#TODO Mettre la preview dans le popup search
|
||||||
return [(e.norm_name, e.norm_name.title(), '', icons[e.asset_type], i) for i, e in enumerate(items)]
|
return [(e.norm_name, e.norm_name.title(), '', icons[e.asset_type], i) for i, e in enumerate(items)]
|
||||||
# return [(e.norm_name, e.norm_name.title(), '', ASSET_PREVIEWS[e.preview].icon_id, i) for i, e in enumerate(items)]
|
# return [(e.norm_name, e.norm_name.title(), '', ASSET_PREVIEWS[e.preview].icon_id, i) for i, e in enumerate(items)]
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,6 @@ class VSETB_PT_main(VSETB_main, Panel):
|
||||||
row.operator('sequencer.import_files', text='Import', icon='IMPORT')
|
row.operator('sequencer.import_files', text='Import', icon='IMPORT')
|
||||||
# TODO FAIRE DES VRAIS OPS
|
# TODO FAIRE DES VRAIS OPS
|
||||||
row.operator('sequencer.export_csv', text='Export', icon='EXPORT')
|
row.operator('sequencer.export_csv', text='Export', icon='EXPORT')
|
||||||
|
|
||||||
op = col.operator('sequencer.strips_render', text='Render Strips', icon='RENDER_ANIMATION')
|
op = col.operator('sequencer.strips_render', text='Render Strips', icon='RENDER_ANIMATION')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -45,15 +45,6 @@ def get_tracker_items(self, context):
|
||||||
return [(norm_str(a.name, format=str.upper), a.name, "", i) for i, a in enumerate(TRACKERS)]
|
return [(norm_str(a.name, format=str.upper), a.name, "", i) for i, a in enumerate(TRACKERS)]
|
||||||
|
|
||||||
|
|
||||||
class Episode(PropertyGroup):
|
|
||||||
id : StringProperty(default='')
|
|
||||||
|
|
||||||
@property
|
|
||||||
def active(self):
|
|
||||||
settings = get_settings()
|
|
||||||
return self.get(settings.project_name)
|
|
||||||
|
|
||||||
|
|
||||||
class Asset(PropertyGroup):
|
class Asset(PropertyGroup):
|
||||||
name : StringProperty(default='')
|
name : StringProperty(default='')
|
||||||
id : StringProperty(default='')
|
id : StringProperty(default='')
|
||||||
|
@ -66,8 +57,18 @@ class Asset(PropertyGroup):
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
return (getattr(self, p) for p in self.bl_rna.properties.keys() if p not in ('rna_type', 'name'))
|
return (getattr(self, p) for p in self.bl_rna.properties.keys() if p not in ('rna_type', 'name'))
|
||||||
|
|
||||||
|
|
||||||
class AssetCasting(Asset):
|
class AssetCasting(Asset):
|
||||||
pass
|
instance : IntProperty(default=1)
|
||||||
|
|
||||||
|
|
||||||
|
class Episode(PropertyGroup):
|
||||||
|
id : StringProperty(default='')
|
||||||
|
|
||||||
|
@property
|
||||||
|
def active(self):
|
||||||
|
settings = get_settings()
|
||||||
|
return self.get(settings.project_name)
|
||||||
|
|
||||||
|
|
||||||
class Project(PropertyGroup):
|
class Project(PropertyGroup):
|
||||||
|
@ -119,9 +120,10 @@ class VSETB_UL_casting(UIList):
|
||||||
# Make sure your code supports all 3 layout types
|
# Make sure your code supports all 3 layout types
|
||||||
if self.layout_type in {'DEFAULT', 'COMPACT'}:
|
if self.layout_type in {'DEFAULT', 'COMPACT'}:
|
||||||
layout.label(**params)
|
layout.label(**params)
|
||||||
split = layout.split(factor=0.7)
|
split = layout.split(factor=0.6)
|
||||||
split.label(text=f"{item.norm_name.title()}")
|
split.label(text=f"{item.norm_name.title()}")
|
||||||
split.label(text=f"{item.asset_type.title()}")
|
split.label(text=f"{item.asset_type.title()}")
|
||||||
|
split.prop(item, 'instance', text='')
|
||||||
|
|
||||||
elif self.layout_type in {'GRID'}:
|
elif self.layout_type in {'GRID'}:
|
||||||
layout.alignment = 'CENTER'
|
layout.alignment = 'CENTER'
|
||||||
|
|
Loading…
Reference in New Issue