diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2019-09-11 09:22:53 +0300 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2019-09-12 10:08:22 +0300 |
commit | 861697c9e55bad362fc493e263fe966095744b37 (patch) | |
tree | 3b9a11147422980029dfaf251b5b84c7c6720f59 /intern/cycles/blender/addon | |
parent | 70a934770521b538b98b8a3e27739ae6a643ebfa (diff) |
Cycles: Initial Support For Local View
This diff will add support for local view to Cycles rendered preview mode.
Currently the implementation shows same results as EEVEE does. This entails
a difference with Blender 2.79, where lights were automatically added to the
local view. {T69780} describes this should be solved before the next release.
This patch also solves missing `owner_id` issues when using the RNA CPP Api
from Cycles. Cycles didn't provide the `owner_id` making some functionality
fail, what then was worked around in Blender. It also fixes an issue in
`makesrna` where incorrect CPP code was generated when only `PARM_RNAPTR`
was provided.
An optional `view_layer` parameter is added to the `Object.local_view_get`
method to reduce lookups.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5753
Diffstat (limited to 'intern/cycles/blender/addon')
-rw-r--r-- | intern/cycles/blender/addon/engine.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/intern/cycles/blender/addon/engine.py b/intern/cycles/blender/addon/engine.py index b8bc74f9e35..0e3de6d8066 100644 --- a/intern/cycles/blender/addon/engine.py +++ b/intern/cycles/blender/addon/engine.py @@ -139,15 +139,19 @@ def create(engine, data, region=None, v3d=None, rv3d=None, preview_osl=False): data = data.as_pointer() prefs = bpy.context.preferences.as_pointer() + screen = None if region: + screen = region.id_data.as_pointer() region = region.as_pointer() if v3d: + screen = screen or v3d.id_data.as_pointer() v3d = v3d.as_pointer() if rv3d: + screen = screen or rv3d.id_data.as_pointer() rv3d = rv3d.as_pointer() engine.session = _cycles.create( - engine.as_pointer(), prefs, data, region, v3d, rv3d, preview_osl) + engine.as_pointer(), prefs, data, screen, region, v3d, rv3d, preview_osl) def free(engine): |