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
""" | |
A decorator to wrap Qt slots, in Maya, so that exceptions are reported to Script Editor | |
Ref: https://groups.google.com/d/topic/python_inside_maya/xv7DCiocDZA/discussion | |
justinisrael@gmail.com | |
""" | |
#... | |
import sys |
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
""" | |
Example of using a proxy model to apply custom | |
filtering to a QFileSystemModel | |
RE: https://groups.google.com/d/topic/python_inside_maya/a2QM_KvgfeI/discussion | |
Justin Israel | |
justinisrael@gmail.com | |
""" | |
from PySide import QtCore, QtGui |
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
""" | |
https://groups.google.com/d/topic/python_inside_maya/eZOCjK2jewY/discussion | |
How to create a QListWidget, and toggle the background color of items | |
when they are double clicked | |
""" | |
from PySide import QtCore, QtGui | |
class List(QtGui.QDialog): |
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
""" | |
Re: https://groups.google.com/d/topic/python_inside_maya/ndjexeQrZs8/discussion | |
Example of an approach to generating a unique name for a Maya object. | |
Author: Justin Israel (justinisrael@gmail.com) | |
""" | |
def uniqueNamePattern(base="object", padding=1): | |
""" |
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
/* | |
Example of taking an OpenColorIO ColorData and converting | |
it into a stdlib Image. Then encoding to jpeg format. | |
Ref: https://github.com/justinfx/opencolorigo/issues/1 | |
Author: Justin Israel (justinisrael@gmail.com) | |
*/ | |
package main |
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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"image" | |
"image/gif" | |
"net/http" | |
"github.com/gin-gonic/gin" |
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
// Testing reported mem leak at: https://github.com/gographics/imagick/issues/72 | |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"runtime" |
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
""" | |
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 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 flask.ext.restful import Resource | |
from flask import Response | |
from ctypes import CDLL | |
gotest = CDLL("gotest.so") | |
class api2(Resource): | |
def get(self): | |
return gotest.GetValWithConcurrency() |
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
""" | |
Original example reformatted from: | |
http://blog.3dkris.com/2011/08/python-in-maya-how-to-make-commands.html | |
python_inside_maya discussion: | |
https://groups.google.com/d/topic/python_inside_maya/xfuCYBO6aLg/discussion | |
""" | |
import maya.cmds as cmds |