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>2012-02-08 09:45:16 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-08 09:45:16 +0400
commit19d0f93099b0964fca66c4f4b1651260b749a73d (patch)
treedbc9dabdc2e87dba0d35d0a947b70abb5f07af08 /source/blender/makesrna/intern/rna_object_api.c
parent873fe5cb59deac0918135e2226c6d2b3cbc743ef (diff)
parent054e10ac135eee0eb6d4a0e3ca5a3e8ae5a94cea (diff)
svn merge ^/trunk/blender -r43934:43976
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 6783e5d4788..d736a18068d 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -80,7 +80,7 @@
Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_modifiers, int settings)
{
Mesh *tmpmesh;
- Curve *tmpcu = NULL;
+ Curve *tmpcu = NULL, *copycu;
Object *tmpobj = NULL;
int render = settings == eModifierMode_Render, i;
int cage = !apply_modifiers;
@@ -101,22 +101,20 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
object_free_modifiers(tmpobj);
/* copies the data */
- tmpobj->data = copy_curve( (Curve *) ob->data );
+ copycu = tmpobj->data = copy_curve( (Curve *) ob->data );
-#if 0
- /* copy_curve() sets disp.first null, so currently not need */
- {
- Curve *cu;
- cu = (Curve *)tmpobj->data;
- if( cu->disp.first )
- MEM_freeN( cu->disp.first );
- cu->disp.first = NULL;
- }
-
-#endif
+ /* temporarily set edit so we get updates from edit mode, but
+ also because for text datablocks copying it while in edit
+ mode gives invalid data structures */
+ copycu->editfont = tmpcu->editfont;
+ copycu->editnurb = tmpcu->editnurb;
/* get updated display list, and convert to a mesh */
makeDispListCurveTypes( sce, tmpobj, 0 );
+
+ copycu->editfont = NULL;
+ copycu->editnurb = NULL;
+
nurbs_to_mesh( tmpobj );
/* nurbs_to_mesh changes the type to a mesh, check it worked */