Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/startup/bl_operators/wm.py')
-rw-r--r--release/scripts/startup/bl_operators/wm.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index 022ee1576d8..1bbb3e9883e 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1887,6 +1887,37 @@ class WM_OT_addon_disable(Operator):
return {'FINISHED'}
+class WM_OT_owner_enable(Operator):
+ """Enable workspace owner ID"""
+ bl_idname = "wm.owner_enable"
+ bl_label = "Enable Add-on"
+
+ owner_id = StringProperty(
+ name="UI Tag",
+ )
+
+ def execute(self, context):
+ workspace = context.workspace
+ workspace.owner_ids.new(self.owner_id)
+ return {'FINISHED'}
+
+
+class WM_OT_owner_disable(Operator):
+ """Enable workspace owner ID"""
+ bl_idname = "wm.owner_disable"
+ bl_label = "Disable UI Tag"
+
+ owner_id = StringProperty(
+ name="UI Tag",
+ )
+
+ def execute(self, context):
+ workspace = context.workspace
+ owner_id = workspace.owner_ids[self.owner_id]
+ workspace.owner_ids.remove(owner_id)
+ return {'FINISHED'}
+
+
class WM_OT_theme_install(Operator):
"""Load and apply a Blender XML theme file"""
bl_idname = "wm.theme_install"
@@ -2384,5 +2415,7 @@ classes = (
WM_OT_properties_remove,
WM_OT_sysinfo,
WM_OT_theme_install,
+ WM_OT_owner_disable,
+ WM_OT_owner_enable,
WM_OT_url_open,
)