diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-19 14:40:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-19 14:40:48 +0400 |
commit | 2457d4f5abd65095ae48be937ed43d026d47124a (patch) | |
tree | 79c9b666420fa06262c90fa8f9d11ec77e285719 /source/blender/blenlib/intern | |
parent | 5c6ee6b523c6a53c310683a9f7fbe5d730db6122 (diff) | |
parent | 90ef435145416313596cafa6f8c4c6c6aebe4e44 (diff) |
svn merge ^/trunk/blender -r42680:42722
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/bpath.c | 18 | ||||
-rw-r--r-- | source/blender/blenlib/intern/math_vector.c | 9 |
2 files changed, 23 insertions, 4 deletions
diff --git a/source/blender/blenlib/intern/bpath.c b/source/blender/blenlib/intern/bpath.c index 140e1752648..861efcfe6c5 100644 --- a/source/blender/blenlib/intern/bpath.c +++ b/source/blender/blenlib/intern/bpath.c @@ -199,7 +199,11 @@ void makeFilesAbsolute(Main *bmain, const char *basedir, ReportList *reports) - filesize: filesize for the file */ #define MAX_RECUR 16 -static int findFileRecursive(char *filename_new, const char *dirname, const char *filename, int *filesize, int *recur_depth) +static int findFileRecursive(char *filename_new, + const char *dirname, + const char *filename, + int *filesize, + int *recur_depth) { /* file searching stuff */ DIR *dir; @@ -314,7 +318,11 @@ static int rewrite_path_fixed(char *path, BPathVisitor visit_cb, const char *abs } } -static int rewrite_path_fixed_dirfile(char path_dir[FILE_MAXDIR], char path_file[FILE_MAXFILE], BPathVisitor visit_cb, const char *absbase, void *userdata) +static int rewrite_path_fixed_dirfile(char path_dir[FILE_MAXDIR], + char path_file[FILE_MAXFILE], + BPathVisitor visit_cb, + const char *absbase, + void *userdata) { char path_src[FILE_MAX]; char path_dst[FILE_MAX]; @@ -496,7 +504,8 @@ void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int fla SEQ_BEGIN(scene->ed, seq) { if (SEQ_HAS_PATH(seq)) { if (ELEM(seq->type, SEQ_MOVIE, SEQ_SOUND)) { - rewrite_path_fixed_dirfile(seq->strip->dir, seq->strip->stripdata->name, visit_cb, absbase, bpath_user_data); + rewrite_path_fixed_dirfile(seq->strip->dir, seq->strip->stripdata->name, + visit_cb, absbase, bpath_user_data); } else if (seq->type == SEQ_IMAGE) { /* might want an option not to loop over all strips */ @@ -510,7 +519,8 @@ void bpath_traverse_id(Main *bmain, ID *id, BPathVisitor visit_cb, const int fla } for(i= 0; i < len; i++, se++) { - rewrite_path_fixed_dirfile(seq->strip->dir, se->name, visit_cb, absbase, bpath_user_data); + rewrite_path_fixed_dirfile(seq->strip->dir, se->name, + visit_cb, absbase, bpath_user_data); } } else { diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c index 0ea9934d3b6..47deb705def 100644 --- a/source/blender/blenlib/intern/math_vector.c +++ b/source/blender/blenlib/intern/math_vector.c @@ -430,6 +430,15 @@ void range_vn_i(int *array_tar, const int size, const int start) while(i--) { *(array_pt--) = j--; } } +void range_vn_fl(float *array_tar, const int size, const float start, const float step) +{ + float *array_pt= array_tar + (size-1); + int i= size; + while(i--) { + *(array_pt--) = start + step * (float)(i); + } +} + void negate_vn(float *array_tar, const int size) { float *array_pt= array_tar + (size-1); |