diff options
author | Thomas Dinges <blender@dingto.org> | 2013-12-26 05:02:14 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2013-12-26 05:02:14 +0400 |
commit | a649b6eef515aacccf01114c0bfa87cb22b29c22 (patch) | |
tree | 67c40aabea8c1d2595ea2ea6c2b8f98da60c511b /intern/cycles/blender | |
parent | ef9a9428a5aa5db713435bd86bbef0ddec7d99d1 (diff) |
Cycles / Hair: Some cleanup and optimizations for hair code.
* Remove dead code from line segments BVH refine.
CURVE_KN_TANGENTGNORMAL and CURVE_KN_TRUETANGENTGNORMAL are either both true, or both false. Therefore a true/false condition is impossible.
This was a leftover of CURVE_CUSTOM, which was removed in r59234.
* Use "else if" in blender_curves.cpp.
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/blender_curves.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp index c47f410a742..d13c532533e 100644 --- a/intern/cycles/blender/blender_curves.cpp +++ b/intern/cycles/blender/blender_curves.cpp @@ -701,11 +701,11 @@ void BlenderSync::sync_curve_settings() curve_system_manager->triangle_method = CURVE_CAMERA_TRIANGLES; curve_system_manager->resolution = 1; } - if(curve_system_manager->primitive == CURVE_TRIANGLES && curve_system_manager->curve_shape == CURVE_THICK) { + else if(curve_system_manager->primitive == CURVE_TRIANGLES && curve_system_manager->curve_shape == CURVE_THICK) { /* camera facing planes */ curve_system_manager->triangle_method = CURVE_TESSELATED_TRIANGLES; } - if(curve_system_manager->primitive == CURVE_LINE_SEGMENTS && curve_system_manager->curve_shape == CURVE_RIBBON) { + else if(curve_system_manager->primitive == CURVE_LINE_SEGMENTS && curve_system_manager->curve_shape == CURVE_RIBBON) { /* tangent shading */ curve_system_manager->line_method = CURVE_UNCORRECTED; curve_system_manager->use_encasing = true; @@ -713,13 +713,13 @@ void BlenderSync::sync_curve_settings() curve_system_manager->use_tangent_normal = true; curve_system_manager->use_tangent_normal_geometry = true; } - if(curve_system_manager->primitive == CURVE_LINE_SEGMENTS && curve_system_manager->curve_shape == CURVE_THICK) { + else if(curve_system_manager->primitive == CURVE_LINE_SEGMENTS && curve_system_manager->curve_shape == CURVE_THICK) { curve_system_manager->line_method = CURVE_ACCURATE; curve_system_manager->use_encasing = false; curve_system_manager->use_tangent_normal = false; curve_system_manager->use_tangent_normal_geometry = false; } - if(curve_system_manager->primitive == CURVE_SEGMENTS && curve_system_manager->curve_shape == CURVE_RIBBON) { + else if(curve_system_manager->primitive == CURVE_SEGMENTS && curve_system_manager->curve_shape == CURVE_RIBBON) { curve_system_manager->primitive = CURVE_RIBBONS; curve_system_manager->use_backfacing = false; } |