Closed adamearle closed 1 year ago
import bpy import re
try: bpy.context.area.ui_type = '' except TypeError as e: match = re.search(r'not found in ((.*))', str(e)) if match: enums = match.group(1).split(', ') enums = [enum.strip("'") for enum in enums] else: raise e
print() print(enums)
Dynamically get the list of Blender Editors types
import bpy import re
try: bpy.context.area.ui_type = '' except TypeError as e: match = re.search(r'not found in ((.*))', str(e)) if match: enums = match.group(1).split(', ') enums = [enum.strip("'") for enum in enums] else: raise e
print() print(enums)