Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <bastien@blender.org>2022-01-31 17:16:36 +0300
committerBastien Montagne <bastien@blender.org>2022-01-31 17:16:36 +0300
commit180a68c1dcc7f18d746b43803e34119f31fc323d (patch)
tree15a60f84ba3ee4775d623ba936e1027f6e2754a2 /source/blender/makesrna/intern/rna_internal.h
parentb9718899fa6448e96868de4e56a5a12835381ae1 (diff)
Fix (studio-reported) missing RNA path for EEVEE render passes.
For those EEVEE passes a bit of trickery with pointer offsets allows to get the owning viewlayer, so path generation is not too bad. Also moved ViewLayer path generation itself into a public utils, to avoid duplicating code. NOTE: Doing the same for AOV would be needed, but since pointer offsets won't help us here to find the owning viewlayer, not sure how to do it nicely yet (only solution I think is to loop over all AOVs of all ViewLayer of the scene to find it :( ). Reported by Beau Gerbrands (@Beaug), thanks.
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal.h')
-rw-r--r--source/blender/makesrna/intern/rna_internal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 4687e86916e..d4de20b5328 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -369,6 +369,13 @@ void rna_ViewLayer_active_aov_index_range(
PointerRNA *ptr, int *min, int *max, int *softmin, int *softmax);
int rna_ViewLayer_active_aov_index_get(PointerRNA *ptr);
void rna_ViewLayer_active_aov_index_set(PointerRNA *ptr, int value);
+/** Set `r_rna_path` with the base viewlayer path.
+ * `rna_path_buffer_size` should be at least `sizeof(ViewLayer.name) * 3`.
+ * \return actual length of the generayted RNA path.
+ */
+size_t rna_ViewLayer_path_buffer_get(struct ViewLayer *view_layer,
+ char *r_rna_path,
+ const size_t rna_path_buffer_size);
/* named internal so as not to conflict with obj.update() rna func */
void rna_Object_internal_update_data(struct Main *bmain,