[Closed] 3ds Max'sons Python integration… what's wrong with you?
Hello guys,
a couple of days ago I decided to use the Python Google OAuth 2.0 implementation I wrote for Maya to pull data directly from the web. In Maya this is super handy since it gives artists the opportunity to always work on the latest data (if your project managers do not want to use databases, this is as close as you can get).
Anyways as you probably know OAuth needs to authenticate the user by establishing a connection via user credentials etc.
Since Max has a Python API I thought calling the proper class (with some special modifications of course) from within Max would work. But it does not.
Whenever I try to call the Python script handling the authentification it throws an error in Max stating that there is a security violation Read more about it here.
This only happens the FIRST time I execute the code. After I re-execute the code it’s gone and I would be able to work with that stuff. Unfortunately putting a try-catch block around it is no solution I can accept and it leads to sychronisation / linking errors from time to time.
I was pretty desperate because of that since any error-handling always led to that 504 error (of course I tried out most of the solution proposals on StackOverflow). Finally I had the idea of calling the Python interpreter shipped with 3ds Max with the script as parameter directly from a cmd. And gues what? That worked. No security issue as it used to be in Maya’s Python or any other Python version.
After this long intro I finally want to ask: WTF? I mean it seams like 3DS Max is layering something over the Python function call itself that kind of causes this error. If anyone has any insights about why it’s like this and how I would be pretty interested in it.
Best regards
Mirko