Re: [Bf-committers] API: How to get a list of running scripts?

2012-04-10 Thread Dima Glibitsky
Do you mean the Python API? Seems like it's not possible yet... But I guess in your case, you can just have a global variable in the script (or add some property to a WindowManager) and set it to True/False accordingly. ___ Bf-committers mailing list Bf-c

Re: [Bf-committers] API: How to get a list of running scripts?

2012-04-11 Thread Remigiusz Fiedler
Dima, yes, i meant Python API, and particularly 2.49 API. Global variables (like Blender.myvariable) are perfect for script-to-script communication but there seems to be no way to update/delete them when the script cancels unexpectedly (by user_cancel or by errors). 2012/4/11 Dima Glibitsky : > D

Re: [Bf-committers] API: How to get a list of running scripts?

2012-04-11 Thread Dima Glibitsky
What is your script doing? Some realtime background processing? I'm not familiar with 2.49 API, and I'm not sure if this helps your case, but here's my suggestion: perhaps you can pass all the relevant data to the new instance of the script (which would continue the job), and the old one would shu

Re: [Bf-committers] API: How to get a list of running scripts?

2012-04-12 Thread Remigiusz Fiedler
Dima, > perhaps you can pass all the relevant data to the new instance of the > script (which would continue the job), and the old one would shut down > itself? i use something similar already, but this is not the issue. The problem stays (2.49 and 2.6x API): how to prevent user and other scripts

Re: [Bf-committers] API: How to get a list of running scripts?

2012-04-12 Thread Dima Glibitsky
Remigiusz, then how about incrementing a global variable each frame? Can a new instance wait one frame and then actually launch if the value of the variable hasn't changed? Anyway, seems like I'm the only one responding to this thread, and I'm in no way an expert... Have you tried to ask main deve

Re: [Bf-committers] API: How to get a list of running scripts?

2012-04-12 Thread Remigiusz Fiedler
> how about incrementing a global variable each frame? > Can a new instance wait one frame and then actually launch if the > value of the variable hasn't changed? > my scripts are triggered by "Redraw" not by "Frame change", so i have thought about time stamps and delay value checks, but it is not

Re: [Bf-committers] API: How to get a list of running scripts?

2012-04-12 Thread Brecht Van Lommel
Hi, If this is about an addon, there seems to be a function to check if it is running: import addon_utils addon_utils.check('space_view3d_3d_navigation') If not then it seems more difficult. I might be wrong here, but I think in that case there isn't really any running 'script object' that exist

Re: [Bf-committers] API: How to get a list of running scripts?

2012-04-12 Thread Remigiusz Fiedler
Brecht, thanks. I am still on 2.49 though. I think it should be possible to use the same method the popup list uses for switching between running scripts in scripts viewport. ___ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.or