|
|
|
Tell us what you think of the site.
|
Autodesk Media & Entertainment User Community
|
Autodesk® 3ds Max®
|
|
Autodesk® Maya®
|
|
Autodesk® Softimage®
|
|
Autodesk® MotionBuilder®
|
|
Autodesk® Mudbox™
|
|
Autodesk® Stitcher™
|
|
Autodesk® ImageModeler™
|
|
Autodesk® Sketchbook® Pro
|
|
how do you use python in 3dsmax?
|
|
|
I haven’t tried to dock one yet, although I bet it could be done. The win32 API is pretty full-featured with respect to windows, and the Python win32 extensions are just a
big wrapper around that API.
Adam Pletcher
Technical Art Director, Volition, Inc. / THQ
blog: Tech Art Tiki
|
|
|
Adam Pletcher 11 December 2007 07:09 PM
The COM bits of what we’re doing is explained in this thread on CGTalk, as someone mentioned
above.
Some of the win32 code posted in that thread is actually from the book “Python Programming on
Win32” by Mark Hammond and Andy Robinson. An excellent book if you want to learn more about Python and COM, and the Win32 API in general.
I’ll be happy to post some code examples when my GDC talk is further along and I’ve cleaned things up a bit.
Hi Adam,
You’re presentation sounds awesome, hopefully I can make it this year… I was just curious how you bind the wx window to max, I have created several wx based tools that I use
with max (and maya) and just parse commands back to max via com, I would love to know how to make the wx window a child of max’s. Would you consider posting some demo code?
Cheers
David Mackenzie
|
|
|
|
My GDC talk “Python for Technical Artists” was today. It seemed to go pretty well. I’ve posted my slides and code sample files here:
http://www.volition-inc.com/gdc
The Python examples include several scripts in a few Tech Art-oriented categories:
- Data mining (large XML files)
- Data Serialization/Persistence
- Screen scraping
- Textures
- Databases (MySQL, etc)
- Windows COM
The COM group includes examples on driving 3ds Max and Maya in various ways from outside of those apps, using Python. There’s a fun example that uses a 360 controller to
fly a camera around a 3ds Max scene and place world objects on a landscape, with just a few lines of embedded MaxScript.
Check out the examples, let me know what you think.
Adam Pletcher
Technical Art Director, Volition, Inc. / THQ
blog: Tech Art Tiki
|
|
|
|
thanks for sharing this
i really appreciate it
Mohab Gamal
|
|
|
|
Hey guys -
We’ve developed some plugins to actually wrap maxscript as a Python module so you don’t have to work through COM.
It implements a Python/PyQt gui as your dialogs, so you can use all of python, with all of Qt, and then access max through the module.
from Py3dsMax import mxs # import mxs module
sphere = mxs.getNodeByName( "Sphere01" print sphere.radius
Thats just a very small sample - we have much more at http://blur-dev.googlecode.com
Enjoy!
Eric Hulser
Software Developer
Blur Studio
|
|
|
|
I’m sure I’m not the only one who sez “big thanks” to Adam & Volition and Eric & Blur for sharing this stuff. I’m a one-person shop, but getting increasingly interested
in the code side of things, and developing app-agnostic scripts sounds very sensible!
thanks again,
Jeff
|
|
|
|
|
Settings
|
Choose Theme color:
|
|
|
|
|
|
|
|
|