diff options
Diffstat (limited to 'intern/cycles/render/nodes.cpp')
-rw-r--r-- | intern/cycles/render/nodes.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp index 14ef3c68ad3..d1297c9dc94 100644 --- a/intern/cycles/render/nodes.cpp +++ b/intern/cycles/render/nodes.cpp @@ -142,6 +142,7 @@ ImageTextureNode::ImageTextureNode() slot = -1; is_float = -1; filename = ""; + is_builtin = false; color_space = ustring("Color"); projection = ustring("Flat");; projection_blend = 0.0f; @@ -155,7 +156,7 @@ ImageTextureNode::ImageTextureNode() ImageTextureNode::~ImageTextureNode() { if(image_manager) - image_manager->remove_image(filename); + image_manager->remove_image(filename, is_builtin); } ShaderNode *ImageTextureNode::clone() const @@ -176,7 +177,7 @@ void ImageTextureNode::compile(SVMCompiler& compiler) image_manager = compiler.image_manager; if(is_float == -1) { bool is_float_bool; - slot = image_manager->add_image(filename, animated, is_float_bool); + slot = image_manager->add_image(filename, is_builtin, animated, is_float_bool); is_float = (int)is_float_bool; } @@ -237,7 +238,7 @@ void ImageTextureNode::compile(OSLCompiler& compiler) tex_mapping.compile(compiler); if(is_float == -1) - is_float = (int)image_manager->is_float_image(filename); + is_float = (int)image_manager->is_float_image(filename, false); compiler.parameter("filename", filename.c_str()); if(is_float || color_space != "Color") @@ -271,6 +272,7 @@ EnvironmentTextureNode::EnvironmentTextureNode() slot = -1; is_float = -1; filename = ""; + is_builtin = false; color_space = ustring("Color"); projection = ustring("Equirectangular"); animated = false; @@ -283,7 +285,7 @@ EnvironmentTextureNode::EnvironmentTextureNode() EnvironmentTextureNode::~EnvironmentTextureNode() { if(image_manager) - image_manager->remove_image(filename); + image_manager->remove_image(filename, is_builtin); } ShaderNode *EnvironmentTextureNode::clone() const @@ -304,7 +306,7 @@ void EnvironmentTextureNode::compile(SVMCompiler& compiler) image_manager = compiler.image_manager; if(slot == -1) { bool is_float_bool; - slot = image_manager->add_image(filename, animated, is_float_bool); + slot = image_manager->add_image(filename, is_builtin, animated, is_float_bool); is_float = (int)is_float_bool; } @@ -354,7 +356,7 @@ void EnvironmentTextureNode::compile(OSLCompiler& compiler) tex_mapping.compile(compiler); if(is_float == -1) - is_float = (int)image_manager->is_float_image(filename); + is_float = (int)image_manager->is_float_image(filename, false); compiler.parameter("filename", filename.c_str()); compiler.parameter("projection", projection); |