PDA

View Full Version : mel script question --- on checkboxes


a3dmonkey
11-05-2002, 09:35 PM
I'm working on a script to create a twisting muscle. In this script I'm obtaining the number of section in a nurbs object and using that to dynamicly create a window with checkBoxes so that the number of Isoparms to be used in creating control wires for the muscle can be selected by the user.

I've gotten to the point in my script where I'm creating the window with checkBoxes with the following code


int $i = 0;

//for ( $i=0 ; $i < $sections ; $i++)
// {
string $tempISO = "Isoparm" + $i ;

checkBox -l $tempISO
-cc "select -tgl ( $objECT + ".v[" + $i +"]");";


// }


$sections - is and int and the number of sections in the nurbs object.

$tempISO - is a string that I'm using as the name of my checkBoxes.

$objECT - is the selected object[0].

// - The loops turned off till I get the checkBox info right. No problems here with test runs of the loop.


NOW THE PROBLEM ...

when executing the checkbox command I get the following error.

// Error: Too many arguments. Expected 1, found 2. //


I've tracked this error to the checkBox command and I'm thinking my syntax if off or something. I've looked throught a couple of books and the Mel node ref and have not been able to spot the cause of the error yet.

To any mel experts out there can please take a quick look at my checkBox syntax and let me know if I'm off the mark here.

Back off to animate, I'm creating this script to relax from animating and learn mel if you can believe it.

( lol relaxing )

Oh well , cheers all.


Michael Ware
SVA Grad Student
:buttrock:

jschleifer
11-06-2002, 12:01 AM
here's your code:


checkBox -l $tempISO -cc "select -tgl ( $objECT + ".v[" + $i +"]");";



The problem is just that you've got all sorts of crazy concatination going on in weird places.. try this:

so try something like this:

checkBox -l $tempISO -cc ("select -tgl " +$objECT + ".v[" + $i +"]");


that should do it..

-jason

a3dmonkey
11-06-2002, 12:29 AM
Many thankx for the assist Jason.

I figured my syntax was off somewhere. I just couldn't seem to find an example of something similar to what I was doing to check it against.

I know I know there's crazyness everywhere in my script. Trying to get it to dynamicly build a window that will allow you to select the iso's to be used to make a muscle twist. Once I'm done with it I'll release it to the boards here and let people play around with it and see what they think of it. Currently the muscle system I'm basing it on has everything worked out except the collision detection with the bones. The first version should be done some time next week I'm guessing ... working on it in my spare time.

By the way great seminar at SiGGRAPH this past year... I would be the guy that tried to get everyone to head out for Margaritas after the day long session :beer: . We went out had 1/2 a drink then returned to your respective hotels and crashed.

=)

Oh well next year aye.


Ciao and thankx,

Michael Ware
SVA grad Student
:buttrock:

CGTalk Moderation
01-13-2006, 08:01 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.