Fix T92288, T96041: instancing of shared mesh objects without modifiers broken
New code from the vertex normal refactorcfa53e0fbe
combined with older code from592759e3d6
that disabled instancing for custom normals and autosmooth meant that instancing was always disabled. However we do not need to disable instancing for custom normals and autosmooth at all, this can be shared between instances just fine.
This commit is contained in:
@@ -1304,12 +1304,7 @@ static void mesh_calc_modifiers(struct Depsgraph *depsgraph,
|
||||
* we need to apply these back onto the Mesh. If we have no
|
||||
* Mesh then we need to build one. */
|
||||
if (mesh_final == nullptr) {
|
||||
/* NOTE: this check on cdmask is a bit dodgy, it handles the issue at stake here (see T68211),
|
||||
* but other cases might require similar handling?
|
||||
* Could be a good idea to define a proper CustomData_MeshMask for that then. */
|
||||
if (deformed_verts == nullptr && allow_shared_mesh &&
|
||||
(final_datamask.lmask & CD_MASK_NORMAL) == 0 &&
|
||||
(final_datamask.pmask & CD_MASK_NORMAL) == 0) {
|
||||
if (deformed_verts == nullptr && allow_shared_mesh) {
|
||||
mesh_final = mesh_input;
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user