Merged changes in the trunk up to revision 26533.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Mon, 1 Feb 2010 20:47:23 +0000 (20:47 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Mon, 1 Feb 2010 20:47:23 +0000 (20:47 +0000)
1  2 
release/scripts/ui/space_userpref.py
source/blender/blenloader/intern/readfile.c
source/blender/editors/screen/screen_ops.c
source/blender/python/CMakeLists.txt
source/blender/python/intern/bpy_interface.c
source/blender/render/CMakeLists.txt
source/blender/render/SConscript
source/blender/render/intern/source/pipeline.c
source/creator/CMakeLists.txt
source/creator/creator.c

index 42b6b1d1a5484468ee95aec895ebeeb42281e93b,97dd369b2282071195207834a5779578dc12ea3e..5a98b4d0fcfcd482ae3243bd6e701348d54c2a22
@@@ -236,14 -241,14 +241,21 @@@ class USERPREF_PT_interface(bpy.types.P
          col.prop(view, "auto_perspective")
          col.prop(view, "smooth_view")
          col.prop(view, "rotation_angle")
 -
 +        
 +        col.separator()
 +        col.separator()
 +        
 +        col.label(text="2D Viewports:")
 +        col.prop(view, "view2d_grid_minimum_spacing", text="Minimum Grid Spacing")
 +        col.prop(view, "timecode_style")
 +        
+         col.separator()
+         col.separator()
+         col.label(text="2D Viewports:")
+         col.prop(view, "view2d_grid_minimum_spacing", text="Minimum Grid Spacing")
+         col.prop(view, "timecode_style")
          row.separator()
          row.separator()
  
index 48392a5f509f7e1bda0a3e2f9694e7ec0170747a,3a57db647e6e7e27ed9bd292c59281afa5512c52..77b666e269b79edb6dda00dc79f04d091b3f24ea
  #
  # ***** END GPL LICENSE BLOCK *****
  
+ ADD_SUBDIRECTORY(generic)
  FILE(GLOB SRC intern/*.c)
- FILE(GLOB GENSRC generic/*.c)
  
  SET(INC 
-       . ../../../intern/guardedalloc ../blenlib ../makesdna ../makesrna
-       ../blenkernel ../editors/include ../windowmanager ${PYTHON_INC}
-       ../../../extern/glew/include ../freestyle/intern/python
+       .
+       ../blenlib
+       ../makesdna
+       ../makesrna
+       ../blenkernel
+       ../windowmanager
+       ../editors/include
++      ../freestyle/intern/python
+       ../../../intern/guardedalloc
+       ${PYTHON_INC}
  )
  
- IF(WITH_OPENEXR)
-       ADD_DEFINITIONS(-DWITH_OPENEXR)
- ENDIF(WITH_OPENEXR)
- IF(WITH_QUICKTIME)
-       SET(INC ${INC} ${QUICKTIME_INC})
-       ADD_DEFINITIONS(-DWITH_QUICKTIME)
- ENDIF(WITH_QUICKTIME)
- IF(WITH_FFMPEG)
-       SET(INC ${INC} ${FFMPEG_INC})
-       ADD_DEFINITIONS(-DWITH_FFMPEG)
- ENDIF(WITH_FFMPEG)
+ # only to check if buildinfo is available
+ IF(WITH_BUILDINFO)
+       ADD_DEFINITIONS(-DBUILD_DATE)
+ ENDIF(WITH_BUILDINFO)
  
  BLENDERLIB(bf_python "${SRC}" "${INC}")
- BLENDERLIB(bf_gen_python "${GENSRC}" "${INC}")
  
index 142b5f0788a7e1d41a55d1f0ae3e2f848536bdb6,1c15f311cd69e5818763dfee27d0bf45247d67a1..8437f4d376e1423675056394d689cf44fab63edf
@@@ -803,4 -782,4 +785,3 @@@ int BPY_context_get(bContext *C, const 
  
        return done;
  }
--
Simple merge
Simple merge
Simple merge
index 4d207319b3556bc29c9aafe4273934e58a75da1f,6244032bbcf27fdeafe41a79ca23aa1ebb5d08dd..ef1556000592d5aacfb65ba8b9a542d106c584b1
@@@ -570,347 -1008,11 +1010,15 @@@ int main(int argc, char **argv
                printf("Example: setenv BF_TIFF_LIB /usr/lib/libtiff.so\n");
        }
  
 +      /* initialize Freestyle */
 +      FRS_initialize();
 +      FRS_set_context(C);
 +
        /* OK we are ready for it */
+       BLI_argsParse(ba, 4, load_file, C);
  
-       for(a=1; a<argc; a++) {
-               if (G.afbreek==1) break;
-               if(argv[a][0] == '-') {
-                       switch(argv[a][1]) {
-                       case '-':  /* -- ends argument processing */
-                               a = argc;
-                               break;
-                               
-                       case 'p':       /* prefsize */
-                               a+= 4;
-                               break;
-                       case 'g':
-                               {
-                               /**
-                               gameengine parameters are automaticly put into system
-                               -g [paramname = value]
-                               -g [boolparamname]
-                               example:
-                               -g novertexarrays
-                               -g maxvertexarraysize = 512
-                               */
-                                       if(++a < argc)
-                                       {
-                                               char* paramname = argv[a];
-                                               /* check for single value versus assignment */
-                                               if (a+1 < argc && (*(argv[a+1]) == '='))
-                                               {
-                                                       a++;
-                                                       if (a+1 < argc)
-                                                       {
-                                                               a++;
-                                                               /* assignment */
-                                                               SYS_WriteCommandLineString(syshandle,paramname,argv[a]);
-                                                       }  else
-                                                       {
-                                                               printf("error: argument assignment (%s) without value.\n",paramname);
-                                                       }
-                                                       /* name arg eaten */
-                                               } else
-                                               {
-                                                       SYS_WriteCommandLineInt(syshandle,argv[a],1);
-                                                       /* doMipMap */
-                                                       if (!strcmp(argv[a],"nomipmap"))
-                                                       {
-                                                               GPU_set_mipmap(0); //doMipMap = 0;
-                                                       }
-                                                       /* linearMipMap */
-                                                       if (!strcmp(argv[a],"linearmipmap"))
-                                                       {
-                                                               GPU_set_linear_mipmap(1); //linearMipMap = 1;
-                                                       }
-                                               } /* if (*(argv[a+1]) == '=') */
-                                       } /*    if(++a < argc)  */
-                                       break;
-                               }
-                       case 'f':
-                               a++;
-                               if (CTX_data_scene(C)) {
-                                       Scene *scene= CTX_data_scene(C);
-                                       
-                                       if (a < argc) {
-                                               int frame = atoi(argv[a]);
-                                               Render *re = RE_NewRender(scene->id.name);
-                                               ReportList reports;
-                                               BKE_reports_init(&reports, RPT_PRINT);
-                                               frame = MIN2(MAXFRAME, MAX2(MINAFRAME, frame));
-                                               
-                                               RE_BlenderAnim(re, scene, frame, frame, scene->r.frame_step, &reports);
-                                       }
-                               } else {
-                                       printf("\nError: no blend loaded. cannot use '-f'.\n");
-                               }
-                               break;
-                       case 'a':
-                               if (CTX_data_scene(C)) {
-                                       Scene *scene= CTX_data_scene(C);
-                                       Render *re= RE_NewRender(scene->id.name);
-                                       ReportList reports;
-                                       BKE_reports_init(&reports, RPT_PRINT);
-                                       RE_BlenderAnim(re, scene, scene->r.sfra, scene->r.efra, scene->r.frame_step, &reports);
-                               } else {
-                                       printf("\nError: no blend loaded. cannot use '-a'.\n");
-                               }
-                               break;
-                       case 'S':
-                               if(++a < argc) {
-                                       set_scene_name(argv[a]);
-                               }
-                               break;
-                       case 's':
-                               a++;
-                               if (CTX_data_scene(C)) {
-                                       Scene *scene= CTX_data_scene(C);
-                                       if (a < argc) {
-                                               int frame = atoi(argv[a]);
-                                               (scene->r.sfra) = MIN2(MAXFRAME, MAX2(1, frame));
-                                       }
-                               } else {
-                                       printf("\nError: no blend loaded. cannot use '-s'.\n");
-                               }
-                               break;
-                       case 'e':
-                               a++;
-                               if (CTX_data_scene(C)) {
-                                       Scene *scene= CTX_data_scene(C);
-                                       if (a < argc) {
-                                               int frame = atoi(argv[a]);
-                                               (scene->r.efra) = MIN2(MAXFRAME, MAX2(1, frame));
-                                       }
-                               } else {
-                                       printf("\nError: no blend loaded. cannot use '-e'.\n");
-                               }
-                               break;
-                       case 'j':
-                               a++;
-                               if (CTX_data_scene(C)) {
-                                       Scene *scene= CTX_data_scene(C);
-                                       if (a < argc) {
-                                               int frame = atoi(argv[a]);
-                                               (scene->r.frame_step) = MIN2(MAXFRAME, MAX2(1, frame));
-                                       }
-                               } else {
-                                       printf("\nError: no blend loaded. cannot use '-j'.\n");
-                               }
-                               break;
-                       case 'P':
- #ifndef DISABLE_PYTHON
-                               a++;
-                               /* workaround for scripts not getting a bpy.context.scene, causes internal errors elsewhere */
-                               {
-                                       /* XXX, temp setting the WM is ugly, splash also does this :S */
-                                       wmWindowManager *wm= CTX_wm_manager(C);
-                                       wmWindow *prevwin= CTX_wm_window(C);
-                                       if(wm->windows.first) {
-                                               CTX_wm_window_set(C, wm->windows.first);
+       BLI_argsFree(ba);
  
-                                               BPY_run_python_script(C, argv[a], NULL, NULL); // use reports?
-                                               CTX_wm_window_set(C, prevwin);
-                                       }
-                                       else {
-                                               fprintf(stderr, "Python script \"%s\" running with missing context data.\n", argv[a]);
-                                               BPY_run_python_script(C, argv[a], NULL, NULL); // use reports?
-                                       }
-                               }
- #if 0
-                               a++;
-                               if (a < argc) {
-                                       /* If we're not running in background mode, then give python a valid screen */
-                                       if ((G.background==0) && (scr_init==0)) {
-                                               main_init_screen();
-                                               scr_init = 1;
-                                       }
-                                       BPY_run_python_script(C, argv[a], NULL, NULL); // use reports?
-                               }
-                               else printf("\nError: you must specify a Python script after '-P '.\n");
- #endif
- #else
-                               printf("This blender was built without python support\n");
- #endif /* DISABLE_PYTHON */
-                               break;
-                       case 'o':
-                               a++;
-                               if (a < argc){
-                                       if (CTX_data_scene(C)) {
-                                               Scene *scene= CTX_data_scene(C);
-                                               BLI_strncpy(scene->r.pic, argv[a], FILE_MAXDIR);
-                                       } else {
-                                               printf("\nError: no blend loaded. cannot use '-o'.\n");
-                                       }
-                               } else {
-                                       printf("\nError: you must specify a path after '-o '.\n");
-                               }
-                               break;
-                       case 'E':
-                               a++;
-                               if (a < argc)
-                               {
-                                       if (!strcmp(argv[a],"help"))
-                                       {
-                                               RenderEngineType *type = NULL;
-                                               for( type = R_engines.first; type; type = type->next )
-                                               {
-                                                       printf("\t%s\n", type->idname);
-                                               }
-                                               exit(0);
-                                       }
-                                       else 
-                                       {
-                                               if (CTX_data_scene(C)==NULL)
-                                               {
-                                                       printf("\nError: no blend loaded. order the arguments so '-E ' is after the blend is loaded.\n");
-                                               }
-                                               else 
-                                               {
-                                                       Scene *scene= CTX_data_scene(C);
-                                                       RenderData *rd = &scene->r;
-                                                       RenderEngineType *type = NULL;
-                                                       
-                                                       for( type = R_engines.first; type; type = type->next )
-                                                       {
-                                                               if (!strcmp(argv[a],type->idname))
-                                                               {
-                                                                       BLI_strncpy(rd->engine, type->idname, sizeof(rd->engine));
-                                                               }
-                                                       }
-                                               }
-                                       }
-                               }
-                               else
-                               {
-                                       printf("\nEngine not specified.\n");
-                               }
-                               break;
-                       case 'F':
-                               a++;
-                               if (a < argc){
-                                       if (CTX_data_scene(C)==NULL) {
-                                               printf("\nError: no blend loaded. order the arguments so '-F ' is after the blend is loaded.\n");
-                                       } else {
-                                               Scene *scene= CTX_data_scene(C);
-                                               if      (!strcmp(argv[a],"TGA")) scene->r.imtype = R_TARGA;
-                                               else if (!strcmp(argv[a],"IRIS")) scene->r.imtype = R_IRIS;
-                                               else if (!strcmp(argv[a],"HAMX")) scene->r.imtype = R_HAMX;
- #ifdef WITH_DDS
-                                               else if (!strcmp(argv[a],"DDS")) scene->r.imtype = R_DDS;
- #endif
-                                               else if (!strcmp(argv[a],"JPEG")) scene->r.imtype = R_JPEG90;
-                                               else if (!strcmp(argv[a],"MOVIE")) scene->r.imtype = R_MOVIE;
-                                               else if (!strcmp(argv[a],"IRIZ")) scene->r.imtype = R_IRIZ;
-                                               else if (!strcmp(argv[a],"RAWTGA")) scene->r.imtype = R_RAWTGA;
-                                               else if (!strcmp(argv[a],"AVIRAW")) scene->r.imtype = R_AVIRAW;
-                                               else if (!strcmp(argv[a],"AVIJPEG")) scene->r.imtype = R_AVIJPEG;
-                                               else if (!strcmp(argv[a],"PNG")) scene->r.imtype = R_PNG;
-                                               else if (!strcmp(argv[a],"AVICODEC")) scene->r.imtype = R_AVICODEC;
-                                               else if (!strcmp(argv[a],"QUICKTIME")) scene->r.imtype = R_QUICKTIME;
-                                               else if (!strcmp(argv[a],"BMP")) scene->r.imtype = R_BMP;
-                                               else if (!strcmp(argv[a],"HDR")) scene->r.imtype = R_RADHDR;
-                                               else if (!strcmp(argv[a],"TIFF")) scene->r.imtype = R_TIFF;
- #ifdef WITH_OPENEXR
-                                               else if (!strcmp(argv[a],"EXR")) scene->r.imtype = R_OPENEXR;
-                                               else if (!strcmp(argv[a],"MULTILAYER")) scene->r.imtype = R_MULTILAYER;
- #endif
-                                               else if (!strcmp(argv[a],"MPEG")) scene->r.imtype = R_FFMPEG;
-                                               else if (!strcmp(argv[a],"FRAMESERVER")) scene->r.imtype = R_FRAMESERVER;
-                                               else if (!strcmp(argv[a],"CINEON")) scene->r.imtype = R_CINEON;
-                                               else if (!strcmp(argv[a],"DPX")) scene->r.imtype = R_DPX;
- #if WITH_OPENJPEG
-                                               else if (!strcmp(argv[a],"JP2")) scene->r.imtype = R_JP2;
- #endif
-                                               else printf("\nError: Format from '-F' not known or not compiled in this release.\n");
-                                       }
-                               } else {
-                                       printf("\nError: no blend loaded. cannot use '-x'.\n");
-                               }
-                               break;
-                               
-                       case 't':
-                               a++;
-                               if (a < argc) {
-                                       if(G.background) {
-                                               RE_set_max_threads(atoi(argv[a]));
-                                       } else {
-                                               printf("Warning: threads can only be set in background mode\n");
-                                       }
-                               } else {
-                                       printf("\nError: you must specify a number of threads between 0 and 8 '-t '.\n");
-                               }
-                               break;
-                       case 'x': /* extension */
-                               a++;
-                               if (a < argc) {
-                                       if (CTX_data_scene(C)) {
-                                               Scene *scene= CTX_data_scene(C);
-                                               if (argv[a][0] == '0') {
-                                                       scene->r.scemode &= ~R_EXTENSION;
-                                               } else if (argv[a][0] == '1') {
-                                                       scene->r.scemode |= R_EXTENSION;
-                                               } else {
-                                                       printf("\nError: Use '-x 1' or '-x 0' To set the extension option.\n");
-                                               }
-                                       } else {
-                                               printf("\nError: no blend loaded. order the arguments so '-o ' is after '-x '.\n");
-                                       }
-                               } else {
-                                       printf("\nError: you must specify a path after '- '.\n");
-                               }
-                               break;
-                       }
-               }
-               else {
-                       
-                       /* Make the path absolute because its needed for relative linked blends to be found */
-                       char filename[FILE_MAXDIR + FILE_MAXFILE];
-                       
-                       BLI_strncpy(filename, argv[a], sizeof(filename));
-                       BLI_convertstringcwd(filename);
-                       
-                       if (G.background) {
-                               int retval = BKE_read_file(C, argv[a], NULL, NULL);
-                               
-                               /*we successfully loaded a blend file, get sure that
-                               pointcache works */
-                               if (retval!=0) {
-                                       CTX_wm_manager_set(C, NULL); /* remove wm to force check */
-                                       WM_check(C);
-                                       G.relbase_valid = 1;
-                               }
-                               /* happens for the UI on file reading too (huh? (ton))*/
- // XXX                        BKE_reset_undo();
- //                            BKE_write_undo("original");     /* save current state */
-                       } else {
-                               /* we are not running in background mode here, but start blender in UI mode with 
-                                  a file - this should do everything a 'load file' does */
-                               WM_read_file(C, filename, NULL);
-                       }
-                       file_loaded = 1;
-               }
-       }
-       
        if(G.background) {
                /* actually incorrect, but works for now (ton) */
                WM_exit(C);