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 /source/blender/makesrna/intern/makesrna.c | |
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 'source/blender/makesrna/intern/makesrna.c')
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 968baca3517..f531eb7f494 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -2539,6 +2539,12 @@ static void rna_def_struct_function_call_impl_cpp(FILE *f, StructRNA *srna, Func rna_safe_id(dp->prop->identifier)); } } + else if (dp->prop->flag_parameter & PARM_RNAPTR) { + fprintf(f, + "(::%s *) &%s", + rna_parameter_type_name(dp->prop), + rna_safe_id(dp->prop->identifier)); + } else { fprintf(f, "(::%s *) %s.ptr.data", |