Skip to content

Instantly share code, notes, and snippets.

@liorbenhorin
liorbenhorin / MayaDockingClass.py
Last active October 3, 2023 13:01
Maya 2017 PySide2 Docking Qt QMainWindow
"""
This is what you need to do in order to get a qt window to dock next to maya channel box,
In all maya versions, including 2017 with PySide2
"""
__author__ = "liorbenhorin@gmail.com"
import sys
import os
import logging
import xml.etree.ElementTree as xml
@hmasato
hmasato / MAYA_grabFrameBufferToQImage.py
Last active August 17, 2018 01:36
[Maya, python, PyQt, PySide] grabFrameBufferToQImage (MImage and QPixmap) #screenshot
#hmasato
#https://gist.github.com/hmasato/b72a95fbadf1c63b56ec
#------------------------------
#grab frame buffer to QImage
#------------------------------
import ctypes
import maya.OpenMaya as om
import maya.OpenMayaUI as omui
@SEVEZ
SEVEZ / snap_loc_to_geo.py
Created August 29, 2015 11:22
Create locator on surface of any visible mesh object
import maya.cmds as cmds
import pymel.core as pm
import maya.api.OpenMaya as om
import maya.api.OpenMayaUI as omui
class SamsClass():
def __init__(self):
pass
@fredrikaverpil
fredrikaverpil / custom_ui_docked.py
Last active December 1, 2022 16:29
Create custom PySide GUI and dock it into Nuke UI
import PySide.QtCore as QtCore
import PySide.QtGui as QtGui
from nukescripts import panels
class PanelTest(QtGui.QWidget):
def __init__(self, parent=None):
QtGui.QWidget.__init__(self, parent)
self.setLayout(QtGui.QVBoxLayout())
self.myTable = QtGui.QTableWidget()
self.myTable.header = ['Date', 'Files', 'Size', 'Path' ]
@hofmannsven
hofmannsven / README.md
Last active February 24, 2026 15:26
Raspberry Pi Cheatsheet
@hmasato
hmasato / JS_seqParser.js
Created December 3, 2013 05:36
[Javascript] _seqParser
//--------------------------------
// zero padding
//--------------------------------
function _padding(val,n)
{
n -= (''+val).length-1;
return((n>0?(new Array(n)).join('0'):'')+val);
}
//--------------------------------
// examples:
@werediver
werediver / singleton.py
Created December 28, 2012 09:51
A thread safe implementation of singleton pattern in Python. Based on tornado.ioloop.IOLoop.instance() approach.
import threading
# Based on tornado.ioloop.IOLoop.instance() approach.
# See https://github.com/facebook/tornado
class SingletonMixin(object):
__singleton_lock = threading.Lock()
__singleton_instance = None
@classmethod