use task normed name
This commit is contained in:
+5
-2
@@ -9,6 +9,7 @@ from bl_ui.utils import PresetPanel
|
||||
from vse_toolbox.bl_utils import (get_addon_prefs, get_scene_settings, get_strip_settings)
|
||||
from vse_toolbox.constants import ASSET_PREVIEWS
|
||||
from vse_toolbox.sequencer_utils import (set_active_strip, get_channel_name, get_strips)
|
||||
from vse_toolbox.file_utils import norm_str
|
||||
|
||||
|
||||
class VSETB_main:
|
||||
@@ -350,8 +351,10 @@ class VSETB_PT_comments(VSETB_main, Panel):
|
||||
|
||||
|
||||
for task_type in project.task_types:
|
||||
|
||||
norm_task_name = norm_str(task_type.name)
|
||||
|
||||
if not hasattr(strip_settings.tasks, task_type.name):
|
||||
if not hasattr(strip_settings.tasks, norm_task_name):
|
||||
continue
|
||||
|
||||
label_col.label(text=task_type.name)
|
||||
@@ -365,7 +368,7 @@ class VSETB_PT_comments(VSETB_main, Panel):
|
||||
sub.prop(task_type, 'color', text='')
|
||||
sub.enabled = False
|
||||
|
||||
row.prop(getattr(strip_settings.tasks, task_type.name), 'comment', text='')
|
||||
row.prop(getattr(strip_settings.tasks, norm_task_name), 'comment', text='')
|
||||
|
||||
|
||||
def context_menu_prop(self, context):
|
||||
|
||||
+2
-2
@@ -381,8 +381,8 @@ class Project(PropertyGroup):
|
||||
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)
|
||||
ShotTasks.__annotations__[norm_str(task_type.name)] = prop
|
||||
setattr(ShotTasks, norm_str(task_type.name), prop)
|
||||
|
||||
|
||||
class VSETB_UL_casting(UIList):
|
||||
|
||||
Reference in New Issue
Block a user