Maya for 3D Printing - Rapid Prototyping
In this course we're going to look at something a little different, creating technically accurate 3D printed parts.
# 1 14-04-2003 , 09:43 PM
Registered User
Join Date: Jun 2002
Location: Scotland
Posts: 129

expression help

im getting a syntax error with this code and cant find the problem, can someone see if they can spot the error.

vector $pos = particleExplosionShape.position;
if (0.05*$pos.z > 1.0)
particleExplosionShape.radiusPP = 0.05*$pos.z;
float $DTOR = 0.01745
if ((particleExplosionShape.lifespanPP ñ particleExplosionShape.age ) < 1.5)
{
float $theta = 5.0*$DTOR;
vector $vel = particleExplosionShape.velocity;
vector $tmp = <<$vel.x,$vel.y,$vel.z-0.001>>;
vector $axis = cross($vel,$tmp);
vector $new = rot($vel,$axis,$theta);
particleExplosionShape.velocity = $new;
}

# 2 15-04-2003 , 01:36 AM
David's Avatar
SM Tea Boy
Join Date: Apr 2002
Location: Prague
Posts: 3,228
Never having used mel b4 this is a wild stab in the dark but there is no { } block defined after your first if statement?

should it read

if (0.05*$pos.z > 1.0)
{
particleExplosionShape.radiusPP = 0.05*$pos.z;
float $DTOR = 0.01745
}


From a readers' Q and A column in TV GUIDE: "If we get involved in a nuclear war, would the electromagnetic pulses from exploding bombs damage my videotapes?"
# 3 15-04-2003 , 02:02 AM
dannyngan's Avatar
Registered User
Join Date: Dec 2002
Location: Seattle, WA
Posts: 1,154
You're missing a semicolon here:

float $DTOR = 0.01745; // semicolon here


Danny Ngan
Animator | Amaze Entertainment
my website | my blog | my job
# 4 15-04-2003 , 02:23 AM
David's Avatar
SM Tea Boy
Join Date: Apr 2002
Location: Prague
Posts: 3,228
Ahhh should have seen that.

David user added image


From a readers' Q and A column in TV GUIDE: "If we get involved in a nuclear war, would the electromagnetic pulses from exploding bombs damage my videotapes?"
# 5 15-04-2003 , 03:39 AM
twisteddragon33's Avatar
Registered User
Join Date: Apr 2003
Location: New York, USA
Posts: 1,945
whats sad is i figured it out and dont even know what your doinguser added image

of course i know a bit of programming...


________________________
AIM: SublimeDragon33
Catch me if i'm on. Always up for a chat.
e-mail: sublimedragon33@gmail.com
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads