Showing posts with label announcements. Show all posts
Showing posts with label announcements. Show all posts

Wednesday, July 8, 2009

Assignment 04

This final assignment should be a collection of all the topics from the last assignments. You should try to create a system starting from the point going all the way up to the surface, and finishing it by making modification on this surface's components.

You should to this both by creating a polygonal and a nurbs surface, as the final component modifications will depend on the type of object you have in the end.

Here are a few guidelines:

  • You should produce new work, and not simply copy from the past assignments or from material given in class
  • Start by writing down the logic by which your script will work to produce the final result you want to achieve. This should be done in plain English, just like your pseudo-code in the beginning of the course
  • Create functions for each of the steps, using both arguments and return values, so that one function depends on the results of the last to work
  • Document each step by doing renderings or screenshots, and also by intensively commenting your script
  • Post both final results (polygonal and nurbs surface) along with corresponding scripts and images

You can do the work in groups of two if you want, but keep in mind that double the quality of work is expected from two thinking heads working together!

This assignment, along with any other missing assignment you migh have, should be delivered by Sunday (12.07)

w08 - recap and script

As we saw last class, this semester we studied the following topics:

a. Basics of scripting
    i. Variables
    ii. Lists
    iii. Loops
    iv. Conditional statements
    v. Functions
b. Object manipulation in maya
    i. Points
        1. How to represent a point
        2. How to plot points in space
    ii. Curves
        1. How to get points coordinates and use them to draw a curve
        2. Using mathematical functions to generate curves
    iii. Surfaces
        1. How to use curves to generate surfaces
        2. Primitive surfaces in Maya
        3. Types of surfaces
            a. Polygonal surfaces
            b. Nurbs surfaces
            c. Subdivisions
        4. Object components
            a. Polygons
                i. Vertices
                ii. Faces
                iii. Edges
            b. Nurbs
                i. Control vertices
                ii. Isoparms
                iii. Surface points
        5. Volumes
            a. Primitives

In our last class we saw the last function for the semester, which showed you how to determine point on a nurbs surface and how to use the normals to orient the placement of objects on them. Here is the whole function, with some modifications to increase flexibility:

####################
## GSI
## w08
####################

import maya.cmds as cmds

def createCellsNormalToSurface(whatCell, numU, numV, size):
#determine the scale of the objects
scale = (size/100.)*.5
#get selected objects
objs = cmds.ls(sl=1)
#check if you do have selected objects on stage
if (len(objs) == 0):
#in case you dont, stop the function execution
print "You need to select at least one surface!"
return

#if you have selected surfaces,
#apply the objects on each one of the
for mySurface in objs:
for i in range(numU):
myu = i/float(numU)
for j in range(numV):
myv = j/float(numV)
#get the coordinates and the normal on the current uv parameter
myCoord = cmds.pointOnSurface(mySurface, top=1, u=myu, v=myv, p=1)
myNorm = cmds.pointOnSurface(mySurface, top=1, normalizedNormal=1, u=myu, v=myv)
#then according to the type of object you want place it
if (whatCell == "Cylinder"):
myCell = cmds.cylinder(p=myCoord,ax=myNorm, r=scale, hr=scale)
elif (whatCell == "Plane"):
myCell = cmds.nurbsPlane(p=myCoord, ax=myNorm, w=scale, lr=scale)
elif (whatCell == "Cone"):
myCell = cmds.cone(p=myCoord, ax=myNorm, r=scale, s=20, hr=scale)

else:
print "You need to specify Cylinder, Plane or Cone!

##call the function
createCellsNormalToSurface("Cylinder", 30, 15, 200)

Wednesday, July 1, 2009

Assignment 03B

Redo the assignment 03A by making all those transformations based on a single or multiple locators.

You can do that by either using the distance, direction, relative rotation, etc,  to the locator, which will in turn define the amount of the transformation you applied. You'll need to use the vector functions we defined last class.

This assignment should be delivered by 05.07, the day before our last class.

w07 - recap and scripts

On our 7th class, we looked into some vector math to help us with certain calculations in Maya. We then developed the following functions:

#######
##
## VECTOR FUNCTIONS
##

import maya.cmds as cmds
import math

#find the magnitude (length) of a vector
def magnitude(v):
#v is a list of x,y,z values
x = v[0]
y = v[1]
z = v[2]
m = math.sqrt( (x*x) + (y*y) + (z*z) )

return m

#find the distance between two points
#by getting the vector between the points and
#getting its magnitude
def distance(p1, p2):
#subtract both vectors
x1 = p1[0]
y1 = p1[1]
z1 = p1[2]
x2 = p2[0]
y2 = p2[1]
z2 = p2[2]
x = x1 - x2
y = y1 - y2
z = z1 - z2
m = magnitude([x,y,z])
return m

#find the unit vector of a given vector
def unit(v):
"returns unit vector of v"
#firt get magnitude
m = magnitude(v)
x = v[0]
y = v[1]
z = v[2]
#divide each element by magnitude
x = x/m
y = y/m
z = z/m
vu = [x,y,z]
return vu

#find the new position of an object which
#it supposed to move a certain amount in the
#direction of a vector (which should be a unit vector)
def move(v, amount):
"Move by certain amount in direction v"
x = v[0]
y = v[1]
z = v[2]
x = x + amount
y = y + amount
z = z + amount
newP = [x,y,z]
return newP

#find the vector between two given points
def vectorBetweenPoints(p1, p2):
"Returns vector between p1 and p2"
#subtract both vectors
x1 = p1[0]
y1 = p1[1]
z1 = p1[2]
x2 = p2[0]
y2 = p2[1]
z2 = p2[2]
x = x1 - x2
y = y1 - y2
z = z1 - z2
newV = [x,y,z]
return newV

We then used a bit of this content to extrude the faces of a certain polygonal object according to its distance to a certain locator, by using the function below:
def extrudeToLocator():
"Extrude based on distance to a certain locator"
#get selected poly
#get selected locator
#get faces of poly
#loop through faces
# find center
# get distance from center to locator
# extrude based on distance
selPoly = cmds.filterExpand(sm=12)
selLoc = cmds.filterExpand(sm=22)

selPoly = selPoly[0]

allFaces = cmds.ls(selPoly + ".f[:]", fl=1)
#loop
for face in allFaces:
vertex = cmds.polyListComponentConversion( face, fromFace=1, toVertex=1 )
vertex = cmds.ls(vertex, fl=1)
#find the center of the face
xs = 0
ys = 0
zs = 0
#loop through vertices
for v in vertex:
pos = cmds.pointPosition(v)
x = pos[0]
y = pos[1]
z = pos[2]
xs = xs + x
ys = ys + y
zs = zs + z
centerX = xs/len(vertex)
centerY = ys/len(vertex)
centerZ = zs/len(vertex)
#check by placing a locator
cmds.spaceLocator(p=(centerX, centerY, centerZ))

#find distance to locator
posLoc = cmds.pointPosition(selLoc)
d = distance([centerX, centerY, centerZ], posLoc)
print d

#extrude based on distance
cmds.polyExtrudeFacet( face, ltz=d)

Tuesday, June 16, 2009

Assignment 03A

For this assignment, you should mainly work with components of objects in Maya (cvs, edges, faces, vertices). You should try and create a function definition for each one of the exercises, making them flexible by passing arguments and using if/else statements in your code.

  1. Curve CVs: function to randomly move all control vertices of a curve. As arguments in your function, you should pass the minimum and maximum values for the random movement
  2. Nurbs Surfaces CVs: function to randomly move all control vertices of a nurbs surface. As arguments in your function, you should pass the minimum and maximum values for the random movement, as well as the axis in which you want to randomly move the CVs (x, y or z)
  3. Faces of a polygon: function for randomly extrude all faces of a polygonal surface. As arguments in your function, you should pass the minimum and maximum values for the random extrusion
  4. Polygon Vertices: function to randomly move all vertices of a polygonal surface. As arguments in your function, you should pass the minimum and maximum values for the random movement, as well as the axis in which you want to randomly move the vertices (x, y or z)
  5. Add an if statement to the above functions to jump every n element (you choose the number). If you want, you can also change the operation being performed (for example, use poke face instead of extrude face, or extrude vertex instead of move vertex). Check the Python Command Reference in the Help menu to look for other operations that could be used with the desired component.

All the above is repetition of everything we saw in class and that you have been producing the past weeks.

Please, post your results (scripts along with screenshots) on the blog by 21.06, around midday.

w06 - recap and scripts

Yesterday we tried to do a kind of workshop in class. It was good, but a bit slower than I imagined. We started by seeing how to access all cvs of curves and nurbs surfaces, and all faces, vertices and edges of polygonal surfaces, and how to start a loop to make modifications with them.

## how to get all CVs of a curve
## this will result in a list containing all the names of the curve CVs
allCVs = cmds.ls("nameOfCurve.cv[:]", fl=1)

