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
This commit is contained in:
parent
4599748962
commit
6c0c766bca
Notes:
blender-bot
2023-02-14 03:21:27 +01:00
Referenced by issue #88443, Lattice still shows edges with "Bounds" display type.
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue