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
57f937ad5a
commit
a7d5cabd4e
Notes:
blender-bot
2023-02-14 10:54:29 +01:00
Referenced by issue #49405, Crash when baking with adaptive subdivision
|
@ -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