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.app.general.mayaMixin import MayaQWidgetDockableMixin | |
import maya.cmds as cmds | |
import PySide2.QtWidgets as qtwidgets | |
import maya.OpenMayaUI as omui | |
class DockableMixinWidget(MayaQWidgetDockableMixin, qtwidgets.QWidget): | |
_instance = None | |
_show_kwargs = {} # see kwargs for setDockableParameters in mayaMixin.py |
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 timeit | |
pymel_setup = ''' | |
import pymel.core as pm | |
def create_sphere(): | |
s = pm.polySphere()[0] | |
for vertex in s.vtx: | |
vertex.setPosition((10, 10, 10)) | |
pm.delete(s)''' |
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 FbxCommon | |
def fbx_trim_keys(scene, start, end, take_buffer=10): | |
""" | |
Uses the FBX SDK to remove unnecessary keys. | |
:param scene: FBX SDK scene class that hold data to edit | |
:param int start: start frame of animation keys to keep | |
:param int end: end frame of animation keys to keep |