functionString = 'increment_folders(getWorkingDir("%s"))' % inFile 
nukeMenu.addCommand( 'Custom/Save and update', functionString) 

JCK 

----- Original Message ----- 
From: "teidenzero" <[email protected]> 
To: [email protected] 
Sent: Wednesday, August 29, 2012 4:11:21 PM 
Subject: [Nuke-python] menu.addCommand issues 


Hello everybody, 
I have a problem with the menu.addCommand function and I really can't see where 
the problem is. 

I'm trying to execute a function I wrote that works perfectly every time I call 
it except when this is done inside the addCommand function. 

this is my code 

nukeMenu = nuke.menu( 'Nuke' ) 
nukeMenu.addCommand( 'Custom/Save and update', 
"increment_folders(getWorkingDir(inFile)")) 

it says that inFile is not defined while it's absolutely defined two lines 
above. 

If i run the function outside of the menu.addCommand function, it works 
smoothly. 

Any idea where I'm doing wrong? 

Thank you so much for your help with this and previous topics 
_______________________________________________ 
Nuke-python mailing list 
[email protected], http://forums.thefoundry.co.uk/ 
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python 
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to