diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-03-09 20:36:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-03-09 20:36:23 +0300 |
commit | 1708ac07231cd222f269d3c0ddb9e22aba7aeec4 (patch) | |
tree | f4e8736ae34fac2e614f127d4ceae24a9454410a /source/blender/blenkernel/intern | |
parent | 26272d4c58de0b80056092de190bb35b44532f2e (diff) |
rename some functions to use easier to understand names.
'BLI_makestringcode' --> 'BLI_path_rel'
'BLI_convertstringcwd' --> 'BLI_path_cwd'
'BLI_convertstringframe' --> 'BLI_path_frame'
'BLI_convertstringframe_range' --> 'BLI_path_frame_range'
'BLI_make_cwdpath' --> 'BLI_path_cwd'
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/fluidsim.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 22 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/packedFile.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pointcache.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 12 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sound.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/text.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/writeavi.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/writeffmpeg.c | 4 |
12 files changed, 36 insertions, 36 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 34ad6660294..07960dd2fa0 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -2315,7 +2315,7 @@ static void customdata_external_filename(char filename[FILE_MAX], ID *id, Custom char *path = (id->lib)? id->lib->filename: G.sce; BLI_strncpy(filename, external->filename, FILE_MAX); - BLI_convertstringcode(filename, path); + BLI_path_abs(filename, path); } void CustomData_external_read(CustomData *data, ID *id, CustomDataMask mask, int totelem) diff --git a/source/blender/blenkernel/intern/fluidsim.c b/source/blender/blenkernel/intern/fluidsim.c index 7d1f0510d71..22eb0578f72 100644 --- a/source/blender/blenkernel/intern/fluidsim.c +++ b/source/blender/blenkernel/intern/fluidsim.c @@ -431,8 +431,8 @@ DerivedMesh *fluidsim_read_cache(Object *ob, DerivedMesh *orgdm, FluidsimModifie strcat(targetDir,"fluidsurface_final_####"); } - BLI_convertstringcode(targetDir, G.sce); - BLI_convertstringframe(targetDir, curFrame, 0); // fixed #frame-no + BLI_path_abs(targetDir, G.sce); + BLI_path_frame(targetDir, curFrame, 0); // fixed #frame-no strcpy(targetFile,targetDir); strcat(targetFile, ".bobj.gz"); diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index a0337704c2d..ee3d685938b 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -391,7 +391,7 @@ Image *BKE_add_image_file(const char *name, int frame) } BLI_strncpy(str, name, sizeof(str)); - BLI_convertstringcode(str, G.sce); + BLI_path_abs(str, G.sce); /* exists? */ file= open(str, O_BINARY|O_RDONLY); @@ -402,7 +402,7 @@ Image *BKE_add_image_file(const char *name, int frame) for(ima= G.main->image.first; ima; ima= ima->id.next) { if(ima->source!=IMA_SRC_VIEWER && ima->source!=IMA_SRC_GENERATED) { BLI_strncpy(strtest, ima->name, sizeof(ima->name)); - BLI_convertstringcode(strtest, G.sce); + BLI_path_abs(strtest, G.sce); if( strcmp(strtest, str)==0 ) { if(ima->anim==NULL || ima->id.us==0) { @@ -1428,8 +1428,8 @@ void BKE_makepicstring(char *string, char *base, int frame, int imtype, int use_ { if (string==NULL) return; BLI_strncpy(string, base, FILE_MAX - 10); /* weak assumption */ - BLI_convertstringcode(string, G.sce); - BLI_convertstringframe(string, frame, 4); + BLI_path_abs(string, G.sce); + BLI_path_frame(string, frame, 4); if(use_ext) BKE_add_image_extension(string, imtype); @@ -1684,9 +1684,9 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame) BLI_strncpy(name, ima->name, sizeof(name)); if(ima->id.lib) - BLI_convertstringcode(name, ima->id.lib->filename); + BLI_path_abs(name, ima->id.lib->filename); else - BLI_convertstringcode(name, G.sce); + BLI_path_abs(name, G.sce); /* read ibuf */ ibuf = IMB_loadiffname(name, IB_rect|IB_multilayer); @@ -1791,9 +1791,9 @@ static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame) BLI_strncpy(str, ima->name, FILE_MAX); if(ima->id.lib) - BLI_convertstringcode(str, ima->id.lib->filename); + BLI_path_abs(str, ima->id.lib->filename); else - BLI_convertstringcode(str, G.sce); + BLI_path_abs(str, G.sce); ima->anim = openanim(str, IB_cmap | IB_rect); @@ -1845,11 +1845,11 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra) /* get the right string */ BLI_strncpy(str, ima->name, sizeof(str)); if(ima->id.lib) - BLI_convertstringcode(str, ima->id.lib->filename); + BLI_path_abs(str, ima->id.lib->filename); else - BLI_convertstringcode(str, G.sce); + BLI_path_abs(str, G.sce); - BLI_convertstringframe(str, cfra, 0); + BLI_path_frame(str, cfra, 0); /* read ibuf */ ibuf = IMB_loadiffname(str, IB_rect|IB_multilayer|IB_imginfo); diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 79bc92bdbfb..83268a0a165 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -1244,8 +1244,8 @@ static void image_fix_relative_path(Image *ima) { if(ima->id.lib==NULL) return; if(strncmp(ima->name, "//", 2)==0) { - BLI_convertstringcode(ima->name, ima->id.lib->filename); - BLI_makestringcode(G.sce, ima->name); + BLI_path_abs(ima->name, ima->id.lib->filename); + BLI_path_rel(ima->name, G.sce); } } diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c index 55f09eede91..cdcdcc07eef 100644 --- a/source/blender/blenkernel/intern/packedFile.c +++ b/source/blender/blenkernel/intern/packedFile.c @@ -186,7 +186,7 @@ PackedFile *newPackedFile(ReportList *reports, char *filename) // convert relative filenames to absolute filenames strcpy(name, filename); - BLI_convertstringcode(name, G.sce); + BLI_path_abs(name, G.sce); // open the file // and create a PackedFile structure @@ -274,7 +274,7 @@ int writePackedFile(ReportList *reports, char *filename, PackedFile *pf, int gui if (guimode); //XXX waitcursor(1); strcpy(name, filename); - BLI_convertstringcode(name, G.sce); + BLI_path_abs(name, G.sce); if (BLI_exists(name)) { for (number = 1; number <= 999; number++) { @@ -339,7 +339,7 @@ int checkPackedFile(char *filename, PackedFile *pf) char name[FILE_MAXDIR + FILE_MAXFILE]; strcpy(name, filename); - BLI_convertstringcode(name, G.sce); + BLI_path_abs(name, G.sce); if (stat(name, &st)) { ret_val = PF_NOFILE; diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 9b1d48ac8c3..491ecd6011b 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3567,8 +3567,8 @@ static void particles_fluid_step(ParticleSimulationData *sim, int cfra) // ok, start loading strcpy(filename, fss->surfdataPath); strcat(filename, suffix); - BLI_convertstringcode(filename, G.sce); - BLI_convertstringframe(filename, curFrame, 0); // fixed #frame-no + BLI_path_abs(filename, G.sce); + BLI_path_frame(filename, curFrame, 0); // fixed #frame-no strcat(filename, suffix2); gzf = gzopen(filename, "rb"); diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 2dbdfd06551..3908429e606 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -1064,7 +1064,7 @@ static int ptcache_path(PTCacheID *pid, char *filename) file[i-6] = '\0'; snprintf(filename, MAX_PTCACHE_PATH, "//"PTCACHE_PATH"%s", file); /* add blend file name to pointcache dir */ - BLI_convertstringcode(filename, blendfilename); + BLI_path_abs(filename, blendfilename); return BLI_add_slash(filename); /* new strlen() */ } diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 481c1ef29cf..601ead8654e 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -586,7 +586,7 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq) if (seq->type != SEQ_SCENE && seq->type != SEQ_META && seq->type != SEQ_IMAGE) { BLI_join_dirfile(str, seq->strip->dir, seq->strip->stripdata->name); - BLI_convertstringcode(str, G.sce); + BLI_path_abs(str, G.sce); } if (seq->type == SEQ_IMAGE) { @@ -1247,7 +1247,7 @@ static int seq_proxy_get_fname(Scene *scene, Sequence * seq, int cfra, char * na if (seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) { BLI_join_dirfile(name, dir, seq->strip->proxy->file); - BLI_convertstringcode(name, G.sce); + BLI_path_abs(name, G.sce); return TRUE; } @@ -1276,8 +1276,8 @@ static int seq_proxy_get_fname(Scene *scene, Sequence * seq, int cfra, char * na render_size); } - BLI_convertstringcode(name, G.sce); - BLI_convertstringframe(name, frameno, 0); + BLI_path_abs(name, G.sce); + BLI_path_frame(name, frameno, 0); strcat(name, ".jpg"); @@ -2044,7 +2044,7 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int if(se->ok == STRIPELEM_OK && se->ibuf == 0) { StripElem * s_elem = give_stripelem(seq, cfra); BLI_join_dirfile(name, seq->strip->dir, s_elem->name); - BLI_convertstringcode(name, G.sce); + BLI_path_abs(name, G.sce); if (!build_proxy_run) { se->ibuf = seq_proxy_fetch(scene, seq, cfra, render_size); } @@ -2078,7 +2078,7 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int if (se->ibuf == 0) { if(seq->anim==0) { BLI_join_dirfile(name, seq->strip->dir, seq->strip->stripdata->name); - BLI_convertstringcode(name, G.sce); + BLI_path_abs(name, G.sce); seq->anim = openanim( name, IB_rect | diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index 23df930aa84..9d189237ba0 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -127,7 +127,7 @@ struct bSound* sound_new_file(struct Main *bmain, char* filename) int len; strcpy(str, filename); - BLI_convertstringcode(str, bmain->name); + BLI_path_abs(str, bmain->name); len = strlen(filename); while(len > 0 && filename[len-1] != '/' && filename[len-1] != '\\') @@ -262,7 +262,7 @@ void sound_load(struct Main *bmain, struct bSound* sound) else path = bmain ? bmain->name : G.sce; - BLI_convertstringcode(fullpath, path); + BLI_path_abs(fullpath, path); /* but we need a packed file then */ if (pf) diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index a7f80953f22..37c583943c6 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -246,7 +246,7 @@ int reopen_text(Text *text) if (!text || !text->name) return 0; BLI_strncpy(str, text->name, FILE_MAXDIR+FILE_MAXFILE); - BLI_convertstringcode(str, G.sce); + BLI_path_abs(str, G.sce); BLI_split_dirfile(str, NULL, sfile); fp= fopen(str, "r"); @@ -344,7 +344,7 @@ Text *add_text(char *file, const char *relpath) BLI_strncpy(str, file, FILE_MAXDIR+FILE_MAXFILE); if (relpath) /* can be NULL (bg mode) */ - BLI_convertstringcode(str, relpath); + BLI_path_abs(str, relpath); BLI_split_dirfile(str, NULL, sfile); fp= fopen(str, "r"); diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c index d67a79154d2..f4bcb6d412f 100644 --- a/source/blender/blenkernel/intern/writeavi.c +++ b/source/blender/blenkernel/intern/writeavi.c @@ -124,12 +124,12 @@ static void filepath_avi (char *string, RenderData *rd) if (string==NULL) return; strcpy(string, rd->pic); - BLI_convertstringcode(string, G.sce); + BLI_path_abs(string, G.sce); BLI_make_existing_file(string); if (!BLI_testextensie(string, ".avi")) { - BLI_convertstringframe_range(string, rd->sfra, rd->efra, 4); + BLI_path_frame_range(string, rd->sfra, rd->efra, 4); strcat(string, ".avi"); } } diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 6e94602c0c9..8aa9282937c 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -789,7 +789,7 @@ void filepath_ffmpeg(char* string, RenderData* rd) { if (!string || !exts) return; strcpy(string, rd->pic); - BLI_convertstringcode(string, G.sce); + BLI_path_abs(string, G.sce); BLI_make_existing_file(string); @@ -810,7 +810,7 @@ void filepath_ffmpeg(char* string, RenderData* rd) { if (!*fe) { strcat(string, autosplit); - BLI_convertstringframe_range(string, rd->sfra, rd->efra, 4); + BLI_path_frame_range(string, rd->sfra, rd->efra, 4); strcat(string, *exts); } else { *(string + strlen(string) - strlen(*fe)) = 0; |