Cycles microdisplacement: Move displacement options from mesh to material settings

Displacement is now a per material setting, which means old files will have to
be updated if they had used displacement. Cool side effect of this change is
material previews now show displacement.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2140
This commit is contained in:
2016-08-02 05:13:58 -04:00
parent dd1929754f
commit a58fe05c05
10 changed files with 201 additions and 89 deletions

View File

@@ -1008,21 +1008,6 @@ Mesh *BlenderSync::sync_mesh(BL::Object& b_ob,
}
mesh->geometry_flags = requested_geometry_flags;
/* displacement method */
if(cmesh.data) {
const int method = get_enum(cmesh,
"displacement_method",
Mesh::DISPLACE_NUM_METHODS,
Mesh::DISPLACE_BUMP);
if(method == 0 || !experimental)
mesh->displacement_method = Mesh::DISPLACE_BUMP;
else if(method == 1)
mesh->displacement_method = Mesh::DISPLACE_TRUE;
else
mesh->displacement_method = Mesh::DISPLACE_BOTH;
}
/* fluid motion */
sync_mesh_fluid_motion(b_ob, scene, mesh);