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:
Diffstat (limited to 'intern/cycles/scene/osl.cpp')
-rw-r--r--intern/cycles/scene/osl.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/intern/cycles/scene/osl.cpp b/intern/cycles/scene/osl.cpp
index f5ee0c0f1d3..93839facdbe 100644
--- a/intern/cycles/scene/osl.cpp
+++ b/intern/cycles/scene/osl.cpp
@@ -17,7 +17,6 @@
# include "kernel/osl/globals.h"
# include "kernel/osl/services.h"
-# include "kernel/osl/shader.h"
# include "util/aligned_malloc.h"
# include "util/foreach.h"
@@ -78,6 +77,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,
@@ -286,7 +297,7 @@ void OSLShaderManager::shading_system_init()
const int nraytypes = sizeof(raytypes) / sizeof(raytypes[0]);
ss_shared->attribute("raytypes", TypeDesc(TypeDesc::STRING, nraytypes), raytypes);
- OSLShader::register_closures((OSLShadingSystem *)ss_shared);
+ OSLRenderServices::register_closures(ss_shared);
loaded_shaders.clear();
}