[Bf-python] T47811 - 2.8x python proposed changes

Campbell Barton ideasman42 at gmail.com
Tue Jan 9 09:01:10 CET 2018


Hi James,

Blender 2.8 now has bpy.msgbus:
https://developer.blender.org/T53308
Simple example:
https://developer.blender.org/P563

This allows you to subscribe to changes to data.
It needs further testing and documentation, but it does work on a basic level.

If bpy.handlers.scene_update_pre/post are added back, they should work
as was originally intended - instead of continuously calling.

On Thu, Dec 28, 2017 at 4:10 PM, James Crowther
<jamesharrycrowther at gmail.com> wrote:
> Hi there,
> Hope you’ve all had a good Christmas and are about to have a happy new year
> :). I’ve been using 2.8 daily builds for a few days now that Christmas has
> allowed me some time off regular duties. I am working on making our addon
> compatible with it, but I notice that bpy.handlers.scene_upate_post/pre have
> been removed. Per the discussions that have occurred on the task T47811
> (https://developer.blender.org/T47811) regarding this I was under the
> impression that we were not going to remove them, at least not yet. Better
> yet there were comments about repairing them so that they make calls to
> their subscribers only when something in the scene has changed. There was no
> mention on this task about them actually going to be removed so I was
> surprised when I noticed that they are no longer there.
>
> As mentioned in my latest comment on the thread, we need to use this,
> preferable in its repaired form rather than how it used to be. Our addon
> needs notification of changes to blender’s data. I don’t see how we can
> accomplish this without having some callback we can subscribe to that
> notifies us of changes to the data of the scene. I’ve made a case in the
> task linked to above for why we need this so I won’t go into it further
> here. I’d just like to hear from the devs why this decision was made, and
> what the proposed alternative is? I’ve had a good look around the new python
> api in the current 2.8 and can’t see anywhere I can subscribe to get
> notifications about changes to the scene as I was able to do in pretty much
> any prior release I’ve used.
>
> Any guidance on what the future holds for the scene_update_post and pre
> handlers would be greatly appreciated, restoring them to a fully functional
> state would be even better :D
>
> All the best
>
> James
>
>
>
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> https://lists.blender.org/mailman/listinfo/bf-python
>



-- 
- Campbell


More information about the Bf-python mailing list