forked from bartvdbraak/blender
Cycles: Add utility function to remove given attribute
This commit is contained in:
parent
4782000fd5
commit
552d15c976
@ -502,6 +502,16 @@ Attribute *AttributeSet::find(AttributeRequest& req)
|
||||
return find(req.std);
|
||||
}
|
||||
|
||||
void AttributeSet::remove(Attribute *attribute)
|
||||
{
|
||||
if(attribute->std == ATTR_STD_NONE) {
|
||||
remove(attribute->name);
|
||||
}
|
||||
else {
|
||||
remove(attribute->std);
|
||||
}
|
||||
}
|
||||
|
||||
void AttributeSet::resize(bool reserve_only)
|
||||
{
|
||||
foreach(Attribute& attr, attributes) {
|
||||
|
@ -120,6 +120,8 @@ public:
|
||||
|
||||
Attribute *find(AttributeRequest& req);
|
||||
|
||||
void remove(Attribute *attribute);
|
||||
|
||||
void resize(bool reserve_only = false);
|
||||
void clear();
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user