fix [#27607] Scene's render.filepath gets cropped to 159 characters
authorCampbell Barton <ideasman42@gmail.com>
Fri, 10 Jun 2011 10:13:50 +0000 (10:13 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 10 Jun 2011 10:13:50 +0000 (10:13 +0000)
use 240 char limit, remove backbuffer path which wasn't used.

source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/scene.c
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/render/intern/source/pipeline.c
source/creator/creator.c

index 20b44b3..5a94325 100644 (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);
        }
 }
index 11cdcdd..51eaba3 100644 (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;
index 70e90cf..2b88469 100644 (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;
index 50e66f9..907710a 100644 (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];
index 436f0ec..e120854 100644 (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);
                
index fe9bd57..8b405d2 100644 (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");
                }