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:
authorAlexander Gavrilov <angavrilov@gmail.com>2022-09-30 18:54:26 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2022-09-30 20:01:57 +0300
commit554afabf7580d60cc1990bb9df9d9940cb1fb1c3 (patch)
treefdd40672265c948b600482d3b17d9667dbf17844 /source/blender/blenkernel/BKE_duplilist.h
parent42eda155df3b77a49c4c1aa3ddcc681e43771111 (diff)
Attribute Node: refactor lookup to remove duplication between engines.
Currently lookup of Object and Instancer attributes is completely duplicated between Cycles, Eevee and Eevee Next. This is bad design, so this patch aims to deduplicate it by introducing a common API in blenkernel. In case of Cycles this requires certain hacks, but according to Brecht it is planned to be rewritten later for more direct access to internal Blender data anyway. Differential Revision: https://developer.blender.org/D16117
Diffstat (limited to 'source/blender/blenkernel/BKE_duplilist.h')
-rw-r--r--source/blender/blenkernel/BKE_duplilist.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_duplilist.h b/source/blender/blenkernel/BKE_duplilist.h
index cc362495a24..79f37d2edde 100644
--- a/source/blender/blenkernel/BKE_duplilist.h
+++ b/source/blender/blenkernel/BKE_duplilist.h
@@ -64,6 +64,14 @@ typedef struct DupliObject {
unsigned int random_id;
} DupliObject;
+/** Look up the RGBA value of a uniform shader attribute.
+ * \return true if the attribute was found; if not, r_value is also set to zero. */
+bool BKE_object_dupli_find_rgba_attribute(struct Object *ob,
+ struct DupliObject *dupli,
+ struct Object *dupli_parent,
+ const char *name,
+ float r_value[4]);
+
#ifdef __cplusplus
}
#endif