This is clearly a work in progress
Example of content in a Maya publish of context.data
key | type | description | example value |
---|
import re | |
from maya import cmds | |
import maya.api.OpenMaya as om | |
def nodename(n): | |
return n.rsplit("|", 1)[-1].rsplit(":", 1)[-1] | |
for joint in cmds.ls(type="joint", sl=True): | |
jointname = nodename(joint) |
import pprint | |
import inspect | |
import html | |
import copy | |
import pyblish.api | |
from Qt import QtWidgets, QtCore, QtGui | |
TAB = 4* " " |
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" |
import subprocess | |
import sys | |
import os | |
from maya import cmds | |
current_file = cmds.file(query=True, sceneName=True) | |
args = [sys.executable] | |
if current_file and os.path.exists(current_file): | |
args.append("-file") | |
args.append(current_file) |
from maya import cmds | |
def get_shells(mesh, as_selection_string=True): | |
"""Return faces per shell of mesh""" | |
num_shells = cmds.polyEvaluate(mesh, shell=True) | |
num_faces = cmds.polyEvaluate(mesh, face=True) | |
unprocessed = set(range(num_faces)) | |
from openpype.pipeline import legacy_io | |
import datetime | |
# This is what OpenPype v3 uses for the date it stores on versions (reference) | |
""" | |
def get_formatted_current_time(): | |
return datetime.datetime.now().strftime( | |
"%Y%m%dT%H%M%SZ" | |
) | |
""" |
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 |
from maya import cmds | |
def asShadingNode(node, **kwargs): | |
"""Set shading node classification on existing nodes. | |
Like `maya.cmds.shadingNode` does on creation of nodes | |
this command can add or remove a shading node classification. | |
It matches the same argument names of `maya.cmds.shadingNode` |
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) |