Metadata-Version: 2.4
Name: genvid-nuke
Version: 1.0.0
Summary: Genvid platform integration for Foundry Nuke 14+
Project-URL: Homepage, https://app.genvid.com/docs
Project-URL: Documentation, https://app.genvid.com/docs
Author: Genvid Technologies
License-Expression: LicenseRef-Proprietary
License-File: LICENSE
Keywords: compositing,genvid,nuke,vfx
Classifier: Development Status :: 4 - Beta
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
Requires-Python: >=3.9
Requires-Dist: httpx<1.0,>=0.27
Requires-Dist: keyring<26,>=24
Requires-Dist: pyjwt<3.0,>=2.8
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest-cov>=4.1; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Description-Content-Type: text/markdown

# genvid-nuke

Genvid platform integration for Foundry Nuke 14+.

This package lets compositors authenticate with the Genvid backend from inside
Nuke, browse project comps, render to the platform, and surface live
notifications about server-side comp generation.

## Requirements

- Foundry Nuke 14.0 or newer (bundled Python is 3.9+).
- macOS or Windows. Linux is best-effort.
- A Genvid account with access to at least one project.

## Layout

This is a standard pip-installable Python package using a `src/` layout:

```
genvid_nuke/
├── pyproject.toml
└── src/genvid_nuke/
    ├── __init__.py
    ├── __about__.py
    ├── config.py
    └── tests/
```

Nuke discovers plugins by executing `init.py` and `menu.py` files placed on
its `NUKE_PATH` (typically `~/.nuke/`). Those bootstrap files are added in
later tasks of the Phase 2 plan; they are intentionally thin shims that
import this `genvid_nuke` package via standard Python `import` once it is
installed into Nuke's Python environment.

Why pip-installable + thin loader? Nuke's bundled Python is a normal
CPython interpreter, so a properly installed package on `sys.path` works
exactly the same as any other library. Studios get clean upgrades via
`pip install --upgrade genvid-nuke`, and we avoid the historical pitfall of
shipping a single 3000-line `menu.py`.

## Install

Two distribution artifacts are published, both built from the same source
tree via `dist/build.sh`:

### Wheel (recommended) — install into Nuke's bundled Python

```bash
"<Nuke install>/python" -m pip install genvid_nuke-1.0.0-py3-none-any.whl
```

This is the cleanest path for individual workstations: the package lands
on Nuke's `sys.path` and `import genvid_nuke` works directly. Upgrades
are `pip install --upgrade`.

### `.zip` — drop onto a shared `NUKE_PATH`

For studios that distribute plugins by extracting to a shared NUKE_PATH
location:

```bash
unzip genvid_nuke-1.0.0.zip -d ~/.nuke/genvid_nuke/
```

Then add the extracted directory itself (e.g. `~/.nuke/genvid_nuke/`) to
`NUKE_PATH` — in `~/.nuke/init.py` or your studio launch script — and
restart Nuke. The `.zip` ships a top-level `init.py` shim alongside a
`genvid_nuke/` package directory; on Nuke startup, the shim adds the
extracted folder to `sys.path` and then imports `genvid_nuke.init` to
wire the on-script-load sync. Once that runs, Nuke's bundled Python can
`import genvid_nuke` directly.

### Development

```bash
cd genvid_nuke
python -m pip install -e ".[dev]"
```

`nuke` itself is **never** a dependency — it is provided by the Nuke host.
The test suite mocks `sys.modules["nuke"]` so the package can be exercised
in CI without a real Nuke license.

## Sign-in (preview)

Authentication uses the Supabase OAuth Password grant against the Genvid
project, with refresh tokens cached via the OS keychain (`keyring`).
Implementation lands in later Phase 2 tasks.

## Usage (preview)

After install and sign-in, the Nuke menu gains a **Genvid** entry that
lets users:

- Pick a project / comp.
- Push the current comp to the Genvid backend (`POST /comps`).
- See status updates as the server processes the comp.

Detailed usage docs live alongside the implementation in later tasks.

## Configuration

All runtime configuration is environment-variable driven (see
`src/genvid_nuke/config.py`). Defaults target Genvid production; studios
behind a corporate proxy or running against a staging environment can
override:

| Variable | Default |
| --- | --- |
| `GENVID_API_BASE_URL` | `https://api.genvidtech.com` |
| `GENVID_SUPABASE_AUTH_BASE_URL` | `https://dsgbohphalncxvdsttwl.supabase.co/auth/v1` (Genvid production; override for staging) |
| `GENVID_SUPABASE_CLIENT_ID` | `genvid-nuke-plugin` |
| `GENVID_POLL_INTERVAL_SECONDS` | `5.0` |
| `GENVID_POLL_FAST_INTERVAL_SECONDS` | `2.0` |
| `GENVID_POLL_FAST_WINDOW_SECONDS` | `30.0` |

## Testing

```bash
cd genvid_nuke
python -m pip install ".[dev]"
pytest -v -m "not e2e" --cov=src/genvid_nuke
```

The `e2e` marker is reserved for tests that require a real Nuke license;
those are skipped in CI.
