Fix #104789: uv_layers.remove() always raises error
A simple typo from 6c774feba2. Also return
so nothing happens when the UV map isn't found.
This commit is contained in:
@@ -2385,8 +2385,9 @@ static PointerRNA rna_Mesh_uv_layers_new(struct Mesh *me,
|
||||
|
||||
static void rna_Mesh_uv_layers_remove(struct Mesh *me, ReportList *reports, CustomDataLayer *layer)
|
||||
{
|
||||
if (!BKE_id_attribute_find(&me->id, layer->name, CD_PROP_FLOAT, ATTR_DOMAIN_CORNER)) {
|
||||
if (!BKE_id_attribute_find(&me->id, layer->name, CD_PROP_FLOAT2, ATTR_DOMAIN_CORNER)) {
|
||||
BKE_reportf(reports, RPT_ERROR, "UV map '%s' not found", layer->name);
|
||||
return;
|
||||
}
|
||||
BKE_id_attribute_remove(&me->id, layer->name, reports);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user