Cycles Volume Render: these changes should have included in the last commit.

This commit is contained in:
Brecht Van Lommel 2013-12-31 17:33:55 +01:00
parent 9cd2b19999
commit aaabac069f
2 changed files with 9 additions and 6 deletions

View File

@ -17,6 +17,7 @@
#include "attribute.h"
#include "graph.h"
#include "nodes.h"
#include "shader.h"
#include "util_algorithm.h"
#include "util_debug.h"
@ -121,11 +122,15 @@ void ShaderNode::attributes(Shader *shader, AttributeRequestSet *attributes)
foreach(ShaderInput *input, inputs) {
if(!input->link) {
if(input->default_value == ShaderInput::TEXTURE_GENERATED) {
attributes->add(ATTR_STD_GENERATED);
attributes->add(ATTR_STD_GENERATED_TRANSFORM); // XXX only for volumes!
if(shader->has_surface)
attributes->add(ATTR_STD_GENERATED);
if(shader->has_volume)
attributes->add(ATTR_STD_GENERATED_TRANSFORM);
}
else if(input->default_value == ShaderInput::TEXTURE_UV) {
if(shader->has_surface)
attributes->add(ATTR_STD_UV);
}
else if(input->default_value == ShaderInput::TEXTURE_UV)
attributes->add(ATTR_STD_UV);
}
}
}

View File

@ -931,8 +931,6 @@ static void node_shader_buts_volume(uiLayout *layout, bContext *C, PointerRNA *U
if (cscene.data && RNA_enum_get(&cscene, "device") == 1)
uiItemL(layout, IFACE_("Volumes not supported on GPU"), ICON_ERROR);
else
uiItemL(layout, IFACE_("Volumes are work in progress"), ICON_ERROR);
}
}