code cleanup: function naming for BLI functions.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 5 May 2012 00:23:55 +0000 (00:23 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 5 May 2012 00:23:55 +0000 (00:23 +0000)
42 files changed:
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/scene.c
source/blender/blenlib/BLI_bitmap.h
source/blender/blenlib/BLI_boxpack2d.h
source/blender/blenlib/BLI_bpath.h
source/blender/blenlib/BLI_callbacks.h
source/blender/blenlib/BLI_jitter.h
source/blender/blenlib/BLI_scanfill.h
source/blender/blenlib/BLI_uvproject.h
source/blender/blenlib/BLI_voxel.h
source/blender/blenlib/intern/boxpack2d.c
source/blender/blenlib/intern/bpath.c
source/blender/blenlib/intern/callbacks.c
source/blender/blenlib/intern/jitter.c
source/blender/blenlib/intern/scanfill.c
source/blender/blenlib/intern/uvproject.c
source/blender/blenlib/intern/voxel.c
source/blender/blenloader/intern/writefile.c
source/blender/bmesh/operators/bmo_triangulate.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/render/render_opengl.c
source/blender/editors/space_info/info_ops.c
source/blender/editors/uvedit/uvedit_parametrizer.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/modifiers/intern/MOD_uvproject.c
source/blender/python/intern/bpy.c
source/blender/python/intern/bpy_app_handlers.c
source/blender/python/mathutils/mathutils_geometry.c
source/blender/render/intern/source/initrender.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/shadbuf.c
source/blender/render/intern/source/volume_precache.c
source/blender/render/intern/source/volumetric.c
source/blender/render/intern/source/voxeldata.c
source/blender/render/intern/source/zbuf.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_gesture.c
source/creator/creator.c

index 2b741d6d8eb25e361d15dfe9e11c8ba616e721f0..b0bfd2ee98d4ee2f32142bec436e0088444f3cd3 100644 (file)
@@ -110,7 +110,7 @@ void free_blender(void)
        
        IMB_exit();
 
-       BLI_cb_finalize();
+       BLI_callback_global_finalize();
 
        seq_stripelem_cache_destruct();
        IMB_moviecache_destruct();
@@ -173,7 +173,7 @@ static void clean_paths(Main *main)
 {
        Scene *scene;
 
-       bpath_traverse_main(main, clean_paths_visit_cb, BPATH_TRAVERSE_SKIP_MULTIFILE, NULL);
+       BLI_bpath_traverse_main(main, clean_paths_visit_cb, BLI_BPATH_TRAVERSE_SKIP_MULTIFILE, NULL);
 
        for (scene= main->scene.first; scene; scene= scene->id.next) {
                BLI_clean(scene->r.pic);
index de61929aa18f6b7dc430ed017f520be756477041..cf7750520a3e5213b20e56263fa47415fee8a3cb 100644 (file)
@@ -432,7 +432,7 @@ void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal)
                totvert= 0;
                nextcol= 0;
                
-               BLI_begin_edgefill(&sf_ctx);
+               BLI_scanfill_begin(&sf_ctx);
                
                dl= dispbase->first;
                while (dl) {
@@ -449,18 +449,18 @@ void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal)
                                                while (a--) {
                                                        vlast= eve;
 
-                                                       eve = BLI_addfillvert(&sf_ctx, f1);
+                                                       eve = BLI_scanfill_vert_add(&sf_ctx, f1);
                                                        totvert++;
 
                                                        if (vlast==NULL) v1= eve;
                                                        else {
-                                                               BLI_addfilledge(&sf_ctx, vlast, eve);
+                                                               BLI_scanfill_edge_add(&sf_ctx, vlast, eve);
                                                        }
                                                        f1+=3;
                                                }
 
                                                if (eve!=NULL && v1!=NULL) {
-                                                       BLI_addfilledge(&sf_ctx, eve, v1);
+                                                       BLI_scanfill_edge_add(&sf_ctx, eve, v1);
                                                }
                                        }
                                        else if (colnr<dl->col) {
@@ -473,7 +473,7 @@ void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal)
                        dl= dl->next;
                }
                
-               if (totvert && (tot= BLI_edgefill(&sf_ctx, FALSE))) { // XXX (obedit && obedit->actcol)?(obedit->actcol-1):0)) {
+               if (totvert && (tot= BLI_scanfill_calc(&sf_ctx, FALSE))) { // XXX (obedit && obedit->actcol)?(obedit->actcol-1):0)) {
                        if (tot) {
                                dlnew= MEM_callocN(sizeof(DispList), "filldisplist");
                                dlnew->type= DL_INDEX3;
@@ -518,7 +518,7 @@ void filldisplist(ListBase *dispbase, ListBase *to, int flipnormal)
                        BLI_addhead(to, dlnew);
                        
                }
-               BLI_end_edgefill(&sf_ctx);
+               BLI_scanfill_end(&sf_ctx);
 
                if (nextcol) {
                        /* stay at current char but fill polys with next material */
index 8d7ac99e2a39b53fe2eed7ee93443be2a5f797b4..428dc176e1de5abf21e91611706426a9dafee7ff 100644 (file)
@@ -196,18 +196,18 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm)
                        ScanFillFace *efa;
                        int totfilltri;
 
-                       BLI_begin_edgefill(&sf_ctx);
+                       BLI_scanfill_begin(&sf_ctx);
                        /*scanfill time*/
                        l = BM_iter_new(&liter, bm, BM_LOOPS_OF_FACE, f);
                        for (j=0; l; l=BM_iter_step(&liter), j++) {
                                /*mark order*/
                                BM_elem_index_set(l, j); /* set_loop */
 
-                               v = BLI_addfillvert(&sf_ctx, l->v->co);
+                               v = BLI_scanfill_vert_add(&sf_ctx, l->v->co);
                                v->tmp.p = l;
 
                                if (lastv) {
-                                       /* e = */ BLI_addfilledge(&sf_ctx, lastv, v);
+                                       /* e = */ BLI_scanfill_edge_add(&sf_ctx, lastv, v);
                                }
 
                                lastv = v;
@@ -215,9 +215,9 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm)
                        }
 
                        /*complete the loop*/
-                       BLI_addfilledge(&sf_ctx, firstv, v);
+                       BLI_scanfill_edge_add(&sf_ctx, firstv, v);
 
-                       totfilltri = BLI_edgefill_ex(&sf_ctx, FALSE, f->no);
+                       totfilltri = BLI_scanfill_calc_ex(&sf_ctx, FALSE, f->no);
                        BLI_array_grow_items(looptris, totfilltri);
 
                        for (efa = sf_ctx.fillfacebase.first; efa; efa=efa->next) {
@@ -235,7 +235,7 @@ static void BMEdit_RecalcTessellation_intern(BMEditMesh *tm)
                                i += 1;
                        }
 
-                       BLI_end_edgefill(&sf_ctx);
+                       BLI_scanfill_end(&sf_ctx);
                }
        }
 
index 2924ea457a8c3c5f464ce6405e34ec9285f809d3..14ab8166f0a915786531b99b61b789a23bafe91e 100644 (file)
@@ -135,9 +135,9 @@ void BKE_id_lib_local_paths(Main *bmain, Library *lib, ID *id)
 {
        char *bpath_user_data[2]= {bmain->name, lib->filepath};
 
-       bpath_traverse_id(bmain, id,
-                                         bpath_relocate_visitor,
-                                         BPATH_TRAVERSE_SKIP_MULTIFILE,
+       BLI_bpath_traverse_id(bmain, id,
+                                         BLI_bpath_relocate_visitor,
+                                         BLI_BPATH_TRAVERSE_SKIP_MULTIFILE,
                                          bpath_user_data);
 }
 
index 6dd5923a80339587e7f10b69e41bb720eb84b303..4b14c2aec4bdd46f913156433a0cec0be930d8f9 100644 (file)
@@ -2481,24 +2481,24 @@ int mesh_recalcTessellation(CustomData *fdata,
 
                        ml = mloop + mp->loopstart;
                        
-                       BLI_begin_edgefill(&sf_ctx);
+                       BLI_scanfill_begin(&sf_ctx);
                        firstv = NULL;
                        lastv = NULL;
                        for (j=0; j<mp->totloop; j++, ml++) {
-                               v = BLI_addfillvert(&sf_ctx, mvert[ml->v].co);
+                               v = BLI_scanfill_vert_add(&sf_ctx, mvert[ml->v].co);
        
                                v->keyindex = mp->loopstart + j;
        
                                if (lastv)
-                                       BLI_addfilledge(&sf_ctx, lastv, v);
+                                       BLI_scanfill_edge_add(&sf_ctx, lastv, v);
        
                                if (!firstv)
                                        firstv = v;
                                lastv = v;
                        }
-                       BLI_addfilledge(&sf_ctx, lastv, firstv);
+                       BLI_scanfill_edge_add(&sf_ctx, lastv, firstv);
                        
-                       totfilltri = BLI_edgefill(&sf_ctx, FALSE);
+                       totfilltri = BLI_scanfill_calc(&sf_ctx, FALSE);
                        if (totfilltri) {
                                BLI_array_grow_items(mface_to_poly_map, totfilltri);
                                BLI_array_grow_items(mface, totfilltri);
@@ -2531,7 +2531,7 @@ int mesh_recalcTessellation(CustomData *fdata,
                                }
                        }
        
-                       BLI_end_edgefill(&sf_ctx);
+                       BLI_scanfill_end(&sf_ctx);
                }
        }
 
index c8f41f26c9b55fbc1ea254c9cbb16c6a2a2a0bf7..c66aa375a1337e50f725c582dfcd9093452d8f21 100644 (file)
@@ -1007,7 +1007,7 @@ static void scene_update_tagged_recursive(Main *bmain, Scene *scene, Scene *scen
 void scene_update_tagged(Main *bmain, Scene *scene)
 {
        /* keep this first */
-       BLI_exec_cb(bmain, &scene->id, BLI_CB_EVT_SCENE_UPDATE_PRE);
+       BLI_callback_exec(bmain, &scene->id, BLI_CB_EVT_SCENE_UPDATE_PRE);
 
        /* flush recalc flags to dependencies */
        DAG_ids_flush_tagged(bmain);
@@ -1035,7 +1035,7 @@ void scene_update_tagged(Main *bmain, Scene *scene)
                BKE_ptcache_quick_cache_all(bmain, scene);
 
        /* notify editors and python about recalc */
-       BLI_exec_cb(bmain, &scene->id, BLI_CB_EVT_SCENE_UPDATE_POST);
+       BLI_callback_exec(bmain, &scene->id, BLI_CB_EVT_SCENE_UPDATE_POST);
        DAG_ids_check_recalc(bmain, scene, FALSE);
 
        /* clear recalc flags */
@@ -1049,8 +1049,8 @@ void scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay)
        Scene *sce_iter;
 
        /* keep this first */
-       BLI_exec_cb(bmain, &sce->id, BLI_CB_EVT_FRAME_CHANGE_PRE);
-       BLI_exec_cb(bmain, &sce->id, BLI_CB_EVT_SCENE_UPDATE_PRE);
+       BLI_callback_exec(bmain, &sce->id, BLI_CB_EVT_FRAME_CHANGE_PRE);
+       BLI_callback_exec(bmain, &sce->id, BLI_CB_EVT_SCENE_UPDATE_PRE);
 
        sound_set_cfra(sce->r.cfra);
        
@@ -1084,8 +1084,8 @@ void scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay)
        scene_update_tagged_recursive(bmain, sce, sce);
 
        /* notify editors and python about recalc */
-       BLI_exec_cb(bmain, &sce->id, BLI_CB_EVT_SCENE_UPDATE_POST);
-       BLI_exec_cb(bmain, &sce->id, BLI_CB_EVT_FRAME_CHANGE_POST);
+       BLI_callback_exec(bmain, &sce->id, BLI_CB_EVT_SCENE_UPDATE_POST);
+       BLI_callback_exec(bmain, &sce->id, BLI_CB_EVT_FRAME_CHANGE_POST);
 
        DAG_ids_check_recalc(bmain, sce, TRUE);
 
index 2aed71a7d44c9dfd4c18bfb37e8ee3ce600800b1..f19d6d6f465cfc72e418497e6e18035ddc0ff3ca 100644 (file)
@@ -69,7 +69,7 @@ typedef unsigned int* BLI_bitmap;
 /* set or clear the value of a single bit at '_index' */
 #define BLI_BITMAP_MODIFY(_bitmap, _index, _set) \
        do { \
-               if(_set) \
+               if (_set) \
                        BLI_BITMAP_SET(_bitmap, _index); \
                else \
                        BLI_BITMAP_CLEAR(_bitmap, _index); \
index 7f92047b312683d3da916cd3bb65333dcfb3cbfd..77e937d7b6f07b3ebf779844a48e18fed8fcfcfe 100644 (file)
@@ -34,7 +34,7 @@
 
 /* Box Packer */
 
-typedef struct boxPack {
+typedef struct BoxPack {
        float x;
        float y;
        float w;
@@ -44,9 +44,9 @@ typedef struct boxPack {
        /* Verts this box uses
         * (BL,TR,TL,BR) / 0,1,2,3 */
        struct boxVert *v[4];
-} boxPack;
+} BoxPack;
 
-void boxPack2D(boxPack *boxarray, const int len, float *tot_width, float *tot_height);
+void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *tot_height);
 
 #endif
 
index 91252d3beb5347052486998e355361f548c1ec1e..27b373e6eb81acf32db19215b057782667c82a69 100644 (file)
@@ -43,25 +43,25 @@ struct ReportList;
  * path has changed, and in that case, should write the result to pathOut. */
 typedef int (*BPathVisitor)(void *userdata, char *path_dst, const char *path_src);
 /* Executes 'visit' for each path associated with 'id'. */
-void bpath_traverse_id(struct Main *bmain, struct ID *id, BPathVisitor visit_cb, const int flag, void *userdata);
-void bpath_traverse_id_list(struct Main *bmain, struct ListBase *lb, BPathVisitor visit_cb, const int flag, void *userdata);
-void bpath_traverse_main(struct Main *bmain, BPathVisitor visit_cb, const int flag, void *userdata);
-int bpath_relocate_visitor(void *oldbasepath, char *path_dst, const char *path_src);
+void BLI_bpath_traverse_id(struct Main *bmain, struct ID *id, BPathVisitor visit_cb, const int flag, void *userdata);
+void BLI_bpath_traverse_id_list(struct Main *bmain, struct ListBase *lb, BPathVisitor visit_cb, const int flag, void *userdata);
+void BLI_bpath_traverse_main(struct Main *bmain, BPathVisitor visit_cb, const int flag, void *userdata);
+int  BLI_bpath_relocate_visitor(void *oldbasepath, char *path_dst, const char *path_src);
 
-#define BPATH_TRAVERSE_ABS             (1<<0) /* convert paths to absolute */
-#define BPATH_TRAVERSE_SKIP_LIBRARY    (1<<2) /* skip library paths */
-#define BPATH_TRAVERSE_SKIP_PACKED     (1<<3) /* skip packed data */
-#define BPATH_TRAVERSE_SKIP_MULTIFILE  (1<<4) /* skip paths where a single dir is used with an array of files, eg.
-                                               * sequence strip images and pointcache. in this case only use the first
-                                               * file, this is needed for directory manipulation functions which might
-                                               * otherwise modify the same directory multiple times */
+#define BLI_BPATH_TRAVERSE_ABS             (1<<0) /* convert paths to absolute */
+#define BLI_BPATH_TRAVERSE_SKIP_LIBRARY    (1<<2) /* skip library paths */
+#define BLI_BPATH_TRAVERSE_SKIP_PACKED     (1<<3) /* skip packed data */
+#define BLI_BPATH_TRAVERSE_SKIP_MULTIFILE  (1<<4) /* skip paths where a single dir is used with an array of files, eg.
+                                                   * sequence strip images and pointcache. in this case only use the first
+                                                   * file, this is needed for directory manipulation functions which might
+                                                   * otherwise modify the same directory multiple times */
 
 /* high level funcs */
 
 /* creates a text file with missing files if there are any */
-void checkMissingFiles(struct Main *bmain, struct ReportList *reports);
-void makeFilesRelative(struct Main *bmain, const char *basedir, struct ReportList *reports);
-void makeFilesAbsolute(struct Main *bmain, const char *basedir, struct ReportList *reports);
-void findMissingFiles(struct Main *bmain, const char *searchpath, struct ReportList *reports);
+void BLI_bpath_missing_files_check(struct Main *bmain, struct ReportList *reports);
+void BLI_bpath_missing_files_find(struct Main *bmain, const char *searchpath, struct ReportList *reports);
+void BLI_bpath_relative_convert(struct Main *bmain, const char *basedir, struct ReportList *reports);
+void BLI_bpath_absolute_convert(struct Main *bmain, const char *basedir, struct ReportList *reports);
 
 #endif // __BLI_BPATH_H__
index b32a1e272c86d221cf2f77234b9c5f665c1bac7e..bfc336781aa9d92015e7b8cbd058b20dfea340a5 100644 (file)
@@ -62,11 +62,11 @@ typedef struct {
 } bCallbackFuncStore;
 
 
-void BLI_exec_cb(struct Main *main, struct ID *self, eCbEvent evt);
-void BLI_add_cb(bCallbackFuncStore *funcstore, eCbEvent evt);
+void BLI_callback_exec(struct Main *main, struct ID *self, eCbEvent evt);
+void BLI_callback_add(bCallbackFuncStore *funcstore, eCbEvent evt);
 
-void BLI_cb_init(void);
-void BLI_cb_finalize(void);
+void BLI_callback_global_init(void);
+void BLI_callback_global_finalize(void);
 
 
 /* This is blenlib internal only, unrelated to above */
index 9aa21a8952102a30f555003812415cc4260182c6..c2a6250c154058fa2e1c0ce1d1c325c403f614af 100644 (file)
@@ -32,7 +32,7 @@
  *  \ingroup bli
  */
 
-void   BLI_initjit(float *jitarr, int num);
+void   BLI_jitter_init(float *jitarr, int num);
 void    BLI_jitterate1(float *jit1, float *jit2, int num, float rad1);
 void    BLI_jitterate2(float *jit1, float *jit2, int num, float rad2);
 
index 26bcd50ef3e8454fcc6a5dc64852ab75e4b92dcb..081d5ccfb6653df887652551d8c571df845a6d1b 100644 (file)
@@ -91,14 +91,14 @@ typedef struct ScanFillFace
 } ScanFillFace;
 
 /* scanfill.c: used in displist only... */
-struct ScanFillVert *BLI_addfillvert(ScanFillContext *sf_ctx, const float vec[3]);
-struct ScanFillEdge *BLI_addfilledge(ScanFillContext *sf_ctx, struct ScanFillVert *v1, struct ScanFillVert *v2);
+struct ScanFillVert *BLI_scanfill_vert_add(ScanFillContext *sf_ctx, const float vec[3]);
+struct ScanFillEdge *BLI_scanfill_edge_add(ScanFillContext *sf_ctx, struct ScanFillVert *v1, struct ScanFillVert *v2);
 
-int BLI_begin_edgefill(ScanFillContext *sf_ctx);
-int BLI_edgefill(ScanFillContext *sf_ctx, const short do_quad_tri_speedup);
-int BLI_edgefill_ex(ScanFillContext *sf_ctx, const short do_quad_tri_speedup,
+int BLI_scanfill_begin(ScanFillContext *sf_ctx);
+int BLI_scanfill_calc(ScanFillContext *sf_ctx, const short do_quad_tri_speedup);
+int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const short do_quad_tri_speedup,
                     const float nor_proj[3]);
-void BLI_end_edgefill(ScanFillContext *sf_ctx);
+void BLI_scanfill_end(ScanFillContext *sf_ctx);
 
 /* These callbacks are needed to make the lib finction properly */
 
