Maya Training

Creating characters In Maya and Zbrush

Maya Training

Creating character renders in Maya 2017 and Arnold

Maya Training

Spach-Alspaugh House the complete courseware
You are here > Home > SimplyMaya Community Forums

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 03-12-2010, 11:42 AM   #1
happymat27's Avatar
Join Date: Jul 2004
Posts: 1,257
Thanks: 0
Thanked 3 Times in 3 Posts
Default MEL headache!!


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.


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?


Click here to visit my site
happymat27 is offline   Reply With Quote
Old 03-12-2010, 04:41 PM   #2
kbrown's Avatar
Join Date: Sep 2002
Location: London, UK
Posts: 3,198
Thanks: 0
Thanked 8 Times in 8 Posts

You are essentially just doubling the X value so a simple for loop should do. Something like this

int $i;
float $x = 0.005;
for($i = 0; $i < $numberOfCVs; $i++)
	$x *= 2;
	// Do whatever needs to be done
- My Website

Do a lot, Fail a lot and Learn a lot!
kbrown is offline   Reply With Quote

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

Thread Tools

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-2017 SimplyMaya - vBulletin® Copyright © 2000-2017, Jelsoft Enterprises Ltd.