Help with MEL (noobhere)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi! I'm basically new to MEL scripting. I'm trying to figure out how to connect the intslidergrp to my variables as an adjuster. No idea what I'm doing or what I've done wrong, the lecturer just told us to make an UI script and now I'm here. Any help would really be appreciated! Here's my script.
global proc cubeconeUI ()
{window;
columnLayout;
intSliderGrp $count -label "Slide Me" -int field true;-fieldMinValue -50 -fieldMaxValue 50 -minValue -10 -maxValue 10 -value 0;
intSliderGrp $distance -label "Limits" -int field true -fieldMinValue -50 -fieldMaxValue 50 -minValue -10 -maxValue 10 -value 0;
button -label "Create" -c ("cubecone") -w 70;
showWindow;
}
proc cubecone (int $count,int $distance)
{
string $groupList[0];
for ($i = 0; $i < $count; $i++)
{
string $cube[] = `polyCube -w 1 -h 1 -d 1 -sx 1 -sy 1 -sz 1 -ax 0 1 0 -cuv 4 -ch 1`;
xform -t 0 1.047089 0 -s 1.80978 1.80978 1.80978 $cube[0];
string $cone[] = `polyCone -r 1 -h 2 -sx 20 -sy 1 -sz 0 -ax 0 1 0 -rcp 0 -cuv 3 -ch 1`;
move -r 0 3.129135 0 $cone[0] ;
select -r $cube[0] $cone[0];
string $groupName = `group`;
xform -t 0 ($distance*$i) 0 -ro 0 (30*$i) 0;;
}
}