Standalone Installation
Linux, Mac, Windows
If you're trying to install on Windows in a Python 2 environment see here
To install the latest release directly from PyPi follow the following steps.
Note
The nxt-core
is just the Python backend of NXT, it does not include the visual editor.
The core will automatically install with the nxt-editor
.
Video
Written
- First time install
- For just the cli and backend:
pip install nxt-core
- For the backend and the visual editor:
pip install nxt-editor
- For just the cli and backend:
- Launch (nxt editor)
nxt ui
- Update
pip install -U nxt-core
pip install -U nxt-editor
To execute a graph with the nxt Python core, use the following:
import nxt
nxt.execute_graph('path/to/graph.nxt')
Windows (Python 2.7)
If you're installing into a Python 3.7.x environment you can use the above steps
Note
These steps are only necessary if you want to use the nxt standalone editor outside of Maya.
The nxt-core
will pip install on Windows Python 2.7 without issue.
Due to the limited availability of PySide2 on Windows for Python 2.7 the steps to install on Windows are slightly more involved.
For the simplest instructions, please follow the developer installation steps.
If you're comfortable working in an IDE and using git we suggest you follow
the contributing documentation.
Blender plugin
The Blender addon relies on the pip package nxt-editor
and its dependencies being installed into the Python environment used by Blender. We only support Blender version 2.8 and newer.
Video
Coming soon...
Written
- Install:
- Download Blender addon (
nxt_blender.zip
) from the latest release - Extract and follow
nxt_blender
README instructions (also included in the download)
- Download Blender addon (
- Launch:
- Load the
nxt_blender
Addon (Edit > Preferences > Add-ons) - Navigate the newly created NXT menu and select Open Editor.
- Load the
- Update:
- Automatically: NXT > Update NXT
- By Hand:
/path/to/python.exe -m pip install -U nxt-editor
- Relaunch Blender after
Maya plugin
Our Maya plugin comes with both a visual editor and the core. We've tested Maya 2018-20 on all platforms.
Video
Written
- Install:
- Download the maya module(
nxt_maya.zip
) from the latest release - Follow the
nxt_maya
README instructions (also included in the download)
- Download the maya module(
- Launch:
- Load
nxt_maya
plugin in Maya - Select the
nxt
menu from the menus at the top of Maya - Click
Open Editor
- Load
- Update:
- Download the
nxt_maya
zip from the latest release - Extract the zip and replace the existing
nxt_maya
files with the newly extracted files. - Re-launch Maya
- Download the
Planned plugins:
- Houdini
- Nuke
Developer Installation
See our contributing documentation
NXT Python Dev Environment (Miniconda)
The following steps are only needed if you intend on contributing to the NXT codebase or you are trying to install NXT standalone on Windows Python 2.7.
To get the correct Python environment setup on your Windows machine you will
need to follow these steps.
The nxt environment is specified in our nxt_env.yml
.
- Conda is best installed via miniconda. We recommend not adding conda python to your system path and not making it your system python.
- You can either clone the nxt source from our core repo / editor repo or download the desired core release / editor release source code zip and extract it.
- Lets assume you place the source code at
C:/Projects/nxt
- Launch the Anaconda Prompt and install dependencies:
conda env create -f C:/Projects/nxt/nxt_env.yml
Launching the nxt editor
From Anaconda Prompt
conda activate nxt
cd C:/Projects/nxt
python -m nxt.cli ui
From Python
import nxt_editor
GRAPHS_TO_OPEN = ['a_graph.nxt'] or None
nxt_editor.launch_editor(paths=GRAPHS_TO_OPEN, start_rpc=True)
Bootstrapping nxt
Tested with Maya2018/19/20, Houdini18, Nuke11,12
Warning
This setup is temporary, and will eventually be replaced with a command port connections with host plugins.
Find your conda env with this command in the Anaconda Prompt: conda info --envs
Copy the following code into Maya and edit NXT_PATH
and ENV_PATH
to reflect your environment. You can then drag it to your shelf or save it to a file, up to you.
import sys
import os
# path to your nxt clone
NXT_PATH = '~/Projects/Sun/nxt'
# path to conda env
ENV_PATH = 'C:/ProgramData/Miniconda2/envs/nxt/Lib/site-packages'
# Default file(s) to open, can be `None`
LAUNCH_FILES = ['~/Projects/SomeGraph.nxt']
if ENV_PATH not in sys.path:
sys.path.append(os.path.expanduser(ENV_PATH))
if NXT_PATH not in sys.path:
sys.path.append(os.path.expanduser(NXT_PATH))
from Qt import QtCore
import nxt_editor
# The `paths` kwarg can be omited if you don't want to open any graphs.
# Due to the way some thrid party Python interpeters are setup, we recommened setting `start_rpc` to `False`.
instance = nxt_editor.show_new_editor(paths=LAUNCH_FILES, start_rpc=False)
if sys.platform == 'win32':
instance.setWindowFlags(QtCore.Qt.Window)
# To force close the instance run this line:
# instance.close()
Optional window attach
To attach to the main window in Nuke
def _nuke_main_window():
"""Returns Nuke's main window"""
for obj in QtWidgets.QApplication.topLevelWidgets():
if (obj.inherits('QMainWindow') and
obj.metaObject().className() == 'Foundry::UI::DockMainWindow'):
return obj
else:
raise RuntimeError('Could not find DockMainWindow instance')
nuke_window = _nuke_main_window()
instance = nxt_editor.show_new_editor(start_rpc=False)
instance.setParent(nuke_window, QtCore.Qt.Window)
To Attach to the main window in Houdini
from hutil.Qt import QtCore
instance = nxt_editor.show_new_editor(start_rpc=False)
instance.setParent(hou.qt.mainWindow(), QtCore.Qt.Window)
To Attach to the main window in Maya
import maya.OpenMayaUI as mui
pointer = mui.MQtUtil.mainWindow()
maya_window = QtCompat.wrapInstance(long(pointer), QtWidgets.QWidget)
instance = nxt_editor.show_new_editor(start_rpc=False)
instance.setParent(hou.qt.mainWindow(), QtCore.Qt.Window)