Maya Training

Introduction to Hard Surface Modeling

Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

Maya Training

Shading, Lighting and Rendering the Bedroom in MR

Maya Training

Robot volume one - Modeling with animation in mind

Maya Training

Spach-Alspaugh House the complete courseware

Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums
Loading

Welcome to Simply Maya

Please Sign in or Sign up for an account

Member Login

Lost your password?

Not a member yet? Sign Up!

Old 21-06-2006, 07:54 PM   #1
mike_bonifacio
Registered User
 
Join Date: Mar 2005
Location: New York
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Post question on expressions

when i try to write an expression in maya, i keep getting an error

attributes must be of float, integer, or boolean types filmTranslate.

film translate in what im trying to do the expression on.

any ideas or websites i can go for help?
thanks
mike_bonifacio is offline   Reply With Quote
Old 21-06-2006, 08:27 PM   #2
skywola
Registered User
 
skywola's Avatar
 
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Your question is unclear, what are you trying to do, and could you post the part of the code that is giving you the message . . .
__________________
"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
skywola is offline   Reply With Quote
Old 21-06-2006, 08:40 PM   #3
mike_bonifacio
Registered User
 
Join Date: Mar 2005
Location: New York
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

im taking a box, and using it to drive the film translate attribute in a camera


zoom_camShape.filmTranslate = pan640x480.translateX;

the box is named pan640x480.

basically, when i move the box, teh film translate attribute will change and my focus on what im looking at will change.
i need to do it to the x and y coordinates.

i'll tell you right now, i have about a week of experience with expressions. the other half of this project i figured out myself. but i don't know much of the language for what i want or can do.

i had an "if" statement earlier but it didn't help, and i got the same error message.

thanks
mike_bonifacio is offline   Reply With Quote
Old 21-06-2006, 09:47 PM   #4
skywola
Registered User
 
skywola's Avatar
 
Join Date: Jan 2004
Location: Tempe, Arizona, USA
Posts: 224
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Best I can tell, by looking at the Maya help file, (always useful when you hit a brick wall) :headbang: is that the filmTranslate attribute is looking for TWO numbers . . .

From Help file :

filmTranslate (ct) double2 0.0, 0.0
Post projection translation component. Translate the film back by the given values.
The values are normalized with respect to viewing area.

filmTranslateH (fth) double 0.0
Translate in horizontal direction.

filmTranslateV (ftv) double 0.0
Translate in vertical direction.

So evidently it needs you to either supply it with two numbers,
and I'm not so sure how to do that without a little more research that I am to lazy to do, or break it down to :

zoom_camShape.filmTranslateH = pan640x480.translateX;
zoom_camShape.filmTranslateV = pan640x480.translateY;
__________________
"The Sage as an Astronomer: If you still see the stars as something above you, you lack the eye of knowledge." Friedrich Nietzsche
skywola is offline   Reply With Quote

A little bit about who we are
Links you might find useful
Catch up with SimplyMaya
SimplyMaya specialises in Maya tutorials. We offer over 1,000 individual Maya training videos, ranging from basic Maya tutorials through to intermediate Maya tutorials. Our tutorials are created by instructors with industry experience and are designed to get you up and running in Maya quickly without making it seem like hard work.

Copyright © 1999-2015 SimplyMaya - vBulletin® Copyright © 2000-2015, Jelsoft Enterprises Ltd.