acceptImport
activate
addAttribute
addExternalContentForFileAttr
addItemObserver
addListObserver
addOpaqueData
ancestorCollections
ancestors
This file contains hidden or 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
| # 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: |
This file contains hidden or 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 PySide2 import QtWidgets, QtCore | |
| def _maya_main_window(): | |
| """Return Maya's main window""" | |
| for obj in QtWidgets.qApp.topLevelWidgets(): | |
| if obj.objectName() == 'MayaWindow': | |
| return obj | |
| raise RuntimeError('Could not find MayaWindow instance') |
This file contains hidden or 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 hidden or 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
| brew install Qt4 | |
| brew install openssl | |
| brew install cmake | |
| git clone https://github.com/PySide/pyside-setup.git --recurse-submodules | |
| cd pyside-setup | |
| # The following must be executed in a bash shell | |
| python setup.py bdist_wheel --ignore-git --qmake=/usr/local/Cellar/qt/4.8.7_2/bin/qmake --openssl=/usr/local/Cellar/openssl/1.0.2h_1/bin/openssl --cmake=/usr/local/Cellar/cmake/3.5.2/bin/cmake |
This file contains hidden or 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 hidden or 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 hidden or 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', |
NewerOlder