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/render/object.cpp')
-rw-r--r--intern/cycles/render/object.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index e03160954bc..b981d2b8849 100644
--- a/intern/cycles/render/object.cpp
+++ b/intern/cycles/render/object.cpp
@@ -604,9 +604,16 @@ void ObjectManager::device_update_flags(Device *,
foreach(Object *object, scene->objects) {
if(object->mesh->has_volume) {
object_flag[object_index] |= SD_OBJECT_HAS_VOLUME;
+ object_flag[object_index] &= ~SD_OBJECT_HAS_VOLUME_ATTRIBUTES;
+
+ foreach(Attribute& attr, object->mesh->attributes.attributes) {
+ if(attr.element == ATTR_ELEMENT_VOXEL) {
+ object_flag[object_index] |= SD_OBJECT_HAS_VOLUME_ATTRIBUTES;
+ }
+ }
}
else {
- object_flag[object_index] &= ~SD_OBJECT_HAS_VOLUME;
+ object_flag[object_index] &= ~(SD_OBJECT_HAS_VOLUME|SD_OBJECT_HAS_VOLUME_ATTRIBUTES);
}
if(object->is_shadow_catcher) {
object_flag[object_index] |= SD_OBJECT_SHADOW_CATCHER;