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.OpenMaya as om | |
import maya.cmds as mc | |
import uuid | |
def ensure_id(node): | |
"""Add a uuid attribute on the given node with a unique value. | |
Skips nodes that already have the attribute, unless when used upon duplicating. | |
Maya temporarily assigns the prefix '__PrenotatoPerDuplicare_' so we use that |
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
"""These are utilities for connecting open-source pipeline Avalon with CG-Wire using Qtazu | |
See: | |
- https://github.com/getavalon/core | |
- https://github.com/Colorbleed/qtazu | |
References: | |
- https://github.com/getavalon/docker/blob/master/volume/sync.py#L227 | |
# How it works: |
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 ragdoll.vendor import cmdx | |
from ragdoll import commands, interactive | |
def fix_marker_in_place(marker): | |
source = marker["sourceTransform"].input() | |
solver = commands._find_solver(marker) | |
start_time = solver["_startTime"].asTime() | |
start_frame = cmdx.frame(start_time) |
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 logging | |
import subprocess | |
from datetime import datetime | |
import os | |
import re | |
import tempfile | |
log = logging.getLogger(__name__) | |
# Locate ffmpeg if full path provided, otherwise use ffmpeg executable name |
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 webbrowser | |
from openpype.pipeline import LauncherAction | |
from openpype.modules import ModulesManager | |
from openpype.client import get_project, get_asset_by_name | |
class ShowInKitsu(LauncherAction): | |
name = "showinkitsu" | |
label = "Show in Kitsu" |
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 PySide2 import QtCore, QtWidgets | |
import substance_painter.ui | |
try: | |
from openpype_modules.python_console_interpreter.window import PythonInterpreterWidget # noqa | |
except ModuleNotFoundError: | |
from openpype.modules.python_console_interpreter.window import PythonInterpreterWidget # noqa | |
WIDGET = None | |
ACTION = None |
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 PySide2 import QtCore, QtWidgets, QtGui | |
from pxr import Usd, Tf, Sdf | |
# See: https://github.com/PixarAnimationStudios/OpenUSD/blob/release/pxr/usd/sdf/fileIO_Common.cpp#L879-L892 | |
SPECIFIER_LABEL = { | |
Sdf.SpecifierDef: "def", | |
Sdf.SpecifierOver: "over", | |
Sdf.SpecifierClass: "abstract" | |
} |
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 pxr import Usd, Plug, Tf | |
from collections import defaultdict | |
NICE_NAMES = { | |
"usdGeom": "Geometry", | |
"usdLux": "Lighting", | |
"mayaUsd_Schemas": "Maya Reference", | |
"usdMedia": "Media", | |
"usdRender": "Render", | |
"usdRi": "RenderMan", |
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
"""Create Default Assembly Rig Setup as shown in How RISE VFX Reached New Creative Heights with USD in Maya talk | |
See: https://youtu.be/8UIW-g1_heg?t=1902 | |
""" | |
import pxr | |
import ufe | |
import pymel.core as pm | |
from mayaUsd import lib as mayaUsdLib | |
USD_SCHEMA = "UsdSchemaBase" |
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 pxr import UsdUtils, Sdf | |
stage = hou.pwd().editableStage() | |
# Given a Sdf.Layer you can use UsdUtils.ComputeAllDependencies | |
# which returns the layers, assets and any unresolved paths | |
layer = stage.Flatten() | |
layers, assets, unresolved_paths = UsdUtils.ComputeAllDependencies(layer.identifier) | |
for path in assets: | |
print(path) |