Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_operators/wm.py
| Context not available. | |||||
| class WM_OT_url_open(Operator): | class WM_OT_url_open(Operator): | ||||
| """Open a website in the web-browser""" | """Open a website in the web-browser""" | ||||
| bl_idname = "wm.url_open" | bl_idname = "wm.url_open" | ||||
| bl_label = "" | bl_label = "Open in Browser" | ||||
| bl_options = {'INTERNAL'} | bl_options = {'INTERNAL'} | ||||
| url: StringProperty( | url: StringProperty( | ||||
| Context not available. | |||||
| return {'FINISHED'} | return {'FINISHED'} | ||||
| class WM_OT_report_bug(Operator): | |||||
| """Report bug to Blender using your web-browser""" | |||||
| bl_idname = "wm.report_bug" | |||||
| bl_label = "Report a Bug" | |||||
brecht: This should not be left empty, operators need a name. | |||||
| bl_options = {'INTERNAL'} | |||||
| def execute(self, _context): | |||||
| from bl_ui_utils.bug_report_url import url_prefill_from_blender | |||||
| import webbrowser | |||||
| webbrowser.open(url_prefill_from_blender(url="https://developer.blender.org/maniphest/task/edit/form/1/")) | |||||
| return {'FINISHED'} | |||||
| class WM_OT_report_bug_addon(Operator): | |||||
| """Report addon bug to Blender using your web-browser""" | |||||
| bl_idname = "wm.report_bug_addon" | |||||
| bl_label = "Report Addon Bug" | |||||
Not Done Inline ActionsSame as above. brecht: Same as above. | |||||
| bl_options = {'INTERNAL'} | |||||
| addon: StringProperty( | |||||
| name="addon", | |||||
| description="name of addon", | |||||
| ) | |||||
| def execute(self, _context): | |||||
| from bl_ui_utils.bug_report_url import url_prefill_from_blender | |||||
| import webbrowser | |||||
| webbrowser.open(url_prefill_from_blender(url="https://developer.blender.org/maniphest/task/edit/form/2/", addon=self.addon)) | |||||
| return {'FINISHED'} | |||||
| class WM_OT_path_open(Operator): | class WM_OT_path_open(Operator): | ||||
| """Open a path in a file browser""" | """Open a path in a file browser""" | ||||
| bl_idname = "wm.path_open" | bl_idname = "wm.path_open" | ||||
| bl_label = "" | bl_label = "Open Path in Browser" | ||||
| bl_options = {'INTERNAL'} | bl_options = {'INTERNAL'} | ||||
| filepath: StringProperty( | filepath: StringProperty( | ||||
| Context not available. | |||||
| WM_OT_owner_disable, | WM_OT_owner_disable, | ||||
| WM_OT_owner_enable, | WM_OT_owner_enable, | ||||
| WM_OT_url_open, | WM_OT_url_open, | ||||
| WM_OT_report_bug, | |||||
| WM_OT_report_bug_addon, | |||||
| WM_OT_tool_set_by_id, | WM_OT_tool_set_by_id, | ||||
| WM_OT_tool_set_by_index, | WM_OT_tool_set_by_index, | ||||
| WM_OT_toolbar, | WM_OT_toolbar, | ||||
| Context not available. | |||||
This should not be left empty, operators need a name.