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:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-10-22 18:17:03 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-10-22 18:17:03 +0400
commit1be189f000242db37c074599e75761669b1afc58 (patch)
tree6805495ef24b96462a393037a16363c93af06391 /intern/cycles/blender/blender_shader.cpp
parentd2d1b19170c5790b2ef971f5d825d3c36e008513 (diff)
Cycles: Get rid of hardcoded enum values in the code
Still need to keep enum definition in sync with the python code, but the code itself is a bit more clear to understand now.
Diffstat (limited to 'intern/cycles/blender/blender_shader.cpp')
-rw-r--r--intern/cycles/blender/blender_shader.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp
index 97f2ecc1a6c..27c2e9e9ae8 100644
--- a/intern/cycles/blender/blender_shader.cpp
+++ b/intern/cycles/blender/blender_shader.cpp
@@ -1014,8 +1014,8 @@ void BlenderSync::sync_materials(bool update_all)
shader->use_mis = get_boolean(cmat, "sample_as_light");
shader->use_transparent_shadow = get_boolean(cmat, "use_transparent_shadow");
shader->heterogeneous_volume = !get_boolean(cmat, "homogeneous_volume");
- shader->volume_sampling_method = RNA_enum_get(&cmat, "volume_sampling");
- shader->volume_interpolation_method = RNA_enum_get(&cmat, "volume_interpolation");
+ shader->volume_sampling_method = (VolumeSampling)RNA_enum_get(&cmat, "volume_sampling");
+ shader->volume_interpolation_method = (VolumeInterpolation)RNA_enum_get(&cmat, "volume_interpolation");
shader->set_graph(graph);
shader->tag_update(scene);
@@ -1045,8 +1045,8 @@ void BlenderSync::sync_world(bool update_all)
/* volume */
PointerRNA cworld = RNA_pointer_get(&b_world.ptr, "cycles");
shader->heterogeneous_volume = !get_boolean(cworld, "homogeneous_volume");
- shader->volume_sampling_method = RNA_enum_get(&cworld, "volume_sampling");
- shader->volume_interpolation_method = RNA_enum_get(&cworld, "volume_interpolation");
+ shader->volume_sampling_method = (VolumeSampling)RNA_enum_get(&cworld, "volume_sampling");
+ shader->volume_interpolation_method = (VolumeInterpolation)RNA_enum_get(&cworld, "volume_interpolation");
}
else if(b_world) {
ShaderNode *closure, *out;