[Bf-blender-cvs] [67e32b3] master: Fix T45514 crash entering texpaint mode.
Antony Riakiotakis
noreply at git.blender.org
Thu Aug 20 09:35:35 CEST 2015
Commit: 67e32b31951b8b570148bd8b456afac27bb9645a
Author: Antony Riakiotakis
Date: Thu Aug 20 10:35:14 2015 +0300
Branches: master
https://developer.blender.org/rB67e32b31951b8b570148bd8b456afac27bb9645a
Fix T45514 crash entering texpaint mode.
In the file of the report, stencil and clone indices
have fallen out of synch with the uv/mtexpoly layers.
Looks like the file has a long history, coming from 2.49
even. Unfortunately reporter cannot recall exact steps
to reproduce, so "fix" is to patch mesh.validate to
fix those indices.
===================================================================
M source/blender/blenkernel/intern/mesh_validate.c
===================================================================
diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c
index 418c291..e21dde9 100644
--- a/source/blender/blenkernel/intern/mesh_validate.c
+++ b/source/blender/blenkernel/intern/mesh_validate.c
@@ -980,6 +980,24 @@ bool BKE_mesh_validate_all_customdata(CustomData *vdata, CustomData *edata,
MAX_MCOL, tot_vcolloop - MAX_MCOL);
}
+ /* check indices of clone/stencil */
+ if (do_fixes && CustomData_get_clone_layer(pdata, CD_MTEXPOLY) >= tot_texpoly) {
+ CustomData_set_layer_clone(pdata, CD_MTEXPOLY, 0);
+ is_change_p = true;
+ }
+ if (do_fixes && CustomData_get_clone_layer(ldata, CD_MLOOPUV) >= tot_uvloop) {
+ CustomData_set_layer_clone(ldata, CD_MLOOPUV, 0);
+ is_change_l = true;
+ }
+ if (do_fixes && CustomData_get_stencil_layer(pdata, CD_MTEXPOLY) >= tot_texpoly) {
+ CustomData_set_layer_stencil(pdata, CD_MTEXPOLY, 0);
+ is_change_p = true;
+ }
+ if (do_fixes && CustomData_get_stencil_layer(ldata, CD_MLOOPUV) >= tot_uvloop) {
+ CustomData_set_layer_stencil(ldata, CD_MLOOPUV, 0);
+ is_change_l = true;
+ }
+
*r_change = (is_change_v || is_change_e || is_change_l || is_change_p);
return is_valid;
More information about the Bf-blender-cvs
mailing list