Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/blender_mesh.cpp
| Show First 20 Lines • Show All 562 Lines • ▼ Show 20 Lines | Mesh *BlenderSync::sync_mesh(BL::Object b_ob, bool object_updated, bool hide_tris) | ||||
| * adjustsments in dynamic BVH - other methods could probably do this better*/ | * adjustsments in dynamic BVH - other methods could probably do this better*/ | ||||
| vector<float4> oldcurve_keys = mesh->curve_keys; | vector<float4> oldcurve_keys = mesh->curve_keys; | ||||
| mesh->clear(); | mesh->clear(); | ||||
| mesh->used_shaders = used_shaders; | mesh->used_shaders = used_shaders; | ||||
| mesh->name = ustring(b_ob_data.name().c_str()); | mesh->name = ustring(b_ob_data.name().c_str()); | ||||
| if(render_layer.use_surfaces || render_layer.use_hair) { | if(render_layer.use_surfaces || render_layer.use_hair) { | ||||
| if(preview) | /* mesh objects does have special handle in the dependency graph, | ||||
| * they're ensured to have properly updated. | |||||
| * | |||||
| * updating meshes here will end up having derived mesh referencing | |||||
| * freed data from the blender side. | |||||
| */ | |||||
| if(preview && b_ob.type() != BL::Object::type_MESH) | |||||
| b_ob.update_from_editmode(); | b_ob.update_from_editmode(); | ||||
| bool need_undeformed = mesh->need_attribute(scene, ATTR_STD_GENERATED); | bool need_undeformed = mesh->need_attribute(scene, ATTR_STD_GENERATED); | ||||
| BL::Mesh b_mesh = object_to_mesh(b_data, b_ob, b_scene, true, !preview, need_undeformed); | BL::Mesh b_mesh = object_to_mesh(b_data, b_ob, b_scene, true, !preview, need_undeformed); | ||||
| if(b_mesh) { | if(b_mesh) { | ||||
| if(render_layer.use_surfaces && !hide_tris) { | if(render_layer.use_surfaces && !hide_tris) { | ||||
| if(cmesh.data && experimental && RNA_boolean_get(&cmesh, "use_subdivision")) | if(cmesh.data && experimental && RNA_boolean_get(&cmesh, "use_subdivision")) | ||||
| ▲ Show 20 Lines • Show All 205 Lines • Show Last 20 Lines | |||||