Skip to content

Instantly share code, notes, and snippets.

View vshotarov's full-sized avatar

Vasil Shotarov vshotarov

View GitHub Profile
@vshotarov
vshotarov / markingMenu.py
Created May 13, 2017 11:48
Example of a custom marking menu in Maya, scripted in Python.
'''A simple example of a custom marking menu in Maya. The benefits of doing it this way with Python are that
it is very flexible and easily maintainable. Additionally, you can keep it in a version control system.
This file is used for demonstration purposes, to be followed along with in this blog post
http://bindpose.com/custom-marking-menu-maya-python/
'''
import maya.cmds as mc
@vshotarov
vshotarov / controlShapeManagerFull.py
Last active May 21, 2023 11:50
An example control shape manager for Maya all contained in one file for demo purposes.
'''A simple example of a control shape manager in Maya contained in one file for easier access. It can be used for loading, saving, copying, etc. control shapes.
This file is used for demonstration purposes, to be followed along with in this blog post
http://bindpose.com/creating-maya-control-shape-manager
'''
import os
import json
import re
@vshotarov
vshotarov / shelfBase.py
Last active February 23, 2023 23:49
Maya base class for building custom shelves.
import maya.cmds as mc
def _null(*args):
pass
class _shelf():
'''A simple class to build shelves in maya. Since the build method is empty,
it should be extended by the derived class to build the necessary shelf elements.
@vshotarov
vshotarov / ikFkSwitch.py
Last active August 30, 2022 16:50
Functions for switching between IK and FK setups, matching the existing pose.
'''File containing simple commands for switching between IK and FK and keeping the pose.
This file is used for demonstration purposes, to be followed along with in this blog post
http://bindpose.com/seamless-ik-fk-switch-maya-python/
'''
import maya.cmds as mc
def ikFkSwitch_sameOrient():
@vshotarov
vshotarov / server.py
Last active September 15, 2017 10:42
Simple socket chat server
import socket
import threading
class ThreadedServer(object):
def __init__(self, host, port):
self.host = host
self.port = port
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)