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:
authorLukas Toenne <lukas.toenne@googlemail.com>2012-09-05 21:08:56 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-09-05 21:08:56 +0400
commit674d295df3931f3ebbfa5bca549bf000c1abe362 (patch)
tree91ef3ac7c934c19a219560d542c4de69aa06587b /intern/cycles/render/attribute.cpp
parentc1dc3753790038d94dd088923f0bb7f97e5ed6f9 (diff)
Fix for attribute lookup in OSL. This uses a map in the OSL globals instead of the device texture.
Diffstat (limited to 'intern/cycles/render/attribute.cpp')
-rw-r--r--intern/cycles/render/attribute.cpp26
1 files changed, 1 insertions, 25 deletions
diff --git a/intern/cycles/render/attribute.cpp b/intern/cycles/render/attribute.cpp
index 7296f8bebba..5122c1af410 100644
--- a/intern/cycles/render/attribute.cpp
+++ b/intern/cycles/render/attribute.cpp
@@ -84,30 +84,6 @@ bool Attribute::same_storage(TypeDesc a, TypeDesc b)
return false;
}
-ustring Attribute::standard_name(AttributeStandard std)
-{
- if(std == ATTR_STD_VERTEX_NORMAL)
- return ustring("N");
- else if(std == ATTR_STD_FACE_NORMAL)
- return ustring("Ng");
- else if(std == ATTR_STD_UV)
- return ustring("uv");
- else if(std == ATTR_STD_GENERATED)
- return ustring("generated");
- else if(std == ATTR_STD_POSITION_UNDEFORMED)
- return ustring("undeformed");
- else if(std == ATTR_STD_POSITION_UNDISPLACED)
- return ustring("undisplaced");
- else if(std == ATTR_STD_MOTION_PRE)
- return ustring("motion_pre");
- else if(std == ATTR_STD_MOTION_POST)
- return ustring("motion_post");
- else if(std == ATTR_STD_PARTICLE)
- return ustring("particle");
-
- return ustring();
-}
-
/* Attribute Set */
AttributeSet::AttributeSet()
@@ -178,7 +154,7 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name)
Attribute *attr = NULL;
if(name == ustring())
- name = Attribute::standard_name(std);
+ name = attribute_standard_name(std);
if(std == ATTR_STD_VERTEX_NORMAL)
attr = add(name, TypeDesc::TypeNormal, Attribute::VERTEX);