diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-17 08:59:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-17 08:59:14 +0400 |
commit | 1ff373ef5bb0c1462ad8b0f30cfb773e30cbb2bb (patch) | |
tree | b6ec7b01b644cc8c0d4d743a4d3d94551b59f2b1 /source/blender/blenkernel | |
parent | 594b0298c7a672fca44890d3afd1e5bf4f06c1da (diff) | |
parent | 2636be0ac0d3139b2c9cf54f6380b2e9a3d3ed51 (diff) |
svn merge -r40166:40279 ^/trunk/blender
Diffstat (limited to 'source/blender/blenkernel')
21 files changed, 153 insertions, 70 deletions
diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index 557ce417b14..02fc70e41e8 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -34,14 +34,16 @@ * \since March 2001 * \author nzc */ + +struct BevList; +struct BezTriple; struct Curve; +struct EditNurb; struct ListBase; +struct ListBase; +struct Nurb; struct Object; struct Scene; -struct Nurb; -struct ListBase; -struct BezTriple; -struct BevList; #define KNOTSU(nu) ( (nu)->orderu+ (nu)->pntsu+ (((nu)->flagu & CU_NURB_CYCLIC) ? ((nu)->orderu-1) : 0) ) #define KNOTSV(nu) ( (nu)->orderv+ (nu)->pntsv+ (((nu)->flagv & CU_NURB_CYCLIC) ? ((nu)->orderv-1) : 0) ) @@ -55,11 +57,14 @@ struct BevList; void unlink_curve( struct Curve *cu); +void free_curve_editNurb_keyIndex(struct EditNurb *editnurb); +void free_curve_editNurb(struct Curve *cu); void free_curve( struct Curve *cu); void BKE_free_editfont(struct Curve *cu); struct Curve *add_curve(const char *name, int type); struct Curve *copy_curve( struct Curve *cu); void make_local_curve( struct Curve *cu); +struct ListBase *curve_editnurbs(struct Curve *cu); short curve_type( struct Curve *cu); void test_curve_type( struct Object *ob); void tex_space_curve( struct Curve *cu); diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index a6b5c04b5c3..7e39461a032 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -108,6 +108,7 @@ void object_to_mat4(struct Object *ob, float mat[][4]); void object_apply_mat4(struct Object *ob, float mat[][4], const short use_compat, const short use_parent); void set_no_parent_ipo(int val); +struct Object *object_pose_armature_get(struct Object *ob); void where_is_object_time(struct Scene *scene, struct Object *ob, float ctime); void where_is_object(struct Scene *scene, struct Object *ob); @@ -128,6 +129,7 @@ void *object_tfm_backup(struct Object *ob); void object_tfm_restore(struct Object *ob, void *obtfm_pt); void object_handle_update(struct Scene *scene, struct Object *ob); +void object_sculpt_modifiers_changed(struct Object *ob); float give_timeoffset(struct Object *ob); int give_obdata_texspace(struct Object *ob, short **texflag, float **loc, float **size, float **rot); diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 76f89b5e890..ad739c5d83c 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -97,5 +97,6 @@ typedef struct SculptSession { } SculptSession; void free_sculptsession(struct Object *ob); +void free_sculptsession_deformMats(struct SculptSession *ss); #endif diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 58f9c88ed21..89a00590bc5 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -35,7 +35,6 @@ set(INC ../blenfont ../blenlib ../blenloader - ../editors/include ../gpu ../ikplugin ../imbuf diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index 5da24bc43be..5281e590cd5 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -4,7 +4,7 @@ import os sources = env.Glob('intern/*.c') + env.Glob('intern/*.cpp') -incs = '. #/intern/guardedalloc #/intern/memutil ../editors/include' +incs = '. #/intern/guardedalloc #/intern/memutil' incs += ' ../blenlib ../blenfont ../makesdna ../windowmanager' incs += ' ../render/extern/include #/intern/decimation/extern ../makesrna' incs += ' ../imbuf ../ikplugin ../avi #/intern/elbeem/extern ../nodes ../modifiers' diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 81e0d86214f..d579bc0d3c7 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -64,18 +64,16 @@ #include "BKE_tessmesh.h" #include "BKE_bvhutils.h" - #include "BLO_sys_types.h" // for intptr_t support -#include "BIF_gl.h" -#include "BIF_glutil.h" +#include "GL/glew.h" #include "GPU_buffers.h" #include "GPU_draw.h" #include "GPU_extensions.h" #include "GPU_material.h" -#include "ED_sculpt.h" /* for ED_sculpt_modifiers_changed */ +extern GLubyte stipple_quarttone[128]; /* glutil.c, bad level data */ static void add_shapekey_layers(DerivedMesh *dm, Mesh *me, Object *ob); static void shapekey_layers_to_keyblocks(DerivedMesh *dm, Mesh *me, int actshape_uid); @@ -1642,7 +1640,7 @@ static void clear_mesh_caches(Object *ob) } if(ob->sculpt) { - ED_sculpt_modifiers_changed(ob); + object_sculpt_modifiers_changed(ob); } } diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 9c2467505cd..73ddcbecf94 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -117,7 +117,7 @@ static void make_localact_apply_cb(ID *id, AnimData *adt, void *mlac_ptr) tMakeLocalActionContext *mlac = (tMakeLocalActionContext *)mlac_ptr; if (adt->action == mlac->act) { - if (id->lib==0) { + if (id->lib == NULL) { adt->action = mlac->actn; id_us_plus(&mlac->actn->id); @@ -524,7 +524,6 @@ void copy_pose (bPose **dst, bPose *src, int copycon) if (copycon) { copy_constraints(&listb, &pchan->constraints, TRUE); // copy_constraints NULLs listb pchan->constraints= listb; - pchan->path= NULL; // XXX remove this line when the new motionpaths are ready... (depreceated code) pchan->mpath= NULL; /* motion paths should not get copied yet... */ } @@ -595,17 +594,12 @@ void free_pose_channels_hash(bPose *pose) void free_pose_channel(bPoseChannel *pchan) { - // XXX this case here will need to be removed when the new motionpaths are ready - if (pchan->path) { - MEM_freeN(pchan->path); - pchan->path= NULL; - } - + if (pchan->mpath) { animviz_free_motionpath(pchan->mpath); pchan->mpath= NULL; } - + free_constraints(&pchan->constraints); if (pchan->prop) { diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index d4721707dc7..232194b22b6 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -1140,11 +1140,11 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa w= (mv4)? 0.25f: 1.0f/3.0f; if(orco) { - VECADDFAC(dob->orco, dob->orco, orco[mv1], w); - VECADDFAC(dob->orco, dob->orco, orco[mv2], w); - VECADDFAC(dob->orco, dob->orco, orco[mv3], w); + madd_v3_v3v3fl(dob->orco, dob->orco, orco[mv1], w); + madd_v3_v3v3fl(dob->orco, dob->orco, orco[mv2], w); + madd_v3_v3v3fl(dob->orco, dob->orco, orco[mv3], w); if(mv4) - VECADDFAC(dob->orco, dob->orco, orco[mv4], w); + madd_v3_v3v3fl(dob->orco, dob->orco, orco[mv4], w); } if(mtface) { diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c index 62ce184a2d7..08a95477c2e 100644 --- a/source/blender/blenkernel/intern/armature.c +++ b/source/blender/blenkernel/intern/armature.c @@ -1483,7 +1483,6 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected pchanw.next= pchan->next; pchanw.parent= pchan->parent; pchanw.child= pchan->child; - pchanw.path= NULL; /* this is freed so copy a copy, else undo crashes */ if(pchanw.prop) { diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index eadb9139d78..9d40b0980d5 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -36,10 +36,7 @@ * \ingroup bke */ - -/* TODO maybe BIF_gl.h should include string.h? */ -#include <string.h> -#include "BIF_gl.h" +#include "GL/glew.h" #include "BKE_cdderivedmesh.h" #include "BKE_global.h" diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c index 03405c28074..700c6693a24 100644 --- a/source/blender/blenkernel/intern/collision.c +++ b/source/blender/blenkernel/intern/collision.c @@ -2022,7 +2022,7 @@ static int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModi { if(edgecollpair.p21==6 || edgecollpair.p22 == 6) { - printf("dist: %f, sol[k]: %lf, sol2[k]: %lf\n", distance, solution[k], solution2[k]); + printf("dist: %f, sol[k]: %f, sol2[k]: %f\n", distance, solution[k], solution2[k]); printf("a1: %f, a2: %f, b1: %f, b2: %f\n", x1[0], x2[0], x3[0], v1[0]); printf("b21: %d, b22: %d\n", edgecollpair.p21, edgecollpair.p22); } diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index b8820fb24d1..3c693fd83a4 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -41,9 +41,10 @@ #include "MEM_guardedalloc.h" -#include "BLI_blenlib.h" -#include "BLI_math.h" +#include "BLI_blenlib.h" +#include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLI_ghash.h" #include "DNA_curve_types.h" #include "DNA_material_types.h" @@ -67,9 +68,6 @@ #include "BKE_object.h" #include "BKE_material.h" - -#include "ED_curve.h" - /* globals */ /* local */ @@ -119,6 +117,25 @@ void BKE_free_editfont(Curve *cu) } } +void free_curve_editNurb_keyIndex(EditNurb *editnurb) +{ + if (!editnurb->keyindex) { + return; + } + BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)MEM_freeN); + editnurb->keyindex= NULL; +} + +void free_curve_editNurb (Curve *cu) +{ + if(cu->editnurb) { + freeNurblist(&cu->editnurb->nurbs); + free_curve_editNurb_keyIndex(cu->editnurb); + MEM_freeN(cu->editnurb); + cu->editnurb= NULL; + } +} + /* don't free curve itself */ void free_curve(Curve *cu) { @@ -282,6 +299,16 @@ void make_local_curve(Curve *cu) } } +/* Get list of nurbs from editnurbs structure */ +ListBase *curve_editnurbs(Curve *cu) +{ + if (cu->editnurb) { + return &cu->editnurb->nurbs; + } + + return NULL; +} + short curve_type(Curve *cu) { Nurb *nu; @@ -359,7 +386,6 @@ void tex_space_curve(Curve *cu) } } - int count_curveverts(ListBase *nurb) { Nurb *nu; @@ -2050,7 +2076,7 @@ void makeBevelList(Object *ob) BLI_freelistN(&(cu->bev)); if(cu->editnurb && ob->type!=OB_FONT) { - ListBase *nurbs= ED_curve_editnurbs(cu); + ListBase *nurbs= curve_editnurbs(cu); nu= nurbs->first; } else nu= cu->nurb.first; @@ -3158,7 +3184,7 @@ int clamp_nurb_order_v( struct Nurb *nu) ListBase *BKE_curve_nurbs(Curve *cu) { if (cu->editnurb) { - return ED_curve_editnurbs(cu); + return curve_editnurbs(cu); } return &cu->nurb; diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index ec8a59d51f0..8c7e17ca59b 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -67,8 +67,6 @@ #include "BLO_sys_types.h" // for intptr_t support -#include "ED_curve.h" /* for BKE_curve_nurbs */ - extern Material defmaterial; /* material.c */ static void boundbox_displist(Object *ob); @@ -1104,7 +1102,7 @@ void makeDispListSurf(Scene *scene, Object *ob, ListBase *dispbase, float (*deformedVerts)[3]; if(!forRender && cu->editnurb) - nubase= ED_curve_editnurbs(cu); + nubase= curve_editnurbs(cu); else nubase= &cu->nurb; diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 4ce5de78895..002cfdbf41a 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -592,7 +592,7 @@ void BKE_image_print_memlist(void) for(ima= G.main->image.first; ima; ima= ima->id.next) totsize += image_mem_size(ima); - printf("\ntotal image memory len: %.3lf MB\n", (double)totsize/(double)(1024*1024)); + printf("\ntotal image memory len: %.3f MB\n", (double)totsize/(double)(1024*1024)); for(ima= G.main->image.first; ima; ima= ima->id.next) { size= image_mem_size(ima); diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 0d3f3cc5ae4..5acd6c169a0 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -942,7 +942,7 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co sprintf(buf, "sequence_editor.sequences_all[\"%s\"]", seq->name+2); } else - strcpy(buf, ""); /* empty string */ + buf[0]= '\0'; /* empty string */ BLI_dynstr_append(path, buf); /* need to add dot before property if there was anything precceding this */ diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c index f936683bb31..e7cec669081 100644 --- a/source/blender/blenkernel/intern/mesh_validate.c +++ b/source/blender/blenkernel/intern/mesh_validate.c @@ -143,7 +143,7 @@ int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), unsigned int totve BLI_assert(!(do_fixes && me == NULL)); - PRINT("ED_mesh_validate: verts(%u), edges(%u), faces(%u)\n", totvert, totedge, totface); + PRINT("%s: verts(%u), edges(%u), faces(%u)\n", __func__, totvert, totedge, totface); if(totedge == 0 && totface != 0) { PRINT(" locical error, %u faces and 0 edges\n", totface); diff --git a/source/blender/blenkernel/intern/navmesh_conversion.cpp b/source/blender/blenkernel/intern/navmesh_conversion.cpp index cc3b926db75..fbc4775cf34 100644 --- a/source/blender/blenkernel/intern/navmesh_conversion.cpp +++ b/source/blender/blenkernel/intern/navmesh_conversion.cpp @@ -289,17 +289,15 @@ struct SortContext const int* recastData; const int* trisToFacesMap; }; -#if defined(_MSC_VER) -static int compareByData(void* data, const void * a, const void * b) -#elif defined(__APPLE__) || defined(__FreeBSD__) -static int compareByData(void* data, const void * a, const void * b) -#else -static int compareByData(const void * a, const void * b, void* data) -#endif + +/* XXX: not thread-safe, but it's called only from modifiers stack + which isn't threaded. Anyway, better to avoid this in the future */ +static SortContext *_qsort_context; + +static int compareByData(const void * a, const void * b) { - const SortContext* context = (const SortContext*)data; - return ( context->recastData[context->trisToFacesMap[*(int*)a]] - - context->recastData[context->trisToFacesMap[*(int*)b]] ); + return ( _qsort_context->recastData[_qsort_context->trisToFacesMap[*(int*)a]] - + _qsort_context->recastData[_qsort_context->trisToFacesMap[*(int*)b]] ); } bool buildNavMeshData(const int nverts, const float* verts, @@ -323,13 +321,8 @@ bool buildNavMeshData(const int nverts, const float* verts, SortContext context; context.recastData = recastData; context.trisToFacesMap = trisToFacesMap; -#if defined(_MSC_VER) - qsort_s(trisMapping, ntris, sizeof(int), compareByData, &context); -#elif defined(__APPLE__) || defined(__FreeBSD__) - qsort_r(trisMapping, ntris, sizeof(int), &context, compareByData); -#else - qsort_r(trisMapping, ntris, sizeof(int), compareByData, &context); -#endif + _qsort_context = &context; + qsort(trisMapping, ntris, sizeof(int), compareByData); //search first valid triangle - triangle of convex polygon int validTriStart = -1; for (int i=0; i< ntris; i++) diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index d40b030c470..89fd3ff9c13 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1051,9 +1051,9 @@ void ntreeMakeLocal(bNodeTree *ntree) if(ntree->id.lib==NULL) return; if(ntree->id.us==1) { - ntree->id.lib= 0; + ntree->id.lib= NULL; ntree->id.flag= LIB_LOCAL; - new_id(0, (ID *)ntree, 0); + new_id(NULL, (ID *)ntree, NULL); return; } @@ -1069,7 +1069,7 @@ void ntreeMakeLocal(bNodeTree *ntree) if(cd.local && cd.lib==0) { ntree->id.lib= NULL; ntree->id.flag= LIB_LOCAL; - new_id(0, (ID *)ntree, 0); + new_id(NULL, (ID *)ntree, NULL); } else if(cd.local && cd.lib) { /* this is the mixed case, we copy the tree and assign it to local users */ @@ -1438,7 +1438,7 @@ static void ntree_update_link_pointers(bNodeTree *ntree) } } -void ntree_validate_links(bNodeTree *ntree) +static void ntree_validate_links(bNodeTree *ntree) { bNodeTreeType *ntreetype = ntreeGetType(ntree->type); bNodeLink *link; diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 08c36d76b8e..8741caffe16 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -236,6 +236,17 @@ void object_free_display(Object *ob) freedisplist(&ob->disp); } +void free_sculptsession_deformMats(SculptSession *ss) +{ + if(ss->orig_cos) MEM_freeN(ss->orig_cos); + if(ss->deform_cos) MEM_freeN(ss->deform_cos); + if(ss->deform_imats) MEM_freeN(ss->deform_imats); + + ss->orig_cos = NULL; + ss->deform_cos = NULL; + ss->deform_imats = NULL; +} + void free_sculptsession(Object *ob) { if(ob && ob->sculpt) { @@ -266,6 +277,7 @@ void free_sculptsession(Object *ob) } } + /* do not free object itself */ void free_object(Object *ob) { @@ -407,7 +419,7 @@ void unlink_object(Object *ob) for (ct= targets.first; ct; ct= ct->next) { if (ct->tar == ob) { ct->tar = NULL; - strcpy(ct->subtarget, ""); + ct->subtarget[0]= '\0'; obt->recalc |= OB_RECALC_DATA; } } @@ -437,7 +449,7 @@ void unlink_object(Object *ob) for (ct= targets.first; ct; ct= ct->next) { if (ct->tar == ob) { ct->tar = NULL; - strcpy(ct->subtarget, ""); + ct->subtarget[0]= '\0'; obt->recalc |= OB_RECALC_DATA; } } @@ -1299,6 +1311,37 @@ static void copy_object_pose(Object *obn, Object *ob) } } +static int object_pose_context(Object *ob) +{ + if( (ob) && + (ob->type == OB_ARMATURE) && + (ob->pose) && + (ob->mode & OB_MODE_POSE) + ) { + return 1; + } + else { + return 0; + } +} + +//Object *object_pose_armature_get(Object *ob) +Object *object_pose_armature_get(struct Object *ob) +{ + if(ob==NULL) + return NULL; + + if(object_pose_context(ob)) + return ob; + + ob= modifiers_isDeformedByArmature(ob); + + if(object_pose_context(ob)) + return ob; + + return NULL; +} + static void copy_object_transform(Object *ob_tar, Object *ob_src) { copy_v3_v3(ob_tar->loc, ob_src->loc); @@ -2769,6 +2812,33 @@ void object_handle_update(Scene *scene, Object *ob) } } +void object_sculpt_modifiers_changed(Object *ob) +{ + SculptSession *ss= ob->sculpt; + + if(!ss->cache) { + /* we free pbvh on changes, except during sculpt since it can't deal with + changing PVBH node organization, we hope topology does not change in + the meantime .. weak */ + if(ss->pbvh) { + BLI_pbvh_free(ss->pbvh); + ss->pbvh= NULL; + } + + free_sculptsession_deformMats(ob->sculpt); + } else { + PBVHNode **nodes; + int n, totnode; + + BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode); + + for(n = 0; n < totnode; n++) + BLI_pbvh_node_mark_update(nodes[n]); + + MEM_freeN(nodes); + } +} + float give_timeoffset(Object *ob) { if ((ob->ipoflag & OB_OFFS_PARENTADD) && ob->parent) { return ob->sf + give_timeoffset(ob->parent); diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 74c48128c9c..b2628159563 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -65,8 +65,7 @@ #include "PIL_time.h" #include "BLI_array.h" -#include "BIF_gl.h" -#include "BIF_glutil.h" +#include "GL/glew.h" #include "GPU_draw.h" #include "GPU_extensions.h" @@ -74,6 +73,8 @@ #include "CCGSubSurf.h" +extern GLubyte stipple_quarttone[128]; /* glutil.c, bad level data */ + static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss, int drawInteriorEdges, int useSubsurfUv, diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index 72fe1c19884..8aeef0d84b1 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -345,7 +345,7 @@ static int unit_as_string(char *str, int len_max, double value, int prec, bUnitC /* Convert to a string */ { - len= BLI_snprintf(str, len_max, "%.*lf", prec, value_conv); + len= BLI_snprintf(str, len_max, "%.*f", prec, value_conv); if(len >= len_max) len= len_max; |