Maya version: 2018 update 6 OS: Windows 10
- Save those two
.ma
file in a folder. - Open
work.ma
, it should haveupstream.ma
referenced. - Execute the script
crash.py
. - Save the scene and Maya will crash.
"""Testing generator that yields within a context and interrupt by error | |
Looks like the context is being closed by the python garbage collection if | |
error raised during the iteration. | |
https://stackoverflow.com/a/19825163/4145300 | |
""" | |
import sys | |
from contextlib import contextmanager |
Maya version: 2018 update 6 OS: Windows 10
.ma
file in a folder.work.ma
, it should have upstream.ma
referenced.crash.py
.import os | |
import pyblish.api | |
import pyblish_qml | |
class CreateToy(pyblish.api.ContextPlugin): | |
order = pyblish.api.CollectorOrder - 0.2 | |
def process(self, context): | |
instance = context.create_instance("Bear") |
import sys | |
from PySide2 import QtCore, QtGui, QtQuick | |
class Data(QtCore.QObject): | |
color = QtCore.Property(str, fget=lambda _: "purple", constant=True) | |
if __name__ == '__main__': |
import nuke | |
import re | |
def list_user_knobs(node): | |
"""Get user defined knobs | |
Args: | |
node (nuke.Node): Nuke node object |
"""Implement scene modification awareness | |
By tracking Maya's undo queue, if there are any undo command that is not | |
a simple select after collecting completed, consider this scene has been | |
modified and require to reset Pyblish. | |
""" | |
import collections |
# -*- coding: utf-8 | |
import os | |
import pyblish.api | |
import pyblish_qml | |
import pyblish_qml.settings | |
class CreateInstances(pyblish.api.ContextPlugin): | |
"""Create instance""" |
from avalon.vendor.Qt import QtWidgets, QtCore, QtGui | |
from avalon.vendor import qtawesome | |
from avalon import tools, style | |
import logging | |
import threading | |
import time | |
main_logger = logging.getLogger() |
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) |
""" | |
Maya command `sets -forceElement` failed cases | |
""" | |
from maya import cmds | |
CUBE = None |