Skip to content

Hammerspoon extension that launches .py scripts inside Nuke app

Notifications You must be signed in to change notification settings

sisoe24/Hammerspoon-Nukepy-Launcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docs » HNukeLauncher


Create a chooser menu with python files to be launched inside Nuke app. chooser chooser2

HNukeLauncher uses applescript idea to execute actions.

Download: https://github.com/sisoe24/Hammerspoon-Nukepy-Launcher/releases/download/0.0.1/HNukeLauncher.spoon.zip


NOTE If you unzip the file with tools other than the default, be sure that the file name still has the .spoon at the end (HNukeLauncher.spoon), otherwise it will be threated like any other folder.


Basic usage

Unzip the file and double clicking on the .spoon file to install, then inside your init.lua:

nuke = hs.loadSpoon("HNukeLauncher")
nuke:bindHotkeys({{"ctrl", "shift"}, "z"})     -- add hotkey
nuke:addDirectory("/path/to/nuke_scripts")     
nuke:addDirectory("/other/path/scripts", true) -- parse recursevily inside path
nuke:returnFocus = false                       -- optional: if you do not want to return focus on starting app

API Overview

API Documentation

Variables

logger
Signature HNukeLauncher.logger
Type Variable
Description Optional. Logging functionality. Defaults to info
pathLength
Signature HNukeLauncher.pathLength
Type Variable
Description Optional. How long the path should be in the subtext of the chooser users/x/path3/path2/path1/.
Starts from the end. Defaults to 4.
returnFocus
Signature HNukeLauncher.returnFocus
Type Variable
Description Optional. Return the focus to the app which is currenlty active when the script launcher is executed.
Defaults to true

Methods

addDirectory
Signature HNukeLauncher:addDirectory(path, parseRecursively)
Type Method
Description Generate chooser entries from python files in the path
Parameters
  • path - the path to be parsed for .py files
  • parseRecursively - An optional boolean for recursive parsing
bindHotkeys
Signature HNukeLauncher:bindHotkeys(mapping)
Type Method
Description Add a hotkey to call the chooser menu
Parameters
  • mapping - a table containing the shortcuts keys: {{"ctrl", "shift"}, "f"}

About

Hammerspoon extension that launches .py scripts inside Nuke app

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages