diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-02-21 18:39:59 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-02-21 18:39:59 +0400 |
commit | d47b018f8d63b4ec68428011aba0c1f04c63ca73 (patch) | |
tree | afb5e27b8b288ca3c3d947b4f6c53899d1676023 /source/blender/makesrna/intern/rna_object_api.c | |
parent | 6a5b34bdb55c430622ec88afc9bbd79ffe85d502 (diff) |
Fix #30270, #30265: cycles not displaying textured objects, and not rendering
text/curve objects after the bmesh merge. Also removed a debug print.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 7 |
1 files changed, 5 insertions, 2 deletions
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; } |