diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-05-21 19:25:35 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-08-10 17:05:01 +0300 |
commit | 6c0c766bcaa013007e12f2fd3e308d83cd95594c (patch) | |
tree | 93075d147c3c794cc095ac656732b257d59e4f9c | |
parent | 45997489622869b206b8fdacba0586e14f402722 (diff) |
UI: hide instancing options for empties which cannot be used
Empties can only instance a collection, instancing on "Vertices" or
"Faces" does not make sense for empties, make that clear in the UI.
ref D11348
Maniphest Tasks: T88443
Differential Revision: https://developer.blender.org/D11349
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index bef430b0314..0f6b89722a4 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -218,6 +218,12 @@ static EnumPropertyItem instance_items_pointcloud[] = { {OB_DUPLIVERTS, "POINTS", 0, "Points", "Instantiate child objects on all points"}, {0, NULL, 0, NULL, NULL}, }; + +static EnumPropertyItem instance_items_empty[] = { + {0, "NONE", 0, "None", ""}, + INSTANCE_ITEM_COLLECTION, + {0, NULL, 0, NULL, NULL}, +}; #endif #undef INSTANCE_ITEMS_SHARED #undef INSTANCE_ITEM_COLLECTION @@ -751,7 +757,7 @@ static const EnumPropertyItem *rna_Object_instance_type_itemf(bContext *UNUSED(C const EnumPropertyItem *item; if (ob->type == OB_EMPTY) { - item = instance_items; + item = instance_items_empty; } else if (ob->type == OB_POINTCLOUD) { item = instance_items_pointcloud; |