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
| """ | |
| Simplified version of original forum post: | |
| http://tech-artists.org/forum/showthread.php?4547-Passing-uchar-pointer-with-PySide-in-Maya | |
| """ | |
| import ctypes | |
| import maya.OpenMaya as om | |
| from PySide import QtCore, QtGui | |
| # Build a test MImage |
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 | |
| import maya.OpenMaya as om | |
| import maya.OpenMayaUI as omui | |
| from PySide2 import QtCore, QtGui, QtWidgets | |
| # Capture viewport to MImage | |
| view = omui.M3dView.active3dView() | |
| mIm = om.MImage() |
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
| ''' | |
| export camera standalone | |
| 1. put in `C:/Users/<user>/Documents/maya/scripts` | |
| 2. open maya and select the camera in outliner | |
| 3. menu 'custom->Export Selected Camera' | |
| ''' | |
| from maya import cmds | |
| from maya import mel | |
| def make_kwargs(overrides, **kwargs): |
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
| """ | |
| "Connect rename command in QListWidget item edit" | |
| https://groups.google.com/g/python_inside_maya/c/lPoWGuXyFsg/m/sLiWOaJgBAAJ | |
| """ | |
| from PySide2 import QtCore, QtGui, QtWidgets | |
| class MyListWidget(QtWidgets.QListWidget): |
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 sys | |
| from PyQt5.QtCore import QEvent | |
| from PyQt5.QtCore import Qt | |
| from PyQt5.QtWidgets import QApplication | |
| from PyQt5.QtWidgets import QMainWindow |
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 pymel.core as pm | |
| """ | |
| Take a collection of attributes and interpolate them along a curve. | |
| It uses a master remapValue that drives multiple remapValues | |
| to simulate the effect of a multi-out curve node. | |
| References to "twist", because it was originally written for twisting ribbon IK | |
| But it can interpolate any custom attributes you wish | |
| Written by Chris Lesage, June 2019 |