deadline-cloud-for-blender 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. deadline_cloud_for_blender-0.3.0/.gitignore +41 -0
  2. deadline_cloud_for_blender-0.3.0/LICENSE +175 -0
  3. deadline_cloud_for_blender-0.3.0/NOTICE +1 -0
  4. deadline_cloud_for_blender-0.3.0/PKG-INFO +97 -0
  5. deadline_cloud_for_blender-0.3.0/README.md +70 -0
  6. deadline_cloud_for_blender-0.3.0/_version.py +16 -0
  7. deadline_cloud_for_blender-0.3.0/hatch.toml +42 -0
  8. deadline_cloud_for_blender-0.3.0/hatch_custom_hook.py +47 -0
  9. deadline_cloud_for_blender-0.3.0/pyproject.toml +187 -0
  10. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/BlenderAdaptor/BlenderAdaptor.json +3 -0
  11. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/BlenderAdaptor/__init__.py +9 -0
  12. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/BlenderAdaptor/__main__.py +34 -0
  13. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/BlenderAdaptor/adaptor.py +478 -0
  14. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/BlenderAdaptor/py.typed +1 -0
  15. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/BlenderAdaptor/schemas/init_data.schema.json +38 -0
  16. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/BlenderAdaptor/schemas/run_data.schema.json +19 -0
  17. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/BlenderClient/__init__.py +6 -0
  18. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/BlenderClient/blender_client.py +59 -0
  19. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/BlenderClient/py.typed +0 -0
  20. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/BlenderClient/render_handlers/__init__.py +32 -0
  21. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/BlenderClient/render_handlers/cycles_blender_handler.py +7 -0
  22. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/BlenderClient/render_handlers/default_blender_handler.py +218 -0
  23. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/BlenderClient/render_handlers/workbench_blender_handler.py +7 -0
  24. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/__init__.py +1 -0
  25. deadline_cloud_for_blender-0.3.0/src/deadline/blender_adaptor/_version.py +16 -0
  26. deadline_cloud_for_blender-0.3.0/src/deadline/blender_submitter/_version.py +16 -0
  27. deadline_cloud_for_blender-0.3.0/src/deadline/blender_submitter/addons/deadline_cloud_blender_submitter/__init__.py +183 -0
  28. deadline_cloud_for_blender-0.3.0/src/deadline/blender_submitter/addons/deadline_cloud_blender_submitter/_version.py +16 -0
  29. deadline_cloud_for_blender-0.3.0/src/deadline/blender_submitter/addons/deadline_cloud_blender_submitter/adaptor_override_environment.yaml +84 -0
  30. deadline_cloud_for_blender-0.3.0/src/deadline/blender_submitter/addons/deadline_cloud_blender_submitter/addonpreferences.py +76 -0
  31. deadline_cloud_for_blender-0.3.0/src/deadline/blender_submitter/addons/deadline_cloud_blender_submitter/blender_utils.py +122 -0
  32. deadline_cloud_for_blender-0.3.0/src/deadline/blender_submitter/addons/deadline_cloud_blender_submitter/default_blender_template.yaml +142 -0
  33. deadline_cloud_for_blender-0.3.0/src/deadline/blender_submitter/addons/deadline_cloud_blender_submitter/job_settings.py +128 -0
  34. deadline_cloud_for_blender-0.3.0/src/deadline/blender_submitter/addons/deadline_cloud_blender_submitter/logutil.py +57 -0
  35. deadline_cloud_for_blender-0.3.0/src/deadline/blender_submitter/addons/deadline_cloud_blender_submitter/open_deadline_cloud_dialog.py +181 -0
  36. deadline_cloud_for_blender-0.3.0/src/deadline/blender_submitter/addons/deadline_cloud_blender_submitter/sanity_checks.py +182 -0
  37. deadline_cloud_for_blender-0.3.0/src/deadline/blender_submitter/addons/deadline_cloud_blender_submitter/scene_settings_widget.py +274 -0
  38. deadline_cloud_for_blender-0.3.0/src/deadline/blender_submitter/addons/deadline_cloud_blender_submitter/template_filling.py +415 -0
