- Put
mayapy
on Path - Open a cmd as admin
- run
mayapy -m ensurepip --default-pip
- run
mayapy -m pip install --upgrade pip
- run
mayapy -m pip install ipython==5.7.0
- delete
C:\Program Files\Autodesk\Maya2018\Python\Lib\site-packages\_scandir.pyd
. it's build against original python release version. - test
mayapy -c "from IPython import embed; embed()"
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
name = "python" | |
version = "3.8.6" | |
authors = [ | |
"Guido van Rossum" | |
] | |
description = \ | |
""" |
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
import sys | |
import os | |
from PySide2.QtCore import Qt, QObject, Signal, Slot, Property | |
from PySide2.QtWidgets import QApplication, QSystemTrayIcon, QStyle, QAction, QMenu, QMessageBox | |
from PySide2.QtQml import QQmlApplicationEngine | |
my_list = ['here','is','my','list'] | |
class Manager(QObject): |
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
import maya.OpenMaya as OpenMaya | |
# Get the selection and create a selection list of all the nodes meshes | |
selection = OpenMaya.MSelectionList() | |
OpenMaya.MGlobal.getActiveSelectionList(selection); | |
# Create an MItSelectionList class to iterate over the selection | |
# Use the MFn class to as a filter to filter node types | |
iter = OpenMaya.MItSelectionList ( selection, OpenMaya.MFn.kGeometric ); |
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
import QtQuick 2.9 | |
import QtQuick.Controls 2.2 | |
ApplicationWindow { | |
id: main_window | |
visible: true | |
width: 500 | |
height: 500 | |
Item { |
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 pymel.core import * | |
# original setup | |
SCENE.defaultRenderGlobals.imageFilePrefix.set('/render_output/frame_<RenderLayer>') | |
SCENE.defaultRenderGlobals.animation.set(1) | |
SCENE.defaultRenderGlobals.outFormatControl.set(2) | |
SCENE.defaultRenderGlobals.putFrameBeforeExt.set(1) | |
SCENE.defaultRenderGlobals.extensionPadding.set(3) | |
# get path and add format expression |
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
''' | |
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 |
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
import time, hou | |
# version 1. Static class | |
class SessionCallback(object): | |
last_time = time.time() | |
interval = 10 # sec | |
@classmethod |
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
# Create shortcut on desktop for windows | |
#................................... | |
def createShortCut(self, data): | |
executable = join(os.getenv('PIPELINE_LOCATION'), 'start_app.cmd') | |
if not os.path.exists(executable): | |
self.trayMessage('Launcher not found') | |
return | |
data['launcher'] = executable.replace('/','\\') | |
data['wd'] = os.getenv('PIPELINE_LOCATION') | |
ico = icons[data['name']] if data['name'] in icons else icons['default'] |
NewerOlder