diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-16 18:19:05 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-16 18:24:16 +0300 |
commit | 2ee762344f8742618804e869536e3efee6ab0bd0 (patch) | |
tree | 391546a4401f76c93e3a232dbf80a115fe7d371f /doc | |
parent | aac95aa1e9727f145e258561816baac80b915f20 (diff) |
Cycles: Fix missing viewport updates after recent changes
We can not access ensured-to-be-evaluated dependency graph from the
render API: some of it is running from within evaluation which makes
it possible for engines to access list of evaluated IDs.
Solved by passing dependency graph to viewport functions, similar to
the final render functions.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/python_api/examples/bpy.types.RenderEngine.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/doc/python_api/examples/bpy.types.RenderEngine.py b/doc/python_api/examples/bpy.types.RenderEngine.py index 6014b4f1d53..cfb32433248 100644 --- a/doc/python_api/examples/bpy.types.RenderEngine.py +++ b/doc/python_api/examples/bpy.types.RenderEngine.py @@ -55,10 +55,9 @@ class CustomRenderEngine(bpy.types.RenderEngine): # whenever the scene or 3D viewport changes. This method is where data # should be read from Blender in the same thread. Typically a render # thread will be started to do the work while keeping Blender responsive. - def view_update(self, context): + def view_update(self, context, depsgraph): region = context.region view3d = context.space_data - depsgraph = context.depsgraph scene = depsgraph.scene # Get viewport dimensions @@ -93,9 +92,8 @@ class CustomRenderEngine(bpy.types.RenderEngine): # with OpenGL, and not perform other expensive work. # Blender will draw overlays for selection and editing on top of the # rendered image automatically. - def view_draw(self, context): + def view_draw(self, context, depsgraph): region = context.region - depsgraph = context.depsgraph scene = depsgraph.scene # Get viewport dimensions |