@@ -0,0 +1,41 @@
1
+ # Test outputs
2
+ devfiles/adaptor_test/out/
3
+ devfiles/submission_test_files/suzanne_cameras_and_viewlayers/out
4
+
5
+ devcontainer/config
6
+ devcontainer/*.env
7
+ # example env is the only .env file to include
8
+ !example.env
9
+
10
+ # Hatch version temp file
11
+ *_version.py
12
+
13
+ # build artifacts
14
+ build/
15
+ dependency_bundle/
16
+ dist/
17
+ plugin_env/
18
+ wheels/
19
+
20
+ *.egg-info/
21
+ __pycache__/
22
+ *.py[cod]
23
+ .coverage
24
+ .tox
25
+
26
+ # misc extensions that might pop up
27
+ .run
28
+ .exe
29
+ .zip
30
+
31
+ # virtualenv
32
+ .venv
33
+ venv/
34
+
35
+ # IDE
36
+ .vscode
37
+ .idea/
38
+
39
+ # macOS
40
+ .DS_STORE
41
+
@@ -0,0 +1,175 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
@@ -0,0 +1 @@
1
+ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
@@ -0,0 +1,97 @@
1
+ Metadata-Version: 2.3
2
+ Name: deadline-cloud-for-blender
3
+ Version: 0.3.0
4
+ Summary: AWS Deadline Cloud for Blender
5
+ Project-URL: Homepage, https://github.com/aws-deadline/deadline-cloud-for-blender
6
+ Project-URL: Source, https://github.com/aws-deadline/deadline-cloud-for-blender
7
+ Author: Amazon Web Services
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ License-File: NOTICE
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: End Users/Desktop
14
+ Classifier: License :: OSI Approved :: Apache Software License
15
+ Classifier: Operating System :: MacOS
16
+ Classifier: Operating System :: Microsoft :: Windows
17
+ Classifier: Operating System :: POSIX :: Linux
18
+ Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: deadline==0.47.*
25
+ Requires-Dist: openjd-adaptor-runtime==0.7.*
26
+ Description-Content-Type: text/markdown
27
+
28
+ # AWS Deadline Cloud for Blender
29
+
30
+ [![pypi](https://img.shields.io/pypi/v/deadline-cloud-for-blender.svg?style=flat)](https://pypi.python.org/pypi/deadline-cloud-for-blender)
31
+ [![python](https://img.shields.io/pypi/pyversions/deadline-cloud-for-blender.svg?style=flat)](https://pypi.python.org/pypi/deadline-cloud-for-blender)
32
+ [![license](https://img.shields.io/pypi/l/deadline-cloud-for-blender.svg?style=flat)](https://github.com/aws-deadline/deadline-cloud-for-blender/blob/mainline/LICENSE)
33
+
34
+ AWS Deadline Cloud for Blender is a python package that allows users to create [AWS Deadline Cloud][deadline-cloud] jobs from within Blender. Using the [Open Job Description (OpenJD) Adaptor Runtime][openjd-adaptor-runtime] this package also provides a command line application that adapts Blender's command line interface to support the [OpenJD specification][openjd].
35
+
36
+ [deadline-cloud]: https://docs.aws.amazon.com/deadline-cloud/latest/userguide/what-is-deadline-cloud.html
37
+ [deadline-cloud-client]: https://github.com/aws-deadline/deadline-cloud
38
+ [openjd]: https://github.com/OpenJobDescription/openjd-specifications/wiki
39
+ [openjd-adaptor-runtime]: https://github.com/OpenJobDescription/openjd-adaptor-runtime-for-python
40
+ [openjd-adaptor-runtime-lifecycle]: https://github.com/OpenJobDescription/openjd-adaptor-runtime-for-python/blob/release/README.md#adaptor-lifecycle
41
+
42
+ ## Compatibility
43
+
44
+ This library requires:
45
+
46
+ 1. Blender 3.6 or greater,
47
+ 1. Python 3.10 or higher; and
48
+ 1. Linux, Windows, or a macOS operating system.
49
+ * Adaptor only supports Linux and macOS
50
+
51
+ ## Submitter
52
+
53
+ This package provides a Blender plugin that creates jobs for AWS Deadline Cloud using the [AWS Deadline Cloud client library][deadline-cloud-client]. Based on the loaded scene it determines the files required, allows the user to specify render options, and builds an [OpenJD template][openjd] that defines the workflow.
54
+
55
+ ## Adaptor
56
+
57
+ The Blender Adaptor implements the [OpenJD][openjd-adaptor-runtime] interface that allows render workloads to launch Blender and feed it commands. This gives the following benefits:
58
+ * a standardized render application interface,
59
+ * sticky rendering, where the application stays open between tasks,
60
+
61
+ Jobs created by the submitter use this adaptor by default.
62
+
63
+ ### Getting Started
64
+
65
+ The adaptor can be installed by the standard python packaging mechanisms:
66
+ ```sh
67
+ $ pip install deadline-cloud-for-blender
68
+ ```
69
+
70
+ After installation it can then be used as a command line tool:
71
+ ```sh
72
+ $ blender-openjd --help
73
+ ```
74
+
75
+ For more information on the commands the OpenJD adaptor runtime provides, see [here][openjd-adaptor-runtime-lifecycle].
76
+
77
+ ## Versioning
78
+
79
+ This package's version follows [Semantic Versioning 2.0](https://semver.org/), but is still considered to be in its
80
+ initial development, thus backwards incompatible versions are denoted by minor version bumps. To help illustrate how
81
+ versions will increment during this initial development stage, they are described below:
82
+
83
+ 1. The MAJOR version is currently 0, indicating initial development.
84
+ 2. The MINOR version is currently incremented when backwards incompatible changes are introduced to the public API.
85
+ 3. The PATCH version is currently incremented when bug fixes or backwards compatible changes are introduced to the public API.
86
+
87
+ ## Security
88
+
89
+ See [CONTRIBUTING](https://github.com/aws-deadline/deadline-cloud-for-blender/blob/release/CONTRIBUTING.md#security-issue-notifications) for more information.
90
+
91
+ ## Telemetry
92
+
93
+ See [telemetry](https://github.com/aws-deadline/deadline-cloud-for-blender/blob/release/docs/telemetry.md) for more information.
94
+
95
+ ## License
96
+
97
+ This project is licensed under the Apache-2.0 License.
@@ -0,0 +1,70 @@
1
+ # AWS Deadline Cloud for Blender
2
+
3
+ [![pypi](https://img.shields.io/pypi/v/deadline-cloud-for-blender.svg?style=flat)](https://pypi.python.org/pypi/deadline-cloud-for-blender)
4
+ [![python](https://img.shields.io/pypi/pyversions/deadline-cloud-for-blender.svg?style=flat)](https://pypi.python.org/pypi/deadline-cloud-for-blender)
5
+ [![license](https://img.shields.io/pypi/l/deadline-cloud-for-blender.svg?style=flat)](https://github.com/aws-deadline/deadline-cloud-for-blender/blob/mainline/LICENSE)
6
+
7
+ AWS Deadline Cloud for Blender is a python package that allows users to create [AWS Deadline Cloud][deadline-cloud] jobs from within Blender. Using the [Open Job Description (OpenJD) Adaptor Runtime][openjd-adaptor-runtime] this package also provides a command line application that adapts Blender's command line interface to support the [OpenJD specification][openjd].
8
+
9
+ [deadline-cloud]: https://docs.aws.amazon.com/deadline-cloud/latest/userguide/what-is-deadline-cloud.html
10
+ [deadline-cloud-client]: https://github.com/aws-deadline/deadline-cloud
11
+ [openjd]: https://github.com/OpenJobDescription/openjd-specifications/wiki
12
+ [openjd-adaptor-runtime]: https://github.com/OpenJobDescription/openjd-adaptor-runtime-for-python
13
+ [openjd-adaptor-runtime-lifecycle]: https://github.com/OpenJobDescription/openjd-adaptor-runtime-for-python/blob/release/README.md#adaptor-lifecycle
14
+
15
+ ## Compatibility
16
+
17
+ This library requires:
18
+
19
+ 1. Blender 3.6 or greater,
20
+ 1. Python 3.10 or higher; and
21
+ 1. Linux, Windows, or a macOS operating system.
22
+ * Adaptor only supports Linux and macOS
23
+
24
+ ## Submitter
25
+
26
+ This package provides a Blender plugin that creates jobs for AWS Deadline Cloud using the [AWS Deadline Cloud client library][deadline-cloud-client]. Based on the loaded scene it determines the files required, allows the user to specify render options, and builds an [OpenJD template][openjd] that defines the workflow.
27
+
28
+ ## Adaptor
29
+
30
+ The Blender Adaptor implements the [OpenJD][openjd-adaptor-runtime] interface that allows render workloads to launch Blender and feed it commands. This gives the following benefits:
31
+ * a standardized render application interface,
32
+ * sticky rendering, where the application stays open between tasks,
33
+
34
+ Jobs created by the submitter use this adaptor by default.
35
+
36
+ ### Getting Started
37
+
38
+ The adaptor can be installed by the standard python packaging mechanisms:
39
+ ```sh
40
+ $ pip install deadline-cloud-for-blender
41
+ ```
42
+
43
+ After installation it can then be used as a command line tool:
44
+ ```sh
45
+ $ blender-openjd --help
46
+ ```
47
+
48
+ For more information on the commands the OpenJD adaptor runtime provides, see [here][openjd-adaptor-runtime-lifecycle].
49
+
50
+ ## Versioning
51
+
52
+ This package's version follows [Semantic Versioning 2.0](https://semver.org/), but is still considered to be in its
53
+ initial development, thus backwards incompatible versions are denoted by minor version bumps. To help illustrate how
54
+ versions will increment during this initial development stage, they are described below:
55
+
56
+ 1. The MAJOR version is currently 0, indicating initial development.
57
+ 2. The MINOR version is currently incremented when backwards incompatible changes are introduced to the public API.
58
+ 3. The PATCH version is currently incremented when bug fixes or backwards compatible changes are introduced to the public API.
59
+
60
+ ## Security
61
+
62
+ See [CONTRIBUTING](https://github.com/aws-deadline/deadline-cloud-for-blender/blob/release/CONTRIBUTING.md#security-issue-notifications) for more information.
63
+
64
+ ## Telemetry
65
+
66
+ See [telemetry](https://github.com/aws-deadline/deadline-cloud-for-blender/blob/release/docs/telemetry.md) for more information.
67
+
68
+ ## License
69
+
70
+ This project is licensed under the Apache-2.0 License.
@@ -0,0 +1,16 @@
1
+ # file generated by setuptools_scm
2
+ # don't change, don't track in version control
3
+ TYPE_CHECKING = False
4
+ if TYPE_CHECKING:
5
+ from typing import Tuple, Union
6
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
7
+ else:
8
+ VERSION_TUPLE = object
9
+
10
+ version: str
11
+ __version__: str
12
+ __version_tuple__: VERSION_TUPLE
13
+ version_tuple: VERSION_TUPLE
14
+
15
+ __version__ = version = '0.3.0'
16
+ __version_tuple__ = version_tuple = (0, 3, 0)
@@ -0,0 +1,42 @@
1
+ [envs.default]
2
+ pre-install-commands = [
3
+ "pip install -r requirements-testing.txt"
4
+ ]
5
+
6
+ [envs.default.scripts]
7
+ sync = "pip install -r requirements-testing.txt"
8
+ test = "pytest --cov-config pyproject.toml {args:test}"
9
+ typing = "mypy {args:src test}"
10
+ style = [
11
+ "ruff check {args:.}",
12
+ "black --check --diff {args:.}",
13
+ ]
14
+ fmt = [
15
+ "black {args:.}",
16
+ "style",
17
+ ]
18
+ lint = [
19
+ "style",
20
+ "typing",
21
+ ]
22
+
23
+ [[envs.all.matrix]]
24
+ python = ["3.10", "3.11", "3.12"]
25
+
26
+ [envs.default.env-vars]
27
+ SKIP_BOOTSTRAP_TEST_RESOURCES="True"
28
+ DEADLINE_ENABLE_DEVELOPER_OPTIONS="True"
29
+
30
+ [envs.codebuild.scripts]
31
+ build = "hatch build"
32
+
33
+ [envs.codebuild.env-vars]
34
+ SKIP_BOOTSTRAP_TEST_RESOURCES="True"
35
+
36
+ [envs.release]
37
+ detached = true
38
+
39
+ [envs.release.scripts]
40
+ deps = "pip install -r requirements-release.txt"
41
+ bump = "semantic-release -v --strict version --no-push --no-commit --no-tag --skip-build {args}"
42
+ version = "semantic-release -v --strict version --print {args}"
@@ -0,0 +1,47 @@
1
+ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
+ import os
3
+ import shutil
4
+ from typing import Any
5
+
6
+ from hatchling.builders.hooks.plugin.interface import BuildHookInterface
7
+
8
+
9
+ class HatchCustomBuildHook(BuildHookInterface):
10
+ """
11
+ This class implements Hatch's [custom build hook] (https://hatch.pypa.io/1.6/plugins/build-hook/custom/)
12
+ for a copy_version_py operation that copies the _version.py file generated by the hatch-vcs build hook into
13
+ specified destination directories. See the `[[tool.hatch.build.hooks.custom]]` section in `pyproject.toml`.
14
+ """
15
+
16
+ def _validate_config(self):
17
+ if sorted(self.config) != ["blender_addon_init", "copy_version_py", "path"] or list(
18
+ self.config["copy_version_py"]
19
+ ) != ["destinations"]:
20
+ raise RuntimeError(
21
+ "Configuration of the custom build hook must be like { 'copy_version_py': {'destinations': ['path1', ...]}}."
22
+ + f" Received:\n{self.config}"
23
+ )
24
+
25
+ def initialize(self, version: str, build_data: dict[str, Any]) -> None:
26
+ self._validate_config()
27
+
28
+ for destination in self.config["copy_version_py"]["destinations"]:
29
+ print(f"Copying _version.py to {destination}")
30
+ shutil.copy(
31
+ os.path.join(self.root, "_version.py"),
32
+ os.path.join(self.root, destination),
33
+ )
34
+
35
+ def clean(self, versions: list[str]) -> None:
36
+ self._validate_config()
37
+
38
+ cleaned_count = 0
39
+ for destination in self.config["copy_version_py"]["destinations"]:
40
+ print(f"Cleaning _version.py from {destination}")
41
+ clean_path = os.path.join(self.root, destination, "_version.py")
42
+ try:
43
+ os.remove(clean_path)
44
+ cleaned_count += 1
45
+ except FileNotFoundError:
46
+ pass
47
+ print(f"Cleaned {cleaned_count} items")
@@ -0,0 +1,187 @@
1
+ [build-system]
2
+ requires = ["hatchling", "hatch-vcs"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "deadline-cloud-for-blender"
7
+ dynamic = ["version"]
8
+ readme = "README.md"
9
+ license = "Apache-2.0"
10
+ requires-python = ">=3.10"
11
+ description = "AWS Deadline Cloud for Blender"
12
+ authors = [
13
+ {name = "Amazon Web Services"},
14
+ ]
15
+ # https://pypi.org/classifiers/
16
+ classifiers = [
17
+ "Development Status :: 5 - Production/Stable",
18
+ "Programming Language :: Python",
19
+ "Programming Language :: Python :: 3 :: Only",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Operating System :: POSIX :: Linux",
24
+ "Operating System :: Microsoft :: Windows",
25
+ "Operating System :: MacOS",
26
+ "License :: OSI Approved :: Apache Software License",
27
+ "Intended Audience :: Developers",
28
+ "Intended Audience :: End Users/Desktop",
29
+ ]
30
+ # Blender 3.1+ uses Python version 3.10+ (https://vfxplatform.com/ 2023)
31
+
32
+
33
+ dependencies = [
34
+ "deadline == 0.47.*",
35
+ "openjd-adaptor-runtime == 0.7.*",
36
+ ]
37
+
38
+ [project.urls]
39
+ Homepage = "https://github.com/aws-deadline/deadline-cloud-for-blender"
40
+ Source = "https://github.com/aws-deadline/deadline-cloud-for-blender"
41
+
42
+ [project.scripts]
43
+ blender-openjd = "deadline.blender_adaptor.BlenderAdaptor:main"
44
+ # The binary name 'BlenderAdaptor' is deprecated.
45
+ BlenderAdaptor = "deadline.blender_adaptor.BlenderAdaptor:main"
46
+
47
+ # --- HATCH ---
48
+
49
+ [tool.hatch.build]
50
+ artifacts = ["*_version.py"]
51
+
52
+ [tool.hatch.version]
53
+ source = "vcs"
54
+
55
+ [tool.hatch.version.raw-options]
56
+ version_scheme = "post-release"
57
+
58
+ [tool.hatch.build.hooks.vcs]
59
+ version-file = "_version.py"
60
+
61
+ [tool.hatch.build.hooks.custom]
62
+ path = "hatch_custom_hook.py"
63
+ blender_addon_init = "src/deadline/blender_submitter/addons/deadline_cloud_blender_submitter/__init__.py"
64
+
65
+ [tool.hatch.build.hooks.custom.copy_version_py]
66
+ destinations = [
67
+ "src/deadline/blender_adaptor",
68
+ "src/deadline/blender_submitter",
69
+ "src/deadline/blender_submitter/addons/deadline_cloud_blender_submitter",
70
+ ]
71
+
72
+ [tool.hatch.build.targets.sdist]
73
+ include = ["src/*", "hatch_custom_hook.py"]
74
+
75
+ [tool.hatch.build.targets.wheel]
76
+ packages = ["src/deadline"]
77
+
78
+ # --- MYPY ---
79
+
80
+ [tool.mypy]
81
+ python_version = "3.10"
82
+ check_untyped_defs = true
83
+ show_error_codes = true
84
+ pretty = true
85
+ files = ["src/**/*.py"]
86
+ ignore_missing_imports = true
87
+ # Tell mypy that there's a namespace package at src/deadline
88
+ namespace_packages = true
89
+ explicit_package_bases = true
90
+ mypy_path = "src"
91
+
92
+ [[tool.mypy.overrides]]
93
+ module = ["bpy.*", "qtpy.*"]
94
+
95
+ # --- RUFF / BLACK ---
96
+
97
+ [tool.ruff]
98
+ line-length = 100
99
+
100
+ [tool.ruff.lint]
101
+ ignore = ["E501"]
102
+
103
+ [tool.ruff.lint.isort]
104
+ known-first-party = ["deadline"]
105
+
106
+ [tool.black]
107
+ line-length = 100
108
+
109
+ # --- PYTEST ---
110
+
111
+ [tool.pytest.ini_options]
112
+ xfail_strict = true
113
+ addopts = [
114
+ "--durations=5",
115
+ "--cov=src/deadline/blender_adaptor",
116
+ "--cov=src/deadline/blender_submitter",
117
+ "--color=yes",
118
+ "--cov-report=html:build/coverage",
119
+ "--cov-report=xml:build/coverage/coverage.xml",
120
+ "--cov-report=term-missing",
121
+ "--numprocesses=auto",
122
+ ]
123
+ testpaths = ["test"]
124
+ looponfailroots = ["src", "test"]
125
+ # looponfailroots is deprecated, this removes the deprecation from the test output
126
+ filterwarnings = ["ignore::DeprecationWarning"]
127
+
128
+ # --- COVERAGE ---
129
+
130
+ [tool.coverage.run]
131
+ source_pkgs = [
132
+ "deadline/blender_adaptor",
133
+ "deadline/blender_submitter",
134
+ ]
135
+ branch = true
136
+ parallel = true
137
+ omit = [
138
+ "**/__main__.py",
139
+ "**/_version.py",
140
+ ]
141
+
142
+
143
+ [tool.coverage.paths]
144
+ source = ["src/"]
145
+
146
+ [tool.coverage.report]
147
+ show_missing = true
148
+ fail_under = 24
149
+
150
+ [tool.semantic_release]
151
+ # Can be removed or set to true once we are v1
152
+ major_on_zero = false
153
+ tag_format = "{version}"
154
+
155
+ [tool.semantic_release.commit_parser_options]
156
+ allowed_tags = [
157
+ "build",
158
+ "chore",
159
+ "ci",
160
+ "docs",
161
+ "feat",
162
+ "fix",
163
+ "perf",
164
+ "style",
165
+ "refactor",
166
+ "test",
167
+ ]
168
+ minor_tags = []
169
+ patch_tags = [
170
+ "chore",
171
+ "feat",
172
+ "fix",
173
+ "refactor",
174
+ ]
175
+
176
+ [tool.semantic_release.publish]
177
+ upload_to_vcs_release = false
178
+
179
+ [tool.semantic_release.changelog]
180
+ template_dir = ".semantic_release"
181
+
182
+ [tool.semantic_release.changelog.environment]
183
+ trim_blocks = true
184
+ lstrip_blocks = true
185
+
186
+ [tool.semantic_release.branches.release]
187
+ match = "(mainline|release)"