- Mirror Selected (animation):
- no description
This file contains hidden or 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 hidden or 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 |
This file contains hidden or 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 | |
| ALL_MASK = omui.M3dView.kDisplayEverything | |
| def hoge(mask): |
This file contains hidden or 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 ctypes | |
| class MEMORYSTATUSEX(ctypes.Structure): | |
| _fields_ = [ | |
| ('dwLength', ctypes.c_ulong), | |
| ('dwMemoryLoad', ctypes.c_ulong), | |
| ('ullTotalPhys', ctypes.c_ulonglong), | |
| ('ullAvailPhys', ctypes.c_ulonglong), |
This file contains hidden or 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 | |
| from maya.api import OpenMaya as OpenMaya2 | |
| def select_opposite(): | |
| # type: () -> None | |
| y = OpenMaya2.MGlobal.getActiveSelectionList() | |
| sel_strings = y.getSelectionStrings() |
This file contains hidden or 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 textwrap import dedent | |
| from maya import OpenMaya as om | |
| from maya import cmds | |
| from maya import mel | |
| def auto_enable_vp2(arg): | |
| force_vp2_cmd = dedent(""" | |
| string $panels[] = `getPanel -type modelPanel`; |
This file contains hidden or 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
| #!/usr/bin/env python | |
| # -'''- coding: utf-8 -'''- | |
| import os | |
| import sys | |
| from PySide2 import QtQuickWidgets | |
| from PySide2.QtCore import QUrl | |
This file contains hidden or 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 as mel | |
| import maya.cmds as cmds | |
| import_command = "DoraSkinWeightImport( \"{name}.dsw\", $gDoraSkinWeightImpExp_ImpMode, 0, 1, 0.001)" | |
| all = [x for x in cmds.ls(sl=True)] | |
| for x in all: | |
| cmds.select(x) | |
| mel.eval(import_command.format(name=x)) |