index 5abad87452c46b7ec6f64b65befea52137f72d20..516a9b8b237fb3ac9f63609e1186a9ff9aa8de18 100644 (file)
  *  \ingroup bli
  */
 
-struct UvCameraInfo;
+struct ProjCameraInfo;
 struct Object;
 
 /* create uv info from the camera, needs to be freed */
-struct UvCameraInfo *project_camera_info(struct Object *ob, float rotmat[4][4], float winx, float winy);
+struct ProjCameraInfo *BLI_uvproject_camera_info(struct Object *ob, float rotmat[4][4], float winx, float winy);
 
 /* apply uv from uvinfo (camera) */
-void project_from_camera(float target[2], float source[3], struct UvCameraInfo *uci);
+void BLI_uvproject_from_camera(float target[2], float source[3], struct ProjCameraInfo *uci);
 
 /* apply uv from perspective matrix */
-void project_from_view(float target[2], float source[3], float persmat[4][4], float rotmat[4][4], float winx, float winy);
+void BLI_uvproject_from_view(float target[2], float source[3], float persmat[4][4], float rotmat[4][4], float winx, float winy);
 
 /* apply ortho uv's */
-void project_from_view_ortho(float target[2], float source[3], float rotmat[4][4]);
+void BLI_uvproject_from_view_ortho(float target[2], float source[3], float rotmat[4][4]);
 
 /* so we can adjust scale with keeping the struct private */
-void project_camera_info_scale(struct UvCameraInfo *uci, float scale_x, float scale_y);
+void BLI_uvproject_camera_info_scale(struct ProjCameraInfo *uci, float scale_x, float scale_y);
 
 #endif
index 4a13810a70543b89865fedcb68a6f758473baf4a..4e9e6f111dbbd00ce5a7a4962b81b6fff9011fb5 100644 (file)
  */
 
 /** find the index number of a voxel, given x/y/z integer coords and resolution vector */
-#define V_I(x, y, z, res) ( (z)*(res)[1]*(res)[0] + (y)*(res)[0] + (x) )
+#define BLI_VEXEL_INDEX(x, y, z, res) ((z) * (res)[1] * (res)[0] + (y) * (res)[0] + (x))
 
 /* all input coordinates must be in bounding box 0.0 - 1.0 */
-float voxel_sample_nearest(float *data, const int res[3], const float co[3]);
-float voxel_sample_trilinear(float *data, const int res[3], const float co[3]);
-float voxel_sample_triquadratic(float *data, const int res[3], const float co[3]);
-float voxel_sample_tricubic(float *data, const int res[3], const float co[3], int bspline);
+float BLI_voxel_sample_nearest(float *data, const int res[3], const float co[3]);
+float BLI_voxel_sample_trilinear(float *data, const int res[3], const float co[3]);
+float BLI_voxel_sample_triquadratic(float *data, const int res[3], const float co[3]);
+float BLI_voxel_sample_tricubic(float *data, const int res[3], const float co[3], int bspline);
 
 #endif /* __BLI_VOXEL_H__ */
index 6631e36fc72234fb4a5d0e25d90f18c1c2a1ea14..f1931d35819102ced9585c9a2505db5e31ebad53 100644 (file)
@@ -38,14 +38,14 @@ typedef struct boxVert {
        float y;
        short free;
 
-       struct boxPack *trb; /* top right box */
-       struct boxPack *blb; /* bottom left box */
-       struct boxPack *brb; /* bottom right box */
-       struct boxPack *tlb; /* top left box */
+       struct BoxPack *trb; /* top right box */
+       struct BoxPack *blb; /* bottom left box */
+       struct BoxPack *brb; /* bottom right box */
+       struct BoxPack *tlb; /* top left box */
 
        /* Store last intersecting boxes here
         * speedup intersection testing */
-       struct boxPack *isect_cache[4];
+       struct BoxPack *isect_cache[4];
 
        int index;
 } boxVert;
