[Bf-python] Modified RenderEngine API Proposal

Matt Ebb matt at mke3.net
Wed May 11 14:45:12 CEST 2011


On Wed, May 11, 2011 at 10:24 PM, Brecht Van Lommel
<brechtvanlommel at pandora.be> wrote:
> Hi all,
>
> To kick of discussion, here's a proposal for how to modify
> RenderEngine to support preview and viewport rendering, and solve
> issues with thread safety and context. Link:
> http://wiki.blender.org/index.php/Dev:2.5/Source/Render/RenderEngineAPI
>
> Some questions about the proposal:
>
> Is it worth preserving backwards compatibility, or do you think it's
> work breaking it for an improved api? The main difference is the
> separate update callback, which exists mostly for thread safety.

No strong opinions here, but one thing that's very annoying about the
current API is the lack of access to modify data - even data that's
owned (custom rna properties) by the engine. It makes it quite
difficult to update data as needed, eg. at render time.

> Each type of rendering has separate callbacks. This seems like it
> would lead to the clearest implementation, if the same callbacks are
> used in different use cases the code may get confusing. Are the 3
> types a sensible distinction to make?

I think so, different types of renders will require different data too
- eg. preview renders can get data like the current material passed
into it directly. I made a basic patch for this sort of thing [1] but
it could be a lot better. The current method of sending blender's
preview.blend scene isn't that practical really, I have problems
trying to retrieve data from the current scene (eg. shader paths)
which isn't accessible via the preview scene.

Rest of the doc seems fine to me at this point.

cheers

Matt


[1] https://projects.blender.org/tracker/index.php?func=detail&aid=25092&group_id=9&atid=127



More information about the Bf-python mailing list