Events or Signal Slots for blender datatypes

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
simtron
Posts: 0
Joined: Sat Sep 11, 2010 8:33 pm

Events or Signal Slots for blender datatypes

Post by simtron » Wed Jul 17, 2013 3:48 pm

I'd like to know if there is a event system inside blender to see if an object type has been modified so that I can exploit that event. Its not a constraint I'm taking about. I want the event system available even for the internals like.... if an internal data changes its value, I need a trigger for it.

If yes..... please provide resources.
If no..... please tell me if there are any plans or how to work around it.

Thank you very much

PS: To be precise I want to have a javascript DOM like event system so that I can addEventListeners to data.

CoDEmanX
Posts: 0
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Post by CoDEmanX » Wed Jul 17, 2013 7:26 pm

The Blender/Python API can’t (yet)...
[...]
Define callbacks or listeners to be notified when data is changed.
http://www.blender.org/documentation/bl ... start.html

There are two properties however, which might help to detect CERTAIN changes, see
http://wiki.blender.org/index.php/Dev:2 ... /UpdateAPI

And there are app handlers, but if you added a scene update handler, it would be called like 20 times per second and might add a serious amount of overhead...
http://www.blender.org/documentation/bl ... dlers.html
I'm sitting, waiting, wishing, building Blender in superstition...

simtron
Posts: 0
Joined: Sat Sep 11, 2010 8:33 pm

Post by simtron » Wed Jul 17, 2013 8:42 pm

Thank you very much for the info

Post Reply