Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_space.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 3,071 Lines • ▼ Show 20 Lines | if (used_object != NULL) { | ||||
| component_type = GEO_COMPONENT_TYPE_POINT_CLOUD; | component_type = GEO_COMPONENT_TYPE_POINT_CLOUD; | ||||
| } | } | ||||
| else { | else { | ||||
| component_type = GEO_COMPONENT_TYPE_MESH; | component_type = GEO_COMPONENT_TYPE_MESH; | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| static EnumPropertyItem mesh_vertex_domain_item = { | |||||
| ATTR_DOMAIN_POINT, "POINT", 0, "Vertex", "Attribute per point/vertex"}; | |||||
| EnumPropertyItem *item_array = NULL; | EnumPropertyItem *item_array = NULL; | ||||
| int items_len = 0; | int items_len = 0; | ||||
| for (const EnumPropertyItem *item = rna_enum_attribute_domain_items; item->identifier != NULL; | for (const EnumPropertyItem *item = rna_enum_attribute_domain_items; item->identifier != NULL; | ||||
| item++) { | item++) { | ||||
| if (component_type == GEO_COMPONENT_TYPE_MESH) { | if (component_type == GEO_COMPONENT_TYPE_MESH) { | ||||
| if (!ELEM(item->value, | if (!ELEM(item->value, | ||||
| ATTR_DOMAIN_CORNER, | ATTR_DOMAIN_CORNER, | ||||
| ATTR_DOMAIN_EDGE, | ATTR_DOMAIN_EDGE, | ||||
| ATTR_DOMAIN_POINT, | ATTR_DOMAIN_POINT, | ||||
| ATTR_DOMAIN_FACE)) { | ATTR_DOMAIN_FACE)) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| if (component_type == GEO_COMPONENT_TYPE_POINT_CLOUD) { | if (component_type == GEO_COMPONENT_TYPE_POINT_CLOUD) { | ||||
| if (item->value != ATTR_DOMAIN_POINT) { | if (item->value != ATTR_DOMAIN_POINT) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| } | } | ||||
| if (item->value == ATTR_DOMAIN_POINT && component_type == GEO_COMPONENT_TYPE_MESH) { | |||||
| RNA_enum_item_add(&item_array, &items_len, &mesh_vertex_domain_item); | |||||
| } | |||||
| else { | |||||
| RNA_enum_item_add(&item_array, &items_len, item); | RNA_enum_item_add(&item_array, &items_len, item); | ||||
| } | } | ||||
| } | |||||
| RNA_enum_item_end(&item_array, &items_len); | RNA_enum_item_end(&item_array, &items_len); | ||||
| *r_free = true; | *r_free = true; | ||||
| return item_array; | return item_array; | ||||
| } | } | ||||
| #else | #else | ||||
| ▲ Show 20 Lines • Show All 4,334 Lines • Show Last 20 Lines | |||||