## you can also use the same code for a selected curve on stage
## which would make more sense for the flexibility of your script

# this will return you the name of all nurbs curves selected on stage
curve = cmds.filterExpand(sm=9)

#this will return you the names of all CVs from the first selected curve
#or of the only curve in case there is only one
allCVs = cmds.ls(curve[0] + ".cv[:]", fl=1)

## the same can be done with any selected nurbs surface
srf = cmds.filterExpand(sm=10)
allCVs = cmds.ls(srf[0] + ".cv[:][:]", fl=1)

## and with polygons
poly = cmds.filterExpand(sm=12)
# all faces:
allFaces = cmds.ls(poly[0] + ".f[:]", fl=1)
# all vertices:
allVertices = cmds.ls(poly[0] + ".vtx[:]", fl=1)
# all edges:
allEdges = cmds.ls(poly[0] + ".e[:]", fl=1)

## Then, if you want to make modifications on each one
## of those elements, you have to start a loop through the list.

#In the case of all cvs of a curve, for example:
for cv in allCVs:
#here come the code you want to perform with each cv
print cv

# or with faces of a polygon.
for face in allFaces:
#do something...

# keep in mind that the words cv or face in the line above
# are simply names of variables which you define, and which
# represent the cv or face at each iteration of the loop

## another way to do a loop, would be:
numCVs = len(allCVs) #this will return you the amount of elements you have in allCVs list
for i in range(numCVs):
print i #this will iterate through numbers
cv = allCVs[i] #like this you get the name of the CV
#and here you can put your code to make transformations with each cv



## One thing you can do in a loop is to jump in certain steps
## like for example, only perform action every 5th element, for example
## you do that by using the % operator and an if statement
for i in range(numCVs):
if i % 5 == 0:
#whatever is indented here will oly be executed everytime
#the above if statement is equal to true
print i

Wednesday, June 10, 2009

Week 05 - script pt01

Here is the what we saw last class:


def tubulize( path, radius, tubeSections=8):
"Function to create tubes out of a curve"
#position on end of curve where i will put the circle profile
pos = cmds.pointOnCurve( path, position=1, pr=0.001, top=1)
#get tangent of this point
tan = cmds.pointOnCurve( path, tangent=1, pr=0.001, top=1)

#create the profile circle
profile = cmds.circle( c=pos, r=radius, normal=tan, s=tubeSections, ch=1 )
#center the circle pivot
cmds.xform( cp=1 )

#extrude the circle along the path
tube = cmds.extrude( profile[0], path, ucp=1, upn=1, et=2, rb=1, dl=3, ch=1, n="spiralTube")

#return values
return [tube[0], radius, profile]

The first function we wrote, used to create pipes on any curve, defining its radius. Also here, we saw what are and how to use optional function arguments, in this case, the
tubeSections
argument.

def crvMoveRandom( curve, minimum, maximum ):
"This function gets all CVs of a curve and move them"
#get all cvs of curve.
allCVs = "%s.cv[:] " % curve
print allCVs
cvs = cmds.ls( allCVs, fl=1 )
print cvs
#loop through cvs
for cv in cvs:
rx = random.uniform(minimum, maximum)
ry = random.uniform(minimum, maximum)
rz = random.uniform(minimum, maximum)
cmds.move( rx, ry, rz, cv, r=1 )

return cvs

On this function we learned a way to easily access all the control vertices (CVs) of a nurbs curve. By using the
cmds.ls
command along with the
fl
flag, you end up having a list with names of all cvs, through which you can later iterate and make whatever modifications you'd like.
We also saw that if we have a curve on which we aplpied the
tubulize()
function, the tube will automatically update when we make transformations on the curve. This happens due to Maya's construction history.

def animateCurve( curve, time ):
fps = 24
#start a loop through time
for i in range( time ):
#first go forward in time
cmds.currentTime( i * fps )
#then make transformations
cvs = crvMoveRandom(curve, -10, 10)
#set keyframe
cmds.setKeyframe(cvs)

The final function was just a quick example of what we could do with the construction history turned on, along with some animation commands. By setting keyframes on each modification, Maya automatically interpolates the frames in between returning you a smooth animation.

Week 05 - recap

Yesterday we saw how to identify and correct some common scripting mistakes. We saw that the output panel from the script editor in Maya always tells us exactly what is wrong with our script and where the mistake is located.

