diff --git a/src/bonsai/bonsai/bim/module/sequence/ui.py b/src/bonsai/bonsai/bim/module/sequence/ui.py index 4c1d1fedda..f0a77050a2 100644 --- a/src/bonsai/bonsai/bim/module/sequence/ui.py +++ b/src/bonsai/bonsai/bim/module/sequence/ui.py @@ -571,7 +571,12 @@ class BIM_PT_animation_tools(Panel): row = self.layout.row(align=True) row.alignment = "RIGHT" if AnimationColorSchemeData.data["saved_color_schemes"]: - row.prop(self.animation_props, "saved_color_schemes", text="Color Scheme", icon="SEQUENCE_COLOR_04") + row.prop( + self.animation_props, + "saved_color_schemes", + text="Color Scheme", + icon=tool.Blender.SEQUENCE_COLOR_SCHEME_ICON, + ) else: row.label(text="No Color Scheme Saved", icon="INFO") op = row.operator("bim.visualise_work_schedule_date_range", text="Create Animation", icon="OUTLINER_OB_CAMERA") @@ -611,7 +616,9 @@ class BIM_PT_animation_Color_Scheme(Panel): self.animation_props = tool.Sequence.get_animation_props() row = self.layout.row(align=True) row.alignment = "RIGHT" - row.operator("bim.load_default_animation_color_scheme", text="Load default", icon="SEQUENCE_COLOR_04") + row.operator( + "bim.load_default_animation_color_scheme", text="Load default", icon=tool.Blender.SEQUENCE_COLOR_SCHEME_ICON + ) if AnimationColorSchemeData.data["saved_color_schemes"]: row.operator("bim.load_animation_color_scheme", text="Load Scheme", icon="IMPORT") row.operator("bim.save_animation_color_scheme", text="Save Scheme", icon="EXPORT") diff --git a/src/bonsai/bonsai/tool/blender.py b/src/bonsai/bonsai/tool/blender.py index 864a994b91..d903210da2 100644 --- a/src/bonsai/bonsai/tool/blender.py +++ b/src/bonsai/bonsai/tool/blender.py @@ -85,6 +85,9 @@ class Blender(bonsai.core.tool.Blender): OBJECT_TYPES_THAT_SUPPORT_EDIT_MODE = ("MESH", "CURVE", "SURFACE", "META", "FONT", "LATTICE", "ARMATURE") OBJECT_TYPES_THAT_SUPPORT_EDIT_GPENCIL_MODE = ("GPENCIL",) TYPE_MANAGER_ICON = "LIGHTPROBE_VOLUME" + SEQUENCE_COLOR_SCHEME_ICON: Literal["STRIP_COLOR_03"] = ( # pyright: ignore[reportAssignmentType] + "STRIP_COLOR_03" if bpy.app.version >= (4, 4, 0) else "SEQUENCE_COLOR_04" + ) BLENDER_ENUM_ITEM = Union[tuple[str, str, str], tuple[str, str, str, int], tuple[str, str, str, str, int], None] """