From b6554727b8c698417d71cb49ce743e9405e82c50 Mon Sep 17 00:00:00 2001 From: Johannes Oehmen Date: Sun, 18 Jan 2026 13:17:03 +0100 Subject: [PATCH 1/3] feat: add 3ds Max conda recipe Signed-off-by: Johannes Oehmen --- conda_recipes/3dsmax-2025/README.md | 96 +++++++++++++++ conda_recipes/3dsmax-2025/deadline-cloud.yaml | 7 ++ conda_recipes/3dsmax-2025/recipe/bld.bat | 2 + conda_recipes/3dsmax-2025/recipe/build_win.sh | 111 ++++++++++++++++++ conda_recipes/3dsmax-2025/recipe/meta.yaml | 29 +++++ 5 files changed, 245 insertions(+) create mode 100644 conda_recipes/3dsmax-2025/README.md create mode 100644 conda_recipes/3dsmax-2025/deadline-cloud.yaml create mode 100644 conda_recipes/3dsmax-2025/recipe/bld.bat create mode 100644 conda_recipes/3dsmax-2025/recipe/build_win.sh create mode 100644 conda_recipes/3dsmax-2025/recipe/meta.yaml diff --git a/conda_recipes/3dsmax-2025/README.md b/conda_recipes/3dsmax-2025/README.md new file mode 100644 index 00000000..8e5212c1 --- /dev/null +++ b/conda_recipes/3dsmax-2025/README.md @@ -0,0 +1,96 @@ +# Autodesk 3ds Max 2025 conda build recipe + +## Creating an archive file for Windows + +The Windows installer requires Administrator permissions that are not available in most conda package +build environments, such as on Deadline Cloud service-managed fleets. Follow these instructions to +install 3ds Max 2025 on a freshly created EC2 instance as Administrator, and create an archive file +for use by the conda build recipe. + +1. Launch a fresh Windows Server 2022 instance. + 1. From the AWS EC2 management console, select the option to Launch instance. + 2. Enter instance name "Create Windows 3ds Max archive". + 3. Select "Microsoft Windows Server 2022 Base" for the AMI. + 4. Select an instance type with enough vCPUs and RAM, for example c5.4xlarge has 8 vCPUs and 16 GiB RAM. + 5. Select "Proceed without a key pair" for the "Key pair (login)" option. + 6. We will use SSM port forwarding to avoid sending RDP protocol traffic directly over the internet. + 1. Make sure that "Allow RDP traffic" is unchecked. + 2. Make sure the security group does not allow any inbound traffic. + 3. Make sure to remove any public IP addresses from the instance. + 7. Set the storage to at least 64 GiB. Adjust other settings as you like, e.g. if you want an encrypted volume of type gp3. + 8. Select "Launch instance." + 9. If it asks, select "Proceed without key pair" and proceed with the launch. + 10. Once it launched, navigate to the instance detail page. Select "Connect," and with "Session manager" selected, again select "Connect." + If it says "SSM Agent is not online," you may have to wait a few minutes for it to initialize. + 11. Create a secure password for the Administrator account. From the Administrator PowerShell window that session manager, + enter the following command with your secure password substituted to change the password. + 1. `net user Administrator MY_SECURE_PASSWORD` +2. Connect to the instance with SSM port forwarding and RDP. + 1. Install or update the AWS CLI v2 from https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html. + 2. Install or update the Session Manager plugin from https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html. + 3. Run the following command, using AWS credentials that have suitable permissions, to start the SSM port forwarding. Replace INSTANCE_ID with the one you launched. + 1. `aws ssm start-session --document-name AWS-StartPortForwardingSession --parameters "localPortNumber=33389,portNumber=3389" --target INSTANCE_ID` + 4. Open RDP, and enter the following connection details: + 1. Computer: `localhost:33389` + 2. User name: `Administrator` + 5. Enter the password you set for Administrator after you created the instance. You should now have a remote desktop session to your instance. +3. Install 3ds Max 2025 on the instance. + 1. Download the 3ds Max 2025 installer for Windows from Autodesk (for example via Autodesk Access). + 2. Run the installer on the EC2 instance and complete installation using the default settings. + 3. Optionally install the `deadline-cloud-for-3ds-max` Python package inside 3ds Max if you want the Deadline Cloud integration available on the workstation you use for archiving. +4. From an Administrator PowerShell window, create the archive from the installed files and capture its hash. + 1. `Compress-Archive -Path 'C:\Program Files\Autodesk\3ds Max 2025' -DestinationPath Autodesk_3dsMax_2025_Windows_installation.zip` + 2. `(Get-FileHash -Path "Autodesk_3dsMax_2025_Windows_installation.zip" -Algorithm SHA256).Hash.ToLower()` +5. Upload the zip to your private S3 bucket. You can use a PowerShell command like + `Write-S3Object -BucketName MY_BUCKET_NAME -Key Autodesk_3dsMax_2025_Windows_installation.zip -File Autodesk_3dsMax_2025_Windows_installation.zip`. +6. Terminate the EC2 instance. +7. Download the zip file to the `conda_recipes/archive_files` directory in your git clone of the + [deadline-cloud-samples](https://github.com/aws-deadline/deadline-cloud-samples) repository for + submitting package build jobs, and update the Windows source artifact hash in `meta.yaml`. + +The build script installs `pywin32` into 3ds Max's embedded Python to enable automation and sets environment +variables (`ADSK_3DSMAX_*`, plus `3DSMAX_EXECUTABLE` in the Windows activation script) to simplify invoking +`3dsmaxbatch.exe` from Deadline Cloud jobs. + +## Required host dependencies +3ds Max 2025 requires .NET 8 runtimes to be present on the host OS. Install them (with admin rights) before running jobs: + +- .NET 8 SDK 8.0.416 (includes .NET, ASP.NET Core, and Desktop runtimes): `ods-sandbox/accounts/deadline/smf/fleets/ods-deadlinedemo-win-cpu-smf-3dsmax_dotnet.ps1` + +Run that PowerShell script during fleet/bootstrap setup to ensure the required runtimes are available on the worker. + +PowerShell snippet (for convenience if the repo isn’t available): + +```powershell +# Install .NET 8 SDK (x64) which includes .NET Runtime, ASP.NET Core Runtime, and .NET Desktop Runtime 8.0.22 +$sdkDisplayPrefix = "Microsoft .NET SDK 8.0.416" +$sdkDownloadUri = "https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0.416/dotnet-sdk-8.0.416-win-x64.exe" +$sdkInstaller = Join-Path $env:TEMP ([IO.Path]::GetFileName($sdkDownloadUri)) + +$sdkExisting = Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | + Where-Object { $_.DisplayName -like "$sdkDisplayPrefix*" } + +if (-not $sdkExisting) { + Write-Host "Downloading .NET 8 SDK from $sdkDownloadUri ..." + Invoke-WebRequest -Uri $sdkDownloadUri -OutFile $sdkInstaller -UseBasicParsing + Write-Host "Installing .NET 8 SDK silently (includes runtime, ASP.NET Core, and Desktop runtimes)..." + Start-Process -FilePath $sdkInstaller -ArgumentList "/install", "/quiet", "/norestart" -Wait + $sdkInstalled = Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | + Where-Object { $_.DisplayName -like "$sdkDisplayPrefix*" } + if ($sdkInstalled) { + Write-Host ".NET 8 SDK installed: $($sdkInstalled.DisplayName)" + } else { + Write-Host ".NET 8 SDK not detected after install." -ForegroundColor Red + } + Remove-Item $sdkInstaller -Force -ErrorAction SilentlyContinue +} else { + Write-Host ".NET 8 SDK already installed: $($sdkExisting.DisplayName)" +} +``` + +## Notes on environment variables +- POSIX shells cannot export variable names that start with a digit, so `3DSMAX_EXECUTABLE` cannot be set by the `.sh` activation script. The Windows `.bat` sets it, but bash activation relies on the ADSK-prefixed variables instead. +- The adaptor’s `executable_handler.py` needs to be hotpatched in a Conda environment before the run to fall back to `ADSK_3DSMAX_EXECUTABLE` / `ADSK_3DSMAX_BATCH_EXE` when `3DSMAX_EXECUTABLE` is absent. Keep this in mind if you update or replace the handler. + +## Renderer plug-ins (e.g., Corona) +If you intend to render with Corona or other third-party renderers, ensure their DLLs are present in the 3ds Max plug-in search path (e.g., `Autodesk/3ds Max 2025/Plugins`). The main 3dsmax package does not carry Corona binaries; use the `3dsmax-corona` package to place the real Corona DLLs into the environment. Without that package (or manually copied DLLs), Max will warn about missing plug-ins and the adaptor will fail. diff --git a/conda_recipes/3dsmax-2025/deadline-cloud.yaml b/conda_recipes/3dsmax-2025/deadline-cloud.yaml new file mode 100644 index 00000000..4db2af91 --- /dev/null +++ b/conda_recipes/3dsmax-2025/deadline-cloud.yaml @@ -0,0 +1,7 @@ +condaPlatforms: + - platform: win-64 + defaultSubmit: true + sourceArchiveFilename: + - Autodesk_3dsMax_2025_Windows_installation.zip + sourceDownloadInstructions: 'Follow the README instructions to create the Windows archive from an installed 3ds Max 2025.' + buildTool: conda-build diff --git a/conda_recipes/3dsmax-2025/recipe/bld.bat b/conda_recipes/3dsmax-2025/recipe/bld.bat new file mode 100644 index 00000000..a2bd15c7 --- /dev/null +++ b/conda_recipes/3dsmax-2025/recipe/bld.bat @@ -0,0 +1,2 @@ +bash %RECIPE_DIR%/build_win.sh +if errorlevel 1 exit 1 diff --git a/conda_recipes/3dsmax-2025/recipe/build_win.sh b/conda_recipes/3dsmax-2025/recipe/build_win.sh new file mode 100644 index 00000000..ce9813b8 --- /dev/null +++ b/conda_recipes/3dsmax-2025/recipe/build_win.sh @@ -0,0 +1,111 @@ +#!/bin/sh + +set -xeuo pipefail + +# The version without the update number +MAX_VERSION=${PKG_VERSION%.*} +AUTODESK_ROOT="Autodesk" +INSTALL_DIR="$PREFIX/$AUTODESK_ROOT/3ds Max $MAX_VERSION" + +mkdir -p "$PREFIX/$AUTODESK_ROOT" + +# Locate the extracted 3ds Max root (zip contents may include an extra top-level folder). +SRC_ROOT="$SRC_DIR/3dsmax" +if [ ! -f "$SRC_ROOT/3dsmax.exe" ]; then + FOUND_PATH=$(find "$SRC_DIR" -maxdepth 4 -type f -name "3dsmax.exe" | head -n 1 || true) + if [ -n "$FOUND_PATH" ]; then + SRC_ROOT=$(dirname "$FOUND_PATH") + fi +fi + +# Copy the extracted files into the install location (robust against read-only flags and file/dir collisions). +rm -rf "$INSTALL_DIR" +mkdir -p "$INSTALL_DIR" +cmd <nul +set RC=%ERRORLEVEL% +echo Robocopy exit code: %RC% +if %RC% GEQ 8 exit /b %RC% +exit /b 0 +EOF + +# The conda-build environment sets pip to offline/no-deps by default; allow installs for 3ds Max Python. +unset PIP_NO_DEPENDENCIES +unset PIP_IGNORE_INSTALLED +unset PIP_NO_INDEX + +# Ensure 3ds Max's bundled Python has pip and pywin32 available for automation. +"$INSTALL_DIR\\Python\\python.exe" -m ensurepip +"$INSTALL_DIR\\Python\\python.exe" -m pip install pywin32 +"$INSTALL_DIR\\Python\\python.exe" -m pip install deadline-cloud-for-3ds-max --upgrade + +mkdir -p "$PREFIX/etc/conda/activate.d" +mkdir -p "$PREFIX/etc/conda/deactivate.d" + +# See https://docs.conda.io/projects/conda/en/latest/dev-guide/deep-dives/activation.html +# for details on activation. The Deadline Cloud sample queue environments use bash +# to activate environments on Windows, so always produce both .bat and .sh files. + +cat < "$PREFIX/etc/conda/activate.d/$PKG_NAME-$PKG_VERSION-vars.sh" +export ADSK_3DSMAX_VERSION=$MAX_VERSION +export ADSK_3DSMAX_LOCATION="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION" +export ADSK_3DSMAX_PYTHON="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/Python/python.exe" +export ADSK_3DSMAX_BATCH_EXE="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/3dsmaxbatch.exe" +export ADSK_3DSMAX_EXECUTABLE="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/3dsmaxbatch.exe" +export ADSK_3DSMAX_ROOT="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION" +export ADSK_3DSMAX_PLUGINS_ADDON_DIR="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/Plugins" +export ADSK_APPLICATION_PLUGINS="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/Plugins" +export PATH="\$(cygpath "\$CONDA_PREFIX/bin"):\$(cygpath "\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION"):\$(cygpath "\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/Python"):\$(cygpath "\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/Python/Scripts"):\$PATH" +export PYTHONPATH="\$(cygpath "\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/Python"):\$(cygpath "\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/Python/Scripts"):\$PYTHONPATH" +EOF +cat "$PREFIX/etc/conda/activate.d/$PKG_NAME-$PKG_VERSION-vars.sh" + +cat < "$PREFIX/etc/conda/activate.d/$PKG_NAME-$PKG_VERSION-vars.bat" +set "ADSK_3DSMAX_VERSION=$MAX_VERSION" +set "ADSK_3DSMAX_LOCATION=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION" +set "ADSK_3DSMAX_PYTHON=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\Python\\python.exe" +set "ADSK_3DSMAX_BATCH_EXE=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\3dsmaxbatch.exe" +set "ADSK_3DSMAX_EXECUTABLE=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\3dsmaxbatch.exe" +set "ADSK_3DSMAX_ROOT=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION" +set "ADSK_3DSMAX_PLUGINS_ADDON_DIR=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\Plugins" +set "ADSK_APPLICATION_PLUGINS=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\Plugins" +set "3DSMAX_EXECUTABLE=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\3dsmaxbatch.exe" +set "PATH=%CONDA_PREFIX%\\bin;%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION;%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\Python;%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\Python\\Scripts;%PATH%" +set "PYTHONPATH=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\Python;%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\Python\\Scripts;%PYTHONPATH%" +EOF +cat "$PREFIX/etc/conda/activate.d/$PKG_NAME-$PKG_VERSION-vars.bat" + +cat < "$PREFIX/etc/conda/deactivate.d/$PKG_NAME-$PKG_VERSION-vars.sh" +export PATH="\${PATH/\$(cygpath "\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/Python/Scripts"):/}" +export PATH="\${PATH/\$(cygpath "\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/Python"):/}" +export PATH="\${PATH/\$(cygpath "\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION"):/}" +export PYTHONPATH="\${PYTHONPATH/\$(cygpath "\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/Python/Scripts"):/}" +export PYTHONPATH="\${PYTHONPATH/\$(cygpath "\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/Python"):/}" +unset ADSK_3DSMAX_EXECUTABLE +unset ADSK_3DSMAX_BATCH_EXE +unset ADSK_3DSMAX_PYTHON +unset ADSK_3DSMAX_LOCATION +unset ADSK_3DSMAX_VERSION +unset ADSK_3DSMAX_ROOT +unset ADSK_3DSMAX_PLUGINS_ADDON_DIR +unset ADSK_APPLICATION_PLUGINS +EOF +cat "$PREFIX/etc/conda/deactivate.d/$PKG_NAME-$PKG_VERSION-vars.sh" + +cat < "$PREFIX/etc/conda/deactivate.d/$PKG_NAME-$PKG_VERSION-vars.bat" +set "PATH=%PATH:%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION;=%" +set "PYTHONPATH=%PYTHONPATH:%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\Python;=%" +set "PYTHONPATH=%PYTHONPATH:%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\Python\\Scripts;=%" +set 3DSMAX_EXECUTABLE= +set ADSK_3DSMAX_BATCH_EXE= +set ADSK_3DSMAX_EXECUTABLE= +set ADSK_3DSMAX_ROOT= +set ADSK_3DSMAX_PLUGINS_ADDON_DIR= +set ADSK_APPLICATION_PLUGINS= +set ADSK_3DSMAX_PYTHON= +set ADSK_3DSMAX_LOCATION= +set ADSK_3DSMAX_VERSION= +EOF +cat "$PREFIX/etc/conda/deactivate.d/$PKG_NAME-$PKG_VERSION-vars.bat" \ No newline at end of file diff --git a/conda_recipes/3dsmax-2025/recipe/meta.yaml b/conda_recipes/3dsmax-2025/recipe/meta.yaml new file mode 100644 index 00000000..1a1f5489 --- /dev/null +++ b/conda_recipes/3dsmax-2025/recipe/meta.yaml @@ -0,0 +1,29 @@ +{% set name = "3dsmax" %} +{% set display_name = "3ds Max" %} +{% set major_version = "2025" %} +{% set minor_version = "3" %} +{% set version = major_version + "." + minor_version %} + +package: + name: {{ name }} + version: {{ version }} + +source: +- url: archive_files/Autodesk_3dsMax_{{ major_version }}_Windows_installation.zip # [win64] + sha256: 0064a976aef6f61b66d42272322dacd77caebb233b41f8a71f3def33b8a1154e # [win64] + folder: 3dsmax + +build: + skip: true # [not win64] + number: 0 + # These build options for repackaging an application + # https://docs.conda.io/projects/conda-build/en/latest/resources/define-metadata.html + binary_relocation: False + detect_binary_files_with_prefix: False + missing_dso_whitelist: + - "**" + +about: + home: https://www.autodesk.com/products/3ds-max/overview + license: LicenseRef-AutodeskEULA + summary: 3ds Max is professional 3D modeling, animation, and rendering software from Autodesk. From 3fd803654ab93a565a2efbd59f5cb9be6d93b679 Mon Sep 17 00:00:00 2001 From: Johannes Oehmen Date: Sun, 18 Jan 2026 13:17:20 +0100 Subject: [PATCH 2/3] feat: add 3ds Max for Corona conda recipe Signed-off-by: Johannes Oehmen --- conda_recipes/3dsmax-corona/README.md | 23 +++++++++++ .../3dsmax-corona/deadline-cloud.yaml | 5 +++ conda_recipes/3dsmax-corona/recipe/bld.bat | 38 +++++++++++++++++++ conda_recipes/3dsmax-corona/recipe/meta.yaml | 32 ++++++++++++++++ 4 files changed, 98 insertions(+) create mode 100644 conda_recipes/3dsmax-corona/README.md create mode 100644 conda_recipes/3dsmax-corona/deadline-cloud.yaml create mode 100644 conda_recipes/3dsmax-corona/recipe/bld.bat create mode 100644 conda_recipes/3dsmax-corona/recipe/meta.yaml diff --git a/conda_recipes/3dsmax-corona/README.md b/conda_recipes/3dsmax-corona/README.md new file mode 100644 index 00000000..abf5dc99 --- /dev/null +++ b/conda_recipes/3dsmax-corona/README.md @@ -0,0 +1,23 @@ +# 3dsmax-corona conda package + +This package repackages the Corona Renderer plug-in for Autodesk 3ds Max into a conda-installable bundle. It should be installed alongside the matching `3dsmax` conda package. + +## Contents +- Corona Renderer payload for 3ds Max (version 13.1) sourced from `archive_files/3dsmax-corona/win-64`. +- Windows-only build that copies the plug-in files into the 3ds Max installation inside the conda prefix. + +## Usage +1. Ensure the `3dsmax` conda package for the matching major version is installed. +2. Install this package via your conda channel (e.g., `conda install 3dsmax-corona`). +3. Activate the environment; the plug-in will live under the 3ds Max plug-ins directory. + +## Building the archive payload +If you need to refresh the archive payload: +1. Run the Corona installer `.exe` for 3ds Max on a Windows OS. +2. After install, copy the Corona files from `C:\Program Files\Chaos\Corona\Corona Renderer for 3ds Max\2025` (or matching year) into `archive_files/3dsmax-corona/win-64/` in this repo. +3. Build the conda package (`conda build conda_recipes/3dsmax-corona/recipe`). + +## Notes +- Platform: `win-64` only. +- License: Chaos EULA (see vendor site). +- Documentation: https://docs.chaos.com/display/CRMAX diff --git a/conda_recipes/3dsmax-corona/deadline-cloud.yaml b/conda_recipes/3dsmax-corona/deadline-cloud.yaml new file mode 100644 index 00000000..584f7d76 --- /dev/null +++ b/conda_recipes/3dsmax-corona/deadline-cloud.yaml @@ -0,0 +1,5 @@ +condaPlatforms: + - platform: win-64 + defaultSubmit: true + sourceArchiveDirectory: 3dsmax-corona-2025-13-2/win-64/ + buildTool: conda-build diff --git a/conda_recipes/3dsmax-corona/recipe/bld.bat b/conda_recipes/3dsmax-corona/recipe/bld.bat new file mode 100644 index 00000000..9f3b77c9 --- /dev/null +++ b/conda_recipes/3dsmax-corona/recipe/bld.bat @@ -0,0 +1,38 @@ +@echo off +setlocal enableextensions enabledelayedexpansion + +set "MAX_VERSION=2025" + +rem Install Corona to the expected Chaos path under the conda prefix. +set "TARGET=%PREFIX%\Program Files\Chaos\Corona\Corona Renderer for 3ds Max\%MAX_VERSION%" +if not exist "%TARGET%" mkdir "%TARGET%" + +rem /E recursive, /I assume destination is a directory, /H copy hidden, /Y overwrite +xcopy "%SRC_DIR%" "%TARGET%" /E /I /H /Y >nul +if errorlevel 1 exit /b 1 + +rem Add activation hooks to expose the Corona load path +set "ACTIVATE_DIR=%PREFIX%\etc\conda\activate.d" +set "DEACTIVATE_DIR=%PREFIX%\etc\conda\deactivate.d" +if not exist "%ACTIVATE_DIR%" mkdir "%ACTIVATE_DIR%" +if not exist "%DEACTIVATE_DIR%" mkdir "%DEACTIVATE_DIR%" + +set "ACTIVATE_SH=%ACTIVATE_DIR%\%PKG_NAME%-%PKG_VERSION%-vars.sh" +set "DEACTIVATE_SH=%DEACTIVATE_DIR%\%PKG_NAME%-%PKG_VERSION%-vars.sh" +set "ACTIVATE_BAT=%ACTIVATE_DIR%\%PKG_NAME%-%PKG_VERSION%-vars.bat" +set "DEACTIVATE_BAT=%DEACTIVATE_DIR%\%PKG_NAME%-%PKG_VERSION%-vars.bat" + +( + echo #!/bin/sh + echo export CORONA_3DSMAX_%MAX_VERSION%_LOAD_PATH=\"$(cygpath "%TARGET%")\" +) > "%ACTIVATE_SH%" + +( + echo #!/bin/sh + echo unset CORONA_3DSMAX_%MAX_VERSION%_LOAD_PATH +) > "%DEACTIVATE_SH%" + +echo set "CORONA_3DSMAX_%MAX_VERSION%_LOAD_PATH=%TARGET%" > "%ACTIVATE_BAT%" +echo set CORONA_3DSMAX_%MAX_VERSION%_LOAD_PATH= > "%DEACTIVATE_BAT%" + +exit /b 0 diff --git a/conda_recipes/3dsmax-corona/recipe/meta.yaml b/conda_recipes/3dsmax-corona/recipe/meta.yaml new file mode 100644 index 00000000..d0ed87d3 --- /dev/null +++ b/conda_recipes/3dsmax-corona/recipe/meta.yaml @@ -0,0 +1,32 @@ +{% set name = "3dsmax-corona-2025" %} +{% set version = "13.2" %} + +package: + name: {{ name }} + version: {{ version }} + +source: + # Plugin payload extracted under archive_files/3dsmax-corona/win-64 + - path: ../../archive_files/3dsmax-corona-2025-13-2/win-64 # [win64] + +build: + skip: true # [not win64] + number: 0 + binary_relocation: false + detect_binary_files_with_prefix: false + missing_dso_whitelist: + - "**" + +requirements: + run: + - 3dsmax >=2025,<2026 + +about: + home: https://www.chaos.com/corona + documentation: https://docs.chaos.com/display/CRMAX + license: LicenseRef-ChaosEULA + summary: Corona Renderer plug-in for Autodesk 3ds Max + description: | + Packages the Corona Renderer for 3ds Max (13.1) into the conda environment. + The plug-in payload is copied into the 3ds Max plugins folder; the package + should be installed alongside the matching 3dsmax conda package. From f404d1cab8a4ba6a3f7fccf883b320ad9d3d3ee0 Mon Sep 17 00:00:00 2001 From: Johannes Oehmen Date: Tue, 26 May 2026 12:24:24 +0200 Subject: [PATCH 3/3] fix(conda_recipes/3dsmax-2025): address PR #173 review feedback Apply review feedback from PR #173: - Split GUI vs batch executables: ADSK_3DSMAX_EXECUTABLE -> 3dsmax.exe, ADSK_3DSMAX_BATCH_EXE -> 3dsmaxbatch.exe. The legacy 3DSMAX_EXECUTABLE stays mapped to 3dsmaxbatch.exe as the safe Cloud Rights default until deadline-cloud-for-3ds-max#190 lands. - Remove the obsolete .NET 8 SDK host config snippet. 3ds Max 2025 needs .NET Framework 4.8 which ships with Windows Server 2022 by default. - Add Autodesk Cloud Rights disclaimer linking to the FAQ. - Add Chaos EULA note to the corona recipe README. - SSM port forward uses 3389 on both ends per Leon`s suggestion. - Clarify that any current Windows Server AMI with sufficient resources works for archive creation. - Note that baking deadline-cloud-for-3ds-max into the archive skips the conda-channel runtime upgrade path. - Document rattler-build migration as a follow-up. - Fix corona version mismatch: README and meta.yaml description now consistently say 13.2. - Add inline comment on robocopy/Windows availability and exit-code 0-7 semantics in build_win.sh. Signed-off-by: Johannes Oehmen --- conda_recipes/3dsmax-2025/README.md | 83 ++++++++++--------- conda_recipes/3dsmax-2025/recipe/build_win.sh | 18 +++- conda_recipes/3dsmax-corona/README.md | 10 ++- conda_recipes/3dsmax-corona/recipe/meta.yaml | 2 +- 4 files changed, 65 insertions(+), 48 deletions(-) diff --git a/conda_recipes/3dsmax-2025/README.md b/conda_recipes/3dsmax-2025/README.md index 8e5212c1..dedcb8b4 100644 --- a/conda_recipes/3dsmax-2025/README.md +++ b/conda_recipes/3dsmax-2025/README.md @@ -1,5 +1,9 @@ # Autodesk 3ds Max 2025 conda build recipe +> **Autodesk Cloud Rights:** Autodesk 3ds Max has its own licensing requirements separate from AWS. +> Confirm you have the appropriate licenses before proceeding. See additional details on +> [Autodesk Cloud Rights for 3ds Max](https://www.autodesk.com/support/technical/article/caas/sfdcarticles/sfdcarticles/Subscription-Benefits-FAQ-Cloud-Rights.html). + ## Creating an archive file for Windows The Windows installer requires Administrator permissions that are not available in most conda package @@ -7,7 +11,7 @@ build environments, such as on Deadline Cloud service-managed fleets. Follow the install 3ds Max 2025 on a freshly created EC2 instance as Administrator, and create an archive file for use by the conda build recipe. -1. Launch a fresh Windows Server 2022 instance. +1. Launch a fresh Windows Server 2022 instance (any current Windows Server AMI with enough vCPUs and RAM works). 1. From the AWS EC2 management console, select the option to Launch instance. 2. Enter instance name "Create Windows 3ds Max archive". 3. Select "Microsoft Windows Server 2022 Base" for the AMI. @@ -29,15 +33,18 @@ for use by the conda build recipe. 1. Install or update the AWS CLI v2 from https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html. 2. Install or update the Session Manager plugin from https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html. 3. Run the following command, using AWS credentials that have suitable permissions, to start the SSM port forwarding. Replace INSTANCE_ID with the one you launched. - 1. `aws ssm start-session --document-name AWS-StartPortForwardingSession --parameters "localPortNumber=33389,portNumber=3389" --target INSTANCE_ID` + 1. `aws ssm start-session --document-name AWS-StartPortForwardingSession --parameters "localPortNumber=3389,portNumber=3389" --target INSTANCE_ID` 4. Open RDP, and enter the following connection details: - 1. Computer: `localhost:33389` + 1. Computer: `localhost:3389` 2. User name: `Administrator` 5. Enter the password you set for Administrator after you created the instance. You should now have a remote desktop session to your instance. 3. Install 3ds Max 2025 on the instance. 1. Download the 3ds Max 2025 installer for Windows from Autodesk (for example via Autodesk Access). 2. Run the installer on the EC2 instance and complete installation using the default settings. - 3. Optionally install the `deadline-cloud-for-3ds-max` Python package inside 3ds Max if you want the Deadline Cloud integration available on the workstation you use for archiving. + 3. *(Optional)* Install the `deadline-cloud-for-3ds-max` Python package inside 3ds Max if you want the Deadline Cloud + integration baked into the package. Note that doing so pins the adaptor at archive-creation time and skips runtime + upgrades that the Deadline Cloud conda channel would otherwise provide; for production fleets, prefer letting the + channel deliver the adaptor at job-init time. 4. From an Administrator PowerShell window, create the archive from the installed files and capture its hash. 1. `Compress-Archive -Path 'C:\Program Files\Autodesk\3ds Max 2025' -DestinationPath Autodesk_3dsMax_2025_Windows_installation.zip` 2. `(Get-FileHash -Path "Autodesk_3dsMax_2025_Windows_installation.zip" -Algorithm SHA256).Hash.ToLower()` @@ -48,49 +55,43 @@ for use by the conda build recipe. [deadline-cloud-samples](https://github.com/aws-deadline/deadline-cloud-samples) repository for submitting package build jobs, and update the Windows source artifact hash in `meta.yaml`. -The build script installs `pywin32` into 3ds Max's embedded Python to enable automation and sets environment -variables (`ADSK_3DSMAX_*`, plus `3DSMAX_EXECUTABLE` in the Windows activation script) to simplify invoking -`3dsmaxbatch.exe` from Deadline Cloud jobs. +The build script installs `pywin32` into 3ds Max's embedded Python to enable automation and exports +environment variables (`ADSK_3DSMAX_*`) so jobs can find both the GUI (`3dsmax.exe`) and batch +(`3dsmaxbatch.exe`) executables. See the *Notes on environment variables* section below for details. -## Required host dependencies -3ds Max 2025 requires .NET 8 runtimes to be present on the host OS. Install them (with admin rights) before running jobs: +## Build tool -- .NET 8 SDK 8.0.416 (includes .NET, ASP.NET Core, and Desktop runtimes): `ods-sandbox/accounts/deadline/smf/fleets/ods-deadlinedemo-win-cpu-smf-3dsmax_dotnet.ps1` +This recipe uses `conda-build` to stay consistent with the existing 3ds Max test pipeline. Migration to +[`rattler-build`](https://github.com/prefix-dev/rattler-build) (already adopted by `blender-5.1`, +`maya-2026`, and others in this repository) is tracked as a follow-up — feel free to open an issue or PR. -Run that PowerShell script during fleet/bootstrap setup to ensure the required runtimes are available on the worker. +## Notes on environment variables -PowerShell snippet (for convenience if the repo isn’t available): +The activation script exports the following variables so jobs and the +[`deadline-cloud-for-3ds-max`](https://github.com/aws-deadline/deadline-cloud-for-3ds-max) adaptor can +locate the right executable: -```powershell -# Install .NET 8 SDK (x64) which includes .NET Runtime, ASP.NET Core Runtime, and .NET Desktop Runtime 8.0.22 -$sdkDisplayPrefix = "Microsoft .NET SDK 8.0.416" -$sdkDownloadUri = "https://builds.dotnet.microsoft.com/dotnet/Sdk/8.0.416/dotnet-sdk-8.0.416-win-x64.exe" -$sdkInstaller = Join-Path $env:TEMP ([IO.Path]::GetFileName($sdkDownloadUri)) +| Variable | Path | When to use | +| --- | --- | --- | +| `ADSK_3DSMAX_BATCH_EXE` | `…/3ds Max 2025/3dsmaxbatch.exe` | **Default.** Non-GUI batch render. Compliant with Autodesk Cloud Rights, which allow up to 10 batch render licenses per GUI subscription seat. | +| `ADSK_3DSMAX_EXECUTABLE` | `…/3ds Max 2025/3dsmax.exe` | GUI executable. Use only if your Autodesk subscription's GUI seats cover the rendering workload. | +| `3DSMAX_EXECUTABLE` (`.bat` only) | `…/3ds Max 2025/3dsmaxbatch.exe` | Legacy variable consumed by the current adaptor; kept pointing at the batch exe so existing jobs render with the safer default. | -$sdkExisting = Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | - Where-Object { $_.DisplayName -like "$sdkDisplayPrefix*" } +Limitations: -if (-not $sdkExisting) { - Write-Host "Downloading .NET 8 SDK from $sdkDownloadUri ..." - Invoke-WebRequest -Uri $sdkDownloadUri -OutFile $sdkInstaller -UseBasicParsing - Write-Host "Installing .NET 8 SDK silently (includes runtime, ASP.NET Core, and Desktop runtimes)..." - Start-Process -FilePath $sdkInstaller -ArgumentList "/install", "/quiet", "/norestart" -Wait - $sdkInstalled = Get-ItemProperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | - Where-Object { $_.DisplayName -like "$sdkDisplayPrefix*" } - if ($sdkInstalled) { - Write-Host ".NET 8 SDK installed: $($sdkInstalled.DisplayName)" - } else { - Write-Host ".NET 8 SDK not detected after install." -ForegroundColor Red - } - Remove-Item $sdkInstaller -Force -ErrorAction SilentlyContinue -} else { - Write-Host ".NET 8 SDK already installed: $($sdkExisting.DisplayName)" -} -``` - -## Notes on environment variables -- POSIX shells cannot export variable names that start with a digit, so `3DSMAX_EXECUTABLE` cannot be set by the `.sh` activation script. The Windows `.bat` sets it, but bash activation relies on the ADSK-prefixed variables instead. -- The adaptor’s `executable_handler.py` needs to be hotpatched in a Conda environment before the run to fall back to `ADSK_3DSMAX_EXECUTABLE` / `ADSK_3DSMAX_BATCH_EXE` when `3DSMAX_EXECUTABLE` is absent. Keep this in mind if you update or replace the handler. +- POSIX shells cannot export variable names that begin with a digit, so `3DSMAX_EXECUTABLE` is set + only by the `.bat` activation script. Bash activation relies on the `ADSK_*` variables. +- The current adaptor reads `3DSMAX_EXECUTABLE` only. Until + [deadline-cloud-for-3ds-max#190](https://github.com/aws-deadline/deadline-cloud-for-3ds-max/issues/190) + ships, jobs that need to switch between batch and GUI explicitly will require either a small adaptor + hot-patch or a fleet-level override of `3DSMAX_EXECUTABLE`. Once that adaptor change lands, the + adaptor will read both `ADSK_3DSMAX_BATCH_EXE` and `ADSK_3DSMAX_EXECUTABLE` and pick the right one + for the job. ## Renderer plug-ins (e.g., Corona) -If you intend to render with Corona or other third-party renderers, ensure their DLLs are present in the 3ds Max plug-in search path (e.g., `Autodesk/3ds Max 2025/Plugins`). The main 3dsmax package does not carry Corona binaries; use the `3dsmax-corona` package to place the real Corona DLLs into the environment. Without that package (or manually copied DLLs), Max will warn about missing plug-ins and the adaptor will fail. + +If you intend to render with Corona or other third-party renderers, ensure their DLLs are present in the +3ds Max plug-in search path (e.g., `Autodesk/3ds Max 2025/Plugins`). The main `3dsmax` package does not +carry Corona binaries; use the `3dsmax-corona` package to place the real Corona DLLs into the +environment. Without that package (or manually copied DLLs), Max will warn about missing plug-ins and +the adaptor will fail. diff --git a/conda_recipes/3dsmax-2025/recipe/build_win.sh b/conda_recipes/3dsmax-2025/recipe/build_win.sh index ce9813b8..97ba9eae 100644 --- a/conda_recipes/3dsmax-2025/recipe/build_win.sh +++ b/conda_recipes/3dsmax-2025/recipe/build_win.sh @@ -19,11 +19,13 @@ if [ ! -f "$SRC_ROOT/3dsmax.exe" ]; then fi # Copy the extracted files into the install location (robust against read-only flags and file/dir collisions). +# robocopy ships with Windows by default (in System32) so no extra install is required for conda-build on Windows. +# /COPY:DAT /DCOPY:DAT skips ACL/owner copying which often fails in conda-build/CI; robocopy uses 0-7 for "success +# with minor differences" so we treat exit codes < 8 as success. rm -rf "$INSTALL_DIR" mkdir -p "$INSTALL_DIR" cmd <nul set RC=%ERRORLEVEL% echo Robocopy exit code: %RC% @@ -48,12 +50,22 @@ mkdir -p "$PREFIX/etc/conda/deactivate.d" # for details on activation. The Deadline Cloud sample queue environments use bash # to activate environments on Windows, so always produce both .bat and .sh files. +# Environment variables exposed to jobs. +# +# ADSK_3DSMAX_BATCH_EXE -> 3dsmaxbatch.exe (non-GUI, the safe default for cloud rendering; +# Autodesk Cloud Rights allow ~10 batch render licenses per GUI seat). +# ADSK_3DSMAX_EXECUTABLE -> 3dsmax.exe (GUI). Use only when your subscription's GUI seats +# cover the rendering workload (see Autodesk Cloud Rights FAQ). +# 3DSMAX_EXECUTABLE -> 3dsmaxbatch.exe (legacy variable still consumed by the current +# deadline-cloud-for-3ds-max adaptor; kept on the .bat side for now). +# See https://github.com/aws-deadline/deadline-cloud-for-3ds-max/issues/190 for the +# planned adaptor change that will let users select GUI vs batch explicitly. cat < "$PREFIX/etc/conda/activate.d/$PKG_NAME-$PKG_VERSION-vars.sh" export ADSK_3DSMAX_VERSION=$MAX_VERSION export ADSK_3DSMAX_LOCATION="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION" export ADSK_3DSMAX_PYTHON="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/Python/python.exe" export ADSK_3DSMAX_BATCH_EXE="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/3dsmaxbatch.exe" -export ADSK_3DSMAX_EXECUTABLE="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/3dsmaxbatch.exe" +export ADSK_3DSMAX_EXECUTABLE="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/3dsmax.exe" export ADSK_3DSMAX_ROOT="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION" export ADSK_3DSMAX_PLUGINS_ADDON_DIR="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/Plugins" export ADSK_APPLICATION_PLUGINS="\$CONDA_PREFIX/Autodesk/3ds Max $MAX_VERSION/Plugins" @@ -67,7 +79,7 @@ set "ADSK_3DSMAX_VERSION=$MAX_VERSION" set "ADSK_3DSMAX_LOCATION=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION" set "ADSK_3DSMAX_PYTHON=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\Python\\python.exe" set "ADSK_3DSMAX_BATCH_EXE=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\3dsmaxbatch.exe" -set "ADSK_3DSMAX_EXECUTABLE=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\3dsmaxbatch.exe" +set "ADSK_3DSMAX_EXECUTABLE=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\3dsmax.exe" set "ADSK_3DSMAX_ROOT=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION" set "ADSK_3DSMAX_PLUGINS_ADDON_DIR=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\Plugins" set "ADSK_APPLICATION_PLUGINS=%CONDA_PREFIX%\\Autodesk\\3ds Max $MAX_VERSION\\Plugins" diff --git a/conda_recipes/3dsmax-corona/README.md b/conda_recipes/3dsmax-corona/README.md index abf5dc99..c76c6d9d 100644 --- a/conda_recipes/3dsmax-corona/README.md +++ b/conda_recipes/3dsmax-corona/README.md @@ -2,19 +2,23 @@ This package repackages the Corona Renderer plug-in for Autodesk 3ds Max into a conda-installable bundle. It should be installed alongside the matching `3dsmax` conda package. +> **Licensing:** Corona Renderer is distributed under the Chaos EULA. You must hold a valid Corona +> license that covers your rendering workload before deploying this package on a fleet. See the +> [Chaos website](https://www.chaos.com/corona) for licensing details. + ## Contents -- Corona Renderer payload for 3ds Max (version 13.1) sourced from `archive_files/3dsmax-corona/win-64`. +- Corona Renderer payload for 3ds Max (version 13.2) sourced from `archive_files/3dsmax-corona-2025-13-2/win-64`. - Windows-only build that copies the plug-in files into the 3ds Max installation inside the conda prefix. ## Usage 1. Ensure the `3dsmax` conda package for the matching major version is installed. -2. Install this package via your conda channel (e.g., `conda install 3dsmax-corona`). +2. Install this package via your conda channel (e.g., `conda install 3dsmax-corona-2025`). 3. Activate the environment; the plug-in will live under the 3ds Max plug-ins directory. ## Building the archive payload If you need to refresh the archive payload: 1. Run the Corona installer `.exe` for 3ds Max on a Windows OS. -2. After install, copy the Corona files from `C:\Program Files\Chaos\Corona\Corona Renderer for 3ds Max\2025` (or matching year) into `archive_files/3dsmax-corona/win-64/` in this repo. +2. After install, copy the Corona files from `C:\Program Files\Chaos\Corona\Corona Renderer for 3ds Max\2025` (or matching year) into `archive_files/3dsmax-corona-2025-13-2/win-64/` in this repo. 3. Build the conda package (`conda build conda_recipes/3dsmax-corona/recipe`). ## Notes diff --git a/conda_recipes/3dsmax-corona/recipe/meta.yaml b/conda_recipes/3dsmax-corona/recipe/meta.yaml index d0ed87d3..592fdf2c 100644 --- a/conda_recipes/3dsmax-corona/recipe/meta.yaml +++ b/conda_recipes/3dsmax-corona/recipe/meta.yaml @@ -27,6 +27,6 @@ about: license: LicenseRef-ChaosEULA summary: Corona Renderer plug-in for Autodesk 3ds Max description: | - Packages the Corona Renderer for 3ds Max (13.1) into the conda environment. + Packages the Corona Renderer for 3ds Max (13.2) into the conda environment. The plug-in payload is copied into the 3ds Max plugins folder; the package should be installed alongside the matching 3dsmax conda package.