Skip to content

Instantly share code, notes, and snippets.

@dbr
dbr / nuke_viewer_shortcut_intercept.py
Created June 4, 2013 04:12
Test of finding Nuke's viewer widget, and intercepting the hardwired "c" shortcut and rewiring it to view the RGB channel
"""Test of finding Nuke's viewer widget, and intercepting the hardwired "c" shortcut and rewiring it to view the RGB channel
"""
from PySide import QtGui, QtCore
def findviewer():
stack = QtGui.QApplication.topLevelWidgets()
viewers = []
while stack:
@lukpazera
lukpazera / cmdMatchXfrm.py
Created July 2, 2013 11:11
This is python translation of Matt Cox's matchXfrm.cpp C++ command and was done as an exercise while learning MODO python API. Matt's original: https://gist.github.com/mattcox/4742206
#python
""" Match Item Transforms.
Command matches transforms of one item to another.
Select 2 or more items and all items will be matched to last selected one.
I'm not author of this command.
This is python translation of Matt Cox's matchXfrm.cpp C++ equivalent
and was done as an exercise while learning MODO python API.
@mattcox
mattcox / query_cmd.py
Last active December 30, 2015 08:39
Demonstrates how to write an executable and queryable command. This will query a channel value on the first selected item, inputting a value will update the channel and querying the value will show the current value of the channel. The command will only be enabled if an item is selected, if there is no selection, then the command will be disabled.
#python
'''
Query Command
Demonstrates how to write an executable and queryable command.
This will query a channel value on the selected items,
inputting a value will update the channel and querying the
value will show the current value of the channel. The command
@mattcox
mattcox / notifier_cmd.py
Last active June 17, 2018 20:48
Demonstrates how to write an executable and queryable command. The difference is that this command will listen for state changes in a scene. If the selection changes, then the command will check its enable/disable state and force any form it's embedded into to update.
#python
'''
Notifier Command
Demonstrates how to write an executable and queryable command.
The difference is that this command will listen for state changes
in a scene. If the selection changes, then the command will check
its enable/disable state and force any form it's embedded into
@lukpazera
lukpazera / item_selection_filter.py
Last active March 10, 2021 19:56
Simple example of filtering item selection to group items only.
# python
""" Snippet demonstrates how to filter item selection out so it contains
only items of required type (group items in this case).
Filtered items are printed out in Event Log.
"""
import lx
import lxu.select
@lukpazera
lukpazera / log.py
Last active August 29, 2015 13:58
An example of a simple class that allows for writing messages into desired log.
# python
""" Log allows for writing messages into choosen log subsystem.
Messages can have simple hierarchical format:
- Head Message,
- Child Message 1,
- Child Message 2,
- Child Message 3,
- etc.
@kanishk2391
kanishk2391 / unsmoothMesh.py
Last active March 16, 2021 03:24
Reconstruct Subdiv for Maya
#---------Reconstruct Subdiv Script for Maya----------
#Script by - Kanishk Chouhan
#Email - kanishk2391@gmail.com
#Blog - www.pixel-architect.blogspot.com
#Description -
#This script allows u to reverse the result of smooth operation in maya after deleting the history
#It also preserves the original UV of the mesh
#Select the mesh u want to unsmooth and execute the script
#Script might take some time to execute depending on the polycount...
@nikhan
nikhan / twitter.sh
Created January 1, 2016 04:45
twitter ffmpeg
ffmpeg -i test.mov -vcodec libx264 -vf 'scale=640:trunc(ow/a/2)*2' -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -strict experimental -r 30 out.mp4
@kpprt
kpprt / CS_EdgeExtend.tcl
Last active February 10, 2018 18:17
A simple edge extend node for Nuke.
set cut_paste_input [stack 0]
version 9.0 v8
push 0
push $cut_paste_input
Group {
inputs 2
name CS_EdgeExtend1
selected true
xpos -150
ypos 1214
@mikoim
mikoim / README.md
Last active April 27, 2024 00:22
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)

Parameters

Container: MP4

Parameter YouTube recommends setting
-movflags faststart moov atom at the front of the file (Fast Start)

Video codec: H.264