Skip to content

Instantly share code, notes, and snippets.

View liorbenhorin's full-sized avatar
✈️

Lior Ben Horin liorbenhorin

✈️
  • NVIDIA
  • Tel Aviv
View GitHub Profile
@liorbenhorin
liorbenhorin / get_pipeline2_project.py
Last active March 31, 2019 17:23
Pipeline 2 get current project
def pipeline_window():
try:
pipeline_win = pipeline.apps.pipeline_main.pipeLineUI.instances
return pipeline_win[-1]
except:
raise('Error geting pipeline window instance')
p = pipeline_window()
print p.project.path
@liorbenhorin
liorbenhorin / start_pipeline_from_elsewhere.py
Created March 28, 2018 19:33
snippet to start pipeline from somewhere other then maya scripts directory
import sys
path = 'path/to/where/pipeline/folder/is/located' #<-- change this to your path
sys.path.append(path)
import pipeline
pipeline.start()
@liorbenhorin
liorbenhorin / Simple_MayaDockingClass.py
Created December 1, 2017 15:04
Simple way to Docking Qt widgets to Maya 2017+
'''
Template class for docking a Qt widget to maya 2017+.
Author: Lior ben horin
12-1-2017
'''
import weakref
import maya.cmds as cmds
import maya.OpenMayaUI as omui
@liorbenhorin
liorbenhorin / update_mgear_guides.py
Created August 26, 2017 08:59
Update mgear guides from older version (2.0.5) to latest (2.2.1)
import pymel.core as pm
import mgear.maya.attribute as att
import mgear.maya.shifter as sh
print '==== updating guides to RB2.2 ==='
guide = sh.RigGuide()
guides_root = pm.PyNode('biped_guide')
@liorbenhorin
liorbenhorin / install.sh
Created December 25, 2016 17:07 — forked from kilfu0701/install.sh
Install PyQt5 with Python2.7 on Mac
cd ~
mkdir dev_tools
cd dev_tools
## download SIP source code
wget http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.7/sip-4.16.7.tar.gz
tar zxf sip-4.16.7.tar.gz
cd sip-4.16.7
python configure.py
make
@liorbenhorin
liorbenhorin / userSetup.py
Last active March 28, 2018 19:34
Auto-start Pipeline with maya
"""
This file, if placed inside maya scripts directory,
will launch Pipeline during Maya startup.
We use utils.executeDeferred so we won't interrupt the maya loading sequence.
"""
import sys
import maya.utils as utils
def startPipeline():
@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__ = "[email protected]"
import sys
import os
import logging
import xml.etree.ElementTree as xml
@liorbenhorin
liorbenhorin / pipeline_run.py
Created September 13, 2016 04:29
Run pipeline from a custom location
pth = '/Path/to/pipeline/directory'
if not pth in sys.path:
sys.path.append(pth)
from pipeline import pipeline
pipeline.show()