SimplyMaya Forums

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

 Simply Maya User Community / Animation / Mel Scripts & Programming / MEL headache!!
 User Name Remember Me? Password
 Register FAQ Calendar Mark Forums Read

 03-12-2010, 11:42 AM #1 happymat27 Subscriber     Join Date: Jul 2004 Posts: 1,257 MEL headache!! Hi, it's been an age since I've posted up here but I need a little help with MEL and I figured that this would be the place to ask. So... Imagine a curve with an unknown number of CV's, I have made a script to count the CV's and attach a cluster to each one. I now need to distribute the clusters along the X axis using 0.005 as a base and the sequence 1,2,4,8,16,32,64....etc as the multiplier. So the first cluster would be at 0.005, the second at 0.010, the third at 0.020, the fourth at 0.040 and so on. has anyone got an idea how I could achieve this with MEL? Cheers, Mat __________________ Click here to visit my site
 03-12-2010, 04:41 PM #2 kbrown Moderator     Join Date: Sep 2002 Location: London, UK Posts: 3,198 You are essentially just doubling the X value so a simple for loop should do. Something like this Code: ```int \$i; float \$x = 0.005; for(\$i = 0; \$i < \$numberOfCVs; \$i++) { \$x *= 2; // Do whatever needs to be done }``` __________________ Kari - My Website - My IMDB Do a lot, Fail a lot and Learn a lot!

 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 BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post happymat27 Members Lounge 5 05-12-2010 09:43 AM

\$34

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

\$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.

\$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.