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
""" | |
Place in [NUKE_PATH]/Python/StartupUI | |
""" | |
import os | |
from PySide2 import QtCore, QtWidgets | |
import hiero.core.nuke as nuke | |
import hiero.core.nuke.Node |
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 os | |
import pymel.core as pc | |
import ngSkinTools.importExport | |
import mgear | |
basename = os.path.basename(pc.sceneName()) | |
filename = os.path.splitext(basename)[0] | |
directory = os.path.dirname(pc.sceneName()) |
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 os | |
import pymel.core as pc | |
from studiolibrarymaya import animitem | |
basename = os.path.basename(pc.sceneName()) | |
filename = os.path.splitext(basename)[0] | |
directory = os.path.dirname(pc.sceneName()) |
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 pymel.core | |
for node in pymel.core.ls(selection=True): | |
grp1 = pymel.core.group(empty=True) | |
grp2 = pymel.core.group(empty=True) | |
pymel.core.delete(pymel.core.parentConstraint(node, grp1)) | |
pymel.core.delete(pymel.core.parentConstraint(node, grp2)) | |
pymel.core.parent(node, grp1) |
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 pymel.core | |
drg = pymel.core.PyNode('defaultRenderGlobals') | |
# iterate over the selected renderlayers. | |
# can select renderlayers through the outliner with "Display" > "DAG Objects Only" | |
data = {} | |
render_cams = [] | |
for layer in pymel.core.ls(selection=True, type='renderLayer'): |
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
""" | |
Will convert aiStandardSurface to usdPreviewSurface. | |
Usage: | |
- Select aiStandardSurface nodes and execute code. | |
""" | |
import pymel.core as pc | |
def list_connections(node, skip_nodes, **kwargs): |
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
""" | |
Select all TimeClips and run code. | |
Will produce a frame hold with start middle and end of the time clips. | |
""" | |
import nuke | |
frames = [] | |
for node in nuke.selectedNodes(): | |
node["selected"].setValue(False) |
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
""" | |
Select targets then source last. | |
""" | |
import pymel.core as pc | |
from ngSkinTools.mllInterface import MllInterface | |
selection = pc.ls(selection=True) | |
targets = selection[:-1] | |
source = selection[-1] |
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
""" | |
Select the node to analyze for held frames. | |
Outputs a FrameHold node with animation synced to the held frames. | |
"incremental" > If True only increment held values by 1. If False held values are the frames. | |
"operation" > choice between "Auto Crop" and "Avg Intensities". Different footage can require different operations. If one operation misses a frame movement, then try the other. | |
""" | |
import nuke |
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 | |
x_separation = 110 | |
y_separation = 110 | |
selection = {} | |
for node in nuke.allNodes(): | |
if node["selected"].value(): | |
selection[node.name()] = node |
NewerOlder