Pymel / Python Coding

Category: pymel

Triple Shading Switch for per object shading

I wanted to render using the maya hardware renderer (very quick). For this to work colors need to be visible in the viewer. Triple Shading Switch in Maya is equivalent to Renderman per object primitive variable shading that I’ve used on other projects. Scroll down for alternative 3delight/Renderman version with pros and cons.    …

Dictionaries, Pickle and Python

### data sample from country-capitals.csv United Arab Emirates,Abu Dhabi,24.4666666667,54.366667,AE,Asia Nigeria,Abuja,9.0833333333,7.533333,NG,Africa Parse a .csv file and create a Dictionary. import pymel.core as pm dataPath = “C:/country-capitals.csv” f = open(dataPath) line = f.readline() mapDict = {} while line: parts = line.split(“,”) countryObject = parts[0].strip() cityObject = parts[1].strip() latObject = parts[2].strip() lonObject = parts[3].strip() mapDict[countryObject]=[cityObject,latObject,lonObject] line = f.readline()…

Run Command Line / .exe from Maya

I use midicsv, so for convenience I coded this up to run its command line from within maya gui. you run it , you pick input file, in this case a midi file (.mid) it does its thing and outputs a .csv file with the same name. import subprocess import EasyDialogs input_file = EasyDialogs.AskFileForOpen() wanted=unicode…

Global Mapping GUI


Features

Filter by capital/country
Filter by continent/region
Create custom locations
Save and Import Collections
Save Presets
Set color of curves
Set width of curves
Animation of curves based on length or fixed.
Start and End point custom geometry
Export locator data to After Effects.

project_01_large_a

project_01_large_b