SimplyMaya Forums

Welcome to the forum, feel free to ask questions here.

Home / forum / Animation / Mel Scripts & Programming / rotation expression troubles
Register FAQ Members List Calendar Mark Forums Read

New Thread
 
Thread Tools
Old 26-10-2007, 08:01 PM   #1
bendingiscool
Subscriber
 
bendingiscool's Avatar
 
Join Date: Jul 2006
Location: London
Posts: 567
Thanks: 0
Thanked 1 Time in 1 Post
Default rotation expression troubles

Hi,
I'm trying to create an expression to make my instanced objects (simple disc shapes) rotate randomly as they fall. I have added a general PP attribute, but when I try this expression:

particleShape1.rotPP = rand (0,360);

I get an error saying :

Warning: Expression Editor: no particle object is selected.

This means that I can't go on to connect the rotation expression to the rotation of the disc shapes.

Any clues on what I have done wrong?

(I am following a falling leaves tutorial, but simply changed there instanced geometry to mine for a project I am working on).

Any help very much welcome, Cheers in advance.

Chris
bendingiscool is offline   Reply With Quote
Old 26-10-2007, 10:18 PM   #2
BadG3r
Subscriber
 
BadG3r's Avatar
 
Join Date: Jan 2007
Location: Frankfurt
Posts: 216
Thanks: 0
Thanked 0 Times in 0 Posts
Default

create a attr. since rotation is a vector u have to write something like this:

particleShape1.rotCustom = <<0,rand(0,360),0>>

ok. now go to the instancer tab and check allow all data types and under rotation chose, in this case to match the naming above, rotCustom.

now it depends what u wanna do where u write the expr in. creation or runtime.
BadG3r is offline   Reply With Quote
New Thread

« Previous Thread | Next Thread »

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

1 Month

$34

Month-to-month billing
$34/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
 
 

3 months

$87

Billing every 3 months
$29/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $5 per month or $15 in total compared to monthly billing with this package.

12 months

$288

Billing every 12 months
$24/month
Unlimited access to all videos
Project files to download
Easy to cancel at anytime
Save $10 per month or $120 in total compared to monthly billing with this package.

Your plan will automatically renew. You can cancel at any time via your PayPal account to avoid being charged again.

You can view the FAQ on our video plans here. You can contact us directly here. By clicking one of the buttons above, you agree to our Terms and Privacy Policy.