Hi at all,
I tryed but python gived me error because it doesn’t found max application.
I try to search max.application to regedit but I don’t found nothing…
I don’t know what I wrong…
what could it be?
thx a lot
See my post above. Max does not register any COM servers for itself by default, you have to tell it to do that. The registerPythonCom.ms script I mentioned will do that for you.
Hey guys,
Just letting you know, I started a new thread to get a little more visibility of it –
http://forums.cgsociety.org/showthread.php?p=6156251#post6156251
But we’ve released our code on a new blur-dev website:
http://blur-dev.googlecode.com
This contains full Python support in 3dsMax, along with a wiki on how to install and run everything. There is no more “python in maxscript” or “python through com” in it – its a direct implementation of python.
Also, for added fun, rollouts and dotNet can be done away with – all of our code supports and is driven by PyQt ( http://qt.nokia.com/ ) which is a very powerful and fast framework.
Enjoy!
Eric Hulser
Tools Developer
Blur Studio
Hi there,
is there any eta on the publication of the sources ? The reason beeing that this is basically kind of a break even for putting it in our pipeline. As with only binaries Version changes etc could kill a lot of dev time and effort as we can never know when/if recompiles will be there.
On a second note while installing on a different dev machine the problem with the system path variable beeing wiped occured again. I thought it was a different install but it is definately one of the Blur installers. I suspect the QT one as it seemed to hang on “adding to system path” on trying to install again.
Also for deploying it seems kinda bad currently. Can we simply copy over and set the correct env variables to deploy to a lot of machines ?
Kind Regards,
Thorsten
Hi guys,
since I know a lot of you (including me!) would love to have native Python language integrated in 3ds Max, Id like to share some of our very own stuff weve done on this front!
Weve taken a different approach to Blurs Python integration, which I have to admit is absolutely fabulous and much more deep and complex than ours, however, Blurs implementation is very hard to adopt in any production pipeline since its completely proprietary, its not open source and Blur doesnt ensure availability for any particular 3ds Max version you might be using.
Our approach, on the other hand, completely leverages on the .NET framework and thus makes our implementation 100% independent on the 3ds Max version or even platform you decide to use! I can run it on Max 9 32bit or Max 2010 64bit at the same time, no need for recompile or anything! Also, when a new IronPython comes out, or if you compile it yourself, just replace the libs and itll use that as the scripting engine immediately!
So, here are more technical details as well as a 13 minute features demo video (at the end)!
http://blog.duber.cz/3ds-max/duberpython-features-demonstration
Please, let me know what you think
Im considering releasing this library of ours to the public, so, thats why Im showing it here.
Hey there,
nice effort! Just wanted to point out that blur did a new version of their integration that seems a lot better then the initial approach, allows for QT and is indeed open source.
http://forums.cgsociety.org/showthread.php?f=98&t=816475
Here’s the thread and you can get the sources at google code
http://blur-dev.googlecode.com/
Might be helpful in your ironpython approach too i guess
Regards,
Thorsten
Thanks, I know about the new Blur approach, however, it’s irrelevant to ours since Blur leverages on the CPython code, but we’re using IronPython, written in C#, leveraging on dotNET. These are two entirely different worlds leading to one place – Python
As I said, Blur has done an amazing job and their version is much more complex, however, their version still need recompilation each time you install a new version of Max etc… ours doesn’t.
Also, we chose to develop on .NET and its GUI libraries (including WPF) since we don’t need to use other tools that aren’t bound to Microsoft platform. We strictly use Max for all our 3D vfx work, so leveraging on .NET was the best way to go, for us.
As for other tools we use, like Nuke, we run our code written in IronPython, but we load different modules so that the GUI can be written in Qt, but the raw scripting can be done platform independent and thus works in both 3ds Max and Nuke.
Ah, got it. One reason i really dig Py3dsmax + PyQT over .net in native maxscript is that i still find dotNet incredibly slow. Even if it only is on first open per session i find it untolerable and it makes me go nuts even with the builtin dotNet tools. How’s you’re experience with the IronPython approach ? Is it the same or better ?
Regards,
Thorsten
Well, there is a lag at first run, about 2-4s, but then it’s instant, since we then keep IronPython in the memory, so anything else run through our IronPython bridge is instant.
As for GUI. Well, since it’s all based on .NET, the raw Python GUI code is quite fast and I don’t have problems with it. But, you can gain some speed by compiling the GUI into a DLL which you can then reference in your script, which makes it even faster for some super complex GUIs, which is cool. But I’m perfectly happy with the raw Python, scripted, GUI.
Hello,
Anyone got luck making the COM Server works on Windows 7 ?
I registered it with the registerPythonCom.ms, I checked my registry, it seems to me the keys are there and correct, when I try this in a python interpreter :
>>> import win32com.client
>>> mx = win32com.client.Dispatch('Max.Application')
I have that sad message :
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
mx = win32com.client.Dispatch('Max.Application')
File "D:\Softwares\Developement\Python26\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
File "D:\Softwares\Developement\Python26\lib\site-packages\win32com\client\dynamic.py", line 104, in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "D:\Softwares\Developement\Python26\lib\site-packages\win32com\client\dynamic.py", line 84, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
com_error: (-2147221164, 'Class not registered', None, None)
Funny thing is that I restarted the python interpreter an reran the same code, without any errors … but now when I try registering a method like this :
>>> mx._FlagAsMethod('ExecuteSIBLLoaderScript')
I get a nasty :
Traceback (most recent call last):
File "<pyshell#6>", line 1, in <module>
mx._FlagAsMethod('ExecuteSIBLLoaderScript')
File "D:\Softwares\Developement\Python26\lib\site-packages\win32com\client\dynamic.py", line 427, in _FlagAsMethod
details = build.MapEntry(self.__AttrToID__(name), (name,))
File "D:\Softwares\Developement\Python26\lib\site-packages\win32com\client\dynamic.py", line 432, in __AttrToID__
return self._oleobj_.GetIDsOfNames(0,attr)
com_error: (-2147352570, 'Unknown name.', None, None)
which make sense since there is no reason it would have failed earlier and not now, though I don’t understand the Dispatch method didn’t made errors this time oO
:banghead: