Heya I actually have 2 questions atm. I'm scripting some tools for studio where I work and I think its time for me to start thinking a bit more about structure and how can I get the code to look and behave better rather than just trying to get it to do the stuff I want it to do...
So one of the tools I wrote is an semi-automatic material manager. As it is now it work pretty good, however any changes I want to do result in a lot of copy/paste and its very time consuming. Now atm each iteration that happen is just a copy of main code + new variables. I was wondering if there is a way to code some kind off (well I think it is) class so that script can call back to it, plug new variables and then do the magic trick... Now I did read about classes a while back and yesterday and my tiny brain still don't get it atm... - no worries I'll get there eventually... In any case here is a graphical thing I'd like to do, its better for me to show it rather than write it... http://imgur.com/gUbZJ2j I basically want to have a piece of main code with lets say "place holders" that will be fill in once I run commands. This way I hope to be able to add new and more parts to the script to core code as we need them rather than code it 1 by 1 to each iteration. So is the Classes the right thing I need or what is it the thing I need to research? So as to second issue. I tried to do the thing above but not much luck tho... I didnt use classes. I wanted to just use functions but o well... Any ideas why this code is not working ? NOT working: http://pastebin.com/h2TP6Vmm Working: http://pastebin.com/v02SZ7Vg -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
