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 pprint | |
import inspect | |
import html | |
import copy | |
import pyblish.api | |
from Qt import QtWidgets, QtCore, QtGui | |
TAB = 4* " " |
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 maya import cmds | |
import maya.api.OpenMaya as om | |
import pymel.core as pm | |
import maya.app.renderSetup.model.utils as utils | |
from maya.app.renderSetup.model import ( | |
override, | |
selector, | |
collection, | |
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
// Maya Mel UI Configuration File.Maya Mel UI Configuration File.. | |
// | |
// | |
// This script is machine generated. Edit at your own risk. | |
// | |
// | |
//////////////////////////////////////////////////////////////////// | |
global proc UI_Mel_Configuration_think(){ | |
string $localized_resources_path = `getenv MAYA_LOCATION`+("/resources/l10n/"); | |
string $all_file[]=`getFileList -folder $localized_resources_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
""" | |
MIT License | |
Copyright (c) 2019 Roy Nieterau | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
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
""" | |
This will iterate all modelPanels and remove the "CgAbBlastPanelOptChangeCallback" | |
As such, after running this the following error should be fixed: | |
// Error: line 1: Cannot find procedure "CgAbBlastPanelOptChangeCallback". // | |
""" | |
from maya import cmds | |
for model_panel in cmds.getPanel(typ="modelPanel"): |
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 om2 | |
import maya.cmds as mc | |
import contextlib | |
from colorbleed.maya.lib import iter_parents | |
@contextlib.contextmanager | |
def maintained_time(): | |
ct = cmds.currentTime(query=True) |
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 alembic.Abc | |
from alembic.AbcGeom import IXform | |
kWrapExisting = alembic.Abc.WrapExistingFlag.kWrapExisting | |
def get_matrix(obj): | |
if not IXform.matches(obj.getHeader()): | |
raise TypeError("Object is not an xform: {0}".format(obj)) |
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 alembic | |
def any_shapes_in_alembic(filename): | |
"""Return whether Alembic file contains any shape/geometry. | |
Arguments: | |
filename (str): Full path to Alembic archive to read. | |
Returns: | |
bool: Whether Alembic file contains geometry. |
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 avalon import api | |
from avalon import io | |
import alembic.Abc | |
def get_alembic_paths(filename): | |
"""Return all full hierarchy paths from alembic file""" | |
# Normalize alembic path | |
path = os.path.normpath(filename) |
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.cmds as cmds | |
def get_shader_in_layer(node, layer): | |
"""Return the assigned shader in a renderlayer without switching layers. | |
This has been developed and tested for Legacy Renderlayers and *not* for | |
Render Setup. | |
Returns: | |
list: The list of assigned shaders in the given layer. |
NewerOlder