add comments panel
This commit is contained in:
+18
-1
@@ -12,6 +12,7 @@ from bpy.props import (
|
||||
IntProperty,
|
||||
PointerProperty,
|
||||
StringProperty,
|
||||
FloatVectorProperty
|
||||
)
|
||||
from bpy.types import PropertyGroup, UIList
|
||||
from pprint import pprint as pp
|
||||
@@ -106,7 +107,7 @@ class MetadataType(PropertyGroup):
|
||||
|
||||
|
||||
class TaskType(PropertyGroup):
|
||||
__annotations__ = {}
|
||||
color : FloatVectorProperty(subtype='COLOR')
|
||||
|
||||
|
||||
class TaskStatus(PropertyGroup):
|
||||
@@ -117,6 +118,14 @@ class Metadata(CollectionPropertyGroup):
|
||||
__annotations__ = {}
|
||||
|
||||
|
||||
class ShotTasks(PropertyGroup):
|
||||
__annotations__ = {}
|
||||
|
||||
|
||||
class ShotTask(PropertyGroup):
|
||||
comment : StringProperty()
|
||||
|
||||
|
||||
class Episode(PropertyGroup):
|
||||
id : StringProperty(default='')
|
||||
|
||||
@@ -358,7 +367,12 @@ class Project(PropertyGroup):
|
||||
Metadata.__annotations__[field_name] = prop
|
||||
setattr(Metadata, field_name, prop)
|
||||
|
||||
def set_shot_tasks(self):
|
||||
for task_type in self.task_types:
|
||||
prop = bpy.props.PointerProperty(type=ShotTask)
|
||||
|
||||
ShotTasks.__annotations__[task_type.name] = prop
|
||||
setattr(ShotTasks, task_type.name, prop)
|
||||
|
||||
|
||||
class VSETB_UL_casting(UIList):
|
||||
@@ -561,6 +575,7 @@ class VSETB_PGT_strip_settings(PropertyGroup):
|
||||
source_name : StringProperty(name='')
|
||||
metadata : PointerProperty(type=Metadata)
|
||||
description : StringProperty()
|
||||
tasks: PointerProperty(type=ShotTasks)
|
||||
|
||||
@property
|
||||
def active_casting(self):
|
||||
@@ -600,6 +615,8 @@ classes = (
|
||||
Metadata,
|
||||
MetadataType,
|
||||
TaskType,
|
||||
ShotTasks,
|
||||
ShotTask,
|
||||
SpreadsheetImport,
|
||||
SpreadsheetExport,
|
||||
Project,
|
||||
|
||||
Reference in New Issue
Block a user