Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/modules/bl_ui_utils/bug_report_url.py
| Context not available. | |||||
| # <pep8-80 compliant> | # <pep8-80 compliant> | ||||
| def url_prefill_from_blender(): | def url_prefill_from_blender(url, addon=None): | ||||
| import bpy | import bpy | ||||
| import bgl | import bgl | ||||
| import struct | import struct | ||||
| Context not available. | |||||
| fh = io.StringIO() | fh = io.StringIO() | ||||
| if addon: | |||||
| fh.write("**Addon**\n") | |||||
| fh.write("Addon Name: " + addon + "\n\n\n") | |||||
| fh.write("**System Information**\n") | fh.write("**System Information**\n") | ||||
| fh.write( | fh.write( | ||||
| "Operating system: {!s} {!s} Bits\n".format( | "Operating system: {!s} {!s} Bits\n".format( | ||||
| Context not available. | |||||
| fh.seek(0) | fh.seek(0) | ||||
| return ( | return (url + "?description=" + urllib.parse.quote(fh.read())) | ||||
| "https://developer.blender.org/maniphest/task/edit/form/1?description=" + | |||||
| urllib.parse.quote(fh.read()) | |||||
| ) | |||||
| Context not available. | |||||