Listing the "Blender Foundation" as copyright holder implied the Blender Foundation holds copyright to files which may include work from many developers. While keeping copyright on headers makes sense for isolated libraries, Blender's own code may be refactored or moved between files in a way that makes the per file copyright holders less meaningful. Copyright references to the "Blender Foundation" have been replaced with "Blender Authors", with the exception of `./extern/` since these this contains libraries which are more isolated, any changed to license headers there can be handled on a case-by-case basis. Some directories in `./intern/` have also been excluded: - `./intern/cycles/` it's own `AUTHORS` file is planned. - `./intern/opensubdiv/`. An "AUTHORS" file has been added, using the chromium projects authors file as a template. Design task: #110784 Ref !110783.
79 lines
2.2 KiB
Python
79 lines
2.2 KiB
Python
# SPDX-FileCopyrightText: 2019-2023 Blender Authors
|
|
#
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
def url_prefill_from_blender(*, addon_info=None):
|
|
import bpy
|
|
import gpu
|
|
import struct
|
|
import platform
|
|
import urllib.parse
|
|
import io
|
|
|
|
fh = io.StringIO()
|
|
|
|
fh.write("**System Information**\n")
|
|
fh.write(
|
|
"Operating system: %s %d Bits" % (
|
|
platform.platform(),
|
|
struct.calcsize("P") * 8,
|
|
)
|
|
)
|
|
# Windowing Environment (include when dynamically selectable).
|
|
# This lets us know if WAYLAND/X11 is in use.
|
|
from _bpy import _ghost_backend
|
|
ghost_backend = _ghost_backend()
|
|
if ghost_backend not in {'NONE', 'DEFAULT'}:
|
|
fh.write(", %s UI" % ghost_backend)
|
|
del _ghost_backend, ghost_backend
|
|
|
|
fh.write("\n")
|
|
|
|
fh.write(
|
|
"Graphics card: %s %s %s\n" % (
|
|
gpu.platform.renderer_get(),
|
|
gpu.platform.vendor_get(),
|
|
gpu.platform.version_get(),
|
|
)
|
|
)
|
|
fh.write(
|
|
"\n"
|
|
"**Blender Version**\n"
|
|
)
|
|
fh.write(
|
|
"Broken: version: %s, branch: %s, commit date: %s %s, hash: `%s`\n" % (
|
|
bpy.app.version_string,
|
|
bpy.app.build_branch.decode('utf-8', 'replace'),
|
|
bpy.app.build_commit_date.decode('utf-8', 'replace'),
|
|
bpy.app.build_commit_time.decode('utf-8', 'replace'),
|
|
bpy.app.build_hash.decode('ascii'),
|
|
)
|
|
)
|
|
fh.write(
|
|
"Worked: (newest version of Blender that worked as expected)\n"
|
|
)
|
|
if addon_info:
|
|
fh.write(
|
|
"\n"
|
|
"**Addon Information**\n"
|
|
)
|
|
fh.write(addon_info)
|
|
|
|
fh.write(
|
|
"\n"
|
|
"**Short description of error**\n"
|
|
"[Please fill out a short description of the error here]\n"
|
|
"\n"
|
|
"**Exact steps for others to reproduce the error**\n"
|
|
"[Please describe the exact steps needed to reproduce the issue]\n"
|
|
"[Based on the default startup or an attached .blend file (as simple as possible)]\n"
|
|
"\n"
|
|
)
|
|
|
|
form_number = 2 if addon_info else 1
|
|
return (
|
|
"https://developer.blender.org/maniphest/task/edit/form/%i?description=" % form_number +
|
|
urllib.parse.quote(fh.getvalue())
|
|
)
|