This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Allows you to scrub in the viewer by holding Alt+Meta. Inspired by Max van Leeuwen's SmoothScrub | |
import nuke | |
from PySide2.QtWidgets import QApplication | |
from PySide2.QtCore import QObject, QCoreApplication, QEvent, Qt, QPoint | |
class ViewerScrub(QObject): | |
def __init__(self): | |
super(ViewerScrub, self).__init__() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r""" | |
Sublime plugin that does what the single_selection command does, | |
but instead of jumping back to the first selection, will remain | |
on the latest. | |
Installation: | |
Save in packages directory (Preferences/Browse Packages in Sublime Text 3). | |
\Sublime Text 3\Packages\User\single_selection_latest.py | |
Add shortcut (Preferences/Key Bindings). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
__all__ = ['c', 'LP64', 'CGFloat', 'NSInteger', 'NSUInteger', 'NSNotFound', 'NSUTF8StringEncoding', 'NS_UTF8', 'CGPoint', 'CGSize', 'CGVector', 'CGRect', 'CGAffineTransform', 'UIEdgeInsets', 'NSRange', 'sel', 'ObjCClass', 'ObjCInstance', 'ObjCClassMethod', 'ObjCInstanceMethod', 'NSObject', 'NSArray', 'NSMutableArray', 'NSDictionary', 'NSMutableDictionary', 'NSSet', 'NSMutableSet', 'NSString', 'NSMutableString', 'NSData', 'NSMutableData', 'NSNumber', 'NSURL', 'NSEnumerator', 'NSThread', 'NSBundle', 'UIColor', 'UIImage', 'UIBezierPath', 'UIApplication', 'UIView', 'ObjCBlock', 'ns', 'nsurl', 'retain_global', 'release_global', 'on_main_thread', 'create_objc_class', | |
'Structure', 'sizeof', 'byref', 'c_void_p', 'c_char', 'c_byte', 'c_char_p', 'c_double', 'c_float', 'c_int', 'c_longlong', 'c_short', 'c_bool', 'c_long', 'c_int32', 'c_ubyte', 'c_uint', 'c_ushort', 'c_ulong', 'c_ulonglong', 'POINTER', 'pointer', 'load_framework', 'nsdata_to_bytes', 'uiimage_to_png'] | |
try: | |
import ctypes | |
except ImportErr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TERMINATORS = ["\n", ";"] | |
ESC = "\\" | |
QUOTES = ['"', "'"] | |
class c: | |
""" | |
Will be at the start of a list representing an expression | |
in curly braces. Every c() is equal to any other c() | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# a simple parser to extract nodes from .nk files | |
nuke.removeKnobChanged(grade_knobChanged) | |
nuke.removeOnCreate(grade_by_order) | |
nuke.removeOnDestroy(grade_by_order) | |
def grade_by_order(): | |
import sys | |
sys.path.append('/job/pipeline/dev/sandbox/sandbox_mlast/work/mlast/git/.nuke/python/scripts/notmine/') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Imagine | |
Copyright 2011 Peter Pearson. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
You may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OPENEXRDIR ?= /opt/openexr-2.2 | |
EXRINCLUDE ?= -I$(OPENEXRDIR)/include/OpenEXR | |
EXRLIBPATH ?= -L$(OPENEXRDIR)/lib64 | |
CXXFLAGS ?= -c $(EXRINCLUDE) -fPIC -msse | |
LINKFLAGS ?= -std=c++11 $(EXRLIBPATH) \ | |
-lz \ | |
-lpthread \ | |
-lm \ | |
-lrt \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <ImfRgba.h> | |
#include <ImfRgbaFile.h> | |
#include <ImfArray.h> | |
#include <ImathBox.h> | |
#include <stdio.h> | |
#include <iostream> // std::cout | |
#include <algorithm> // std::min | |
using namespace Imf; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PySide import QtGui, QtCore | |
import ast | |
import nukescripts | |
def paste_sticky(): | |
try: | |
nuke.nodePaste('%clipboard%') | |
except Exception: |
NewerOlder