diff options
Diffstat (limited to 'intern/cycles/scene/osl.cpp')
-rw-r--r-- | intern/cycles/scene/osl.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/intern/cycles/scene/osl.cpp b/intern/cycles/scene/osl.cpp index f5ee0c0f1d3..7c8d9bcd3e2 100644 --- a/intern/cycles/scene/osl.cpp +++ b/intern/cycles/scene/osl.cpp @@ -78,6 +78,18 @@ void OSLShaderManager::reset(Scene * /*scene*/) shading_system_init(); } +uint64_t OSLShaderManager::get_attribute_id(ustring name) +{ + return name.hash(); +} + +uint64_t OSLShaderManager::get_attribute_id(AttributeStandard std) +{ + /* if standard attribute, use geom: name convention */ + ustring stdname(string("geom:") + string(Attribute::standard_name(std))); + return stdname.hash(); +} + void OSLShaderManager::device_update_specific(Device *device, DeviceScene *dscene, Scene *scene, |