Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-08-25 23:51:44 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-10-11 11:18:59 +0300
commit552d15c97698ac4270c462385a9b111f6e8329c3 (patch)
treee411f497c311ee30d7cdb1215634c395b33c7c5c /intern/cycles/render/attribute.cpp
parent4782000fd5b2a1ae3041884f64ab192dbcb853c0 (diff)
Cycles: Add utility function to remove given attribute
Diffstat (limited to 'intern/cycles/render/attribute.cpp')
-rw-r--r--intern/cycles/render/attribute.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/intern/cycles/render/attribute.cpp b/intern/cycles/render/attribute.cpp
index e157a385904..9dff18691cd 100644
--- a/intern/cycles/render/attribute.cpp
+++ b/intern/cycles/render/attribute.cpp
@@ -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) {