![]() |
|
|
#1 |
|
Seb
Name: Sebastien Demurtas
|
Hi, my question might sound weird but I really would like to know what is it all about with Python ?
![]() Everytime I talk with someone about tech artist stuff I hear : "oh you should really take a look at Python, etc... blablabla..." But I'm doing technical artist stuff and I just don't need it, at all. So I don't get it : why is it so wanted ? |
|
|
|
|
|
#2 |
|
Technical Director
Name: Brandon Harris
Company: reelFX
|
I don't know about everyone else, but I really enjoy the way it handles over Mel. I can create my own objects, nest procedures, recast data types, just to name a few things.
Python is also becoming a universal language in 3D. 3DS Max, Maya, Cinema 4D, Houdini, Motion Builder, Nuke, I'm pretty sure that Blender can even use python. Python also will let me build incredibly custom tools (Like tools that have their own thread, although I don't use this very often) a downside is in building your own commands, Maya doesn't give the option to throw custom errors. (I.E if I make a command that requires a string value for a flag, and the user puts and int. Maya will just throw an error. Not a specific "String Value Required") |
|
|
|
|
|
#3 |
|
Administrator
![]() Name: Rob Galanakis
Company: BioWare Austin
|
We are a Max house and have had huge use for Python. We use it over MXS for a couple reasons.
What we do with Python includes:
Anything that doesn't NEED to be in Max, we keep out of it. This allows us to do those things without having to go through Max, allows other apps and tools to use them, and it is much faster. It is really an extension of the library approach we try to take with our code. By abstracting and separating out what doesn't need to happen in the app, and communicating back and forth via DOS/text files/COM, we maintain much better modularity and reusability. So we get the coding benefits of an excellent language, and the structural benefits of more modular code along with it. |
|
|
|
|
|
#4 |
|
integer
![]() Name: Jason Parks
Company: Sony Online Entertainment
Join Date: Sep 2008
Posts: 31
|
Oh man, don't get me started:
-String functions are worth the price of admission. You can slice up and replace and search a string a million different fast and easy ways. -os.walk (traverses entire directories). Very easy to process lots of files -win32com libraries allow access to control practically any windows application (ie.- photoshop, etc.) -Unlimited libraries some popular ones I use to interact and create xml and excel documents. Handy for making reports, email, etc. -Debugging in an IDE (wing or Eclipse). Invaluable help stepping through code one line at a time seeing stack trace, etc. Code completion, code analysis, refactoring, etc. OOP and classes if needed Features over MEL: -Nestability of tuples, lists, dictionaries, objects, etc. In other words, you have a million better container types that MEL's simple array. -pymel is a super combo of Maya python and Maya api -Python bindings to some very nice GUI apps: wx, tk, QT, etc. Some of which can be used w/ maya right now/soon -Can even debug scripts running directly in Maya, either command line or in-session using wingIDE. This is so darn helpful you can't believe it. You'll never know how valuable a good IDE is until you start to use one. Then you'll realize scripting MEL in a script editor (even a good one) is really slow and ancient. But really its a matter of do you take yourself seriously, why not do it? Look at the industry and your skill set. Everything is going Python so it absolutely cannot hurt to know more of it. Even more of a bonus if you get PAID to learn it on the job coding for your favorite DCC app! Scripting is fun and easy and a good place to start. Python is also fun and easy, but it is also a very good stepping stone to do more serious, powerful work. Python is Object Oriented, so you can start to dabble with more classes and OOP programming. Just give it a try, you'll probably not regret it and never turn back.
__________________
-jason |
|
|
|
|
|
#5 |
|
Technical Director
Name: Brandon Harris
Company: reelFX
|
I don't know if this happens to anyone else, but when I switch back to mel, I end up punching myself in the face from all the things I forget about. $, ;, [], {}, etc.
|
|
|
|
|
|
#6 |
|
Seb
Name: Sebastien Demurtas
|
Ok I get it now and that's what I was suspecting...
This is the new standard for 3d apps scripting. Bye bye Maxscript and MEL then ![]() Sigh... I feel too old-school now, I really need to catch it up hehe... |
|
|
|
|
|
#7 |
|
__name__ != "__main__"
![]() Name: Andreas Tawn
Company: Ubisoft
Join Date: Jul 2008
Location: Newcastle, UK.
Posts: 31
|
I'll add data mining. Whether aggregating log files or, with PIL, generating heatmaps of framerate, memory use, gameplay events and collision data.
We don't integrate Python with Max yet, so I often dump text files with MXS, do some processing in Python and apply that data back via MXS. I <3 Python for loads of things. I also do Motionbuilder scripts It makes me cry. |
|
|
|
|
|
#8 |
|
Co-founder RiggingMentor
Name: Brad Clark
Join Date: Jul 2008
Location: Austin
Posts: 96
|
Speaking of, I have had a hard time finding time/ or having projects that get me in to python. does any one have a link or examples of a max or mel script that they then converted over to python so I can compare and see what the python flow is?
Thanks, Brad.
__________________
Brad Clark Co-Founder:Rigging Mentor -Teaching the art and science of character rigging Author: Inspired 3D Advanced Rigging Author:The Character Animator Toolkit for Motionbuilder |
|
|
|
|
|
#9 |
|
Seb
Name: Sebastien Demurtas
|
Hey bclark : I'm not alone then
![]() I get the feeling that this Python excitement has emerged due to a lack of "tools programers" out there, possibly because of the annoying constantly changing MaxSDK or MayaSDK ? Back in the days where you'd have a coder developing a proper .mll or .dle plugin for the users : you didn't have to do all these funky things and Maxscript/MEL was enough to play around minor tasks. Am I wrong or is the technical artist becoming more and more a "technical guy" than an "artist" ? If so : I believe it might end up in situations where a good coder "interested by 3d art" would have more chances to get a technical artist position than "an artist who learned how to write some scripts" these days ... The thing that stops me sometimes is that I want to limit as much as possible to end up into a "language-oriented-job" in order to keep this first focus on art intact. ps: speaking of "outside 3d apps", to build "stuff" in general : I just use GNU make, I approached Python when having a look at scons but buildsystem specialists say this one is not quite doing the job... yet. |
|
|
|
|
|
#10 |
|
Seb
Name: Sebastien Demurtas
|
Python in the Tiobe language popularity trends :
http://www.tiobe.com/content/paperinfo/tpci/index.html |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|