Python RenderMan API Lego Figure
assignment.py File Reference

Go to the source code of this file.

Namespaces

 assignment
 

Functions

def assignment.Cube (width=1.0, height=1.0, depth=1.0)
 Cube definition from Cube.py by Jon Macey (https://github.com/NCCA/Renderman/blob/master/Lecture1Intro/Cube.py). More...
 
def assignment.checkAndCompileShader (shader)
 Load OSL shader definition is from scene.py by Jon Macey (https://github.com/NCCA/Renderman/blob/master/Lecture4Shaders/scene.py). More...
 
def assignment.convertColourValue (colourValue)
 A funciton to convert a value of 0-255 to a value of 0-1. More...
 
def assignment.legsShader (legsColour, dirtValue, damage)
 A function for the definiton of the shader to use on the legs. More...
 
def assignment.headShader (headColour, dirtValue)
 A function for the definiton of the shader to use on the head. More...
 
def assignment.chestShader (chestType, chestBaseColour, chestDetailColour, dirtValue, damage)
 A function for the definiton of the shader to use on the chest. More...
 
def assignment.tableShader ()
 A function for the definiton of the shader to use on the table. More...
 
def assignment.head (xScale, yScale, zScale)
 A function for the definiton of the main head geometry (points generated in external modeling program). More...
 
def assignment.chest (xScale, yScale, zScale)
 A function for the definiton of the chest gemoetry (points generated in external modeling program). More...
 
def assignment.loadColourCmd (cmdNum, cmdNumType, defaultColour)
 A function for loading in a colour from the command line. More...
 
def assignment.drawScene (ri, chestType, chestBaseColour, chestDetailColour, headColour, legsColour, dirtValue, damage)
 A function for the definiton of the scene to generate. More...
 

Variables

bool assignment.altAngle = False
 The main function. More...
 
string assignment.outputType = "it"
 The type of output to use, default is it. More...
 
string assignment.chestType = "blank"
 Initalise the default values for the figure generation. More...
 
list assignment.chestBaseColour = [0.02,0.02,0.4]
 Check for chest base colour command. More...
 
list assignment.chestDetailColour = [1,1,1]
 Check for chest detail colour command. More...
 
list assignment.headColour = [convertColourValue(220),convertColourValue(150),convertColourValue(10)]
 Check for head colour command. More...
 
list assignment.legsColour = [0.6,0,0]
 Check for legs colour command. More...
 
float assignment.dirtValue = 0.3
 
bool assignment.customFileName = False
 Check for alt angle command. More...
 
int assignment.damage = 3
 
 assignment.loadedNum = float(sys.argv[i+1])
 Check for dirt value command. More...
 
 assignment.outputFilename = sys.argv[i+1]
 Set the filename based on angle. More...
 
 assignment.ri = prman.Ri()
 
string assignment.filename = outputFilename + ".rib"