Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/geometry/geometry_attributes.c
| Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| static const EnumPropertyItem *geometry_attribute_domain_itemf(bContext *C, | static const EnumPropertyItem *geometry_attribute_domain_itemf(bContext *C, | ||||
| PointerRNA *UNUSED(ptr), | PointerRNA *UNUSED(ptr), | ||||
| PropertyRNA *UNUSED(prop), | PropertyRNA *UNUSED(prop), | ||||
| bool *r_free) | bool *r_free) | ||||
| { | { | ||||
| Object *ob = ED_object_context(C); | Object *ob = ED_object_context(C); | ||||
| if (ob != NULL) { | |||||
| return rna_enum_attribute_domain_itemf(ob->data, r_free); | return rna_enum_attribute_domain_itemf(ob->data, r_free); | ||||
| } | } | ||||
| return DummyRNA_NULL_items; | |||||
| } | |||||
| static int geometry_attribute_add_exec(bContext *C, wmOperator *op) | static int geometry_attribute_add_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| Object *ob = ED_object_context(C); | Object *ob = ED_object_context(C); | ||||
| ID *id = ob->data; | ID *id = ob->data; | ||||
| char name[MAX_NAME]; | char name[MAX_NAME]; | ||||
| RNA_string_get(op->ptr, "name", name); | RNA_string_get(op->ptr, "name", name); | ||||
| CustomDataType type = (CustomDataType)RNA_enum_get(op->ptr, "data_type"); | CustomDataType type = (CustomDataType)RNA_enum_get(op->ptr, "data_type"); | ||||
| ▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines | |||||