Introduction to Maya - Rendering in Arnold
This course will look at the fundamentals of rendering in Arnold. We'll go through the different light types available, cameras, shaders, Arnold's render settings and finally how to split an image into render passes (AOV's), before we then reassemble it i
# 1 11-09-2011 , 02:38 PM
Registered User
Join Date: Sep 2011
Posts: 1

Script Error On Restart.

Hi ,
I downloaded a script Bake Under Parent from creative crash. My maya version is 2012. When I execute it in the script editor nothing happens.

After that when I run it through command line by its global proc name it runs properly.

If I reopen maya and directly type the global proc name it gives an error (Cannot find the procedure 'bake_under_parent')

Kindly Let me know where lies the problem

Thank Youuser added image


Last edited by nirakarsethy; 11-09-2011 at 02:41 PM.
# 2 11-09-2011 , 06:24 PM
Gen's Avatar
Super Moderator
Join Date: Dec 2006
Location: South FL
Posts: 3,522
When you execute lines like..
Code:
global proc Gen_printThis(){
	
	print "This is a test!\n";
}
in Maya, you are simply defining the global procedure. Now Maya knows it exists so you can now call on it with..

Code:
Gen_printThis;
However, restarting Maya flushes all that info from memory, hence the error when calling the script.

If you don't have a "userSetup.mel" in your scripts folder, now is a good time to make one, it runs mel commands on startup and you can have it source the mel file. Close Maya. Create a .txt file in notepad or whatever, type...
Code:
source theNameOfTheMelFile;
Close notepad and change the .txt extension to .mel. Now Gen_printThis can be run and Maya already knows where to find it. This comes in especially handy when multiple global procs are in one file.

You can even drag
Code:
Gen_printThis;
onto a shelf or something.


- Genny
__________________
::|| My CG Blog ||::
::|| My Maya FAQ ||::
Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads