an issue with script editor

an issue with script editor

Anonymous
Not applicable
519 Views
2 Replies
Message 1 of 3

an issue with script editor

Anonymous
Not applicable

Hello
Any one please have an idea what happen with my maya scrit editor i try to write a script in maya 2016. let say for exemple this script/

window;
columnLayout; 
string $selObj[] = `ls -sl` ;
textFieldButtonGrp -text $selObj[0] -buttonLabel "Button" -buttonCommand "objectName" selectedObject; 

proc objectName(){ 
string $selObj[] = `ls -sl` ; 
textFieldButtonGrp -e -text $selObj[0] -buttonLabel "Button" -buttonCommand "objectName" selectedObject; 
}

showWindow; 

Script run fine everything alright but when i delete anby line from the script let say for exemple i do this /

window;
columnLayout; 
string $selObj[] = `ls -sl` ;
textFieldButtonGrp -text $selObj[0] -buttonLabel "Button" -buttonCommand "objectName" selectedObject; 

showWindow; 

run the script again and i have the same result with no errors. to see the difference i shoul each time restart maya. i try this with maya 2013 also and i have the same issue. each time when i change anything in any script i shoul restart maya again and again. any idea please. thank you.

0 Likes
520 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
When you define the proc objectName it will continue to exist after you run that first script, so the second time there is no problem - the proc is still there. All you can do after that is re-define the proc .
Message 3 of 3

Anonymous
Not applicable

Thgank ou cgrebeld

0 Likes