Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_operators/wm.py
| Show First 20 Lines • Show All 1,881 Lines • ▼ Show 20 Lines | def execute(self, context): | ||||
| addon_utils.disable(self.module, default_set=True, handle_error=err_cb) | addon_utils.disable(self.module, default_set=True, handle_error=err_cb) | ||||
| if err_str: | if err_str: | ||||
| self.report({'ERROR'}, err_str) | self.report({'ERROR'}, err_str) | ||||
| return {'FINISHED'} | return {'FINISHED'} | ||||
| class WM_OT_bl_origin_enable(Operator): | |||||
| """Enable an ui-tag""" | |||||
| bl_idname = "wm.bl_origin_enable" | |||||
| bl_label = "Enable Add-on" | |||||
| bl_origin = StringProperty( | |||||
| name="UI Tag", | |||||
brecht: Still named UI tag here and the other operator, not sure if intentional. | |||||
| ) | |||||
| def execute(self, context): | |||||
| workspace = context.workspace | |||||
| workspace.bl_origins.new(self.bl_origin) | |||||
| return {'FINISHED'} | |||||
| class WM_OT_bl_origin_disable(Operator): | |||||
| """Disable an ui-tag""" | |||||
| bl_idname = "wm.bl_origin_disable" | |||||
| bl_label = "Disable UI Tag" | |||||
| bl_origin = StringProperty( | |||||
| name="UI Tag", | |||||
| ) | |||||
| def execute(self, context): | |||||
| workspace = context.workspace | |||||
| bl_origin = workspace.bl_origins[self.bl_origin] | |||||
| workspace.bl_origins.remove(bl_origin) | |||||
| return {'FINISHED'} | |||||
| class WM_OT_theme_install(Operator): | class WM_OT_theme_install(Operator): | ||||
| """Load and apply a Blender XML theme file""" | """Load and apply a Blender XML theme file""" | ||||
| bl_idname = "wm.theme_install" | bl_idname = "wm.theme_install" | ||||
| bl_label = "Install Theme..." | bl_label = "Install Theme..." | ||||
| overwrite = BoolProperty( | overwrite = BoolProperty( | ||||
| name="Overwrite", | name="Overwrite", | ||||
| description="Remove existing theme file if exists", | description="Remove existing theme file if exists", | ||||
| ▲ Show 20 Lines • Show All 481 Lines • ▼ Show 20 Lines | classes = ( | ||||
| WM_OT_operator_pie_enum, | WM_OT_operator_pie_enum, | ||||
| WM_OT_path_open, | WM_OT_path_open, | ||||
| WM_OT_properties_add, | WM_OT_properties_add, | ||||
| WM_OT_properties_context_change, | WM_OT_properties_context_change, | ||||
| WM_OT_properties_edit, | WM_OT_properties_edit, | ||||
| WM_OT_properties_remove, | WM_OT_properties_remove, | ||||
| WM_OT_sysinfo, | WM_OT_sysinfo, | ||||
| WM_OT_theme_install, | WM_OT_theme_install, | ||||
| WM_OT_bl_origin_disable, | |||||
| WM_OT_bl_origin_enable, | |||||
| WM_OT_url_open, | WM_OT_url_open, | ||||
| ) | ) | ||||
Still named UI tag here and the other operator, not sure if intentional.