Cycles: svn merge -r41467:41531 ^/trunk/blender
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 4 Nov 2011 20:21:40 +0000 (20:21 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Fri, 4 Nov 2011 20:21:40 +0000 (20:21 +0000)
1  2 
CMakeLists.txt
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/nodes/shader/nodes/node_shader_geom.c
source/blenderplayer/bad_level_call_stubs/stubs.c

diff --cc CMakeLists.txt
Simple merge
@@@ -1321,11 -1319,9 +1321,11 @@@ void nodeSetActive(bNodeTree *ntree, bN
        node->flag |= NODE_ACTIVE;
        if(node->id)
                node->flag |= NODE_ACTIVE_ID;
 +      if(node->typeinfo->nclass == NODE_CLASS_TEXTURE)
 +              node->flag |= NODE_ACTIVE_TEXTURE;
  }
  
- /* use flags are not persistant yet, groups might need different tagging, so we do it each time
+ /* use flags are not persistent yet, groups might need different tagging, so we do it each time
     when we need to get this info */
  void ntreeSocketUseFlags(bNodeTree *ntree)
  {
@@@ -990,10 -990,12 +990,14 @@@ static void scene_update_tagged_recursi
  /* this is called in main loop, doing tagged updates before redraw */
  void scene_update_tagged(Main *bmain, Scene *scene)
  {
+       /* keep this first */
+       BLI_exec_cb(bmain, &scene->id, BLI_CB_EVT_SCENE_UPDATE_PRE);
+       /* flush recalc flags to dependencies */
        DAG_ids_flush_tagged(bmain);
  
 +      BLI_exec_cb(bmain, &scene->id, BLI_CB_EVT_SCENE_UPDATE_PRE);
 +
        scene->physics_settings.quick_cache_step= 0;
  
        /* update all objects: drivers, matrices, displists, etc. flags set
@@@ -12261,33 -12121,7 +12261,32 @@@ static void do_versions(FileData *fd, L
  
        }
  
-       /* put compatibility code here until next subversion bump */
-       {
 +      if(main->versionfile < 259 || (main->versionfile == 259 && main->subversionfile < 5)) {
 +              Scene *sce;
 +              Base *base;
 +              Material *ma;
 +
 +              /* compatibility tweak */
 +              for(sce = main->scene.first; sce; sce = sce->id.next) {
 +                      if(strcmp(sce->r.engine, "CYCLES") == 0) {
 +                              for(base = sce->base.first; base; base=base->next) {
 +                                      Object *ob= newlibadr(fd, lib, base->object);
 +
 +                                      if(ob && ob->type == OB_LAMP) {
 +                                              Lamp *la= newlibadr(fd, lib, ob->data);
 +                                              if(la)
 +                                                      la->area_size= 0.0f;
 +                                      }
 +                              }
 +                      }
 +              }
 +
 +              for(ma = main->mat.first; ma; ma= ma->id.next)
 +                      if(ma->nodetree)
 +                              ntree_tmp_cycles_emission_version_patch(fd, lib, ma->nodetree);
 +      }
 +
+       if (main->versionfile < 260){
                {
                        /* set default alpha value of Image outputs in image and render layer nodes to 0 */
                        Scene *sce;
  
  /* this condition has been made more complex since editmode can draw textures */
  #define CHECK_OB_DRAWTEXTURE(vd, dt) \
 -      ((vd->drawtype==OB_TEXTURE && dt>OB_SOLID) || \
 +      ((ELEM(vd->drawtype, OB_TEXTURE, OB_MATERIAL) && dt>OB_SOLID) || \
        (vd->drawtype==OB_SOLID && vd->flag2 & V3D_SOLID_TEX))
  
- static void draw_bounding_volume(Scene *scene, Object *ob);
+ static void draw_bounding_volume(Scene *scene, Object *ob, short type);
  
  static void drawcube_size(float size);
  static void drawcircle_size(float size);
@@@ -138,8 -138,8 +138,9 @@@ void register_node_type_sh_geom(ListBas
  {
        static bNodeType ntype;
  
 -      node_type_base(&ntype, SH_NODE_GEOMETRY, "Geometry", NODE_CLASS_INPUT, NODE_OPTIONS);
 +      node_type_base(&ntype, SH_NODE_GEOM, "Geometry", NODE_CLASS_INPUT, NODE_OPTIONS);
 +      node_type_compatibility(&ntype, NODE_OLD_SHADING);
+       node_type_compatibility(&ntype, NODE_OLD_SHADING);
        node_type_socket_templates(&ntype, NULL, sh_node_geom_out);
        node_type_size(&ntype, 120, 80, 160);
        node_type_init(&ntype, node_shader_init_geometry);