School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,148 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,721 people online right now. Registration is fast and FREE... Join Now!




Mel Scripting Parenting Variable Equation

 

Mel Scripting Parenting Variable Equation, I am in need of assistance. Mel Scripting Rigging

ratherbesurfing

30 Oct, 2009 - 07:18 PM
Post #1

New D.I.C Head
*

Joined: 17 Aug, 2009
Posts: 1

I realize this is not a 3d website but the problem i have run into is code based not visual aesthetics. Any help would be much appreciated. The parenting command is giving me trouble when i try to call on a equation mixed variable.

CODE

//I am working on this code and the part that has issues has //?? flanking it is giving me a error message that says syntax error any tips
//rigging for both arms in progress
//Greasylemur production
//October 30 2009

string $jnames[]={"left_arm_root","left_shoulder","left_elbow","left_wrist","left_hand",
"right_arm_root","right_shoulder","right_elbow","right_wrist","right_hand"};
int $num_of_sets_of_arms = 1;
int $jnum = 0;
int $numofset =1;
int $sjcount=0;
int $parcount=0;
for ($x=0;$x < $num_of_sets_of_arms;$x++){
select -d;
joint -p 2.0 3.0 0.0;
joint -e -zso -oj xyz -sao yup -n ($numofset + $jnames[$jnum]);
$sjname[$sjcount]=($numofset + $jnames[$jnum]);
$sjcount++;
$jnum++;
joint -p 5.0 1.0 0.0;
joint -e -zso -oj xyz -sao yup -n ($numofset + $jnames[$jnum]);
$sjname[$sjcount]=($numofset + $jnames[$jnum]);
$sjcount++;
$jnum++;
joint -p 6.0 -3.0 0.0;
joint -e -zso -oj xyz -sao yup -n ($numofset + $jnames[$jnum]);
$sjname[$sjcount]=($numofset + $jnames[$jnum]);
$sjcount++;
$jnum++;
joint -p 4.0 -6.0 0.0;
joint -e -zso -oj xyz -sao yup -n ($numofset + $jnames[$jnum]);
$sjname[$sjcount]=($numofset + $jnames[$jnum]);
$sjcount++;
$jnum++;
joint -p 3.0 -8.0 0;
joint -e -zso -oj xyz -sao yup -n ($numofset + $jnames[$jnum]);
$sjname[$sjcount]=($numofset + $jnames[$jnum]);
$sjcount++;
$jnum++;
//??
parent -w
|$sjnames[($parcount-4)]|$sjnames[($parcount-3)]|$sjnames[($parcount-2)]|$sjnames[($parcount-1)]|$sjnames[$parcount];

parent ($numofset + ($jnames[4]))|($numofset + ($jnames[0]))|($numofset + ($jnames[1]))|($numofset + ($jnames[2]))|($numofset + ($jnames[3]));
//??

select -d;
joint -p -2.0 3.0 0.0;
joint -p -5.0 1.0 0.0;
joint -e -zso -oj xyz -sao yup -n ($numofset + $jnames[$jnum]);
$sjname[$sjcount]=($numofset + $jnames[$jnum]);
$sjcount++;
$jnum++;
joint -p -6.0 -3.0 0.0;
joint -e -zso -oj xyz -sao yup -n ($numofset + $jnames[$jnum]);
$sjname[$sjcount]=($numofset + $jnames[$jnum]);
$sjcount++;
$jnum++;
joint -p -4.0 -6.0 0.0;
joint -e -zso -oj xyz -sao yup -n ($numofset + $jnames[$jnum]);
joint -e -zso -oj xyz -sao yup -n ($numofset + $jnames[$jnum]);
$sjname[$sjcount]=($numofset + $jnames[$jnum]);
$sjcount++;
$jnum++;
joint -e -zso -oj xyz -sao yup -n ($numofset + $jnames[$jnum]);
$sjname[$sjcount]=($numofset + $jnames[$jnum]);
$sjcount++;
$jnum++;

//??
parent -w
|$sjnames[($parcount-4)]|$sjnames[($parcount-3)]|$sjnames[($parcount-2)]|$sjnames[($parcount-1)]|$sjnames[$parcount];

parent $sjnames[($parcount)]|$sjnames[($parcount-4)]|$sjnames[($parcount-3)]|$sjnames[($parcount-2)]|$sjnames[$parcount-1];
//??

$jnum++;
$numofset;
}




//this is just for reference "ignore please"
/*
//elderly
//left arm
//this is what the code above is durived from
//I made them both
select -d;
joint -p -2.0 3.0 0.0;
joint -p -5.0 1.0 0.0;
joint -e -zso -oj xyz -sao yup joint1;
joint -p -6.0 -3.0 0.0;
joint -e -zso -oj xyz -sao yup joint2;
joint -p -4.0 -6.0 0.0;
joint -e -zso -oj xyz -sao yup joint3;
joint -p -3.0 -8.0 0;
joint -e -zso -oj xyz -sao yup joint4;
parent -w |joint1|joint2|joint3|joint4|joint5;
parent joint5 |joint1|joint2|joint3|joint4 ;
//right arm
select -d;
joint -p 2.0 3.0 0.0;
joint -p 5.0 1.0 0.0;
joint -e -zso -oj xyz -sao yup joint6;
joint -p 6.0 -3.0 0.0;
joint -e -zso -oj xyz -sao yup joint7;
joint -p 4.0 -6.0 0.0;
joint -e -zso -oj xyz -sao yup joint8;
joint -p 3.0 -8.0 0;
joint -e -zso -oj xyz -sao yup joint9;
parent -w |joint6|joint7|joint8|joint9|joint10;
parent joint10 |joint6|joint7|joint8|joint9 ;


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 04:03PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month