We also tried to go into surface manipulation techniques, which unfortunately wasn't completed as expected. You were supposed to have seen how to access and manupilate nurbs CVs, polygons vertices, faces and edges. But we ended up only seeing how to use construction history to manipulate surfaces my modifying their generating curves.

Monday, June 8, 2009

Week 05 - file to download

In our next class (08.06), we will start by learning how to detect, identify, and correct common scripting mistakes. For that you should download this Python script and save it in your script folder.

We will also take a look on how can we access sub-elements (vertices, faces, edges, control vertices, etc) of polygonal and Nurbs surfaces and apply transformations to them.

Assignment 02B

As discussed in class on 25.05, the Assignment 2B is a simple exercise coming from the previous assignment.

Now that you created series of curves with variations (by using functions and arguments) go one step further and from these curves generate surfaces.

You can use one of the several surface generation commands in Maya, but always using commands which depend on curves to work - loft, revolve, planar, boundary, birail, extrude, etc.

You should create a few variations, and post on the blog along with your code and screenshots. Don't forget to explain a bit what you were trying to do as well!

As I had a problem to post this before, the deadline for this assignment is 14.06 by noon.

Wednesday, May 20, 2009

For next class

As I told you last class, you should have an external script editor installed in your computer. Here is a list of nice editors, just choose one:

If you don't like any of those, feel free to chose any other you desire. Just be sure it has Python syntax highlighting.

It would be great if you could setup your computer to make it able work with external scripts. Here is a step-by-step tutorial on how to do that.

Tuesday, May 19, 2009

Assignment 02A

For this assignment you should do two things:

  1. Take the code you developed for the assignment 01A and use it not to plot points, but to generate a curve
  2. Convert this code into a function with arguments and return value, and use it in a loop to generate several different instances of your curve

Like usual, you should post the script along with screenshots. Don’t forget to comment all your code!

Delivery limit: 24.05 by noon.

w03 code: from points to curves

First we saw how to store the points coordinates generated in a loop into an empty list , and then use this list to generate a curve:

import maya.cmds as cmds

#generating a straight line with even spacing between points
#define initial variables
numPoints = 20.0 #we use floats instead of integers so that the division below works properly
lineLength = 30.0
spacing = lineLength/numPoints #spacing between points


#create an empty list to store my points
#it is empty and will be "populated" in the following loop
points = []

#loop and get point coordinates
for i in range(0, numPoints, 1): #(start, end, increment)
#define x y and z variables
x = spacing*i #this will vary in each loop
y = 0
z = 0
#put all these variables in a list
myPoint = (x,y,z)

print "point ", i, myPoint #shows in the output window the point coordinates which were generated above (just for your feedback)

#append the point to the list (add it to the end of the list)
points.append(myPoint)


print "points list = ", points #for your feedback

#after the loop, I have all points in my "points" list
#now I can use the curve command to create my curve
#by using the points in "points"
cmds.curve(d=1, p=points) #creates a curve of degree 1 > linear curve
cmds.curve(d=3, p=points) #creates a curve of degree 3 > "curved" curve


Then we looked at some functions to make operations on list objects:



#some list functions
#first we create a new list
myList = ["Dessau", "Germany", "europe"]
print myList

#add element to list
myList.append("world")
print myList

#remove element from list
myList.remove("world")
print myList

#insert element in a specified place (specified by the index value)
myList.insert(1, "DIA")
print myList

#remove the last element
myList.pop()
print myList

#sort the elements of the list alphabetically
myList.sort()
print myList


Then we looked quickly at another function to gather point coordinated and generate a curve, which in this case resembles a helix:



#import all functions of the math module
#we will use the function sin() and cos()
from math import *

#define initial variables
numPoints = 60
amplitude = 2

# create an empty list to store the points
points = [ ]

#loop and gather point information
for i in range( 1, numPoints, 1) :
#function for the spiral curve
x = sin( i ) * amplitude
y = cos( i ) * amplitude
z = i / 10
myPoint = (x,y,z)
#store the point in the list
points.append(myPoint)

#create the curve
cmds.curve( d = 3, p = points ) #degree 3


The we started to look at functions. We saw some simple examples of functions with and without arguments, and how to define and call them:



#FUNCTIONS - INTRO

#first we need to define the function
def myFunction( ):
print "Hello world!"

#the code above doesn't do anything apparently
#but it stores the function definition on memory and
#you can use it by calling the function:
myFunction()

#you'll see the command indented under the function
#be executed and printing the text we wrote

#functions get more interesting when we start
#to add arguments to it:

