An example of parallel evaluation in Maya 2018+
Scenes
Usage
Files prefixed scene*
generate nodes suitable for parallelism, profile*
contain ways to measure performance. Each snippet of code is meant to be copy/pasted into the Script Editor and run.
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 ctypes | |
import maya.OpenMaya as om | |
import maya.OpenMayaUI as omui | |
from PySide2 import QtCore, QtGui, QtWidgets | |
# Capture viewport to MImage | |
view = omui.M3dView.active3dView() | |
mIm = om.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
import os, sys, math, subprocess, shlex | |
from shutil import copy2 | |
if __name__ == '__main__': | |
walkdir = "/mnt/tlehr/projects/btb_mosaic/photos/" # folder which contains all photos | |
destdir = "/mnt/tlehr/projects/btb_mosaic/collection/" # folder to which the specific photos to use will be copied | |
destfile = "/mnt/tlehr/projects/btb_mosaic/mosaic.jpg" # filepath to the resulting image |