diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-12-05 19:57:57 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-12-05 19:57:57 +0400 |
commit | 72827ee53190d74ebaa083f2bb616d9bc4b2e078 (patch) | |
tree | 478e9e3b1a74059fbb0700bb214f2778b743ab79 /source/blender/makesrna/intern/rna_object_api.c | |
parent | a5434508ac871f76b6c12d528d5df8f903eda4b3 (diff) |
Fix #29507: cycles rendering of metaball animations not working.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 5b8b9d9a6b2..a87d954046a 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -130,7 +130,7 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ case OB_MBALL: { /* metaballs don't have modifiers, so just convert to mesh */ - Object *basis_ob = find_basis_mball( sce, ob ); + Object *basis_ob = find_basis_mball(sce, ob); /* todo, re-generatre for render-res */ /* metaball_polygonize(scene, ob) */ @@ -138,7 +138,15 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ return NULL; /* only do basis metaball */ tmpmesh = add_mesh("Mesh"); - mball_to_mesh( &ob->disp, tmpmesh ); + + if(render) { + ListBase disp = {NULL, NULL}; + makeDispListMBall_forRender(sce, ob, &disp); + mball_to_mesh(&disp, tmpmesh); + freedisplist(&disp); + } + else + mball_to_mesh(&ob->disp, tmpmesh); break; } |