def printMessage( msg ):
print msg

#the definition above means that this function
#takes as an argument the variable "msg"
#and inside the function we use this argument and print it

#to call this function you have to pass the argument in the function call:
printMessage( "this is my message" )

#you can also pass a pre-defined variable as the argument
#and python will do all the replacing and printing the same way:
a = "Another message"
printMessage( a )


Finally, we took the helix code and converted it into a function:



#converting the helix code into a function
#first import the math module if you still did not do so
from math import *

#then start the function definition
def curves( numPoints, amplitude ):
#it takes as an argument the value of the amplitude of the curve
#and the number of points we want in the curve

#then we just repeat the code of the helix
# create an empty list to store the points
points = [ ]

#loop and gather point information
for i in range( 1, numPoints, 1) :
#function for the spiral curve
x = sin( i ) * amplitude
y = cos( i ) * amplitude
z = i / 10
myPoint = (x,y,z)
#store the point in the list
points.append(myPoint)

#now as we saw, every command in Maya returns me a value
#you can see which values each function returns,
#take a look at Help > Python Command Reference
#and we can store this value in a variable to use it later:
myCurve = cmds.curve( d = 3, p = points ) #degree 3

#also in our own functions we can return values
#in this case, we will return the name of the curve created above
return myCurve


In the end, we saw how to use our new function to generate several curves on the fly. By using the arguments, we can vary each curve, and by using the return value, we can make modifications on the curve after its creation:



#function call in a loop
#first we define how many curves we want
numCurves = 10

#then run the loop
for i in range(0, numCurves, 1):
#then inside the loop we call the function
#and store its return value in the variable crv
crv = curves(60, i ) #arguments (numPoints, amplitude)

#as we stored the return value (in our case, name of the curve)
#in the variable crv, we can later use it to
#do anything we want with the curve
#in this case, we'll move it along the x-axis:
cmds.move(i*10, 0, 0, crv)

Week 03 - recap

Yesterday in our third class we saw how to move from point generation to curves. We reused the code from last class and captured the point coordinates and instead of plotting points, we learned how to use them to generate curves.

Also, we learned about functions and their importance in scripting. We converted previous code into a function to see how it allows us to have more flexibility in our scripts.

Friday, May 15, 2009

Assignment 01B

You should try to plot points in different ways. Here are some guidelines:

Most important: use your imagination. And if you get stuck, try to delineate the logic behind your idea (remember the pseudo-code exercise) to try and make it clearer.

