fix [#27607] Scene's render.filepath gets cropped to 159 characters

use 240 char limit, remove backbuffer path which wasn't used.
This commit is contained in:
Campbell Barton 2011-06-10 10:13:50 +00:00
parent 9cf0bbb95c
commit eeba877926
6 changed files with 5 additions and 8 deletions

View File

@ -180,7 +180,6 @@ static void clean_paths(Main *main)
BLI_bpathIterator_free(bpi);
for(scene= main->scene.first; scene; scene= scene->id.next) {
BLI_clean(scene->r.backbuf);
BLI_clean(scene->r.pic);
}
}

View File

@ -476,8 +476,7 @@ Scene *add_scene(const char *name)
sce->audio.doppler_factor = 1.0;
sce->audio.speed_of_sound = 343.3;
strcpy(sce->r.backbuf, "//backbuf");
strcpy(sce->r.pic, U.renderdir);
BLI_strncpy(sce->r.pic, U.renderdir, sizeof(sce->r.pic));
BLI_init_rctf(&sce->r.safety, 0.1f, 0.9f, 0.1f, 0.9f);
sce->r.osa= 8;

View File

@ -350,7 +350,7 @@ typedef struct RenderData {
float bake_maxdist, bake_biasdist, bake_pad;
/* paths to backbufffer, output */
char backbuf[160], pic[160];
char pic[240];
/* stamps flags. */
int stamp;

View File

@ -305,7 +305,7 @@ typedef struct UserDef {
int savetime;
char tempdir[160]; // FILE_MAXDIR length
char fontdir[160];
char renderdir[160];
char renderdir[240]; // FILE_MAX length
char textudir[160];
char plugtexdir[160];
char plugseqdir[160];

View File

@ -2070,8 +2070,7 @@ static void load_backbuffer(Render *re)
if(re->r.alphamode == R_ADDSKY) {
ImBuf *ibuf;
char name[256];
BLI_strncpy(name, re->r.backbuf, sizeof(name));
BLI_path_abs(name, re->main->name);
BLI_path_frame(name, re->r.cfra, 0);

View File

@ -538,7 +538,7 @@ static int set_output(int argc, const char **argv, void *data)
if (argc >= 1){
if (CTX_data_scene(C)) {
Scene *scene= CTX_data_scene(C);
BLI_strncpy(scene->r.pic, argv[1], FILE_MAXDIR);
BLI_strncpy(scene->r.pic, argv[1], sizeof(scene->r.pic));
} else {
printf("\nError: no blend loaded. cannot use '-o / --render-output'.\n");
}