Merged changes in the trunk up to revision 42021.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 20 Nov 2011 21:02:12 +0000 (21:02 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 20 Nov 2011 21:02:12 +0000 (21:02 +0000)
Conflicts resolved:
source/blender/blenkernel/intern/scene.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/interface/resources.c
source/blender/render/intern/source/pipeline.c

39 files changed:
1  2 
build_files/scons/tools/Blender.py
doc/python_api/sphinx_doc_gen.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/scene.c
source/blender/blenlib/intern/bpath.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/resources.c
source/blender/editors/render/render_shading.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/transform/transform.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/SConscript
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/python/intern/bpy.c
source/blender/render/CMakeLists.txt
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/intern/include/render_types.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/shadeoutput.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt
source/creator/creator.c

Simple merge
Simple merge
Simple merge
index 37c0761e5be9c45eac96945287ba566866734990,483e95f2abb90a99d17418be33eb7be887bb4de1..ae958db3d4a97bac6422012fd8a363aad24225a8
@@@ -1107,7 -1103,45 +1110,46 @@@ SceneRenderLayer *scene_add_render_laye
        srl->lay= (1<<20) -1;
        srl->layflag= 0x7FFF;   /* solid ztra halo edge strand */
        srl->passflag= SCE_PASS_COMBINED|SCE_PASS_Z;
 +      FRS_add_freestyle_config( srl );
+       return srl;
+ }
+ int scene_remove_render_layer(Main *bmain, Scene *scene, SceneRenderLayer *srl)
+ {
+       const int act= BLI_findindex(&scene->r.layers, srl);
+       Scene *sce;
+       if (act == -1) {
+               return 0;
+       }
+       else if ( (scene->r.layers.first == scene->r.layers.last) &&
+                 (scene->r.layers.first == srl))
+       {
+               /* ensure 1 layer is kept */
+               return 0;
+       }
+       BLI_remlink(&scene->r.layers, srl);
+       MEM_freeN(srl);
+       scene->r.actlay= 0;
+       for(sce = bmain->scene.first; sce; sce = sce->id.next) {
+               if(sce->nodetree) {
+                       bNode *node;
+                       for(node = sce->nodetree->nodes.first; node; node = node->next) {
+                               if(node->type==CMP_NODE_R_LAYERS && (Scene*)node->id==scene) {
+                                       if(node->custom1==act)
+                                               node->custom1= 0;
+                                       else if(node->custom1>act)
+                                               node->custom1--;
+                               }
+                       }
+               }
+       }
+       return 1;
  }
  
  /* render simplification */
Simple merge
index 1fc790803108273bc5f41652ea5f072ad0aec569,b1ddb894e67637eaaa102261e960ff942da7cb11..c96d7f7ffa1e8d3a6e331adcbd1d1c303c905767
@@@ -12634,28 -12542,10 +12731,32 @@@ static void do_versions(FileData *fd, L
                }
        }
  
+       /* put compatibility code here until next subversion bump */
+       {
+       }
 +      /* default values in Freestyle settings */
 +      {
 +              Scene *sce;
 +              SceneRenderLayer *srl;
 +              FreestyleLineStyle *linestyle;
 +
 +              for(sce = main->scene.first; sce; sce = sce->id.next) {
 +                      for(srl= sce->r.layers.first; srl; srl= srl->next) {
 +                              if (srl->freestyleConfig.mode == 0)
 +                                      srl->freestyleConfig.mode= FREESTYLE_CONTROL_EDITOR_MODE;
 +                              if (srl->freestyleConfig.raycasting_algorithm == 0)
 +                                      srl->freestyleConfig.raycasting_algorithm= FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE;
 +                      }
 +              }
 +              for(linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) {
 +                      if (linestyle->chaining == 0)
 +                              linestyle->chaining= LS_CHAINING_PLAIN;
 +                      if (linestyle->rounds == 0)
 +                              linestyle->rounds= 3;
 +              }
 +      }
 +      
        /* WATCH IT!!!: pointers from libdata have not been converted yet here! */
        /* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */
  
index 4581721a77649d580d1d1d06c20f6ab6cb2ae000,66add6d8f0c243e0871d261d93bb3324b684f101..b47b03d19a3d4c1f6fcc32f06456e92e36c4b181
@@@ -1674,19 -1673,15 +1679,28 @@@ void init_userdef_do_versions(void
                }
        }
  
+       if (bmain->versionfile < 260 || (bmain->versionfile == 260 && bmain->subversionfile < 5)) {
+               bTheme *btheme;
+               for(btheme= U.themes.first; btheme; btheme= btheme->next) {
+                       SETCOL(btheme->tui.panel.header, 0, 0, 0, 25);
+                       btheme->tui.icon_alpha= 1.0;
+               }
+       }
 +      /* Freestyle color settings */
 +      {
 +              bTheme *btheme;
 +
 +              for(btheme= U.themes.first; btheme; btheme= btheme->next) {
 +                      /* check for alpha==0 is safe, then color was never set */
 +                      if(btheme->tv3d.freestyle_edge_mark[3]==0) {
 +                              SETCOL(btheme->tv3d.freestyle_edge_mark, 0x7f, 0xff, 0x7f, 255);
 +                              SETCOL(btheme->tv3d.freestyle_face_mark, 0x7f, 0xff, 0x7f, 51);
 +                      }
 +              }
 +      }
 +
        /* GL Texture Garbage Collection (variable abused above!) */
        if (U.textimeout == 0) {
                U.texcollectrate = 60;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index d4cd6e1da9271823748bbb5fb3a952764597c48a,ca019e3ffe86c34ef94d30e2dc47ad9751c35011..c3d7f79b61f72a567b6983e75a5d222241d0af49
@@@ -3054,16 -2978,7 +3054,16 @@@ void RE_BlenderFrame(Render *re, Main *
        G.rendering= 0;
  }
  
- static int do_write_image_or_movie(Render *re, Scene *scene, bMovieHandle *mh, const char *name_override)
 +void RE_RenderFreestyleStrokes(Render *re, Main *bmain, Scene *scene)
 +{
 +      re->result_ok= 0;
 +      if(render_initialize_from_main(re, bmain, scene, NULL, NULL, scene->lay, 0, 0)) {
 +              do_render_fields_blur_3d(re);
 +      }
 +      re->result_ok= 1;
 +}
 +
+ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovieHandle *mh, const char *name_override)
  {
        char name[FILE_MAX];
        RenderResult rres;
Simple merge
Simple merge