Hi there!
First of all: Thank you all for this great thread. It helped me VERY much.
I learned how to use a python script in maxscript! yay!
I learned how to send maxscript-commands to 3ds max from python! yay!
(both over COM)
That really helped me out, thx!!!
…but now i’m stuck.
I have a python application (a GUI built with wxPython) and like i said, i can send maxscript-commands to 3ds max. so i can create objects or get all selected objects and things like that. Now i want the gui to update itself if for example in 3dsmax the selection has changed (or on any other event). How can i do that?
I tried to execute a pythonscript from maxscript, which gets an instance of my GUI and executes a method that updates the GUI. 3ds max crashed… i think because 3dsmax was still waiting for a return value when the gui tried to update (and therefore connected to 3dsmax) and BAM! Okay, next thing i tried was using thread to update the GUI asynchronously. Well, 3dsmax didnt crash but nothing happend. At least i dont see anything. I think this approach is a dead end. Perhaps the GUI should poll 3dsmax but that’s not a nice solution, either…
So, how can i send an event from maxscript to a python GUI? Has anyone done something similiar? What’s the (best) solution?
Greetings,
Az