diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-08-04 12:35:44 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-08-04 18:11:00 +0300 |
commit | f130cd116904a130e5ca9ae5dc86039a738016ab (patch) | |
tree | e860090ebac85282533d6c736becb26d36f48645 /source/blender/makesrna/intern/rna_object.c | |
parent | 89baafc8e2587b708502b4503f4289b7ef9f329f (diff) |
Point Clouds: basic support for instancing objects on points
Same exact system as instancing on vertices for a mesh. More powerful ways
of instancing will be added at some later point, but this makes the basics
works and is consistent with other geometry types.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 84b83bee089..08ca3f16b6d 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -193,6 +193,12 @@ static EnumPropertyItem instance_items_nogroup[] = { INSTANCE_ITEMS_SHARED, {0, NULL, 0, NULL, NULL}, }; + +static EnumPropertyItem instance_items_pointcloud[] = { + {0, "NONE", 0, "None", ""}, + {OB_DUPLIVERTS, "POINTS", 0, "Points", "Instantiate child objects on all points"}, + {0, NULL, 0, NULL, NULL}, +}; #endif #undef INSTANCE_ITEMS_SHARED #undef INSTANCE_ITEM_COLLECTION @@ -707,6 +713,9 @@ static const EnumPropertyItem *rna_Object_instance_type_itemf(bContext *UNUSED(C if (ob->type == OB_EMPTY) { item = instance_items; } + else if (ob->type == OB_POINTCLOUD) { + item = instance_items_pointcloud; + } else { item = instance_items_nogroup; } |