On Jan 6, 2011, at 12:02 PM, Hart's Antler wrote:

> I managed to get GTK to work pretty well with blender25 using ctypes.  The 
> old PyGTK bindings didn't work that well with blender2.4x because the GTK 
> mainloop did not release the GIL, and there was no ideal way to iterate the 
> main loop from blender.  Thankfully ctypes releases the GIL, so threading 
> works!  Not sure if updating blender data from a GTK thread can cause a 
> crash, but with this simple addon that changes the scale of the

There is a patch to allow py event handlers in 2.5, which AFAIK allows time 
based updates too. IIRC Dan wants to change something in it still and do more 
testing, perhaps you and me can help with the testing part at least.

See [Bf-committers] Python Event Listeners and Notifiers, 
http://lists.blender.org/pipermail/bf-committers/2010-November/029211.html

I'm afraid threading is crash-prone, though perhaps less with manual GUI 'cause 
you are not clicking both in the Blender UI and the external UI to do stuff at 
the same time :) .. Is more a problem with networking and controller devices, 
which I've sometimes targeted with this sort of stuff. Did think of testing 
making qt ui widgets too with PyQt (like using a more normal file dialog for 
non-blender end users of some special tool made as a Blender script), but 
didn't test it yet .. QApplication has a non-blocking processEvents call so 
should work in the async manner like GTK does too.

Fun experiment in any case!

> -brett

~Toni

_______________________________________________
Bf-committers mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to