Skip to content

Instantly share code, notes, and snippets.

@flipphillips
Created February 11, 2024 16:42
Show Gist options
  • Save flipphillips/078a95431317bc26609eb0d763e4cc55 to your computer and use it in GitHub Desktop.
Save flipphillips/078a95431317bc26609eb0d763e4cc55 to your computer and use it in GitHub Desktop.
nuke plugin subdirectory creator
#!/bin/bash
NUKE_DIR="$HOME/.nuke"
PYTHON_DIR="$NUKE_DIR/python"
GIZMOS_DIR="$NUKE_DIR/gizmos"
PLUGINS_DIR="$NUKE_DIR/plugins"
INIT_FILE="$NUKE_DIR/init.py"
# Create .nuke directory if it doesn't exist
if [ ! -d "$NUKE_DIR" ]; then
mkdir "$NUKE_DIR"
fi
# Create python, gizmos, and plugins directories
mkdir -p "$PYTHON_DIR" "$GIZMOS_DIR" "$PLUGINS_DIR"
# Create init.py file with the required content
echo "nuke.pluginAddPath('./gizmos')" > "$INIT_FILE"
echo "nuke.pluginAddPath('./python')" >> "$INIT_FILE"
echo "nuke.pluginAddPath('./plugins')" >> "$INIT_FILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment