Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fix: Resolve menu.py not found error when running pip install… #170

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ WARNING: This workflow installs additional Python packages into your Nuke's pyth

Windows (update the paths as needed):
```
set NUKE_PATH=C:\Users\<username>\deadline-clients\deadline-cloud-for-nuke\src\deadline\nuke_submitter:C:\Users\<username>\deadline-clients\deadline-cloud-for-nuke\src
set NUKE_PATH=C:\Users\<username>\deadline-clients\deadline-cloud-for-nuke\src
```

Mac (update the paths as needed):
```
export NUKE_PATH=/Users/<username>/dev/deadline-clients/deadline-cloud-for-nuke/src/deadline/nuke_submitter:/Users/<username>/dev/deadline-clients/deadline-cloud-for-nuke/src
export NUKE_PATH=/Users/<username>/dev/deadline-clients/deadline-cloud-for-nuke/src
```
1. Set the `DEADLINE_ENABLE_DEVELOPER_OPTIONS` environment variable to `true` to enable the job bundle debugging support. This enables a menu item you can use to run the tests from the `job_bundle_output_tests` directory.

Expand Down
31 changes: 0 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,6 @@ This library requires:

This package provides a Nuke plugin that creates jobs for AWS Deadline Cloud using the [AWS Deadline Cloud client library][deadline-cloud-client]. Based on the loaded comp it determines the files required, allows the user to specify render options, and builds an [OpenJD template][openjd] that defines the workflow.

### Getting Started

To install the submitter manually, you can use pip.

For Windows,
```sh
pip install deadline-cloud-for-nuke -t %USERPROFILE%/deadline-cloud-for-nuke
```

For Linux and MacOS:
```sh
pip install deadline-cloud-for-nuke -t ~/deadline-cloud-for-nuke
```
Please note that target directory is `~/deadline-cloud-for-nuke` in Mac/Linux or `C:\Users\username/deadline-cloud-for-nuke` in Windows in the example, but you can choose any other directories that you'd prefer.

For Windows,
```sh
set NUKE_PATH=%NUKE_PATH%;%USERPROFILE%/deadline-cloud-for-nuke/deadline/nuke_submitter
```

For Linux and MacOS:
```sh
export NUKE_PATH=${NUKE_PATH}:~/deadline-cloud-for-nuke/deadline/nuke_submitter
```

After installation and within the same terminal, run `Nuke<version>` executable. The Nuke submitter should now be available in the AWS Deadline menu.

For Mac, Nuke executable will be somewhere in `/Applications/Nuke15.0v4/Nuke15.0v4.app/Contents/MacOS` directory.

NOTE: If you want the submitter available outside of this shell, consider using `NUKE_PATH` as an environment variable rather than a shell variable.

## Adaptor

The Nuke Adaptor implements the [OpenJD][openjd-adaptor-runtime] interface that allows render workloads to launch Nuke and feed it commands. This gives the following benefits:
Expand Down
3 changes: 2 additions & 1 deletion install_builder/deadline-cloud-for-nuke.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<onPackingFilterList>
<fileNameFilter pattern="*/deadline/nuke_submitter/*" logic="matches" patternType="glob"/>
<fileNameFilter pattern="*/deadline/nuke_util/*" logic="matches" patternType="glob"/>
<fileNameFilter pattern="*/menu.py" logic="matches" patternType="glob"/>
</onPackingFilterList>
</distributionDirectory>
</distributionFileList>
Expand Down Expand Up @@ -76,7 +77,7 @@
<fnAddPathEnvironmentVariable>
<progressText>Setting NUKE_PATH</progressText>
<name>NUKE_PATH</name>
<value>${nuke_installdir}/deadline/nuke_submitter</value>
<value>${nuke_installdir}</value>
<scope>${installscope}</scope>
<insertAt>end</insertAt>
</fnAddPathEnvironmentVariable>
Expand Down
42 changes: 0 additions & 42 deletions src/deadline/nuke_submitter/menu.py

This file was deleted.

37 changes: 37 additions & 0 deletions src/menu.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

"""
DO NOT CHANGE THIS FILE's NAME

Nuke loads this "init.py" or "menu.py" when looking in its plugin folder.

You can inform nuke to look in additional locations by setting via the
NUKE_PATH environment variable.
"""

try:
import nuke
import os

from deadline.nuke_submitter import (
show_nuke_render_submitter_noargs,
run_render_submitter_job_bundle_output_test,
)

menu_bar = nuke.menu("Nuke")
aws_deadline_menu = menu_bar.addMenu("&AWS Deadline")
aws_deadline_menu.addCommand("Submit to Deadline Cloud", show_nuke_render_submitter_noargs, "")
# Set the environment variable DEADLINE_ENABLE_DEVELOPER_OPTIONS to "true" to get this menu.
if os.environ.get("DEADLINE_ENABLE_DEVELOPER_OPTIONS", "").upper() == "TRUE":
aws_deadline_menu.addCommand(
"Run Nuke Submitter Job Bundle Output Tests...",
run_render_submitter_job_bundle_output_test,
"",
)

except BaseException:

Check notice

Code scanning / CodeQL

Except block handles 'BaseException' Note

Except block directly handles BaseException.
import sys
import traceback

print("Failed to load deadline.nuke_submitter. Reason:", file=sys.stderr)
print(traceback.format_exc(), file=sys.stderr)
32 changes: 0 additions & 32 deletions test/unit/deadline_submitter_for_nuke/test_menu.py

This file was deleted.