Fix T49405: Crash when baking with adaptive subdivision
Blenders baking system currently doesn't support the topology used by adaptive subdivision and primitive ids will be wrong or out of range leading to crashes. Updating the baking system to support other topologies would be a bit involved, so for now we simply disable subdivision while baking to avoid crashes.
This commit is contained in:
parent
59c224ebc7
commit
672fbbfb4e
|
@ -927,6 +927,13 @@ Mesh *BlenderSync::sync_mesh(BL::Object& b_ob,
|
|||
|
||||
mesh->subdivision_type = object_subdivision_type(b_ob, preview, experimental);
|
||||
|
||||
/* Disable adaptive subdivision while baking as the baking system
|
||||
* currently doesnt support the topology and will crash.
|
||||
*/
|
||||
if(scene->bake_manager->get_baking()) {
|
||||
mesh->subdivision_type = Mesh::SUBDIVISION_NONE;
|
||||
}
|
||||
|
||||
BL::Mesh b_mesh = object_to_mesh(b_data,
|
||||
b_ob,
|
||||
b_scene,
|
||||
|
|
Loading…
Reference in New Issue