Skip to content

Instantly share code, notes, and snippets.

View mateuszwojt's full-sized avatar

Mateusz Wojt mateuszwojt

View GitHub Profile
@jedypod
jedypod / hidden_input_handler.py
Last active November 12, 2020 10:38
Python tool to enhance the default behavior when copying / cutting and pasting nodes with hidden inputs. Instead of the pasted copy becoming disconnected, the node with the hidden input is connected to the node that the original was connected to.
import nuke, nukescripts, os
'''
## Hidden Input Handler
# Add these lines to your menu.py:
import hidden_input_handler
nuke.toolbar('Nodes').addCommand('Other/PostageStamp', 'hidden_input_handler.create()', 'alt+shift+p')
nuke.menu("Nuke").addCommand('Edit/Cut', lambda: hidden_input_handler.cut(), 'ctrl+x')
@fredrikaverpil
fredrikaverpil / store_node_information.py
Last active September 7, 2018 04:41
Using Json To Store Node Information #maya
# Copy-pasted from http://www.mattmurrayanimation.com/using-json-to-store-node-information-in-maya/
import json
import pymel.core as pm
def store(name, objs):
pose={}
ctrls=[]
for o in objs:
@fredrikaverpil
fredrikaverpil / find_dir.py
Created March 25, 2014 13:05
Find directory based on search string #python
# This searches for a sequence of characters
import os
def checkForDir(searchDirs, partialOrFullDirNameToFind):
for searchDir in searchDirs:
for directory in os.listdir(searchDir):
if partialOrFullDirNameToFind in directory.lower():
foundDirectories.append(searchDir + directory)
return str(foundDirectories[len(foundDirectories)-1])
import nuke,os
IMPULSE_FILTER_ENUM = 0
__version__ = (0,0,1)
def grow():
"""
Will make a Crop node that crops the frame to the union of the animated BBox of the nude currently selected.
For example, if you have a Tracker node that stabilizes an image this function will grow your bounding box
to include the whole stabilized image
"""
{% extends 'base.html' %}
{% import 'macros.html' as macros %}
{% block content %}
<div class="row">
<div class="col-xs-12 col-md-3 col-sm-4 col-sm-offset-4 col-md-offset-4 col-lg-3 col-lg-offset-4">
<div class="login-message">
Login to AwesomeService!
</div>
{% call macros.render_form(form, action_url=url_for('login_view'), action_text='Login',
class_='login-form') %}
@draconiansolo
draconiansolo / gist:5533976
Last active December 17, 2015 02:09
Quick nuke inf/NaN fix. copypasta
set cut_paste_input [stack 0]
version 6.3 v5
push $cut_paste_input
Expression {
expr0 (isnan(r)||isinf(r))?r(x+xo,y+yo):r
expr1 (isnan(g)||isinf(g))?g(x+xo,y+yo):g
expr2 (isnan(b)||isinf(b))?b(x+xo,y+yo):b
expr3 (isnan(a)||isinf(a))?a(x+xo,y+yo):a
name Expression4
selected true
from PyQt4 import QtCore,QtGui
from tableModel import TableModel
#import tableModel.TableModel as PaletteTableModel
import sys
class PaletteListModel(QtCore.QAbstractListModel):
def __init__(self, colors = [], parent = None):
super(PaletteListModel,self).__init__(parent)
self.__colors = colors
@RicardoViana
RicardoViana / Video converter linux
Last active December 13, 2017 11:30
Video converter for Linux. PYQT4, phonon, avconv
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
from PyQt4 import QtGui, QtCore
from PyQt4.phonon import Phonon
from functools import partial
import skimage.io as io
@davidgyu
davidgyu / displayOsdFVarCoord.cpp
Created February 5, 2013 20:48
OpenSubdiv Example: Uniform Subdivision with Face-varying Data
//
// This is a simple example that uses face-varying u,v data
// with uniform catmull-clark subdivision using OpenSubdiv
//
// c++ -o displayOsdFVarCoord displayOsdFVarCoord.cpp -I$OPENSUBDIV/include -L$OPENSUBDIV/lib -losdCPU -lglut -lGL
//
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
@EricTRocks
EricTRocks / XMLtoDirStruct.py
Created February 4, 2013 19:59
Script to create directories from an XML file.
import os
import xml.etree.ElementTree as ET
DEBUG = 0
strXML = """<?xml version='1.0'?>
<dir>
<dir name="images">
<dir name="nuke" />
<dir name="maya" />