[Bf-python] Bf-python Digest, Vol 157, Issue 1

Campbell Barton ideasman42 at gmail.com
Tue Jan 16 22:59:32 CET 2018


On Fri, Jan 12, 2018 at 9:22 PM, James Crowther
<jamesharrycrowther at gmail.com> wrote:
> Dear Campbell,
>         Thanks! I’ve not been able to get the code at https://developer.blender.org/P563 to work, I left a comment there for you, hope you can take a look and suggest what might be the best course of action.
> I’ve read through the task you linked to as well. Seems like an interesting direction you’re going in!
>
> I have to admit though, this system seems like its more intended for internal dev and for the viewport than for addons like ours. That said if it works for us, I’m certainly not going to complain. I’m particularly interested in the granularity you will end up settling on. AFAICS, you’re looking at balancing the need for granularity with speed? From the comments on the task it appears as though object level might be as granular as you go? If so, would it work that addons like ours could subscribe to updates from particular objects or would any object change generate a callback? Also, does the system extend to other parts of blender outside the viewport? For example, what about changes to the world settings? Render settings? Not to mention all the other parts of blender that are outside of the view port. For this perhaps the depsgraph might be more useful, but as an outsider with little experience in the new bpy.context.despgraph object, I’ve no idea how to extract any information from the depsgraph in python.
>
> Anyway, thank you so much for replying. I hope that I can get the msgbus working soon. I’m really keen to try it out in 2.8.
>
> All the best
>
> james

This system works outside the viewport (no viewport spesific code so
any ID's can be used)
You can also subscribe to changes for single ID's,
The risk is that having many objects means having many subscribers, so
in cases where changes to any object will do - there is no need to be
spesific.
(object or any other kind of ID).


More information about the Bf-python mailing list