コード例 #1
0
from collections import deque

# internal
import vfx_utils.omni.slog as slog
from vfx_utils.omni.string_utils import align_right
import vfx_utils.omni.inspections as inspections

# -------------------------------------------------------------------------- #
# --------------------------------------------------------------- GLOBALS -- #

# ------------------- Version Info ----------------------------------------- #
VERSION = '1.1'
DEBUG_VERSION = '1.0.6'

# ------------------- Logging ---------------------------------------------- #
logger = slog.Logger('DEBUG_TOOL')
logger.level = 5

# ------------------- Enumerations ----------------------------------------- #
FRAME = inspections.FRAME
FUNC_NAME = inspections.FUNC_NAME
MOD_NAME = inspections.MOD_NAME
LOCALS = inspections.LOCALS
FILE_NAME = inspections.FILE_NAME
LINE_NO = inspections.LINE_NO
FUNC_OBJ = inspections.FUNC_OBJ
MOD_OBJ = inspections.MOD_OBJ
INST_OBJ = inspections.INST_OBJ
ARGSPEC = inspections.ARGSPEC

コード例 #2
0
from vfx_utils.cutie.gadgets.supertab import (SuperTab, SuperAction,
                                              SuperActionGroup)

# domain
import nuke

# -------------------------------------------------------------------------- #
# --------------------------------------------------------------- GLOBALS -- #

# ------------------- Version Information ---------------------------- #
VERSION = '1.0'
DEBUG_VERSION = '1.0.0'

# ------------------- Logging and Metrics ---------------------------- #
APP_NAME = 'nuke_supertab'
logger = slog.Logger()

# ------------------- UI Globals ------------------------------------- #
nuke_supertab_ui = None

# ------------------- Item Caches ------------------------------------ #
item_groups = dict()

# -------------------------------------------------------------------------- #
# ------------------------------------------------------- MENU COLLECTION -- #
root_menu = nuke.menu('Nuke')


def _uniquify(item_list, key):
    """from a list of menu items, return an in-order list of only unique
    items. """
コード例 #3
0
ファイル: dg_utils.py プロジェクト: sharpencrag/vfx_utils
# internal
import vfx_utils.omni.slog as slog
from vfx_utils.omni.data_types import TreeDict, TreeNode
import vfx_utils.mirage.api_utils as api
from vfx_utils.mirage.api_utils import msplit
from vfx_utils.mirage.maya_callbacks.watchers import SceneWatcher

# domain
import maya.OpenMaya as om

# -------------------------------------------------------------------------- #
# --------------------------------------------------------------- GLOBALS -- #
DAGNODE = TreeNode('__dagnode__', repr_='DAGNODE')

logger = slog.Logger()
logger.level = 3

cb_logger = slog.Logger('DAG_Crawler_Callbacks')
cb_logger.formatter = lambda msg, lvl, **_: "DAG_CRAWLER: {0}".format(msg)
cb_logger.level = 3


# -------------------------------------------------------------------------- #
# --------------------------------------------------------- DAG TRAVERSAL -- #
def dag_generator():
    iterator = om.MItDag(om.MItDag.kDepthFirst)
    current_item_getter = iterator.currentItem
    next_ = iterator.next
    while not iterator.isDone():
        yield current_item_getter()