Thread: trying to learn
View Single Post
# 4 24-02-2004 , 06:52 PM
Alan's Avatar
Moderator
Join Date: Oct 2002
Location: London, UK
Posts: 2,800
From what I can see you need to add another function to reset the values e.g.

global proc reset()
{
setAttr $xOffset.horizontalFilmOffset 0;
setAttr $yOffset.verticalFilmOffset 0;
}

The only problem you will have is that $xOffset and $yOffset arent visible to this function as they are declared "in scope". So I would declare them as global or outside of that scope (or you will have to pass them in as params). That way it will work. I would also save off the users initial settings into variables and give them the option of restoring them rather than going back to 0.

One thing I should point out is that your variable names for the camera re really bad. I wouldn't bother with $xOffset and $yOffset (or at least change their names cause they are confusing user added image)

Hope this helps a bit.

Alan


Technical Director - Framestore

Currently working on: Your Highness

IMDB