@@ -105,7 +105,7 @@ typedef struct boxVert {
 /* qsort function - sort largest to smallest */
 static int box_areasort(const void *p1, const void *p2)
 {
-       const boxPack *b1 = p1, *b2 = p2;
+       const BoxPack *b1 = p1, *b2 = p2;
        const float a1 = BOXAREA(b1);
        const float a2 = BOXAREA(b2);
 
@@ -152,12 +152,12 @@ static int vertex_sort(const void *p1, const void *p2)
  *     len - the number of boxes in the array.
  *     tot_width and tot_height are set so you can normalize the data.
  *  */
-void boxPack2D(boxPack *boxarray, const int len, float *tot_width, float *tot_height)
+void BLI_box_pack_2D(BoxPack *boxarray, const int len, float *tot_width, float *tot_height)
 {
        boxVert *vert; /* the current vert */
        int box_index, verts_pack_len, i, j, k, isect;
        int quad_flags[4] = {BLF, TRF, TLF, BRF}; /* use for looping */
-       boxPack *box, *box_test; /*current box and another for intersection tests*/
+       BoxPack *box, *box_test; /*current box and another for intersection tests*/
        int *vertex_pack_indices; /*an array of indices used for sorting verts*/
 
        if (!len) {
@@ -167,11 +167,11 @@ void boxPack2D(boxPack *boxarray, const int len, float *tot_width, float *tot_he
        }
 
        /* Sort boxes, biggest first */
-       qsort(boxarray, len, sizeof(boxPack), box_areasort);
+       qsort(boxarray, len, sizeof(BoxPack), box_areasort);
 
        /* add verts to the boxes, these are only used internally  */
-       vert = vertarray = MEM_mallocN(len * 4 * sizeof(boxVert), "boxPack Verts");
-       vertex_pack_indices = MEM_mallocN(len * 3 * sizeof(int), "boxPack Indices");
+       vert = vertarray = MEM_mallocN(len * 4 * sizeof(boxVert), "BoxPack Verts");
+       vertex_pack_indices = MEM_mallocN(len * 3 * sizeof(int), "BoxPack Indices");
 
        for (box = boxarray, box_index = 0, i = 0; box_index < len; box_index++, box++) {
 
index 739c4e00cc7d7e5fbfe71a3c76922e803b7c62f4..48912eb927ac58bee139d0190e2eee35dedece48 100644 (file)
@@ -92,9 +92,9 @@ static int checkMissingFiles_visit_cb(void *userdata, char *UNUSED(path_dst), co
 }
 
 /* high level function */
-void checkMissingFiles(Main *bmain, ReportList *reports)
+void BLI_bpath_missing_files_check(Main *bmain, ReportList *reports)
 {
-       bpath_traverse_main(bmain, checkMissingFiles_visit_cb, BPATH_TRAVERSE_ABS, reports);
+       BLI_bpath_traverse_main(bmain, checkMissingFiles_visit_cb, BLI_BPATH_TRAVERSE_ABS, reports);
 }
 
 typedef struct BPathRemap_Data {
@@ -129,7 +129,7 @@ static int makeFilesRelative_visit_cb(void *userdata, char *path_dst, const char
        }
 }
 
-void makeFilesRelative(Main *bmain, const char *basedir, ReportList *reports)
+void BLI_bpath_relative_convert(Main *bmain, const char *basedir, ReportList *reports)
 {
        BPathRemap_Data data = {NULL};
 
@@ -141,7 +141,7 @@ void makeFilesRelative(Main *bmain, const char *basedir, ReportList *reports)
        data.basedir = basedir;
        data.reports = reports;
 
-       bpath_traverse_main(bmain, makeFilesRelative_visit_cb, 0, (void *)&data);
+       BLI_bpath_traverse_main(bmain, makeFilesRelative_visit_cb, 0, (void *)&data);
 
        BKE_reportf(reports, data.count_failed ? RPT_WARNING : RPT_INFO,
                    "Total files %d|Changed %d|Failed %d",
@@ -171,8 +171,8 @@ static int makeFilesAbsolute_visit_cb(void *userdata, char *path_dst, const char
        }
 }
 
-/* similar to makeFilesRelative - keep in sync! */
-void makeFilesAbsolute(Main *bmain, const char *basedir, ReportList *reports)
+/* similar to BLI_bpath_relative_convert - keep in sync! */
+void BLI_bpath_absolute_convert(Main *bmain, const char *basedir, ReportList *reports)
 {
        BPathRemap_Data data = {NULL};
 
@@ -184,7 +184,7 @@ void makeFilesAbsolute(Main *bmain, const char *basedir, ReportList *reports)
        data.basedir = basedir;
        data.reports = reports;
 
-       bpath_traverse_main(bmain, makeFilesAbsolute_visit_cb, 0, (void *)&data);
+       BLI_bpath_traverse_main(bmain, makeFilesAbsolute_visit_cb, 0, (void *)&data);
 
        BKE_reportf(reports, data.count_failed ? RPT_WARNING : RPT_INFO,
                    "Total files %d|Changed %d|Failed %d",
@@ -293,14 +293,14 @@ static int findMissingFiles_visit_cb(void *userdata, char *path_dst, const char
        }
 }
 
-void findMissingFiles(Main *bmain, const char *searchpath, ReportList *reports)
+void BLI_bpath_missing_files_find(Main *bmain, const char *searchpath, ReportList *reports)
 {
        struct BPathFind_Data data = {NULL};
 
        data.reports = reports;
        BLI_split_dir_part(searchpath, data.searchdir, sizeof(data.searchdir));
 
-       bpath_traverse_main(bmain, findMissingFiles_visit_cb, 0, (void *)&data);
+       BLI_bpath_traverse_main(bmain, findMissingFiles_visit_cb, 0, (void *)&data);
 }
 
 /* Run a visitor on a string, replacing the contents of the string as needed. */
@@ -378,19 +378,19 @@ static int rewrite_path_alloc(char **path, BPathVisitor visit_cb, const char *ab
 }
 
 /* Run visitor function 'visit' on all paths contained in 'id'. */
-void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
+void BLI_bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
 {
        Image *ima;
-       const char *absbase = (flag & BPATH_TRAVERSE_ABS) ? ID_BLEND_PATH(bmain, id) : NULL;
+       const char *absbase = (flag & BLI_BPATH_TRAVERSE_ABS) ? ID_BLEND_PATH(bmain, id) : NULL;
 
-       if ((flag & BPATH_TRAVERSE_SKIP_LIBRARY) && id->lib) {
+       if ((flag & BLI_BPATH_TRAVERSE_SKIP_LIBRARY) && id->lib) {
                return;
        }
 
        switch (GS(id->name)) {
        case ID_IM:
                ima= (Image *)id;
-               if (ima->packedfile == NULL || (flag & BPATH_TRAVERSE_SKIP_PACKED) == 0) {
+               if (ima->packedfile == NULL || (flag & BLI_BPATH_TRAVERSE_SKIP_PACKED) == 0) {
                        if (ELEM3(ima->source, IMA_SRC_FILE, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
                                rewrite_path_fixed(ima->name, visit_cb, absbase, bpath_user_data);
                        }
@@ -470,7 +470,7 @@ void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int fla
        case ID_SO:
                {
                        bSound *sound= (bSound *)id;
-                       if (sound->packedfile == NULL || (flag & BPATH_TRAVERSE_SKIP_PACKED) == 0) {
+                       if (sound->packedfile == NULL || (flag & BLI_BPATH_TRAVERSE_SKIP_PACKED) == 0) {
                                rewrite_path_fixed(sound->name, visit_cb, absbase, bpath_user_data);
                        }
                }
@@ -483,7 +483,7 @@ void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int fla
        case ID_VF:
                {
                        VFont *vf= (VFont *)id;
-                       if (vf->packedfile == NULL || (flag & BPATH_TRAVERSE_SKIP_PACKED) == 0) {
+                       if (vf->packedfile == NULL || (flag & BLI_BPATH_TRAVERSE_SKIP_PACKED) == 0) {
                                if (strcmp(vf->name, FO_BUILTIN_NAME) != 0) {
                                        rewrite_path_fixed(((VFont *)id)->name, visit_cb, absbase, bpath_user_data);
                                }
@@ -523,7 +523,7 @@ void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int fla
                                                        int len= MEM_allocN_len(se) / sizeof(*se);
                                                        int i;
 
-                                                       if (flag & BPATH_TRAVERSE_SKIP_MULTIFILE) {
+                                                       if (flag & BLI_BPATH_TRAVERSE_SKIP_MULTIFILE) {
                                                                /* only operate on one path */
                                                                len= MIN2(1, len);
                                                        }
@@ -575,26 +575,26 @@ void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int fla
        }
 }
 
-void bpath_traverse_id_list(Main *bmain, ListBase *lb, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
+void BLI_bpath_traverse_id_list(Main *bmain, ListBase *lb, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
 {
        ID *id;
        for (id = lb->first; id; id = id->next) {
-               bpath_traverse_id(bmain, id, visit_cb, flag, bpath_user_data);
+               BLI_bpath_traverse_id(bmain, id, visit_cb, flag, bpath_user_data);
        }
 }
 
-void bpath_traverse_main(Main *bmain, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
+void BLI_bpath_traverse_main(Main *bmain, BPathVisitor visit_cb, const int flag, void *bpath_user_data)
 {
        ListBase *lbarray[MAX_LIBARRAY];
        int a = set_listbasepointers(bmain, lbarray);
        while (a--) {
-               bpath_traverse_id_list(bmain, lbarray[a], visit_cb, flag, bpath_user_data);
+               BLI_bpath_traverse_id_list(bmain, lbarray[a], visit_cb, flag, bpath_user_data);
        }
 }
 
 /* Rewrites a relative path to be relative to the main file - unless the path is
  * absolute, in which case it is not altered. */
-int bpath_relocate_visitor(void *pathbase_v, char *path_dst, const char *path_src)
+int BLI_bpath_relocate_visitor(void *pathbase_v, char *path_dst, const char *path_src)
 {
        /* be sure there is low chance of the path being too short */
        char filepath[(FILE_MAXDIR * 2) + FILE_MAXFILE];
index 0cb986d90902f5e5d410d16e3a10ff53393718bf..876599f74802b4c997161b111d4c7694ebbd4d22 100644 (file)
@@ -28,7 +28,7 @@
 
 static ListBase callback_slots[BLI_CB_EVT_TOT]= {{NULL}};
 
-void BLI_exec_cb(struct Main *main, struct ID *self, eCbEvent evt)
+void BLI_callback_exec(struct Main *main, struct ID *self, eCbEvent evt)
 {
        ListBase *lb= &callback_slots[evt];
        bCallbackFuncStore *funcstore;
@@ -38,19 +38,19 @@ void BLI_exec_cb(struct Main *main, struct ID *self, eCbEvent evt)
        }
 }
 
-void BLI_add_cb(bCallbackFuncStore *funcstore, eCbEvent evt)
+void BLI_callback_add(bCallbackFuncStore *funcstore, eCbEvent evt)
 {
        ListBase *lb= &callback_slots[evt];
        BLI_addtail(lb, funcstore);
 }
 
-void BLI_cb_init(void)
+void BLI_callback_global_init(void)
 {
        /* do nothing */
 }
 
 /* call on application exit */
-void BLI_cb_finalize(void)
+void BLI_callback_global_finalize(void)
 {
        eCbEvent evt;
        for (evt= 0; evt < BLI_CB_EVT_TOT; evt++) {
index c7977378f6a3f499f43c9d00858c4a8028fe6b63..afe31fb13774351a2631530ccc2fbcdfde2453c4 100644 (file)
@@ -136,7 +136,7 @@ void BLI_jitterate2(float *jit1, float *jit2, int num, float rad2)
 }
 
 
-void BLI_initjit(float *jitarr, int num)
+void BLI_jitter_init(float *jitarr, int num)
 {
        float *jit2, x, rad1, rad2, rad3;
        int i;
index 25850e14ae7c575e96445f97143259f7d1d35684..503de31616a109b02a0f599e55088ab947b4970a 100644 (file)
@@ -99,7 +99,7 @@ typedef struct ScanFillVertLink {
 #define SF_VERT_ZERO_LEN 255
 
 /* Optionally set ScanFillEdge f to this to mark original boundary edges.
- * Only needed if there are internal diagonal edges passed to BLI_edgefill. */
+ * Only needed if there are internal diagonal edges passed to BLI_scanfill_calc. */
 #define SF_EDGE_BOUNDARY 1
 #define SF_EDGE_UNKNOWN  2    /* TODO, what is this for exactly? - need to document it! */
 
@@ -191,7 +191,7 @@ static void mem_element_reset(ScanFillContext *sf_ctx, int keep_first)
        sf_ctx->melem__offs = 0;
 }
 
-void BLI_end_edgefill(ScanFillContext *sf_ctx)
+void BLI_scanfill_end(ScanFillContext *sf_ctx)
 {
         mem_element_reset(sf_ctx, FALSE);
        
@@ -202,7 +202,7 @@ void BLI_end_edgefill(ScanFillContext *sf_ctx)
 
 /* ****  FILL ROUTINES *************************** */
 
-ScanFillVert *BLI_addfillvert(ScanFillContext *sf_ctx, const float vec[3])
+ScanFillVert *BLI_scanfill_vert_add(ScanFillContext *sf_ctx, const float vec[3])
 {
        ScanFillVert *eve;
        
@@ -214,7 +214,7 @@ ScanFillVert *BLI_addfillvert(ScanFillContext *sf_ctx, const float vec[3])
        return eve;     
 }
 
-ScanFillEdge *BLI_addfilledge(ScanFillContext *sf_ctx, ScanFillVert *v1, ScanFillVert *v2)
+ScanFillEdge *BLI_scanfill_edge_add(ScanFillContext *sf_ctx, ScanFillVert *v1, ScanFillVert *v2)
 {
        ScanFillEdge *newed;
 
@@ -453,7 +453,7 @@ static void testvertexnearedge(ScanFillContext *sf_ctx)
                                                        const float dist = dist_to_line_v2(eed->v1->xy, eed->v2->xy, eve->xy);
                                                        if (dist < SF_EPSILON) {
                                                                /* new edge */
-                                                               ed1 = BLI_addfilledge(sf_ctx, eed->v1, eve);
+                                                               ed1 = BLI_scanfill_edge_add(sf_ctx, eed->v1, eve);
                                                                
                                                                /* printf("fill: vertex near edge %x\n",eve); */
                                                                ed1->f = 0;
@@ -681,7 +681,7 @@ static int scanfill(ScanFillContext *sf_ctx, PolyFill *pf)
                                        /* make new edge, and start over */
                                        /* printf("add new edge %x %x and start again\n",v2,sc1->v1); */
 
-                                       ed3 = BLI_addfilledge(sf_ctx, v2, sc1->v1);
+                                       ed3 = BLI_scanfill_edge_add(sf_ctx, v2, sc1->v1);
                                        BLI_remlink(&sf_ctx->filledgebase, ed3);
                                        BLI_insertlinkbefore((ListBase *)&(sc->first), ed2, ed3);
                                        ed3->v2->f = SF_VERT_UNKNOWN;
@@ -709,7 +709,7 @@ static int scanfill(ScanFillContext *sf_ctx, PolyFill *pf)
                                        }
 
                                        /* new edge */
-                                       ed3 = BLI_addfilledge(sf_ctx, v1, v3);
+                                       ed3 = BLI_scanfill_edge_add(sf_ctx, v1, v3);
                                        BLI_remlink(&sf_ctx->filledgebase, ed3);
                                        ed3->f = SF_EDGE_UNKNOWN;
                                        ed3->v1->h++; 
@@ -764,19 +764,19 @@ static int scanfill(ScanFillContext *sf_ctx, PolyFill *pf)
 }
 
 
-int BLI_begin_edgefill(ScanFillContext *sf_ctx)
+int BLI_scanfill_begin(ScanFillContext *sf_ctx)
 {
        memset(sf_ctx, 0, sizeof(*sf_ctx));
 
        return 1;
 }
 
-int BLI_edgefill(ScanFillContext *sf_ctx, const short do_quad_tri_speedup)
+int BLI_scanfill_calc(ScanFillContext *sf_ctx, const short do_quad_tri_speedup)
 {
-       return BLI_edgefill_ex(sf_ctx, do_quad_tri_speedup, NULL);
+       return BLI_scanfill_calc_ex(sf_ctx, do_quad_tri_speedup, NULL);
 }
 
-int BLI_edgefill_ex(ScanFillContext *sf_ctx, const short do_quad_tri_speedup, const float nor_proj[3])
+int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const short do_quad_tri_speedup, const float nor_proj[3])
 {
        /*
         * - fill works with its own lists, so create that first (no faces!)
index 268b4cbe4a3351e91f4290c7fc6f95f13b450e6f..a630084e79d0eb85fad90ae2e8a17b2cf70bab5f 100644 (file)
@@ -32,7 +32,7 @@
 #include "BLI_math.h"
 #include "BLI_uvproject.h"
 
-typedef struct UvCameraInfo {
+typedef struct ProjCameraInfo {
        float camangle;
        float camsize;
        float xasp, yasp;
@@ -40,9 +40,9 @@ typedef struct UvCameraInfo {
        float rotmat[4][4];
        float caminv[4][4];
        short do_persp, do_pano, do_rotmat;
-} UvCameraInfo;
+} ProjCameraInfo;
 
-void project_from_camera(float target[2], float source[3], UvCameraInfo *uci)
+void BLI_uvproject_from_camera(float target[2], float source[3], ProjCameraInfo *uci)
 {
        float pv4[4];
 
@@ -93,7 +93,7 @@ void project_from_camera(float target[2], float source[3], UvCameraInfo *uci)
 }
 
 /* could rv3d->persmat */
-void project_from_view(float target[2], float source[3], float persmat[4][4], float rotmat[4][4], float winx, float winy)
+void BLI_uvproject_from_view(float target[2], float source[3], float persmat[4][4], float rotmat[4][4], float winx, float winy)
 {
        float pv[3], pv4[4], x = 0.0, y = 0.0;
 
@@ -133,9 +133,9 @@ void project_from_view(float target[2], float source[3], float persmat[4][4], fl
 
 /* 'rotmat' can be obedit->obmat when uv project is used.
  * 'winx' and 'winy' can be from scene->r.xsch/ysch */
-UvCameraInfo *project_camera_info(Object *ob, float(*rotmat)[4], float winx, float winy)
+ProjCameraInfo *BLI_uvproject_camera_info(Object *ob, float(*rotmat)[4], float winx, float winy)
 {
-       UvCameraInfo uci;
+       ProjCameraInfo uci;
        Camera *camera = ob->data;
 
        uci.do_pano = (camera->type == CAM_PANO);
@@ -149,7 +149,7 @@ UvCameraInfo *project_camera_info(Object *ob, float(*rotmat)[4], float winx, flo
        normalize_m4(uci.caminv);
 
        if (invert_m4(uci.caminv)) {
-               UvCameraInfo *uci_pt;
+               ProjCameraInfo *uci_pt;
 
                /* normal projection */
                if (rotmat) {
@@ -174,7 +174,7 @@ UvCameraInfo *project_camera_info(Object *ob, float(*rotmat)[4], float winx, flo
                uci.shiftx = 0.5f - (camera->shiftx * uci.xasp);
                uci.shifty = 0.5f - (camera->shifty * uci.yasp);
 
-               uci_pt = MEM_mallocN(sizeof(UvCameraInfo), "UvCameraInfo");
+               uci_pt = MEM_mallocN(sizeof(ProjCameraInfo), "ProjCameraInfo");
                *uci_pt = uci;
                return uci_pt;
        }
@@ -182,7 +182,7 @@ UvCameraInfo *project_camera_info(Object *ob, float(*rotmat)[4], float winx, flo
        return NULL;
 }
 
-void project_from_view_ortho(float target[2], float source[3], float rotmat[4][4])
+void BLI_uvproject_from_view_ortho(float target[2], float source[3], float rotmat[4][4])
 {
        float pv[3];
 
@@ -193,7 +193,7 @@ void project_from_view_ortho(float target[2], float source[3], float rotmat[4][4
        target[1] = pv[2];
 }
 
-void project_camera_info_scale(UvCameraInfo *uci, float scale_x, float scale_y)
+void BLI_uvproject_camera_info_scale(ProjCameraInfo *uci, float scale_x, float scale_y)
 {
        uci->xasp *= scale_x;
        uci->yasp *= scale_y;
index 34862c724e12eefeb377cb108cb1316761b517fc..1fe42384eb62ab35b430ad672499eed07d6858ea 100644 (file)
 
 BLI_INLINE float D(float *data, const int res[3], int x, int y, int z)
 {
-       CLAMP(x, 0, res[0]-1);
-       CLAMP(y, 0, res[1]-1);
-       CLAMP(z, 0, res[2]-1);
-       return data[ V_I(x, y, z, res) ];
+       CLAMP(x, 0, res[0] - 1);
+       CLAMP(y, 0, res[1] - 1);
+       CLAMP(z, 0, res[2] - 1);
+       return data[ BLI_VEXEL_INDEX(x, y, z, res) ];
 }
 
 /* *** nearest neighbor *** */
 /* input coordinates must be in bounding box 0.0 - 1.0 */
-float voxel_sample_nearest(float *data, const int res[3], const float co[3])
+float BLI_voxel_sample_nearest(float *data, const int res[3], const float co[3])
 {
        int xi, yi, zi;
        
@@ -70,7 +70,7 @@ BLI_INLINE int _clamp(int a, int b, int c)
        return (a < b) ? b : ((a > c) ? c : a);
 }
 
-float voxel_sample_trilinear(float *data, const int res[3], const float co[3])
+float BLI_voxel_sample_trilinear(float *data, const int res[3], const float co[3])
 {
        if (data) {
        
@@ -102,7 +102,7 @@ float voxel_sample_trilinear(float *data, const int res[3], const float co[3])
 }
        
 
-float voxel_sample_triquadratic(float *data, const int res[3], const float co[3])
+float BLI_voxel_sample_triquadratic(float *data, const int res[3], const float co[3])
 {
        if (data) {
 
@@ -132,7 +132,7 @@ float voxel_sample_triquadratic(float *data, const int res[3], const float co[3]
        return 0.f;
 }
 
-float voxel_sample_tricubic(float *data, const int res[3], const float co[3], int bspline)
+float BLI_voxel_sample_tricubic(float *data, const int res[3], const float co[3], int bspline)
 {
        if (data) {
 
index 14c8d42654c45b59cfbd83d473f9246e0138a734..c741ebbc5bf100e6a1ecc3c9a35d50e580551297 100644 (file)
@@ -2919,7 +2919,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
                                 * we should not have any relative paths, but if there
                                 * is somehow, an invalid or empty G.main->name it will
                                 * print an error, don't try make the absolute in this case. */
-                               makeFilesAbsolute(mainvar, G.main->name, NULL);
+                               BLI_bpath_absolute_convert(mainvar, G.main->name, NULL);
                        }
                }
        }
@@ -2928,7 +2928,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
        write_user_block= (BLI_path_cmp(filepath, userfilename) == 0);
 
        if (write_flags & G_FILE_RELATIVE_REMAP)
-               makeFilesRelative(mainvar, filepath, NULL); /* note, making relative to something OTHER then G.main->name */
+               BLI_bpath_relative_convert(mainvar, filepath, NULL); /* note, making relative to something OTHER then G.main->name */
 
        /* actual file writing */
        err= write_file_handle(mainvar, file, NULL, NULL, write_user_block, write_flags, thumb);
index 755dceefdc5a25ba72a0482faa1b73e1ed2faf64..afc60d844db62a37284feef18c145ff3a646d538 100644 (file)
@@ -168,30 +168,30 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
 
        BLI_smallhash_init(&hash);
        
-       BLI_begin_edgefill(&sf_ctx);
+       BLI_scanfill_begin(&sf_ctx);
        
        BMO_ITER (e, &siter, bm, op, "edges", BM_EDGE) {
                BMO_elem_flag_enable(bm, e, EDGE_MARK);
                
                if (!BLI_smallhash_haskey(&hash, (uintptr_t)e->v1)) {
-                       eve = BLI_addfillvert(&sf_ctx, e->v1->co);
+                       eve = BLI_scanfill_vert_add(&sf_ctx, e->v1->co);
                        eve->tmp.p = e->v1;
                        BLI_smallhash_insert(&hash, (uintptr_t)e->v1, eve);
                }
                
                if (!BLI_smallhash_haskey(&hash, (uintptr_t)e->v2)) {
-                       eve = BLI_addfillvert(&sf_ctx, e->v2->co);
+                       eve = BLI_scanfill_vert_add(&sf_ctx, e->v2->co);
                        eve->tmp.p = e->v2;
                        BLI_smallhash_insert(&hash, (uintptr_t)e->v2, eve);
                }
                
                v1 = BLI_smallhash_lookup(&hash, (uintptr_t)e->v1);
                v2 = BLI_smallhash_lookup(&hash, (uintptr_t)e->v2);
-               /* eed = */ BLI_addfilledge(&sf_ctx, v1, v2);
+               /* eed = */ BLI_scanfill_edge_add(&sf_ctx, v1, v2);
                /* eed->tmp.p = e; */ /* UNUSED */
        }
        
-       BLI_edgefill(&sf_ctx, FALSE);
+       BLI_scanfill_calc(&sf_ctx, FALSE);
        
        for (efa = sf_ctx.fillfacebase.first; efa; efa = efa->next) {
                BMFace *f = BM_face_create_quad_tri(bm,
@@ -208,7 +208,7 @@ void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op)
                }
        }
        
-       BLI_end_edgefill(&sf_ctx);
+       BLI_scanfill_end(&sf_ctx);
        BLI_smallhash_release(&hash);
        
        /* clean up fill */
index b215f0ac3451ebdac78a2346421c83a1717156c3..57d7869d3db8905da889151d79b38bea136907d5 100644 (file)
@@ -1877,11 +1877,11 @@ static void knifenet_fill_faces(KnifeTool_OpData *kcd)
                if (face_nets[i].first)
                        BMO_elem_flag_enable(bm, f, DEL);
 
-               BLI_begin_edgefill(&sf_ctx);
+               BLI_scanfill_begin(&sf_ctx);
 
                for (entry = face_nets[i].first; entry; entry = entry->next) {
                        if (!BLI_smallhash_haskey(hash, (intptr_t)entry->kfe->v1)) {
-                               eve = BLI_addfillvert(&sf_ctx, entry->kfe->v1->v->co);
+                               eve = BLI_scanfill_vert_add(&sf_ctx, entry->kfe->v1->v->co);
                                eve->poly_nr = 0;
                                rnd_offset_co(eve->co, rndscale);
                                eve->tmp.p = entry->kfe->v1->v;
@@ -1889,7 +1889,7 @@ static void knifenet_fill_faces(KnifeTool_OpData *kcd)
                        }
 
                        if (!BLI_smallhash_haskey(hash, (intptr_t)entry->kfe->v2)) {
-                               eve = BLI_addfillvert(&sf_ctx, entry->kfe->v2->v->co);
+                               eve = BLI_scanfill_vert_add(&sf_ctx, entry->kfe->v2->v->co);
                                eve->poly_nr = 0;
                                rnd_offset_co(eve->co, rndscale);
                                eve->tmp.p = entry->kfe->v2->v;
@@ -1911,7 +1911,7 @@ static void knifenet_fill_faces(KnifeTool_OpData *kcd)
 
                        if (eve->poly_nr > 1 && lasteve->poly_nr > 1) {
                                ScanFillEdge *eed;
-                               eed = BLI_addfilledge(&sf_ctx, lasteve, eve);
+                               eed = BLI_scanfill_edge_add(&sf_ctx, lasteve, eve);
                                if (entry->kfe->oe)
                                        eed->f = SF_EDGE_BOUNDARY;  /* mark as original boundary edge */
 
@@ -1926,7 +1926,7 @@ static void knifenet_fill_faces(KnifeTool_OpData *kcd)
                        }
                }
 
-               BLI_edgefill(&sf_ctx, FALSE);
+               BLI_scanfill_calc(&sf_ctx, FALSE);
 
                for (efa = sf_ctx.fillfacebase.first; efa; efa = efa->next) {
                        BMVert *v1 = efa->v3->tmp.p, *v2 = efa->v2->tmp.p, *v3 = efa->v1->tmp.p;
@@ -1959,7 +1959,7 @@ static void knifenet_fill_faces(KnifeTool_OpData *kcd)
                        }
                }
 
-               BLI_end_edgefill(&sf_ctx);
+               BLI_scanfill_end(&sf_ctx);
                BLI_smallhash_release(hash);
        }
        bm->elem_index_dirty |= BM_FACE;
index cfc7ba0537fea8dbcd92254664316efe6f7fccd7..9f611b526693de7bf9961a235a1c6d0906050dc5 100644 (file)
@@ -192,7 +192,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
                        float *accum_tmp = MEM_mallocN(sizex * sizey * sizeof(float) * 4, "accum2");
                        int j;
 
-                       BLI_initjit(jit_ofs[0], scene->r.osa);
+                       BLI_jitter_init(jit_ofs[0], scene->r.osa);
 
                        /* first sample buffer, also initializes 'rv3d->persmat' */
                        ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat, TRUE);
index 4698c734f8effe89c01eea3a496b5722b1f66ec7..080f12bf35bbd95c9d8353bc79e157c5d2971604 100644 (file)
@@ -200,7 +200,7 @@ static int make_paths_relative_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        }
 
-       makeFilesRelative(bmain, bmain->name, op->reports);
+       BLI_bpath_relative_convert(bmain, bmain->name, op->reports);
 
        /* redraw everything so any changed paths register */
        WM_main_add_notifier(NC_WINDOW, NULL);
@@ -233,7 +233,7 @@ static int make_paths_absolute_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        }
 
-       makeFilesAbsolute(bmain, bmain->name, op->reports);
+       BLI_bpath_absolute_convert(bmain, bmain->name, op->reports);
 
        /* redraw everything so any changed paths register */
        WM_main_add_notifier(NC_WINDOW, NULL);
@@ -262,7 +262,7 @@ static int report_missing_files_exec(bContext *C, wmOperator *op)
        Main *bmain = CTX_data_main(C);
 
        /* run the missing file check */
-       checkMissingFiles(bmain, op->reports);
+       BLI_bpath_missing_files_check(bmain, op->reports);
        
        return OPERATOR_FINISHED;
 }
@@ -287,7 +287,7 @@ static int find_missing_files_exec(bContext *C, wmOperator *op)
 {
        Main *bmain = CTX_data_main(C);
        const char *searchpath = RNA_string_get_alloc(op->ptr, "filepath", NULL, 0);
-       findMissingFiles(bmain, searchpath, op->reports);
+       BLI_bpath_missing_files_find(bmain, searchpath, op->reports);
        MEM_freeN((void *)searchpath);
 
        return OPERATOR_FINISHED;
index 478643be9474bb0c6d62d5479b8b47a16f3fe69a..2b93246e797c323caaf1d518312aa1b54fbf993d 100644 (file)
@@ -4356,7 +4356,7 @@ void param_smooth_area(ParamHandle *handle)
 void param_pack(ParamHandle *handle, float margin)
 {      
        /* box packing variables */
-       boxPack *boxarray, *box;
+       BoxPack *boxarray, *box;
        float tot_width, tot_height, scale;
         
        PChart *chart;
@@ -4373,7 +4373,7 @@ void param_pack(ParamHandle *handle, float margin)
                param_scale(handle, 1.0f / phandle->aspx, 1.0f / phandle->aspy);
        
        /* we may not use all these boxes */
-       boxarray = MEM_mallocN(phandle->ncharts * sizeof(boxPack), "boxPack box");
+       boxarray = MEM_mallocN(phandle->ncharts * sizeof(BoxPack), "BoxPack box");
        
        
        for (i = 0; i < phandle->ncharts; i++) {
@@ -4424,7 +4424,7 @@ void param_pack(ParamHandle *handle, float margin)
                }
        }
        
-       boxPack2D(boxarray, phandle->ncharts - unpacked, &tot_width, &tot_height);
+       BLI_box_pack_2D(boxarray, phandle->ncharts - unpacked, &tot_width, &tot_height);
        
        if (tot_height > tot_width)
                scale = 1.0f / tot_height;
index b2c7dd59f1d5491e57dc3185bcfac436a6333433..14c8420a8f539f45b80ca47990f2b08a78f5996e 100644 (file)
@@ -262,13 +262,13 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
                }
                else {
                        /* ngon - scanfill time! */
-                       BLI_begin_edgefill(&sf_ctx);
+                       BLI_scanfill_begin(&sf_ctx);
                        
                        firstv = lastv = NULL;
                        BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
                                int i;
                                
-                               v = BLI_addfillvert(&sf_ctx, l->v->co);
+                               v = BLI_scanfill_vert_add(&sf_ctx, l->v->co);
                                
                                /* add small random offset */
                                for (i = 0; i < 3; i++) {
@@ -278,7 +278,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
                                v->tmp.p = l;
 
                                if (lastv) {
-                                       BLI_addfilledge(&sf_ctx, lastv, v);
+                                       BLI_scanfill_edge_add(&sf_ctx, lastv, v);
                                }
 
                                lastv = v;
@@ -286,9 +286,9 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
                                        firstv = v;
                        }
 
-                       BLI_addfilledge(&sf_ctx, firstv, v);
+                       BLI_scanfill_edge_add(&sf_ctx, firstv, v);
 
-                       BLI_edgefill_ex(&sf_ctx, TRUE, efa->no);
+                       BLI_scanfill_calc_ex(&sf_ctx, TRUE, efa->no);
                        for (sefa = sf_ctx.fillfacebase.first; sefa; sefa = sefa->next) {
                                ls[0] = sefa->v1->tmp.p;
                                ls[1] = sefa->v2->tmp.p;
@@ -306,7 +306,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
                                param_face_add(handle, key, 3, vkeys, co, uv, pin, select);
                        }
 
-                       BLI_end_edgefill(&sf_ctx);
+                       BLI_scanfill_end(&sf_ctx);
                }
        }
 
@@ -1265,12 +1265,12 @@ static int uv_from_view_exec(bContext *C, wmOperator *op)
 
                        BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
                                luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
-                               project_from_view_ortho(luv->uv, l->v->co, rotmat);
+                               BLI_uvproject_from_view_ortho(luv->uv, l->v->co, rotmat);
                        }
                }
        }
        else if (camera) {
-               struct UvCameraInfo *uci = project_camera_info(v3d->camera, obedit->obmat, scene->r.xsch, scene->r.ysch);
+               struct ProjCameraInfo *uci = BLI_uvproject_camera_info(v3d->camera, obedit->obmat, scene->r.xsch, scene->r.ysch);
                
                if (uci) {
                        BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
@@ -1279,7 +1279,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op)
 
                                BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
                                        luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
-                                       project_from_camera(luv->uv, l->v->co, uci);
+                                       BLI_uvproject_from_camera(luv->uv, l->v->co, uci);
                                }
                        }
                        
@@ -1295,7 +1295,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op)
 
                        BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
                                luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
-                               project_from_view(luv->uv, l->v->co, rv3d->persmat, rotmat, ar->winx, ar->winy);
+                               BLI_uvproject_from_view(luv->uv, l->v->co, rv3d->persmat, rotmat, ar->winx, ar->winy);
                        }
                }
        }
index af98684c7e3806c108bb5247b38fc881c34da591..4f8fd83491f832d97ee3617cae944afa4c58e9a0 100644 (file)
@@ -194,8 +194,8 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
                        
                        cam = (Camera *)projectors[i].ob->data;
                        if (cam->type == CAM_PANO) {
-                               projectors[i].uci= project_camera_info(projectors[i].ob, NULL, aspx, aspy);
-                               project_camera_info_scale(projectors[i].uci, scax, scay);
+                               projectors[i].uci= BLI_uvproject_camera_info(projectors[i].ob, NULL, aspx, aspy);
+                               BLI_uvproject_camera_info_scale(projectors[i].uci, scax, scay);
                                free_uci= 1;
                        }
                        else {
@@ -304,7 +304,7 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
                                        do {
                                                unsigned int lidx= mp->loopstart + fidx;
                                                unsigned int vidx= mloop[lidx].v;
-                                               project_from_camera(mloop_uv[lidx].uv, coords[vidx], projectors[0].uci);
+                                               BLI_uvproject_from_camera(mloop_uv[lidx].uv, coords[vidx], projectors[0].uci);
                                        } while (fidx--);
                                }
                                else {
@@ -347,7 +347,7 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
                                        do {
                                                unsigned int lidx= mp->loopstart + fidx;
                                                unsigned int vidx= mloop[lidx].v;
-                                               project_from_camera(mloop_uv[lidx].uv, coords[vidx], best_projector->uci);
+                                               BLI_uvproject_from_camera(mloop_uv[lidx].uv, coords[vidx], best_projector->uci);
                                        } while (fidx--);
                                }
                                else {
index 834ca1227b5ef34060efd0e6b5c0e2d6af50a1e7..4d5c02dad68c2b7cac632f459a37a3ffbfacdb99 100644 (file)
@@ -125,13 +125,13 @@ static PyObject *bpy_blend_paths(PyObject *UNUSED(self), PyObject *args, PyObjec
                return NULL;
        }
 
-       if (absolute) flag |= BPATH_TRAVERSE_ABS;
-       if (!packed)  flag |= BPATH_TRAVERSE_SKIP_PACKED;
-       if (local)    flag |= BPATH_TRAVERSE_SKIP_LIBRARY;
+       if (absolute) flag |= BLI_BPATH_TRAVERSE_ABS;
+       if (!packed)  flag |= BLI_BPATH_TRAVERSE_SKIP_PACKED;
+       if (local)    flag |= BLI_BPATH_TRAVERSE_SKIP_LIBRARY;
 
        list = PyList_New(0);
 
-       bpath_traverse_main(G.main, bpy_blend_paths_visit_cb, flag, (void *)list);
+       BLI_bpath_traverse_main(G.main, bpy_blend_paths_visit_cb, flag, (void *)list);
 
        return list;
 }
index 5128cf0b9243024e1744cd33c876d31d3833ebc7..bab5a83a6ed51cca26f13acd8ffe13cd28b317d0 100644 (file)
@@ -225,7 +225,7 @@ PyObject *BPY_app_handlers_struct(void)
                        funcstore->func = bpy_app_generic_callback;
                        funcstore->alloc = 0;
                        funcstore->arg = SET_INT_IN_POINTER(pos);
-                       BLI_add_cb(funcstore, pos);
+                       BLI_callback_add(funcstore, pos);
                }
        }
 
index 203da5d1bd2471df00e3c7491a2860f03098d2d5..9e9b96a885b29e19a6e79b021ca205753e07d1b8 100644 (file)
@@ -1150,11 +1150,11 @@ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject
 }
 
 
-static int boxPack_FromPyObject(PyObject *value, boxPack **boxarray)
+static int boxPack_FromPyObject(PyObject *value, BoxPack **boxarray)
 {
        Py_ssize_t len, i;
        PyObject *list_item, *item_1, *item_2;
-       boxPack *box;
+       BoxPack *box;
 
 
        /* Error checking must already be done */
@@ -1166,7 +1166,7 @@ static int boxPack_FromPyObject(PyObject *value, boxPack **boxarray)
 
        len = PyList_GET_SIZE(value);
 
-       *boxarray = MEM_mallocN(len * sizeof(boxPack), "boxPack box");
+       *boxarray = MEM_mallocN(len * sizeof(BoxPack), "BoxPack box");
 
 
        for (i = 0; i < len; i++) {
@@ -1201,11 +1201,11 @@ static int boxPack_FromPyObject(PyObject *value, boxPack **boxarray)
        return 0;
 }
 
-static void boxPack_ToPyObject(PyObject *value, boxPack **boxarray)
+static void boxPack_ToPyObject(PyObject *value, BoxPack **boxarray)
 {
        Py_ssize_t len, i;
        PyObject *list_item;
-       boxPack *box;
+       BoxPack *box;
 
        len = PyList_GET_SIZE(value);
 
@@ -1243,13 +1243,13 @@ static PyObject *M_Geometry_box_pack_2d(PyObject *UNUSED(self), PyObject *boxlis
 
        len = PyList_GET_SIZE(boxlist);
        if (len) {
-               boxPack *boxarray = NULL;
+               BoxPack *boxarray = NULL;
                if (boxPack_FromPyObject(boxlist, &boxarray) == -1) {
                        return NULL; /* exception set */
                }
 
                /* Non Python function */
-               boxPack2D(boxarray, len, &tot_width, &tot_height);
+               BLI_box_pack_2D(boxarray, len, &tot_width, &tot_height);
 
                boxPack_ToPyObject(boxlist, &boxarray);
        }
index 3e82bec7e52028aa6e223d4604cbfc6564a5bbda..56aadfd63d002e88632d43c811890de3c1bc8255 100644 (file)
@@ -94,10 +94,10 @@ static void init_render_jit(Render *re)
        
        if (lastjit!=re->r.osa || last_mblur_jit != re->r.mblur_samples) {
                memset(jit, 0, sizeof(jit));
-               BLI_initjit(jit[0], re->r.osa);
+               BLI_jitter_init(jit[0], re->r.osa);
                
                memset(mblur_jit, 0, sizeof(mblur_jit));
-               BLI_initjit(mblur_jit[0], re->r.mblur_samples);
+               BLI_jitter_init(mblur_jit[0], re->r.mblur_samples);
        }
        
        lastjit= re->r.osa;
index 57c39a03c0641523fb42b9e16a11cae03c108898..9ca2337e27fc99985bfcd0b4e43e2d7983d51b0b 100644 (file)
@@ -171,7 +171,7 @@ static void stats_background(void *UNUSED(arg), RenderStats *rs)
                        fprintf(stdout, "Sce: %s Ve:%d Fa:%d La:%d", rs->scenename, rs->totvert, rs->totface, rs->totlamp);
        }
 
-       BLI_exec_cb(G.main, NULL, BLI_CB_EVT_RENDER_STATS);
+       BLI_callback_exec(G.main, NULL, BLI_CB_EVT_RENDER_STATS);
 
        fputc('\n', stdout);
        fflush(stdout);
@@ -2021,7 +2021,7 @@ void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *sr
        if (render_initialize_from_main(re, bmain, scene, srl, camera_override, lay, 0, 0)) {
                MEM_reset_peak_memory();
 
-               BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE);
+               BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE);
 
                do_render_all_options(re);
 
@@ -2039,10 +2039,10 @@ void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *sr
                        }
                }
 
-               BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */
+               BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */
        }
 
-       BLI_exec_cb(re->main, (ID *)scene, G.afbreek ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE);
+       BLI_callback_exec(re->main, (ID *)scene, G.afbreek ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE);
 
        /* UGLY WARNING */
        G.rendering= 0;
@@ -2120,7 +2120,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
        BLI_timestr(re->i.lastframetime, name);
        printf(" Time: %s", name);
 
-       BLI_exec_cb(G.main, NULL, BLI_CB_EVT_RENDER_STATS);
+       BLI_callback_exec(G.main, NULL, BLI_CB_EVT_RENDER_STATS);
 
        fputc('\n', stdout);
        fflush(stdout); /* needed for renderd !! (not anymore... (ton)) */
@@ -2155,7 +2155,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
                        if (nf >= 0 && nf >= scene->r.sfra && nf <= scene->r.efra) {
                                scene->r.cfra = re->r.cfra = nf;
 
-                               BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE);
+                               BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE);
 
                                do_render_all_options(re);
                                totrendered++;
@@ -2166,7 +2166,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
                                }
 
                                if (G.afbreek == 0) {
-                                       BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */
+                                       BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */
                                }
                        }
                        else {
@@ -2220,7 +2220,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
                        re->r.cfra= scene->r.cfra;         /* weak.... */
 
                        /* run callbacs before rendering, before the scene is updated */
-                       BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE);
+                       BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_PRE);
 
                        
                        do_render_all_options(re);
@@ -2246,7 +2246,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
                        }
 
                        if (G.afbreek==0) {
-                               BLI_exec_cb(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */
+                               BLI_callback_exec(re->main, (ID *)scene, BLI_CB_EVT_RENDER_POST); /* keep after file save */
                        }
                }
        }
@@ -2262,7 +2262,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
 
        re->flag &= ~R_ANIMATION;
 
-       BLI_exec_cb(re->main, (ID *)scene, G.afbreek ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE);
+       BLI_callback_exec(re->main, (ID *)scene, G.afbreek ? BLI_CB_EVT_RENDER_CANCEL : BLI_CB_EVT_RENDER_COMPLETE);
 
        /* UGLY WARNING */
        G.rendering= 0;
index 1c572524a70139386fa1daac3f703314b40b500f..b3167e15df57f7ad1f7b6c4ad83cada8129928c1 100644 (file)
@@ -139,7 +139,7 @@ static float *give_jitter_tab(int samp)
 
        if (ctab[samp]==0) {
                ctab[samp]= 1;
-               BLI_initjit(jit[offset], samp*samp);
+               BLI_jitter_init(jit[offset], samp*samp);
        }
                
        return jit[offset];
index 69aa6082950bb68bebf82a39c8db6114e29985fe..e7c97574629c0cbe235324d4c267ffeb1afad7c9 100644 (file)
@@ -177,7 +177,7 @@ static float get_avg_surrounds(float *cache, int *res, int xx, int yy, int zz)
                                        for (x=-1; x <= 1; x++) {
                                                x_ = xx+x;
                                                if (x_ >= 0 && x_ <= res[0]-1) {
-                                                       const int i= V_I(x_, y_, z_, res);
+                                                       const int i= BLI_VEXEL_INDEX(x_, y_, z_, res);
                                                        
                                                        if (cache[i] > 0.0f) {
                                                                tot += cache[i];
@@ -208,7 +208,7 @@ static void lightcache_filter(VolumePrecache *vp)
                for (y=0; y < vp->res[1]; y++) {
                        for (x=0; x < vp->res[0]; x++) {
                                /* trigger for outside mesh */
-                               const int i= V_I(x, y, z, vp->res);
+                               const int i= BLI_VEXEL_INDEX(x, y, z, vp->res);
                                
                                if (vp->data_r[i] < -0.f)
                                        vp->data_r[i] = get_avg_surrounds(vp->data_r, vp->res, x, y, z);
@@ -240,7 +240,7 @@ static void lightcache_filter2(VolumePrecache *vp)
                for (y=0; y < vp->res[1]; y++) {
                        for (x=0; x < vp->res[0]; x++) {
                                /* trigger for outside mesh */
-                               const int i= V_I(x, y, z, vp->res);
+                               const int i= BLI_VEXEL_INDEX(x, y, z, vp->res);
                                if (vp->data_r[i] < -0.f)
                                        new_r[i] = get_avg_surrounds(vp->data_r, vp->res, x, y, z);
                                if (vp->data_g[i] < -0.f)
@@ -291,7 +291,7 @@ static float total_ss_energy(Render *re, int do_test_break, VolumePrecache *vp)
        for (z=0; z < res[2]; z++) {
                for (y=0; y < res[1]; y++) {
                        for (x=0; x < res[0]; x++) {
-                               const int i=V_I(x, y, z, res);
+                               const int i=BLI_VEXEL_INDEX(x, y, z, res);
                        
                                if (vp->data_r[i] > 0.f) energy += vp->data_r[i];
                                if (vp->data_g[i] > 0.f) energy += vp->data_g[i];
@@ -527,7 +527,7 @@ static void *vol_precache_part(void *data)
                                        /* convert from world->camera space for shading */
                                        mul_v3_m4v3(cco, pa->viewmat, co);
                                        
-                                       i= V_I(x, y, z, res);
+                                       i= BLI_VEXEL_INDEX(x, y, z, res);
                                        
                                        // don't bother if the point is not inside the volume mesh
                                        if (!point_inside_obi(tree, obi, cco)) {
index c51cb2af8424c633db2a266294517c1dc67930ab..b599da4880313a61d08782f4a92b4b8dc4fac0b1 100644 (file)
@@ -234,9 +234,9 @@ static void vol_get_precached_scattering(Render *re, ShadeInput *shi, float scat
        sample_co[1] = (world_co[1] - bbmin[1]) / dim[1];
        sample_co[2] = (world_co[2] - bbmin[2]) / dim[2];
 
-       scatter_col[0] = voxel_sample_triquadratic(vp->data_r, vp->res, sample_co);
-       scatter_col[1] = voxel_sample_triquadratic(vp->data_g, vp->res, sample_co);
-       scatter_col[2] = voxel_sample_triquadratic(vp->data_b, vp->res, sample_co);
+       scatter_col[0] = BLI_voxel_sample_triquadratic(vp->data_r, vp->res, sample_co);
+       scatter_col[1] = BLI_voxel_sample_triquadratic(vp->data_g, vp->res, sample_co);
+       scatter_col[2] = BLI_voxel_sample_triquadratic(vp->data_b, vp->res, sample_co);
 }
 
 /* Meta object density, brute force for now 
index 940f718d4ad0488dae4a25033e4fffd0f5638124..5135061bc5cf2e3fd9798ee7ff4838d96192ac7e 100644 (file)
@@ -184,7 +184,7 @@ static void load_frame_image_sequence(VoxelData *vd, Tex *tex)
                for (y=0; y < ibuf->y; y++) {
                        for (x=0; x < ibuf->x; x++) {
                                /* currently averaged to monchrome */
-                               vd->dataset[ V_I(x, y, z, vd->resol) ] = (rf[0] + rf[1] + rf[2])*0.333f;
+                               vd->dataset[ BLI_VEXEL_INDEX(x, y, z, vd->resol) ] = (rf[0] + rf[1] + rf[2]) * 0.333f;
                                rf +=4;
                        }
                }
@@ -423,17 +423,17 @@ int voxeldatatex(struct Tex *tex, const float texvec[3], struct TexResult *texre
        
        switch (vd->interp_type) {
                case TEX_VD_NEARESTNEIGHBOR:
-                       texres->tin = voxel_sample_nearest(vd->dataset, vd->resol, co);
+                       texres->tin = BLI_voxel_sample_nearest(vd->dataset, vd->resol, co);
                        break;  
                case TEX_VD_LINEAR:
-                       texres->tin = voxel_sample_trilinear(vd->dataset, vd->resol, co);
+                       texres->tin = BLI_voxel_sample_trilinear(vd->dataset, vd->resol, co);
                        break;                                  
                case TEX_VD_QUADRATIC:
-                       texres->tin = voxel_sample_triquadratic(vd->dataset, vd->resol, co);
+                       texres->tin = BLI_voxel_sample_triquadratic(vd->dataset, vd->resol, co);
                        break;
                case TEX_VD_TRICUBIC_CATROM:
                case TEX_VD_TRICUBIC_BSPLINE:
-                       texres->tin = voxel_sample_tricubic(vd->dataset, vd->resol, co, (vd->interp_type == TEX_VD_TRICUBIC_BSPLINE));
+                       texres->tin = BLI_voxel_sample_tricubic(vd->dataset, vd->resol, co, (vd->interp_type == TEX_VD_TRICUBIC_BSPLINE));
                        break;
        }
        
index b9e697439957631e56c1c4e3bdbf5e8e165b3997..4c3c9889d532920a4682d259410a94d273824fe5 100644 (file)
@@ -3047,7 +3047,7 @@ void RE_zbuf_accumulate_vecblur(NodeBlurData *nbd, int xsize, int ysize, float *
        /* has to become static, the init-jit calls a random-seed, screwing up texture noise node */
        if (firsttime) {
                firsttime= 0;
-               BLI_initjit(jit[0], 256);
+               BLI_jitter_init(jit[0], 256);
        }
        
        memset(newrect, 0, sizeof(float)*xsize*ysize*4);
index e50fbaa624ed26e6d143c0c0fffe0f2cbc45c263..a366810e6472c0a7a5e7608a92f840473db954c8 100644 (file)
@@ -361,7 +361,7 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
 
        WM_cursor_wait(1);
 
-       BLI_exec_cb(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_PRE);
+       BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_PRE);
 
        /* first try to append data from exotic file formats... */
        /* it throws error box when file doesn't exist and returns -1 */
@@ -421,7 +421,7 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
 #endif
 
                /* important to do before NULL'ing the context */
-               BLI_exec_cb(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
+               BLI_callback_exec(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
 
                if (!G.background) {
                        /* in background mode this makes it hard to load
@@ -791,7 +791,7 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re
                ibuf_thumb = blend_file_thumb(CTX_data_scene(C), CTX_wm_screen(C), &thumb);
        }
 
-       BLI_exec_cb(G.main, NULL, BLI_CB_EVT_SAVE_PRE);
+       BLI_callback_exec(G.main, NULL, BLI_CB_EVT_SAVE_PRE);
 
        /* operator now handles overwrite checks */
 
@@ -826,7 +826,7 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re
                        write_history();
                }
 
-               BLI_exec_cb(G.main, NULL, BLI_CB_EVT_SAVE_POST);
+               BLI_callback_exec(G.main, NULL, BLI_CB_EVT_SAVE_POST);
 
                /* run this function after because the file cant be written before the blend is */
                if (ibuf_thumb) {
index bfa3645bf57225564ec863d1646730fa56fe9337..7f40d2980a6fd0772f07149256c68b333eac6a90 100644 (file)
@@ -236,7 +236,7 @@ static void draw_filled_lasso(wmGesture *gt)
        short *lasso = (short *)gt->customdata;
        int i;
        
-       BLI_begin_edgefill(&sf_ctx);
+       BLI_scanfill_begin(&sf_ctx);
        for (i = 0; i < gt->points; i++, lasso += 2) {
                float co[3];
 
@@ -244,9 +244,9 @@ static void draw_filled_lasso(wmGesture *gt)
                co[1] = (float)lasso[1];
                co[2] = 0.0f;
 
-               v = BLI_addfillvert(&sf_ctx, co);
+               v = BLI_scanfill_vert_add(&sf_ctx, co);
                if (lastv)
-                       /* e = */ /* UNUSED */ BLI_addfilledge(&sf_ctx, lastv, v);
+                       /* e = */ /* UNUSED */ BLI_scanfill_edge_add(&sf_ctx, lastv, v);
                lastv = v;
                if (firstv == NULL) firstv = v;
        }
@@ -254,8 +254,8 @@ static void draw_filled_lasso(wmGesture *gt)
        /* highly unlikely this will fail, but could crash if (gt->points == 0) */
        if (firstv) {
                float zvec[3] = {0.0f, 0.0f, 1.0f};
-               BLI_addfilledge(&sf_ctx, firstv, v);
-               BLI_edgefill_ex(&sf_ctx, FALSE, zvec);
+               BLI_scanfill_edge_add(&sf_ctx, firstv, v);
+               BLI_scanfill_calc_ex(&sf_ctx, FALSE, zvec);
        
                glEnable(GL_BLEND);
                glColor4f(1.0, 1.0, 1.0, 0.05);
@@ -268,7 +268,7 @@ static void draw_filled_lasso(wmGesture *gt)
                glEnd();
                glDisable(GL_BLEND);
        
-               BLI_end_edgefill(&sf_ctx);
+               BLI_scanfill_end(&sf_ctx);
        }
 }
 
index 8024356c181faa6d37f04aaf2e3e0e2db215213b..4847df1168da8de514262f13c3a9aac9e776a1e6 100644 (file)
@@ -1248,7 +1248,7 @@ int main(int argc, const char **argv)
 
        IMB_init();
 
-       BLI_cb_init();
+       BLI_callback_global_init();
 
 #ifdef WITH_GAMEENGINE
        syshandle = SYS_GetSystem();