Code Monkey home page Code Monkey logo

pyblish-nuke's Introduction

Build Status

Pyblish integration for The Foundry Nuke 8-15.




What is included?

A set of common plug-ins and functions shared across other integrations - such as getting the current working file. It also visually integrates Pyblish into the File-menu for easy access.




Installation

pyblish-nuke depends on pyblish-base and is available via PyPI.

$ pip install pyblish-nuke

You may also want to consider a graphical user interface, such as pyblish-qml or pyblish-lite.




Usage

To get started using pyblish-nuke, run setup() at startup of your application.

# 1. Register your favourite GUI
import pyblish.api
pyblish.api.register_gui("pyblish_lite")

# 2. Set-up Pyblish for Nuke
import pyblish_nuke
pyblish_nuke.setup()



Persistence

It is recommended that you allow Pyblish to load upon launching Nuke. For this, you have two options.

  1. Add the above snippet to your .nuke/menu.py in your home directory.
  2. Add the pyblish_nuke/nuke_path directory to your NUKE_PATH environment variable

As you will find, this directory contains a menu.py with the same command. Nuke will run this upon startup, along with any other menu.py available.




Documentation




Under the hood

The setup() command will:

  1. Register Nuke related "hosts", allowing plug-ins to be filtered accordingly.
  2. Register a minimal set of plug-ins that are common across all integrations.



Manually show GUI

The menu-button is set to run show(), which you may also manually call yourself, such as from a shelf-button.

import pyblish_nuke
pyblish_nuke.show()



No menu-item

Should you not want a menu-item, pass menu=False.

import pyblish_nuke
pyblish_nuke.show(menu=False)



Dockable GUI

Should you want to dock the pyblish UI, there is a convenience function to help.

import pyblish_nuke
window = pyblish_nuke.show()
pyblish_nuke.dock(window)



Teardown pyblish-nuke

To get rid of the menu, and completely remove any trace of pyblish-nuke from your Nuke session, run teardown().

import pyblish_nuke
pyblish_nuke.teardown()

This will do the opposite of setup() and clean things up for you.




No GUI

In the event that no GUI is registered upon running setup(), the button will provide the user with this information on how they can get up and running on their own.

image

image

image

Environment Variables

You can customize the integration with these environment variables:

Environment Variable Description Examples
PYBLISH_HOTKEY Hotkey for executing File > Publish. The hotkey is not case-sensitive. You can read more about it here. ctrl+p, Ctrl+Alt+P, CTRL+SHIFT+P

pyblish-nuke's People

Contributors

mottosso avatar tokejepsen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.