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 PyQt4 import QtCore, QtGui | |
class TextEdit(QtGui.QTextEdit): | |
""" | |
A TextEdit editor that sends editingFinished events | |
when the text was changed and focus is lost. | |
""" | |
editingFinished = QtCore.pyqtSignal() | |
receivedFocus = QtCore.pyqtSignal() |
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
''' | |
Created on Feb 8, 2013 | |
@author: matthieuc | |
@contact: matthieu.cadet@gmail.com | |
''' | |
import PySide.QtGui as QtGui | |
def setNukeZeroMarginsWidget(widget_object): |
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
"""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: |
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
qApp->setStyle(QStyleFactory::create("Fusion")); | |
QPalette darkPalette; | |
darkPalette.setColor(QPalette::Window, QColor(53,53,53)); | |
darkPalette.setColor(QPalette::WindowText, Qt::white); | |
darkPalette.setColor(QPalette::Base, QColor(25,25,25)); | |
darkPalette.setColor(QPalette::AlternateBase, QColor(53,53,53)); | |
darkPalette.setColor(QPalette::ToolTipBase, Qt::white); | |
darkPalette.setColor(QPalette::ToolTipText, Qt::white); | |
darkPalette.setColor(QPalette::Text, Qt::white); |
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
import nuke, nukescripts, nuke.rotopaint as rp, _curvelib as cl | |
''' | |
## LINK TOOLS | |
Utility functions for creating linked nodes. This script can create roto linked to trackers, | |
transform linked to trackers, or cameras linked to each other, or held on a projection frame. | |
Installation: | |
Put link_tools.py somewhere in your nuke path. | |
You can add the script as commands to your Nodes panel. This code creates a custom menu entry called "Scripts". |
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
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 |
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
#pragma opname fisheyelens | |
#pragma oplabel "Fisheye Lens" | |
#pragma hint x hidden | |
#pragma hint y hidden | |
#pragma hint Time hidden | |
#pragma hint dofx hidden | |
#pragma hint dofy hidden | |
#pragma hint aspect hidden | |
#pragma hint P hidden |
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 pymel.core import * | |
import maya.OpenMaya as om | |
from imath import * | |
from alembic.Abc import * | |
from alembic.AbcGeom import * | |
import math | |
import alembic | |
def get_mesh_data(): |
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
""" | |
dpx.py | |
Read Metadata and Image data from 10-bit DPX files in Python 3 | |
Copyright (c) 2016 Jack Doerner | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
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
import time, hou | |
# version 1. Static class | |
class SessionCallback(object): | |
last_time = time.time() | |
interval = 10 # sec | |
@classmethod |
OlderNewer