acceptImport
activate
addAttribute
addExternalContentForFileAttr
addItemObserver
addListObserver
addOpaqueData
ancestorCollections
ancestors
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
"""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 |
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 | |
#from PyQt4 import QtGui | |
import pickle | |
STYLE = 'plastique' | |
GROUPS = ['Disabled', 'Active', 'Inactive', 'Normal'] | |
ROLES = [ | |
'AlternateBase', | |
'Background', | |
'Base', |
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 maya.api.OpenMaya as om | |
import maya.api.OpenMayaUI as omui | |
import maya.cmds as cmds | |
# Maya Python API: | |
# http://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__py_ref_index_html | |
def onPress(): | |
"""Take x,y from mouse click, convert into 3d world coordinates""" |
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 PySide.QtCore as QtCore | |
import PySide.QtGui as QtGui | |
from nukescripts import panels | |
class PanelTest(QtGui.QWidget): | |
def __init__(self, parent=None): | |
QtGui.QWidget.__init__(self, parent) | |
self.setLayout(QtGui.QVBoxLayout()) | |
self.myTable = QtGui.QTableWidget() | |
self.myTable.header = ['Date', 'Files', 'Size', 'Path' ] |
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
# Get all nodes of type Read | |
readnodes = nuke.allNodes('Read') | |
for readnode in readnodes: | |
print readnode | |
# List all knobs for selected node | |
print( nuke.toNode('Read1') ) | |
# List all knobs for specific node | |
print( nuke.selectedNode() ) |
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 datetime import datetime, timedelta | |
from pytz import timezone as pytz_timezone | |
def normalize_timedelta(dt: datetime, delta: timedelta) -> datetime: | |
"""Normalize timedelta operation, to preserve DST properly.""" | |
if hasattr(dt.tzinfo, "zone"): | |
timezone_ = dt.tzinfo.zone | |
return pytz_timezone(timezone_).normalize(dt + delta) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder