Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/space_userpref.py
| Show First 20 Lines • Show All 1,694 Lines • ▼ Show 20 Lines | def draw_error(layout, message): | ||||
| sub.label(text=lines[0]) | sub.label(text=lines[0]) | ||||
| sub.label(icon='ERROR') | sub.label(icon='ERROR') | ||||
| for l in lines[1:]: | for l in lines[1:]: | ||||
| box.label(text=l) | box.label(text=l) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| import os | import os | ||||
| import addon_utils | import addon_utils | ||||
| from bl_ui_utils.bug_report_url import url_prefill_from_blender | |||||
| layout = self.layout | layout = self.layout | ||||
| prefs = context.preferences | prefs = context.preferences | ||||
| used_ext = {ext.module for ext in prefs.addons} | used_ext = {ext.module for ext in prefs.addons} | ||||
| addon_user_dirs = tuple( | addon_user_dirs = tuple( | ||||
| p for p in ( | p for p in ( | ||||
| ▲ Show 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| ).url = info["wiki_url"] | ).url = info["wiki_url"] | ||||
| # Only add "Report a Bug" button if tracker_url is set | # Only add "Report a Bug" button if tracker_url is set | ||||
| # or the add-on is bundled (use official tracker then). | # or the add-on is bundled (use official tracker then). | ||||
| if info.get("tracker_url") or not user_addon: | if info.get("tracker_url") or not user_addon: | ||||
| sub.operator( | sub.operator( | ||||
| "wm.url_open", text="Report a Bug", icon='URL', | "wm.url_open", text="Report a Bug", icon='URL', | ||||
| ).url = info.get( | ).url = info.get( | ||||
| "tracker_url", | "tracker_url", | ||||
| "https://developer.blender.org/maniphest/task/edit/form/2", | url_prefill_from_blender(info), | ||||
| ) | ) | ||||
| if user_addon: | if user_addon: | ||||
| sub.operator( | sub.operator( | ||||
| "preferences.addon_remove", text="Remove", icon='CANCEL', | "preferences.addon_remove", text="Remove", icon='CANCEL', | ||||
| ).module = mod.__name__ | ).module = mod.__name__ | ||||
| # Show addon user preferences | # Show addon user preferences | ||||
| if is_enabled: | if is_enabled: | ||||
| ▲ Show 20 Lines • Show All 262 Lines • Show Last 20 Lines | |||||