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.mel | |
import re | |
import logging | |
_logger = logging.getLogger("patchmel") | |
_logger.setLevel(logging.ERROR) | |
def log_patches(do_logging : bool): |
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
def add_tool(name, exe, commandline, shortcut=''): | |
''' | |
Adds a command entry to a tools list container node. | |
* tool_list_element is ElementTree node representing the tools list | |
* exe is the path to the executable | |
* commandline is the arguments passed to the commandline. | |
* shortcut is a key shortcut | |
If a tool with the same name already exists, it will be overwritten | |
Perforce supports special characters in the command lines, which | |
will be replaced at call time. see |
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 unreal | |
import PySide2.QtWidgets as widgets | |
import traceback | |
class UEQApplication (widgets.QApplication): | |
""" | |
Ensure that an application never tries to `exec_` inside of Unreal |
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
#ifndef __MATRIX_INCLUDED__ | |
#define __MATRIX_INCLUDED__ | |
#define IDENTITY_MATRIX float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) | |
float4x4 inverse(float4x4 m) { | |
float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0]; | |
float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1]; | |
float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2]; | |
float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][3]; |
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
def is_gui_item(obj): | |
return isinstance(obj, QWidget) or isinstance(obj, QLayout) | |
class LayoutCtxMixin(object): | |
PARENTED = set() # tracks all widgets that have already been added to avoid double counting | |
DEPTH = 0 | |
def __enter__(self): | |
LayoutCtxMixin.DEPTH += 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
import random | |
import logging | |
logger = logging.getLogger("chess") | |
logger.addHandler(logging.StreamHandler()) | |
import time | |
import itertools | |
# the board is a sparse dictionary of x-y addresses | |
# it contains a color key (W or B) and a generator |
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
# Module 'rpath' -- windows paths but using right slashes | |
"""Common pathname manipulations, WindowsNT/95 version. | |
""" | |
# strings representing various path-related bits and pieces | |
# These are primarily for export; internally, they are hardcoded. | |
# Should be set before imports for resolving cyclic dependency. | |
curdir = '.' | |
pardir = '..' |
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
""" | |
MayaPy.py | |
Remote control of a mayapy session with a simple proxy interface. This is not intended as a complete RPC server or anything of the sort; the primary use case is as an isolation chamber (since you can manipulate paths and environment variables) for use in testing. | |
""" | |
import subprocess | |
import cPickle as pickle | |
import os |
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 | |
from functools import wraps | |
from collections import Iterable | |
class NamespaceError(RuntimeError): | |
"""raised when a namespace object does not reflect the reality of the scene""" | |
pass | |
class NamespaceNameError(ValueError): |
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 pyb import Pin, ExtInt, LED | |
import time | |
import utime | |
import micropython | |
micropython.alloc_emergency_exception_buf(100) | |
global last_ping, delta, LAG |
NewerOlder