This is a Nuke snapshot manager which is used to make script versioning more straightforward
It is a backup of script at the specific time with user comment and screenshot
All snapshots are presented in user friendly web-interface
cd ~/.nuke && git clone https://github.com/artaman/snapshotr.git
- Open
~/.nuke/init.py
with your favourite editor - Add the following code:
#
# Snapshotr
#
import os, nuke
snapr_path = os.getenv("HOME") + "/.nuke"
if os.path.exists(snapr_path + "/snapshotr"):
nuke.pluginAddPath(snapr_path)
print "~ Loading Snapshotr into the Nuke..."
import snapshotr
else:
print "! Snapshotr path can't be found, going on..."
This tool assumes that artist uses the following convention in naming scripts: shot.user.task.v01.00.nk
In case file is saved with incorrect name, it will display a warning message and panel will not load
Each snapshot increases minor version by one (e.g v01.00 --> v01.01)
After following steps above you will have a new panel called "Snapshotr"
By default it is dockable, but it can be dragged out and used as a modal window:
- Comment field — Self-descriptive. Color can be specified as a hashtag (#green, #blue, etc)
- Instant — Makes snapshot using screenshot of current viewer, perceptually instant for a user
- Full — Makes full-res snapshot, image is rendered in background from the selected node. Custom LUT's are handled correctly. Whatever you have as input_process or/and viewer_process will be converted to sRGB prior to render
- Open — Opens new browser tab with web-view
- Autosnap – Creates automatic instant snapshot every XX minutes
- Mark node — Marks selected node with color and current timestamp
Here is an example of a web page generated each time user manually initiated snapshot creation:
By default snapshots are sorted from new to old, this can be changed by clicking "Time created" column header. Clicking "nk" button user can see a box with path to the .nk script. Clicking the image thumbnail, full-res version will be opened (limited to the screen width).
Snapshots created in "snaps" directory that is relative to the current script path. So, if script is /projects/xxx/abc001.john.comp.v01.00.nk, then snapshots will be stored in /projects/xxx/snaps/
After writing files to the filesystem they are chmod'ed to 0444
Snapshotr outputs reasonable amount of information to the Nuke script editor
If you want more, change DEV
variable to 1 or 2 (last one will output a lot)
To be tested with v0.2.0