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
# -*- coding: utf-8 -*- | |
############################################################################### | |
import sys | |
import textwrap | |
import maya.cmds as cmds | |
import maya.mel as mel | |
import maya.api.OpenMayaUI as omui | |
# import gml_maya.decorator as deco |
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
# -*- coding: utf-8 -*- | |
############################################################################### | |
import textwrap | |
import functools | |
import maya.cmds as cmds | |
import maya.mel as mel | |
from logging import ( # noqa:F401 pylint: disable=unused-import, wrong-import-order | |
StreamHandler, |
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
# -*- coding: utf-8 -*- | |
"""Resize gameExporter's frame range textfields width of animation clips tab.""" | |
import PySide2 | |
def get_maya_main_window(): | |
for obj in PySide2.QtWidgets.QApplication.topLevelWidgets(): | |
if obj.objectName() == 'MayaWindow': | |
return 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
from contextlib import contextmanager | |
from pathlib import Path | |
@contextmanager | |
def redirect_log(logfile_path): | |
# type: (Text) -> Generator[None, None, None] | |
"""Function: Context manager for redirecting maya's log to given path, to use as `with` statement. | |
Scenario: giving None to logfile_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
from maya import cmds | |
def __swap_selection_for_ikrot_job(): | |
sel = cmds.ls(sl=True) or [] | |
for i, s in enumerate(sel): | |
ctx = cmds.currentCtx() | |
new = None |
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
# pylint: disable=C0326,W0125,line-too-long | |
"""The typeshed generator for `maya.cmds` module from CommandsPython html pages. | |
Usage: | |
Download the documentation files from [ADN](https://knowledge.autodesk.com/support/maya/getting-started/caas/simplecontent/content/maya-documentation.html) | |
Run this script. | |
`$ python generate_typeshed.py inupt_folder output ' | |
`$ python generate_typeshed.py autodesk-maya-user-guide-2020.1.htm-ade-2.1.enu/CommandsPython maya.cmds.__init__.pyi' | |
""" |
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 om | |
import maya.api.OpenMayaUI as omui | |
# マスクの足し算 | |
SLIM_MASK = omui.M3dView.kDisplayTextures | omui.M3dView.kDisplayMeshes | omui.M3dView.kDisplayGrid | omui.M3dView.kDisplayManipulators | |
# 引き算はこう | |
SLIM_MASK = omui.M3dView.kDisplayEverything > omui.M3dView.kDisplayGrid | |
ALL_MASK = omui.M3dView.kDisplayEverything |
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 re | |
import math | |
import inspect | |
import textwrap | |
import maya.cmds as cmds | |
import exprespy.cmd | |
def rotate_driver(COUNT, IN, OUT): |
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 load_hik_animation_into_current_character(source_file_path=None, character=None): | |
if not source_file_path: | |
source_file_path = cmds.fileDialog2( | |
fileFilter="Scene Files (*.ma *.mb *.fbx);;Maya ASCII (*.ma);;Maya Binary (*.mb);;Fbx file(*.fbx)", | |
fileMode=1, | |
caption="Select animation source file.", | |
) | |
if not source_file_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
# -*- coding: UTF-8 -*- | |
# ====================================================================== | |
import os | |
from maya import cmds | |
from maya import mel | |
if False: | |
# For type annotation | |
from typing import Dict, List, Tuple, Pattern, Callable, Any, Text # NOQA |
NewerOlder