> [!abstract] Summary
> **`Prism_Artfx_nuke_Functions.py`** — custom Prism plugin for ARTFX by **Loris Eck** that enhances Nuke's file-path management and render-farm reliability. Auto-converts paths using `PRISM_JOB` / `PRISM_JOB_LOCAL` / `PRISM_JOB_WDISK` env vars, injects an "Artfx" Nuke menu, runs Deadline pre-render sanity checks, and color-codes nodes by path status (green/orange/red).
---
This documentation covers the `Prism_Artfx_nuke_Functions.py` script, a custom Prism Pipeline plugin designed for **Artfx** to enhance Nuke's file path management and render farm reliability.
---
# 1. Overview
The primary purpose of this plugin is to manage the transition of data between **Local Storage** (for speed) and **Server Storage** (for collaboration and rendering). It automates path conversion using environment variables and enforces sanity checks before submitting jobs to Deadline to avoid black / failed renders due to local files.
## 2. Core Features
### A. Environment & Path Management
The script utilizes four specific root variables to handle different storage tiers:
- **`PRISM_JOB`**: The main project server (typically `V:`).
- **`PRISM_JOB_LOCAL`**: The artist's local workstation cache.
And if you have a dedicated write disk like Artfx Lille 2026 class :
- **`PRISM_JOB_WDISK`**: The high-speed Write Disk server (typically `W:`).
- **`PRISM_JOB_WDISK_LOCAL`**: The artist's local workstation cache. (the same as PRISM_JOB_LOCAL)
### B. The "Artfx" Nuke Menu
The plugin injects a custom menu into the Nuke UI with three automated utilities:
1. **Make file path relative for all nodes**: Converts absolute paths to Prism-friendly expressions for **all the nodes** (e.g., replacing `V:/projects/` with `[getenv PRISM_JOB]`).
2. **Set local path**: Swaps the paths of selected nodes to the artist's local drive, if the files exist there.
3. **Set server path**: Swaps the paths of selected nodes to the Main Server or Write Disk if the files exist there.
As a reminder you can check in your pirsm Media tab where the file are located (global / local / wdisk):
![[../../../../DoNOTDelete/Attachments/Pasted image 20260330142756.png]]
And if you need to copy files to a new location (example from global to local) you can right click on the version > copy to > {target location}
![[../../../../DoNOTDelete/Attachments/Pasted image 20260330142919.png]]
### C. Deadline Pre-Render Sanity Checks
To prevent "missing file" errors on the render farm because files or local only, the script runs a sanity check before the submission process:
- It traces all **upstream nodes** (Read, DeepRead, geoImport etc.) from the Write node.
- If a node uses a **local path**, the script checks if that same file exists on the **server**.
- If a file is local-only, a warning pops up, allowing the user to cancel or not the submission.
---
For example, here in my script I have the Read4. And the file path of this read is a **local file and OUT of pipe** (C:/user/loris.eck/Downloads/....).
The sanity checks sees this and **raises a popup window** to inform the user of this issue :
![[../../../../DoNOTDelete/Attachments/Pasted image 20260330140902.png]]
Another example : Here I have my Read8 node. The **file is local and in my prism project** pipeline.
But the sanity check tried to locate the same media **path on the servers, and could not find it**. So it **raises this other popup** to the user.
![[../../../../DoNOTDelete/Attachments/Pasted image 20260330141018.png]]
### D. Deadline Integration
The script patches Prism's Deadline submission to ensure the farm environment matches the studio's needs:
- Forces **NukeX** mode for all farm renders.
- **Environment Mapping**: On the farm, `PRISM_JOB_LOCAL` is automatically mapped to the server `PRISM_JOB` path so the render nodes can find the files.
Same thing with `PRISM_JOB_WDISK_LOCAL` which is mapped to `PRISM_JOB_WDISK`.
This allow artists to **keep working with local file** in their scripts (more speed and avoid slowing down the server) and if submitted on the renderfarm, it will pick the server file instead.
---
Here is a little test to help you visualize :
This is a text node with this value :
`PRISM_JOB = [ getenv PRISM_JOB ]`
`PRISM_JOB_LOCAL = [ getenv PRISM_JOB_LOCAL ]`
`PRISM_JOB_WDISK = [ getenv PRISM_JOB_WDISK ]`
`PISM_JOB_WDISK_LOCAL = [ getenv PRISM_JOB_WDISK_LOCAL ]`
The first screen below shows the result of this text node when it is evaluated on a machine locally = when the artist works on his comp :
![[../../../../DoNOTDelete/Attachments/Pasted image 20260330140203.png]]
Now here is the exact same setup but rendered on the render farm, notes that the local variables are now the same as the severs one :
![[../../../../DoNOTDelete/Attachments/Pasted image 20260330140212.png]]
---
## 3. Visual Feedback (Node Graph UI)
The script provides instant visual feedback by color-coding nodes and adding a label based on their path status:
| Node Color | Status | Meaning | NODE LABEL |
| ---------- | ------------- | ----------------------------------------------------------------------- | ------------------------------------- |
| **Green** | **Optimized** | Correctly set to a relative Prism path (Local or Server). | Local Job path / Main server job path |
| **Orange** | **Warning** | File is on a server but sits **outside** the project pipeline. | Out of project pipe but on server |
| **Red** | **Critical** | File is **local only** and outside the pipeline; will fail on the farm. | Out of project pipe and local ! |
![[../../../../DoNOTDelete/Attachments/Pasted image 20260330141443.png]]
# Advanced
## Configuration
At the top of the script, you may want to edit these variables.
**\_PFE_MAIN_DISK** = the server disk where all the core prism projects are.
**\_PFE_WRITE_DISK** = the write server disk if exists (like in Lille for class 2026) if you don't have one you must leave the string empty (="")
**\_OTHER_SERVERS** = a list of other servers available for the projects. (stockshots servers for example)
![[../../../../DoNOTDelete/Attachments/Pasted image 20260330142028.png]]
## Known Issues
- If you change your prism project, you have to restart your nuke to update the `PRISM_JOB_WDISK` and `PRISM_JOB_WDISK_LOCAL` variables
- You have to **disable** the Prism write gizmo in the prism user settings > DCC apps > Nuke > Use WritePrism gizmo. This will let you use the default write node, and adds a prism tab to render your comp in the pipeline.
---
# 🔗 Related
- [[../TOOLS MOC|TOOLS MOC]].
- [[Deadline Renderman Denoiser - Loris Eck|Deadline RenderMan Denoiser — Loris Eck]] — another Loris Deadline tool.
- [[../../PRISM/PRISM MOC OSMIUM|PRISM MOC (OSMIUM)]].
- [[../../../PROTOCOL/PRISM/PRISM MOC Protocol|PRISM MOC (generic)]].
- [[../../DEADLINE/DEADLINE MOC|DEADLINE MOC]].
- [[../../PIPELINE/Notes/PIPELINE SHOT PART 02|PIPELINE SHOT — Part 02]] — compositing stage.