Cleanup: declare __all__ for Python scripts
Declare all to make public public API's explicit and help detect unused code.
This commit is contained in:
@@ -5,6 +5,10 @@
|
|||||||
|
|
||||||
# macOS utility to remove all `rpaths` and add a new one.
|
# macOS utility to remove all `rpaths` and add a new one.
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
import re
|
import re
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|||||||
@@ -2,18 +2,20 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
# Simple utility that prints all WITH_* options in a CMakeLists.txt
|
# Simple utility that prints all `WITH_*` options in a `CMakeLists.txt`.
|
||||||
# Called by 'make help_features'
|
# Called by `make help_features`.
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from typing import (
|
from typing import (
|
||||||
Union,
|
Optional,
|
||||||
)
|
)
|
||||||
|
|
||||||
cmakelists_file = sys.argv[-1]
|
|
||||||
|
|
||||||
|
|
||||||
def count_backslashes_before_pos(file_data: str, pos: int) -> int:
|
def count_backslashes_before_pos(file_data: str, pos: int) -> int:
|
||||||
slash_count = 0
|
slash_count = 0
|
||||||
@@ -26,7 +28,7 @@ def count_backslashes_before_pos(file_data: str, pos: int) -> int:
|
|||||||
return slash_count
|
return slash_count
|
||||||
|
|
||||||
|
|
||||||
def extract_cmake_string_at_pos(file_data: str, pos_beg: int) -> Union[str, None]:
|
def extract_cmake_string_at_pos(file_data: str, pos_beg: int) -> Optional[str]:
|
||||||
assert file_data[pos_beg - 1] == '"'
|
assert file_data[pos_beg - 1] == '"'
|
||||||
|
|
||||||
pos = pos_beg
|
pos = pos_beg
|
||||||
@@ -73,19 +75,23 @@ def extract_cmake_string_at_pos(file_data: str, pos_beg: int) -> Union[str, None
|
|||||||
return text
|
return text
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> int:
|
||||||
|
cmakelists_file = sys.argv[-1]
|
||||||
|
|
||||||
options = []
|
options = []
|
||||||
with open(cmakelists_file, 'r', encoding="utf-8") as fh:
|
with open(cmakelists_file, 'r', encoding="utf-8") as fh:
|
||||||
file_data = fh.read()
|
file_data = fh.read()
|
||||||
for m in re.finditer(r"^\s*option\s*\(\s*(WITH_[a-zA-Z0-9_]+)\s+(\")", file_data, re.MULTILINE):
|
|
||||||
option_name = m.group(1)
|
for m in re.finditer(r"^\s*option\s*\(\s*(WITH_[a-zA-Z0-9_]+)\s+(\")", file_data, re.MULTILINE):
|
||||||
option_descr = extract_cmake_string_at_pos(file_data, m.span(2)[1])
|
option_name = m.group(1)
|
||||||
if option_descr is None:
|
option_descr = extract_cmake_string_at_pos(file_data, m.span(2)[1])
|
||||||
# Possibly a parsing error, at least show something.
|
if option_descr is None:
|
||||||
option_descr = "(UNDOCUMENTED)"
|
# Possibly a parsing error, at least show something.
|
||||||
options.append("{:s}: {:s}".format(option_name, option_descr))
|
option_descr = "(UNDOCUMENTED)"
|
||||||
|
options.append("{:s}: {:s}".format(option_name, option_descr))
|
||||||
|
|
||||||
print('\n'.join(options))
|
print('\n'.join(options))
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ NOTE:
|
|||||||
Some type annotations are quoted to avoid errors in Python 3.9.
|
Some type annotations are quoted to avoid errors in Python 3.9.
|
||||||
These can be unquoted eventually.
|
These can be unquoted eventually.
|
||||||
"""
|
"""
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import make_utils
|
import make_utils
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
"make test" for all platforms, running automated tests.
|
"make test" for all platforms, running automated tests.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ API dump format:
|
|||||||
]
|
]
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
|||||||
@@ -3,50 +3,60 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"__all__",
|
||||||
|
)
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
argv = sys.argv[:]
|
|
||||||
|
|
||||||
strip_byte = False
|
def main():
|
||||||
if "--strip-byte" in argv:
|
argv = sys.argv[:]
|
||||||
argv.remove("--strip-byte")
|
|
||||||
strip_byte = True
|
|
||||||
|
|
||||||
if len(argv) < 2:
|
strip_byte = False
|
||||||
sys.stdout.write("Usage: ctodata <c_file> [--strip-byte]\n")
|
if "--strip-byte" in argv:
|
||||||
sys.exit(1)
|
argv.remove("--strip-byte")
|
||||||
|
strip_byte = True
|
||||||
|
|
||||||
filename = argv[1]
|
if len(argv) < 2:
|
||||||
|
sys.stdout.write("Usage: ctodata <c_file> [--strip-byte]\n")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
try:
|
filename = argv[1]
|
||||||
fpin = open(filename, "r")
|
|
||||||
except:
|
|
||||||
sys.stdout.write("Unable to open input {:s}\n".format(argv[1]))
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
data_as_str = fpin.read().rsplit("{")[-1].split("}")[0]
|
try:
|
||||||
data_as_str = data_as_str.replace(",", " ")
|
fpin = open(filename, "r")
|
||||||
data_as_list = [int(v) for v in data_as_str.split()]
|
except:
|
||||||
del data_as_str
|
sys.stdout.write("Unable to open input {:s}\n".format(argv[1]))
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
if strip_byte:
|
data_as_str = fpin.read().rsplit("{")[-1].split("}")[0]
|
||||||
# String data gets trailing byte.
|
data_as_str = data_as_str.replace(",", " ")
|
||||||
last = data_as_list.pop()
|
data_as_list = [int(v) for v in data_as_str.split()]
|
||||||
assert last == 0
|
del data_as_str
|
||||||
|
|
||||||
data = bytes(data_as_list)
|
if strip_byte:
|
||||||
del data_as_list
|
# String data gets trailing byte.
|
||||||
|
last = data_as_list.pop()
|
||||||
|
assert last == 0
|
||||||
|
|
||||||
dname = filename + ".ctodata"
|
data = bytes(data_as_list)
|
||||||
|
del data_as_list
|
||||||
|
|
||||||
sys.stdout.write("Making DATA file <{:s}>\n".format(dname))
|
dname = filename + ".ctodata"
|
||||||
|
|
||||||
try:
|
sys.stdout.write("Making DATA file <{:s}>\n".format(dname))
|
||||||
fpout = open(dname, "wb")
|
|
||||||
except:
|
|
||||||
sys.stdout.write("Unable to open output {:s}\n".format(dname))
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
size = fpout.write(data)
|
try:
|
||||||
|
fpout = open(dname, "wb")
|
||||||
|
except:
|
||||||
|
sys.stdout.write("Unable to open output {:s}\n".format(dname))
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
sys.stdout.write("{:d}\n".format(size))
|
size = fpout.write(data)
|
||||||
|
|
||||||
|
sys.stdout.write("{:d}\n".format(size))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
|
|||||||
@@ -3,50 +3,62 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
"""
|
||||||
|
This python script is used to generate the release notes and
|
||||||
|
download URLs which we can copy-paste directly into the CMS of
|
||||||
|
www.blender.org and stores.
|
||||||
|
"""
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import sys
|
||||||
|
|
||||||
import lts_issue
|
import lts_issue
|
||||||
import lts_download
|
import lts_download
|
||||||
|
|
||||||
DESCRIPTION = ("This python script is used to generate the release notes and "
|
|
||||||
"download URLs which we can copy-paste directly into the CMS of "
|
|
||||||
"www.blender.org and stores.")
|
|
||||||
|
|
||||||
# Parse arguments
|
def main() -> int:
|
||||||
parser = argparse.ArgumentParser(description=DESCRIPTION)
|
# Parse arguments
|
||||||
parser.add_argument(
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
"--version",
|
parser.add_argument(
|
||||||
required=True,
|
"--version",
|
||||||
help="Version string in the form of {major}.{minor}.{patch} (e.g. 3.3.2)")
|
required=True,
|
||||||
parser.add_argument(
|
help="Version string in the form of {major}.{minor}.{patch} (e.g. 3.3.2)")
|
||||||
"--issue",
|
parser.add_argument(
|
||||||
help="Task that contains the release notes information (e.g. #77348)")
|
"--issue",
|
||||||
parser.add_argument(
|
help="Task that contains the release notes information (e.g. #77348)")
|
||||||
"--format",
|
parser.add_argument(
|
||||||
help="Format the result in `text`, `steam`, `markdown` or `html`",
|
"--format",
|
||||||
default="text")
|
help="Format the result in `text`, `steam`, `markdown` or `html`",
|
||||||
args = parser.parse_args()
|
default="text")
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
# Determine issue number
|
# Determine issue number
|
||||||
version = args.version
|
version = args.version
|
||||||
issue = args.issue
|
issue = args.issue
|
||||||
if not issue:
|
if not issue:
|
||||||
if version.startswith("2.83."):
|
if version.startswith("2.83."):
|
||||||
issue = "#77348"
|
issue = "#77348"
|
||||||
elif version.startswith("2.93."):
|
elif version.startswith("2.93."):
|
||||||
issue = "#88449"
|
issue = "#88449"
|
||||||
elif version.startswith("3.3."):
|
elif version.startswith("3.3."):
|
||||||
issue = "#100749"
|
issue = "#100749"
|
||||||
elif version.startswith("3.6."):
|
elif version.startswith("3.6."):
|
||||||
issue = "#109399"
|
issue = "#109399"
|
||||||
elif version.startswith("4.2."):
|
elif version.startswith("4.2."):
|
||||||
issue = "#124452"
|
issue = "#124452"
|
||||||
else:
|
else:
|
||||||
raise ValueError("Specify --issue or update script to include issue number for this version")
|
raise ValueError("Specify --issue or update script to include issue number for this version")
|
||||||
|
|
||||||
# Print
|
# Print
|
||||||
if args.format == "html":
|
if args.format == "html":
|
||||||
lts_download.print_urls(version=version)
|
lts_download.print_urls(version=version)
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
lts_issue.print_notes(version=version, format=args.format, issue=issue)
|
lts_issue.print_notes(version=version, format=args.format, issue=issue)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
# SPDX-FileCopyrightText: 2020-2023 Blender Authors
|
# SPDX-FileCopyrightText: 2020-2023 Blender Authors
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
__all__ = (
|
||||||
|
"print_urls",
|
||||||
|
)
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
# SPDX-FileCopyrightText: 2023 Blender Authors
|
# SPDX-FileCopyrightText: 2023 Blender Authors
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
__all__ = (
|
||||||
|
"print_notes",
|
||||||
|
)
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import glob
|
import glob
|
||||||
import pathlib
|
import pathlib
|
||||||
@@ -12,59 +16,65 @@ import tempfile
|
|||||||
import urllib.request
|
import urllib.request
|
||||||
import zipfile
|
import zipfile
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description="Check and upload bpy module to PyPI")
|
|
||||||
parser.add_argument(
|
|
||||||
"--version",
|
|
||||||
required=True,
|
|
||||||
help="Version string in the form of {major}.{minor}.{patch} (e.g. 3.6.0)")
|
|
||||||
parser.add_argument(
|
|
||||||
"--git-hash",
|
|
||||||
required=True,
|
|
||||||
help="Git hash matching the version")
|
|
||||||
parser.add_argument(
|
|
||||||
"--check",
|
|
||||||
action="store_true",
|
|
||||||
help="Only check wheels for errors, don't upload")
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
platforms = [
|
def main():
|
||||||
"darwin.x86_64",
|
parser = argparse.ArgumentParser(description="Check and upload bpy module to PyPI")
|
||||||
"darwin.arm64",
|
parser.add_argument(
|
||||||
"linux.x86_64",
|
"--version",
|
||||||
"windows.amd64"]
|
required=True,
|
||||||
|
help="Version string in the form of {major}.{minor}.{patch} (e.g. 3.6.0)")
|
||||||
|
parser.add_argument(
|
||||||
|
"--git-hash",
|
||||||
|
required=True,
|
||||||
|
help="Git hash matching the version")
|
||||||
|
parser.add_argument(
|
||||||
|
"--check",
|
||||||
|
action="store_true",
|
||||||
|
help="Only check wheels for errors, don't upload")
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
with tempfile.TemporaryDirectory() as tmp_dir:
|
platforms = [
|
||||||
tmp_dir = pathlib.Path(tmp_dir)
|
"darwin.x86_64",
|
||||||
|
"darwin.arm64",
|
||||||
|
"linux.x86_64",
|
||||||
|
"windows.amd64"]
|
||||||
|
|
||||||
print("Download:")
|
with tempfile.TemporaryDirectory() as tmp_dir:
|
||||||
for platform in platforms:
|
tmp_dir = pathlib.Path(tmp_dir)
|
||||||
# Download from buildbot.
|
|
||||||
version = args.version
|
|
||||||
version_tokens = version.split(".")
|
|
||||||
short_version = version_tokens[0] + version_tokens[1]
|
|
||||||
git_hash = args.git_hash
|
|
||||||
|
|
||||||
url = f"https://builder.blender.org/download/daily/bpy-{version}-stable+v{short_version}.{git_hash}-{platform}-release.zip"
|
print("Download:")
|
||||||
filepath = tmp_dir / f"{platform}.zip"
|
for platform in platforms:
|
||||||
print(url)
|
# Download from buildbot.
|
||||||
urllib.request.urlretrieve(url, filepath)
|
version = args.version
|
||||||
|
version_tokens = version.split(".")
|
||||||
|
short_version = version_tokens[0] + version_tokens[1]
|
||||||
|
git_hash = args.git_hash
|
||||||
|
|
||||||
# Unzip.
|
url = f"https://builder.blender.org/download/daily/bpy-{version}-stable+v{short_version}.{git_hash}-{platform}-release.zip"
|
||||||
with zipfile.ZipFile(filepath, "r") as zipf:
|
filepath = tmp_dir / f"{platform}.zip"
|
||||||
zipf.extractall(path=tmp_dir)
|
print(url)
|
||||||
print("")
|
urllib.request.urlretrieve(url, filepath)
|
||||||
|
|
||||||
wheels = glob.glob(str(tmp_dir / "*.whl"))
|
# Unzip.
|
||||||
print("Wheels:")
|
with zipfile.ZipFile(filepath, "r") as zipf:
|
||||||
print("\n".join(wheels))
|
zipf.extractall(path=tmp_dir)
|
||||||
|
print("")
|
||||||
|
|
||||||
if len(platforms) != len(wheels):
|
wheels = glob.glob(str(tmp_dir / "*.whl"))
|
||||||
sys.stderr.write("Unexpected number of whl files.")
|
print("Wheels:")
|
||||||
sys.exit(1)
|
print("\n".join(wheels))
|
||||||
print("")
|
|
||||||
|
|
||||||
# Check and upload.
|
if len(platforms) != len(wheels):
|
||||||
print("Twine:")
|
sys.stderr.write("Unexpected number of whl files.")
|
||||||
subprocess.run(["twine", "check"] + wheels, check=True)
|
sys.exit(1)
|
||||||
if not args.check:
|
print("")
|
||||||
subprocess.run(["twine", "upload", "--repository", "bpy", "--verbose"] + wheels, check=True)
|
|
||||||
|
# Check and upload.
|
||||||
|
print("Twine:")
|
||||||
|
subprocess.run(["twine", "check"] + wheels, check=True)
|
||||||
|
if not args.check:
|
||||||
|
subprocess.run(["twine", "upload", "--repository", "bpy", "--verbose"] + wheels, check=True)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ rna values in fcurves and drivers.
|
|||||||
|
|
||||||
Currently unused, but might become useful later again.
|
Currently unused, but might become useful later again.
|
||||||
"""
|
"""
|
||||||
|
__all__ = (
|
||||||
|
"update_data_paths",
|
||||||
|
)
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import bpy
|
import bpy
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
# When the version is `(0, 0, 0)`, the key-map being loaded didn't contain any versioning information.
|
# When the version is `(0, 0, 0)`, the key-map being loaded didn't contain any versioning information.
|
||||||
# This will older than `(2, 92, 0)`.
|
# This will older than `(2, 92, 0)`.
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"keyconfig_update",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def keyconfig_update(keyconfig_data, keyconfig_version):
|
def keyconfig_update(keyconfig_data, keyconfig_version):
|
||||||
from bpy.app import version_file as blender_version
|
from bpy.app import version_file as blender_version
|
||||||
if keyconfig_version >= blender_version:
|
if keyconfig_version >= blender_version:
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
|||||||
@@ -2,16 +2,19 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
"""
|
||||||
|
blender -b --factory-startup --python tests/python/bl_animation_drivers.py -- --testdir /path/to/tests/data/animation
|
||||||
|
"""
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
import bpy
|
import bpy
|
||||||
import pathlib
|
import pathlib
|
||||||
import sys
|
import sys
|
||||||
from rna_prop_ui import rna_idprop_quote_path
|
from rna_prop_ui import rna_idprop_quote_path
|
||||||
|
|
||||||
"""
|
|
||||||
blender -b --factory-startup --python tests/python/bl_animation_drivers.py -- --testdir /path/to/tests/data/animation
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
class AbstractEmptyDriverTest:
|
class AbstractEmptyDriverTest:
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|||||||
@@ -2,7 +2,13 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
# ./blender.bin --background --python tests/python/bl_blendfile_liblink.py
|
"""
|
||||||
|
./blender.bin --background --python tests/python/bl_blendfile_liblink.py
|
||||||
|
"""
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
@@ -9,6 +9,10 @@
|
|||||||
#
|
#
|
||||||
# This needs to be investigated!
|
# This needs to be investigated!
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
@@ -7,6 +7,9 @@
|
|||||||
"""
|
"""
|
||||||
./blender.bin --background --factory-startup --python tests/python/bl_load_addons.py
|
./blender.bin --background --factory-startup --python tests/python/bl_load_addons.py
|
||||||
"""
|
"""
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
import addon_utils
|
import addon_utils
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
# Simple script to check mash validate code.
|
# Simple script to check mash validate code.
|
||||||
# XXX Should be extended with many more "wrong cases"!
|
# XXX Should be extended with many more "wrong cases"!
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
|
|
||||||
import random
|
import random
|
||||||
|
|||||||
@@ -3,6 +3,11 @@
|
|||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
# ./blender.bin --background --python tests/python/bl_pyapi_bpy_utils_units.py -- --verbose
|
# ./blender.bin --background --python tests/python/bl_pyapi_bpy_utils_units.py -- --verbose
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from bpy.utils import units
|
from bpy.utils import units
|
||||||
@@ -93,7 +98,11 @@ class UnitsTesting(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def main():
|
||||||
import sys
|
import sys
|
||||||
sys.argv = [__file__] + (sys.argv[sys.argv.index("--") + 1:] if "--" in sys.argv else [])
|
sys.argv = [__file__] + (sys.argv[sys.argv.index("--") + 1:] if "--" in sys.argv else [])
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"AbstractImBufTest",
|
||||||
|
)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
import shutil
|
import shutil
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
r"""
|
r"""
|
||||||
Example usage:
|
Example usage:
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
#
|
#
|
||||||
# only error checked for here is a segfault.
|
# only error checked for here is a segfault.
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,9 @@ or the context for executing the actions is not properly set (the case for timer
|
|||||||
|
|
||||||
This utility executes actions as if the user initiated them from a key shortcut.
|
This utility executes actions as if the user initiated them from a key shortcut.
|
||||||
"""
|
"""
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ WAYLAND Environment Variables:
|
|||||||
|
|
||||||
Currently only WAYLAND is supported, other systems could be added.
|
Currently only WAYLAND is supported, other systems could be added.
|
||||||
"""
|
"""
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import signal
|
import signal
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
|
|
||||||
# generate svn rev-sha1 mapping
|
# generate svn rev-sha1 mapping
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"main",
|
||||||
|
)
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"data",
|
||||||
|
)
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
2: "12315f4d0e0ae993805f141f64cb8c73c5297311",
|
2: "12315f4d0e0ae993805f141f64cb8c73c5297311",
|
||||||
16: "599dc60f6dc97d3ef8efdd294ca2e89fbf498f54",
|
16: "599dc60f6dc97d3ef8efdd294ca2e89fbf498f54",
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
__all__ = (
|
||||||
|
"data",
|
||||||
|
)
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
"12315f4d0e0ae993805f141f64cb8c73c5297311": 2,
|
"12315f4d0e0ae993805f141f64cb8c73c5297311": 2,
|
||||||
"599dc60f6dc97d3ef8efdd294ca2e89fbf498f54": 16,
|
"599dc60f6dc97d3ef8efdd294ca2e89fbf498f54": 16,
|
||||||
|
|||||||
Reference in New Issue
Block a user