diff options
Diffstat (limited to 'source/blender/blenkernel/intern/DerivedMesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 5730fd26bcc..fc226288f04 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -484,6 +484,8 @@ void DM_to_mesh(DerivedMesh *dm, Mesh *me, Object *ob, CustomDataMask mask) Mesh tmp = *me; int totvert, totedge /*, totface */ /* UNUSED */, totloop, totpoly; int did_shapekeys = 0; + float *texloc, *texrot, *texsize; + short *texflag; CustomData_reset(&tmp.vdata); CustomData_reset(&tmp.edata); @@ -529,6 +531,14 @@ void DM_to_mesh(DerivedMesh *dm, Mesh *me, Object *ob, CustomDataMask mask) shapekey_layers_to_keyblocks(dm, me, uid); did_shapekeys = 1; } + + /* copy texture space */ + if (BKE_object_obdata_texspace_get(ob, &texflag, &texloc, &texsize, &texrot)) { + tmp.texflag = *texflag; + copy_v3_v3(tmp.loc, texloc); + copy_v3_v3(tmp.size, texsize); + copy_v3_v3(tmp.rot, texrot); + } /* not all DerivedMeshes store their verts/edges/faces in CustomData, so * we set them here in case they are missing */ |