Cleanup: remove unused functions in UI scripts

This commit is contained in:
Campbell Barton 2025-06-04 16:54:12 +10:00
parent 8094e7c5f0
commit 24eaff6889
2 changed files with 0 additions and 46 deletions

View file

@ -1166,39 +1166,6 @@ def description_from_id(context, space_type, idname, *, use_operator=True):
return ""
def item_from_id(context, space_type, idname):
# Used directly for tooltips.
cls = ToolSelectPanelHelper._tool_class_from_space_type(space_type)
if cls is None:
return None
item, _index = cls._tool_get_by_id(context, idname)
return item
def item_from_id_active(context, space_type, idname):
# Used directly for tooltips.
cls = ToolSelectPanelHelper._tool_class_from_space_type(space_type)
if cls is None:
return None
item, _index = cls._tool_get_by_id_active(context, idname)
return item
def item_from_id_active_with_group(context, space_type, idname):
cls = ToolSelectPanelHelper._tool_class_from_space_type(space_type)
if cls is None:
return None
cls, item, _index = cls._tool_get_by_id_active_with_group(context, idname)
return item
def item_group_from_id(context, space_type, idname, *, coerce=False):
cls = ToolSelectPanelHelper._tool_class_from_space_type(space_type)
if cls is None:
return None
return cls._tool_get_group_by_id(context, idname, coerce=coerce)
def item_from_flat_index(context, space_type, index):
cls = ToolSelectPanelHelper._tool_class_from_space_type(space_type)
if cls is None:

View file

@ -106,19 +106,6 @@ def draw_vpaint_symmetry(layout, vpaint, obj):
col.prop(vpaint, "radial_symmetry", text="Radial")
# Most of these panels should not be visible in GP edit modes
def is_not_gpencil_edit_mode(context):
is_gpmode = (
context.active_object and context.active_object.mode in {
'EDIT_GPENCIL',
'PAINT_GREASE_PENCIL',
'SCULPT_GREASE_PENCIL',
'WEIGHT_GREASE_PENCIL',
}
)
return not is_gpmode
# ********** default tools for object mode ****************