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

James Crowther jamesharrycrowther at gmail.com
Fri Jan 12 11:22:43 CET 2018


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

> On 9 Jan 2018, at 10:00 pm, bf-python-request at blender.org wrote:
> 
> Send Bf-python mailing list submissions to
> 	bf-python at blender.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://lists.blender.org/mailman/listinfo/bf-python
> or, via email, send a message with subject or body 'help' to
> 	bf-python-request at blender.org
> 
> You can reach the person managing the list at
> 	bf-python-owner at blender.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Bf-python digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: T47811 - 2.8x python proposed changes (Campbell Barton)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Tue, 9 Jan 2018 19:01:10 +1100
> From: Campbell Barton <ideasman42 at gmail.com>
> To: Blender Foundation Python list <bf-python at blender.org>
> Subject: Re: [Bf-python] T47811 - 2.8x python proposed changes
> Message-ID:
> 	<CAEcf3NwsG1vyu_Te9zLC82M1NTkfh_jUE2zo6R3JVs9ZF0UzJw at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
> 
> 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
> 
> 
> ------------------------------
> 
> Subject: Digest Footer
> 
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> https://lists.blender.org/mailman/listinfo/bf-python
> 
> 
> ------------------------------
> 
> End of Bf-python Digest, Vol 157, Issue 1
> *****************************************



More information about the Bf-python mailing list