Skip to content

Instantly share code, notes, and snippets.

View rafaelperez's full-sized avatar
🏠
Available

Rafael Silva rafaelperez

🏠
Available
View GitHub Profile
import sys
sys.path.append(r"C:\\Users\\rafael.silva\\dev\\repo_prototype\\")
from importlib import reload
import repo
reload (repo)
from repo import *
import sys
@rafaelperez
rafaelperez / nuke_save_with_root_settings.py
Created September 15, 2023 13:29 — forked from dbr/nuke_save_with_root_settings.py
Saving selected Nuke nodes to file, preserving the root settings
def root_settings_to_string(root):
"""Serialise the project settings. Used when writing the selected
nodes (otherwise things like the frame range would be lost)
"""
# Write non-default settings, in .nk script format. Also write
# user-knob definitons to avoid errors like NUKE-256
rootstring = root.writeKnobs(nuke.TO_SCRIPT | nuke.WRITE_USER_KNOB_DEFS)
# TODO: Why doesn't writeKnobs write [first/last]_frame? Also
@rafaelperez
rafaelperez / storefunc.py
Created September 15, 2023 13:30 — forked from fredrikaverpil/storefunc.py
Store function on Nuke NoOp (or on nuke.root()) node and have it made available upon loading of script
"""Store function on node
Usage example:
.. code-block::
# Control node
ctrl_node_name = 'MY_SCRIPT_NODE' # if None, store on nuke.root()
# Define your functions and add them to the dictionary
@rafaelperez
rafaelperez / ffmpeg.md
Created July 7, 2024 17:09 — forked from nonwip/ffmpeg.md
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec