diff options
Diffstat (limited to 'source/blender/editors/geometry/geometry_attributes.c')
-rw-r--r-- | source/blender/editors/geometry/geometry_attributes.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/editors/geometry/geometry_attributes.c b/source/blender/editors/geometry/geometry_attributes.c index b2ecee90a57..9b034d82a51 100644 --- a/source/blender/editors/geometry/geometry_attributes.c +++ b/source/blender/editors/geometry/geometry_attributes.c @@ -109,14 +109,6 @@ void GEOMETRY_OT_attribute_add(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_SKIP_SAVE); prop = RNA_def_enum(ot->srna, - "data_type", - rna_enum_attribute_type_items, - CD_PROP_FLOAT, - "Data Type", - "Type of data stored in attribute"); - RNA_def_property_flag(prop, PROP_SKIP_SAVE); - - prop = RNA_def_enum(ot->srna, "domain", rna_enum_attribute_domain_items, ATTR_DOMAIN_POINT, @@ -124,6 +116,14 @@ void GEOMETRY_OT_attribute_add(wmOperatorType *ot) "Type of element that attribute is stored on"); RNA_def_enum_funcs(prop, geometry_attribute_domain_itemf); RNA_def_property_flag(prop, PROP_SKIP_SAVE); + + prop = RNA_def_enum(ot->srna, + "data_type", + rna_enum_attribute_type_items, + CD_PROP_FLOAT, + "Data Type", + "Type of data stored in attribute"); + RNA_def_property_flag(prop, PROP_SKIP_SAVE); } static int geometry_attribute_remove_exec(bContext *C, wmOperator *op) @@ -140,6 +140,11 @@ static int geometry_attribute_remove_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; } + int *active_index = BKE_id_attributes_active_index_p(id); + if (*active_index > 0) { + *active_index -= 1; + } + DEG_id_tag_update(id, ID_RECALC_GEOMETRY); WM_main_add_notifier(NC_GEOM | ND_DATA, id); |