Pymel / Python Coding

Category: pymel

Curve fix and setup for Renderman/3delight

curveUI
I coded this up in pymel and used qt designer for the GUI in maya. This GUI sets up the normals on curves for rendering in renderman / 3delight – and is used in conjunction with primitive variables on each curve and a curve shader.

A regular curve that hasn’t been processed will have its normals face in the direction of the viewer (1) – and as you can see it just looks “wonky”. With this technique the ‘Face Camera’ of the normals are disabled and they can be set to all face the direction selected.

GUI enables per item or selection
1 Fix
2 set direction
3 color
5 Animation of Curve based on curve length proportion or custom set. Start and end frames
can also be set.

6 Width for start and end can be adjusted

qt designer

http://lukewalters.co.uk/coding/?p=91

maya

http://lukewalters.co.uk/coding/?p=86

pymel
http://lukewalters.co.uk/coding/uncategorized/curve_fixer-py/

Output Maya Animation Data to .csv file

Coded this up to output animation data from maya into a comma separated.csv file. pymel script

http://lukewalters.co.uk/coding/?p=104 QT Gui http://lukewalters.co.uk/coding/?p=108 call GUI from maya

qt designer part 2 – signals and slots

qt designer set up gui to be imported into maya new > file > form > Main Window Layouts > Vertical Layout into the vertical layout drag two instances of  ‘Push Button’ from Buttons in Widget Box. Rename to something that makes sense  – “CreateSphere”, “ResizeSphere” add dynamic property to “CreateSphere” and to “ResizeSphere” first…

Add Mask AOVS – 3delight

# select all geo that you want to have a mask and run the script – this will create a 3delight mask aov for each piece.