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>2017-01-11 18:23:54 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-01-11 18:23:54 +0300
commit38b01415546f2530ced77e91ac2d57b37b576b07 (patch)
treeb442518a20b4d06b92016393470c75dfe2f78d06 /intern/cycles/blender/blender_util.h
parent2b66a17e50ce1971977630b3493fb198dcd9cfef (diff)
Cycles: Pass explicit subdivision type to object_to_mesh
This allows us to do some extra logic checks there based on particular subdivision type. Additionally avoids implicit cast of enum to bool.
Diffstat (limited to 'intern/cycles/blender/blender_util.h')
-rw-r--r--intern/cycles/blender/blender_util.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h
index f17a61f0ac8..92db5fdfd45 100644
--- a/intern/cycles/blender/blender_util.h
+++ b/intern/cycles/blender/blender_util.h
@@ -48,12 +48,12 @@ static inline BL::Mesh object_to_mesh(BL::BlendData& data,
bool apply_modifiers,
bool render,
bool calc_undeformed,
- bool subdivision)
+ Mesh::SubdivisionType subdivision_type)
{
bool subsurf_mod_show_render;
bool subsurf_mod_show_viewport;
- if(subdivision) {
+ if(subdivision_type != Mesh::SUBDIVISION_NONE) {
BL::Modifier subsurf_mod = object.modifiers[object.modifiers.length()-1];
subsurf_mod_show_render = subsurf_mod.show_render();
@@ -65,7 +65,7 @@ static inline BL::Mesh object_to_mesh(BL::BlendData& data,
BL::Mesh me = data.meshes.new_from_object(scene, object, apply_modifiers, (render)? 2: 1, false, calc_undeformed);
- if(subdivision) {
+ if(subdivision_type != Mesh::SUBDIVISION_NONE) {
BL::Modifier subsurf_mod = object.modifiers[object.modifiers.length()-1];
subsurf_mod.show_render(subsurf_mod_show_render);
@@ -76,7 +76,7 @@ static inline BL::Mesh object_to_mesh(BL::BlendData& data,
if(me.use_auto_smooth()) {
me.calc_normals_split();
}
- if(!subdivision) {
+ if(subdivision_type == Mesh::SUBDIVISION_NONE) {
me.calc_tessface(true);
}
}