Also important: don’t forget to comment each line in your code (by using #, as we saw last class).

Post your results along with screenshots on the blog.

Thursday, May 14, 2009

w02 – Plotting point in space

We can’t forget to always write in the beginning of our script:

import maya.cmds as cmds

We then saw how to create a variable to define the coordinates x,y,z of a point, and then use it to create a locator on that position.

# points x,y,z
myPoint = (0,0,0)
cmds.spaceLocator() #this will create a locator in the default position (0,0,0)
cmds.spaceLocator(p=myPoint) #this will create a locator on the position define in myPoint
# change the point values
myPoint = (10,2,0) # keep z=0 to work in 2D only
cmds.spaceLocator(p=myPoint)

Next step was to create several points at once by using loops.

#how to create lots of points
#LOOPS

numPoints = 10 #define the number of desired points

for i in range(0, numPoints, 1):
cmds.spaceLocator()

#the loop above created 10 locator, but all of them on the default position
# I can place the locators in a variable position
# if I use the i variable as one of the position values
for i in range(0, numPoints, 1):
myPoint = (i,0,0)
cmds.spaceLocator(p=myPoint)

#other examples:
for i in range(0, numPoints, 1):
myPoint = (i,i,0)
cmds.spaceLocator(p=myPoint)

for i in range(0, numPoints, 1):
myPoint = (i*10,i+5,0)
cmds.spaceLocator(p=myPoint)

Then we used random functions to generate x,y values. For that, we first need to import the random module as we did for the maya.cmds module.

# import all the functions from the random module
from random import *

numPoints = 20
for i in range(0,numPoints,1):
x = randint(0,10) #this generates a random integer between 0 and 10
y = randint(0,10)
z = 0
myPoint = (x,y,z)
cmds.spaceLocator(p=myPoint)

Then we saw an example of how to plot points in a straight lines with evenly spaced distances:

# how to plot points in a line of a certain length
numPoints = 20
lineLength = 30
#divide to get the space between the points
spaces = lineLength/numPoints
for i in range(0, numPoints, 1):
x = spaces*i
y = 0
z = 0
myPoint = (x,y,z)
cmds.spaceLocator(p=myPoint)

We then saw how to create grids of points with rows and columns, by using nested loops.

## how to create grids of points > rows and columns
## NESTED LOOPS!

numRows = 10
numColumns = 10
for i in range(0, numRows, 1):
x = i
print "row ", i
for j in range(0, numColumns, 1):
print "column ", j
y = j
z = 0
myPoint = (x,y,z)
cmds.spaceLocator(p=myPoint)

Finally, we started to use mathematical functions to plot points, such as the sine and cosine functions. Again, we need to import the math module in order to be able to use mathematical functions in Python. 
#how to use mathematical function to plot the points!
#sine function
from math import *

numPoints = 30
for i in range(0, numPoints, 1):
x = sin(i)
y = i
z = 0
myPoint = (x,y,z)
cmds.spaceLocator(p=myPoint)

#add amplitude

numPoints = 60
amplitude = 2
for i in range(0, numPoints, 1):
x = sin(i)*amplitude
y = i
z = 0
myPoint = (x,y,z)
cmds.spaceLocator(p=myPoint)

### spiral
numPoints = 60
amplitude = 2
for i in range(0, numPoints, 1):
x = sin(i)/i*amplitude
y = cos(i)/i*amplitude
z = 0
cmds.spaceLocator()
cmds.scale(.1,.1,.1)
cmds.move(x,y,z)

Week 02 - recap

Last Monday we took a quick look at the Maya interface and learned how to start scripting with Python. We learned the difference between Python/MEL, and how to use the script editor window to input Python code in Maya.

We also saw different ways to get help on a particular command (quick help and command reference), and how to convert a MEL command from the output window into Python.

In the end, we saw how to use variables, loops, Math functions and Random functions to plot points (locators) on stage.

Friday, April 24, 2009

Calendar

I created a Google Calendar for the course. As you can see, for the next two Mondays we won't have any classes. But that will mean that when everybody is back we will have extra Scripting classes, at least in the first 1 or 2 weeks.

You can check the calendar on this blog's sidebar, or go to the calendar address to see it in its entirety.

Tuesday, April 21, 2009

Assignment 01A - Pseudo-Code

In the first part of the first assignment, you should write a small, but detailed, pseudo-code, just as the tea example I gave you last class.

First write the human instructions, then "translate it" to a format a computer could possibly understand. You should pick something simple and ordinary, such as "boiling an egg", or "walking around the block".

Here is, again, the "making tea" example. For humans, we would simply write:
boil the water
put it in a cup
put a teabag in the water
add sugar if you want

But for a computer, these simple four statements would need much more thorough instructions:
function boilWater:
with waterBoiler
fill with coldWater
if waterBoiler = full:
stop fill
turn waterBoiler.switch to „on“
when waterBoiler.switch = „off“:
execute function fillCup

function fillCup:
get cup
place cup right to waterBoiler
with waterBoiler:
move 20cm up
turn -90°
if cup = „full“
with waterBoiler:
turn 90°
move 20cm down
execute function makeTea

function makeTea:
desiredSugar = 2
desiredTime = 3min

get teaBag
with teaBag:
place inside cup

start counting time
if time = 3min:
put teaBag in initial position

if desiredSugar > 0:
execute function putSugar
else:
finish

And it would go on and on. We would also need to specify what those objects are (waterBoiler, teaBag...).

When you are writing your pseudo-code, keep in mind the following overall rules:
  • Be aware if indenting: Python relies heavily on indenting to structure and process the code. It also helps make the code more organized, by nesting actions.
  • Think about all data you need to pass the computer and, most important, how and when it should use this data
You should post here your pseudo codes in the blog, along this week until Saturday, 25.04, so we can have it for next class.

In order to post your pseudo-code formatted as above, you can follow this tip.

Week 1 - 20.04

Yesterday we had our first class of the semester. Or at least we tried to: it was a pity I couldn't contact you before hand and tell you to have Maya installed in your computers for the first class, like we did last semester.

But I hope you were able to understand a bit what is Scripting about and how you can use it in Maya.

For the next class, as requested, you should all have Maya 8.5 or greater (it goes up to Maya 2009, already) installed in your laptops. Also, read the posts below for info about the required setting up process so you can smoothly start scripting.

Also, you should read the small introduction about variables I wrote for the class last semester, which repeats what I said yesterday about the subject.