mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-06 07:51:47 +00:00
misc: more readable poll error for import_quick_favorites
This commit is contained in:
@@ -418,6 +418,13 @@ class ImportQuickFavorites(bpy.types.Operator):
|
|||||||
bl_description = "Import operators from Blender's Quick Favorites menu, including their configured properties"
|
bl_description = "Import operators from Blender's Quick Favorites menu, including their configured properties"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def poll(cls, context):
|
||||||
|
if bpy.app.version[:2] not in tool.Misc.QuickFavorites.OFFSET_USER_MENUS:
|
||||||
|
cls.poll_message_set(f"Blender version {bpy.app.version_string} is not supported.")
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
def execute(self, context) -> set["rna_enums.OperatorReturnItems"]:
|
def execute(self, context) -> set["rna_enums.OperatorReturnItems"]:
|
||||||
props = tool.Misc.get_misc_props()
|
props = tool.Misc.get_misc_props()
|
||||||
props.quick_favorites.clear()
|
props.quick_favorites.clear()
|
||||||
|
|||||||
Reference in New Issue
Block a user