Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-14 20:18:44 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-11-14 20:18:44 +0400
commit01549823960705bab986329a57a89c7907e07950 (patch)
tree6d88275c732edf58030c46c795fc4d67b8958cf1 /source/blender/makesrna
parent49ccf975f25c11d217e6db462986998991383291 (diff)
Object.to_mesh() for metaball objects now only return a mesh for the basis/mother
metaball. This should fix duplicated export of metaballs for python exporters and cycles.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index c4508c718e5..5b8b9d9a6b2 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -128,16 +128,20 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
free_libblock_us( &G.main->object, tmpobj );
break;
- case OB_MBALL:
+ case OB_MBALL: {
/* metaballs don't have modifiers, so just convert to mesh */
- ob = find_basis_mball( sce, ob );
+ Object *basis_ob = find_basis_mball( sce, ob );
/* todo, re-generatre for render-res */
/* metaball_polygonize(scene, ob) */
+ if(ob != basis_ob)
+ return NULL; /* only do basis metaball */
+
tmpmesh = add_mesh("Mesh");
mball_to_mesh( &ob->disp, tmpmesh );
break;
+ }
case OB_MESH:
/* copies object and modifiers (but not the data) */
if (cage) {