Notifications
Clear all

[Closed] getting started with python in 3dsMax

So I’ve done a ton of maxscripting plus a bit of python and c#.

Give that 3dsmax has no python shell or editor. What’s the simplest setup to write python gui’s for max ?

At the moment I was just looking at using sublime text plus the 3dsmax plugin here . I was going to write the GUI code by hand using pyside and qt.

Any other suggests for a 3dsMax/Python development environment.

I can’t believe I have to type python.execute “… the python file” any time I want to test something … way to go autodesk … (again … )

5 Replies

Here’s my write up of getting Sublime Text talking to 3dsMax

http://www.designimage.co.uk/sublime-text-3dsmax-python/

If I remember correctly, there’s a tool on scriptspot that allows a sublimetext user to ask 3dsmax to run a piece of mxs code (one necessary condition would be to have only one instance of max running).

This code would be your python.executeFile(foobar), and as a result, you’ll have the equivalent of the Alt-E shortcut in the mxs editor.

http://www.scriptspot.com/3ds-max/scripts/sublime3dsmax

Check this page, note that I never used it, I had an equivalent for my Vim/maxscript setup.

Indeed it does work. I using the same plugin.

Are you using Vim for python as well as maxscript ?

1 Reply
(@mrpingouin)
Joined: 11 months ago

Posts: 0

Using it for python yes, with some vim plugins : tagbar, ctags, mainly.

I remember trying to use it with maxscript for some days, but the mxs grammar file I found was not complete enough. I tried to update it progressively but this kind of stuff need time and I didn’t had enough time at the moment so I gave up.

Imho, the mxs grammar is pretty complex as its syntax is not very strict : function declarations that can have empty default values, presence of commas depending of the scope (inside a struct or not), function calls with or without parenthesis, etc. You end up with a grammar file difficult to write, it’s a good exercise

Well, without getting into this huge troll you threw, I think it’s a matter of environment, (different for everyone I guess) : for me it was more specifically about the established workflow and the available time I had.

I’ve been writing python projects for my shop’s pipeline for months now, I’m used to python standard-or-not libraries (os, glob, elementtree/xpath, yaml, imagemagick, wx, etc).
I had to write python tools for windows (e.g. scripting Thinkbox Deadline), others for Linux (e.g. asset library plugged into an apache server, video encoding server, etc) : our pipeline is using python, and it’s using it a lot. Not in a 3D part yet, but in all the remainder we do.

At work we just switched from max 2013 to max 2015 :

  • It gives me access to PySide librairies (qt !)
  • I only have 2 months to write a lot of projects before the vfx artists come back, and I’m way more comfortable on python than on C#/.NET (the only project I did was the helloworld, I don’t know the .NET API and the few lines I wrote some Windows.Forms stuff, I didn’t like it).

Given those reasons, it was the natural choice for me.

btw… why is python? why is it again?