is there a way to pass python commands to blender with the GUI visible? I have a simulator made in Matlab where measurements can be changed. When one of these measurements change I want the script to pass a command to an open blender GUI so the changes are made in real-time. I have everything working except that if I use the interactive python console I can't see the GUI, it's just grey. Right now I have to use the command to run blender and then run a script, but to make any changes I have to rerun blender with an updated script.
1 Answer
It could be any way that you can pass data from one Python script to another. I am not going to pretend I know a lot about that, but one simple and primitive way could be to save a script to a file and check if the file is changed from Blender. You can make an add-on(See Blender's Text Editor Templates menu) with a timer, that checks for scripts to run.
I believe there are more sophisticated ways as well. For example see Python: Server and Client in Blender. But that looks considerably more difficult to make.