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:
authorCampbell Barton <ideasman42@gmail.com>2009-09-22 21:50:29 +0400
committerCampbell Barton <ideasman42@gmail.com>2009-09-22 21:50:29 +0400
commitb4ef0c7d8d9b4197d209193743e76099cf042ec7 (patch)
tree4f2951f73c5e6744ce8dba9fe8b5bee81e6dbecf /source/blender/makesrna/intern/rna_object_api.c
parentabb49829ef6bdc7385e51a00a3e2d5402dc09155 (diff)
minor fixes for merge of soc-2009-kazanbas, rev23422
- Use CTX_data_main(C) over G.main - no need to define object_type_items inline. - rna_mesh.c - dynamic length array was commented out, not sure why this was needed. Povray and PLY scripts rely on faces having 3/4 verts rather then checking the 4th index is 0 (ok in C, not nice in py).
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index f809868c130..af6254a99b0 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -114,7 +114,7 @@ static Mesh *rna_Object_create_mesh(Object *ob, bContext *C, ReportList *reports
/* nurbs_to_mesh changes the type to a mesh, check it worked */
if (tmpobj->type != OB_MESH) {
- free_libblock_us( &G.main->object, tmpobj );
+ free_libblock_us( &(CTX_data_main(C)->object), tmpobj );
BKE_report(reports, RPT_ERROR, "cant convert curve to mesh. Does the curve have any segments?");
return NULL;
}
@@ -125,6 +125,9 @@ static Mesh *rna_Object_create_mesh(Object *ob, bContext *C, ReportList *reports
case OB_MBALL:
/* metaballs don't have modifiers, so just convert to mesh */
ob = find_basis_mball( sce, ob );
+ /* todo, re-generatre for render-res */
+ /* metaball_polygonize(scene, ob) */
+
tmpmesh = add_mesh("Mesh");
mball_to_mesh( &ob->disp, tmpmesh );
break;