Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / MEL / Weird behavior MEL if i run all the lines at the same time,
  RSS 2.0 ATOM  

Weird behavior MEL if i run all the lines at the same time,
Rate this thread
 
51040
 
Permlink of this thread  
avatar
  • pelos
  • Posted: 05 January 2011 08:27 PM
  • Total Posts: 30
  • Joined: 20 June 2007 09:38 PM

i am working in a autorig, just creating a basic leg, and some fingers controls,
if i select all my script, and run it, it has some errors, and sometimes doesn’t find objects in the scene. 
but if i grab a bunch of lines run them, and then another bunch and run it, everything runs fine.

does MEL take in account empty lines? or is something special i need to do to make it work?
Thanks =)

if i run paragraph by paragraph it runs fine, but if i copy all of it and execute all at once i get the error
// Error: No object matches name: pointConstraint //
// Error: No object(s) to duplicate //

at the end of it.

//Fingers Controls
sphere -name L_Index_Finger_Control -radius .18;
setAttr “L_Index_Finger_Control.overrideEnabled” 1;
setAttr “L_Index_Finger_Control.overrideShading” 0;
setAttr “L_Index_Finger_ControlShape.miTransparencyCast” 0;
setAttr “L_Index_Finger_ControlShape.miTransparencyReceive” 0;
setAttr “L_Index_Finger_ControlShape.miReflectionReceive” 0;
setAttr “L_Index_Finger_ControlShape.miRefractionReceive” 0;
setAttr “L_Index_Finger_ControlShape.miFinalGatherCast” 0;
setAttr “L_Index_Finger_ControlShape.miFinalGatherReceive” 0;

pointConstraint L_Finger_Index_1 L_Index_Finger_Control;
pointConstraint -remove L_Finger_Index_1 L_Index_Finger_Control;
orientConstraint L_Finger_Index_1 L_Index_Finger_Control;
orientConstraint -remove L_Finger_Index_1 L_Index_Finger_Control;
select -r L_Index_Finger_Control ;
move -r 0 0.6 0 ;
parent L_Index_Finger_Control L_Arm_IK;
select -r L_Index_Finger_Control;
makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;

//Copy Fingers control for the rest of the fingers.
select -r L_Index_Finger_Control ;
duplicate -name L_Middle_Finger_Control

pointConstraint L_Finger_Middle_1 L_Middle_Finger_Control;
pointConstraint -remove L_Finger_Middle_1 L_Middle_Finger_Control;
orientConstraint L_Finger_Middle_1 L_Middle_Finger_Control;
orientConstraint -remove L_Finger_Middle_1 L_Middle_Finger_Control;
select -r L_Middle_Finger_Control ;
move -r 0 0.6 0 ;
select -r L_Middle_Finger_Control ;
makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;



Replies: 1
/img/forum/dark/default_avatar.png

AJA!!!  is imperative to all line have ; at the end, i was missing some of them, note pad is not a good editor for this.

Author: pelos

Replied: 05 January 2011 11:25 PM