diff options
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/editderivedmesh.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 7 |
4 files changed, 15 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fab87c04ef9..d973c7c9465 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -254,7 +254,6 @@ if(APPLE) "Choose the minimum OSX version required: 10.4 or 10.5" FORCE) endif() - MESSAGE(STATUS ${CMAKE_GENERATOR}) if(${CMAKE_GENERATOR} MATCHES "Xcode") if(${XCODE_VERSION} VERSION_EQUAL 4 OR ${XCODE_VERSION} VERSION_GREATER 4) # Xcode 4 defaults to the Apple LLVM Compiler. diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 7e491ff5f7c..ca453cc6703 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -2628,7 +2628,7 @@ void DM_vertex_attributes_from_gpu(DerivedMesh *dm, GPUVertexAttribs *gattribs, attribs->tface[a].array = tfdata->layers[layer].data; attribs->tface[a].emOffset = tfdata->layers[layer].offset; attribs->tface[a].glIndex = gattribs->layer[b].glindex; - /* attribs->tface[a].glTexco = gattribs->layer[b].gltexco; */ /* BMESH_TODO, trunk has this but not bmesh, need to investigate whats going on here - campbell */ + attribs->tface[a].glTexco = gattribs->layer[b].gltexco; } /* BMESH ONLY, may need to get this working?, otherwise remove */ /* else { diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index 766febc0603..5a82fde8487 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -1129,12 +1129,18 @@ static void emDM_drawMappedFacesMat( #define PASSATTRIB(loop, eve, vert) { \ if (attribs.totorco) { \ - float *orco = attribs.orco.array[BM_elem_index_get(eve)]; \ - glVertexAttrib3fvARB(attribs.orco.glIndex, orco); \ + float *orco = attribs.orco.array[BM_elem_index_get(eve)]; \ + if (attribs.orco.glTexco) \ + glTexCoord3fv(orco); \ + else \ + glVertexAttrib3fvARB(attribs.orco.glIndex, orco); \ } \ for (b = 0; b < attribs.tottface; b++) { \ MLoopUV *_luv = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, CD_MLOOPUV, b);\ - glVertexAttrib2fvARB(attribs.tface[b].glIndex, _luv->uv); \ + if (attribs.tface[b].glTexco) \ + glTexCoord2fv(_luv->uv); \ + else \ + glVertexAttrib2fvARB(attribs.tface[b].glIndex, _luv->uv); \ } \ for (b = 0; b < attribs.totmcol; b++) { \ MLoopCol *_cp = CustomData_bmesh_get_n(&bm->ldata, loop->head.data, CD_MLOOPCOL, b);\ diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index d736a18068d..78c3c665797 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -116,7 +116,7 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ copycu->editnurb = NULL; nurbs_to_mesh( tmpobj ); - + /* nurbs_to_mesh changes the type to a mesh, check it worked */ if (tmpobj->type != OB_MESH) { free_libblock_us( &(G.main->object), tmpobj ); @@ -239,11 +239,14 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ break; } /* end copy materials */ + /* cycles and exporters rely on this still */ + BKE_mesh_tessface_ensure(tmpmesh); + /* we don't assign it to anything */ tmpmesh->id.us--; /* make sure materials get updated in objects */ - test_object_materials( ( ID * ) tmpmesh ); + test_object_materials(&tmpmesh->id); return tmpmesh; } |