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:
authorBrecht Van Lommel <brecht@blender.org>2020-07-03 16:30:04 +0300
committerBrecht Van Lommel <brecht@blender.org>2020-09-09 18:01:17 +0300
commit565510bd7fd87ae146cabafb27f1dfd550450f58 (patch)
tree57ff84b2aa4ba7e5c1dc0511be858d6b3bf156e6 /source/blender/makesrna/intern/rna_hair.c
parenta5db981b0ea044313239c3cc2ee92d19a8f682ea (diff)
Geometry: add .attributes in the Python API for Mesh, Hair and Point Cloud
This puts all generic float/int/vector/color/string geometry attributes in a new .attributes property. For meshes it provides a more general API for existing attributes, for point clouds attributes will be used as an essential part of particle nodes. This patch was implemented by @lichtwerk, with further changes by me. It's still a work in progress, but posting here to show what is going on and for early feedback. Ref T76659 Differential Revision: https://developer.blender.org/D8200
Diffstat (limited to 'source/blender/makesrna/intern/rna_hair.c')
-rw-r--r--source/blender/makesrna/intern/rna_hair.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_hair.c b/source/blender/makesrna/intern/rna_hair.c
index f6dc93323fe..4ca66c6b583 100644
--- a/source/blender/makesrna/intern/rna_hair.c
+++ b/source/blender/makesrna/intern/rna_hair.c
@@ -34,6 +34,7 @@
# include "BLI_math_vector.h"
+# include "BKE_attribute.h"
# include "BKE_hair.h"
# include "DEG_depsgraph.h"
@@ -224,6 +225,9 @@ static void rna_def_hair(BlenderRNA *brna)
RNA_def_property_collection_funcs(
prop, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
+ /* attributes */
+ rna_def_attributes_common(srna);
+
/* common */
rna_def_animdata_common(srna);
}