diff options
author | Mai Lavelle <mai.lavelle@gmail.com> | 2016-04-12 00:07:42 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-04-12 00:13:51 +0300 |
commit | d456458e06cfdccf7c874df63faf9ffca4812555 (patch) | |
tree | fcb298d468973bb70f1175d1a0985b2e8da27672 /intern/cycles/blender | |
parent | ebfdd7da83200f2890b28dd5ef9a0fc8c6ab9137 (diff) |
Cycles microdisplacement: change use subdivision bool to subdivision type enum
This is only the UI change, there is no underlying code change in this commit.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D1910
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/addon/properties.py | 15 | ||||
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 2 | ||||
-rw-r--r-- | intern/cycles/blender/blender_mesh.cpp | 2 |
3 files changed, 13 insertions, 6 deletions
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index 3b5755e8062..68f5f4b12f2 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -46,6 +46,12 @@ enum_displacement_methods = ( ('BOTH', "Both", "Combination of displacement and bump mapping"), ) +enum_subdivision_types = ( + ('NONE', "None", "No subdivision"), + ('LINEAR', "Linear", "Use linear subdivision"), + ('CATMULL_CLARK', "Catmull–Clark", "Use Catmull-Clark subdivision"), + ) + enum_bvh_types = ( ('DYNAMIC_BVH', "Dynamic BVH", "Objects can be individually updated, at the cost of slower render time"), ('STATIC_BVH', "Static BVH", "Any object modification requires a complete BVH rebuild, but renders faster"), @@ -931,10 +937,11 @@ class CyclesMeshSettings(bpy.types.PropertyGroup): items=enum_displacement_methods, default='BUMP', ) - cls.use_subdivision = BoolProperty( - name="Use Subdivision", - description="Subdivide mesh for rendering", - default=False, + cls.subdivision_type = EnumProperty( + name="Subdivision Type", + description="Type of subdivision to use", + items=enum_subdivision_types, + default='NONE', ) cls.dicing_rate = FloatProperty( name="Dicing Rate", diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index b9e51dfddd4..951b03e483a 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -682,7 +682,7 @@ class Cycles_PT_mesh_displacement(CyclesButtonsPanel, Panel): cdata = mball.cycles layout.prop(cdata, "displacement_method", text="Method") - layout.prop(cdata, "use_subdivision") + layout.prop(cdata, "subdivision_type", text="Subdivision") layout.prop(cdata, "dicing_rate") diff --git a/intern/cycles/blender/blender_mesh.cpp b/intern/cycles/blender/blender_mesh.cpp index 48c14a34aad..baff3c206b7 100644 --- a/intern/cycles/blender/blender_mesh.cpp +++ b/intern/cycles/blender/blender_mesh.cpp @@ -808,7 +808,7 @@ Mesh *BlenderSync::sync_mesh(BL::Object& b_ob, if(b_mesh) { if(render_layer.use_surfaces && !hide_tris) { - if(cmesh.data && experimental && RNA_boolean_get(&cmesh, "use_subdivision")) + if(cmesh.data && experimental && RNA_enum_get(&cmesh, "use_subdivision")) create_subd_mesh(scene, mesh, b_ob, b_mesh, &cmesh, used_shaders); else create_mesh(scene, mesh, b_mesh, used_shaders); |