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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-10-06 15:52:54 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-10-06 15:52:54 +0400
commit098d611c7b8dc5178c5dd89fc02148ab2ed5b983 (patch)
treefd6ec133653f30657d3f06fb4ad22f72b06d1a80 /intern/cycles
parenta2d8cf333fb61de97270c1dce732a72915f20dd4 (diff)
Fix for UV texture coordinate problem in cycles, after recent fix.
Diffstat (limited to 'intern/cycles')
-rw-r--r--intern/cycles/render/nodes.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index 8173f5d0af2..4e16eea2774 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -1650,10 +1650,12 @@ TextureCoordinateNode::TextureCoordinateNode()
void TextureCoordinateNode::attributes(AttributeRequestSet *attributes)
{
- if(!output("Generated")->links.empty())
- attributes->add(ATTR_STD_GENERATED);
- if(!output("UV")->links.empty())
- attributes->add(ATTR_STD_UV);
+ if(!from_dupli) {
+ if(!output("Generated")->links.empty())
+ attributes->add(ATTR_STD_GENERATED);
+ if(!output("UV")->links.empty())
+ attributes->add(ATTR_STD_UV);
+ }
ShaderNode::attributes(attributes);
}
@@ -1704,13 +1706,13 @@ void TextureCoordinateNode::compile(SVMCompiler& compiler)
out = output("UV");
if(!out->links.empty()) {
if(from_dupli) {
- int attr = compiler.attribute(ATTR_STD_UV);
compiler.stack_assign(out);
- compiler.add_node(attr_node, attr, out->stack_offset, NODE_ATTR_FLOAT3);
+ compiler.add_node(texco_node, NODE_TEXCO_DUPLI_UV, out->stack_offset);
}
else {
+ int attr = compiler.attribute(ATTR_STD_UV);
compiler.stack_assign(out);
- compiler.add_node(texco_node, NODE_TEXCO_DUPLI_UV, out->stack_offset);
+ compiler.add_node(attr_node, attr, out->stack_offset, NODE_ATTR_FLOAT3);
}
}