Merged changes in the trunk up to revision 48227.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 24 Jun 2012 10:29:26 +0000 (10:29 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 24 Jun 2012 10:29:26 +0000 (10:29 +0000)
Conflicts resolved:
source/blender/blenloader/intern/readfile.c
source/blender/editors/space_file/filelist.c

23 files changed:
1  2 
release/scripts/startup/bl_ui/properties_render.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/blenkernel/intern/object.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/resources.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/space_buttons/space_buttons.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/transform/transform.c
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/intern/source/pipeline.c
source/blender/windowmanager/CMakeLists.txt
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt
source/creator/creator.c

index 0dac27b13cc11929fc6b944813947ebb33871914,47dab0dcc6caa37fc2141a3ba6474e581e976bd9..a45e517d6c3d82fb76c0c796781b1bdfe24fd911
@@@ -7962,36 -7796,21 +7985,51 @@@ static void do_versions(FileData *fd, L
                }
        }
  
+       if (main->versionfile < 263 || (main->versionfile == 263 && main->subversionfile < 12)) {
+               Material *ma;
+               for (ma = main->mat.first; ma; ma = ma->id.next)
+                       if (ma->strand_widthfade == 2.0f)
+                               ma->strand_widthfade = 0.0f;
+       }
+       if (main->versionfile < 263 || (main->versionfile == 263 && main->subversionfile < 13)) {
+               bNodeTreeType *ntreetype = ntreeGetType(NTREE_COMPOSIT);
+               if (ntreetype && ntreetype->foreach_nodetree)
+                       ntreetype->foreach_nodetree(main, NULL, do_version_ntree_dilateerode_264);
+       }
 +      /* default values in Freestyle settings */
 +      {
 +              Scene *sce;
 +              SceneRenderLayer *srl;
 +              FreestyleLineStyle *linestyle;
 +
 +              for(sce = main->scene.first; sce; sce = sce->id.next) {
 +                      if (sce->r.line_thickness_mode == 0) {
 +                              sce->r.line_thickness_mode= R_LINE_THICKNESS_ABSOLUTE;
 +                              sce->r.unit_line_thickness= 1.f;
 +                      }
 +                      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->thickness_position == 0) {
 +                              linestyle->thickness_position= LS_THICKNESS_CENTER;
 +                              linestyle->thickness_ratio= 0.5f;
 +                      }
 +                      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 afd04697e5e4a075bcd03480e80c7b57559132e3,fb12ea8417a3e90f8e9354478d7ecfeb70395680..6d2c8657f0be99a2454d22d993a7e2f8d1cb8155
@@@ -1128,48 -1128,47 +1128,48 @@@ void filelist_from_main(struct FileLis
        
        // filelist->type = FILE_MAIN; // XXXXX TODO: add modes to filebrowser
  
-       if (filelist->dir[0]=='/') filelist->dir[0]= 0;
+       if (filelist->dir[0] == '/') filelist->dir[0] = 0;
        
        if (filelist->dir[0]) {
-               idcode= groupname_to_code(filelist->dir);
-               if (idcode==0) filelist->dir[0]= 0;
+               idcode = groupname_to_code(filelist->dir);
+               if (idcode == 0) filelist->dir[0] = 0;
        }
        
-       if ( filelist->dir[0]==0) {
+       if (filelist->dir[0] == 0) {
                
                /* make directories */
-               filelist->numfiles= 25;
-               filelist->filelist= (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry));
 -              filelist->numfiles = 24;
++              filelist->numfiles = 25;
+               filelist->filelist = (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry));
                
-               for (a=0; a<filelist->numfiles; a++) {
+               for (a = 0; a < filelist->numfiles; a++) {
                        memset(&(filelist->filelist[a]), 0, sizeof(struct direntry));
                        filelist->filelist[a].type |= S_IFDIR;
                }
                
-               filelist->filelist[0].relname= BLI_strdup("..");
-               filelist->filelist[2].relname= BLI_strdup("Scene");
-               filelist->filelist[3].relname= BLI_strdup("Object");
-               filelist->filelist[4].relname= BLI_strdup("Mesh");
-               filelist->filelist[5].relname= BLI_strdup("Curve");
-               filelist->filelist[6].relname= BLI_strdup("Metaball");
-               filelist->filelist[7].relname= BLI_strdup("Material");
-               filelist->filelist[8].relname= BLI_strdup("Texture");
-               filelist->filelist[9].relname= BLI_strdup("Image");
-               filelist->filelist[10].relname= BLI_strdup("Ika");
-               filelist->filelist[11].relname= BLI_strdup("Wave");
-               filelist->filelist[12].relname= BLI_strdup("Lattice");
-               filelist->filelist[13].relname= BLI_strdup("Lamp");
-               filelist->filelist[14].relname= BLI_strdup("Camera");
-               filelist->filelist[15].relname= BLI_strdup("Ipo");
-               filelist->filelist[16].relname= BLI_strdup("World");
-               filelist->filelist[17].relname= BLI_strdup("Screen");
-               filelist->filelist[18].relname= BLI_strdup("VFont");
-               filelist->filelist[19].relname= BLI_strdup("Text");
-               filelist->filelist[20].relname= BLI_strdup("Armature");
-               filelist->filelist[21].relname= BLI_strdup("Action");
-               filelist->filelist[22].relname= BLI_strdup("NodeTree");
-               filelist->filelist[23].relname= BLI_strdup("Speaker");
+               filelist->filelist[0].relname = BLI_strdup("..");
+               filelist->filelist[2].relname = BLI_strdup("Scene");
+               filelist->filelist[3].relname = BLI_strdup("Object");
+               filelist->filelist[4].relname = BLI_strdup("Mesh");
+               filelist->filelist[5].relname = BLI_strdup("Curve");
+               filelist->filelist[6].relname = BLI_strdup("Metaball");
+               filelist->filelist[7].relname = BLI_strdup("Material");
+               filelist->filelist[8].relname = BLI_strdup("Texture");
+               filelist->filelist[9].relname = BLI_strdup("Image");
+               filelist->filelist[10].relname = BLI_strdup("Ika");
+               filelist->filelist[11].relname = BLI_strdup("Wave");
+               filelist->filelist[12].relname = BLI_strdup("Lattice");
+               filelist->filelist[13].relname = BLI_strdup("Lamp");
+               filelist->filelist[14].relname = BLI_strdup("Camera");
+               filelist->filelist[15].relname = BLI_strdup("Ipo");
+               filelist->filelist[16].relname = BLI_strdup("World");
+               filelist->filelist[17].relname = BLI_strdup("Screen");
+               filelist->filelist[18].relname = BLI_strdup("VFont");
+               filelist->filelist[19].relname = BLI_strdup("Text");
+               filelist->filelist[20].relname = BLI_strdup("Armature");
+               filelist->filelist[21].relname = BLI_strdup("Action");
+               filelist->filelist[22].relname = BLI_strdup("NodeTree");
+               filelist->filelist[23].relname = BLI_strdup("Speaker");
 +              filelist->filelist[24].relname= BLI_strdup("FreestyleLineStyle");
                filelist_sort(filelist, FILE_SORT_ALPHA);
        }
        else {
index 1596e4573abd226d4f2b9d65660e9c501f9491da,15fdce09d83dc41ee64f02176e3faf51f1eeef27..315eaaac20e8099baf5b15fe6086660b0ecabb71
@@@ -146,24 -147,47 +148,55 @@@ static char *rna_ColorRamp_path(Pointer
                                Material *ma = (Material *)id;
                                
                                if (ptr->data == ma->ramp_col)
-                                       return BLI_strdup("diffuse_ramp");
+                                       path = BLI_strdup("diffuse_ramp");
                                else if (ptr->data == ma->ramp_spec)
-                                       return BLI_strdup("specular_ramp");
+                                       path = BLI_strdup("specular_ramp");
+                               break;
                        }
-                       break;
+                       
+                       case ID_NT:
+                       {
+                               bNodeTree *ntree = (bNodeTree *)id;
+                               bNode *node;
+                               PointerRNA node_ptr;
+                               char *node_path;
+                               
+                               for (node = ntree->nodes.first; node; node = node->next) {
+                                       if (ELEM3(node->type, SH_NODE_VALTORGB, CMP_NODE_VALTORGB, TEX_NODE_VALTORGB)) {
+                                               if (node->storage == ptr->data) {
+                                                       /* all node color ramp properties called 'color_ramp'
+                                                        * prepend path from ID to the node
+                                                        */
+                                                       RNA_pointer_create(id, &RNA_Node, node, &node_ptr);
+                                                       node_path = RNA_path_from_ID_to_struct(&node_ptr);
+                                                       path = BLI_sprintfN("%s.color_ramp", node_path);
+                                                       MEM_freeN(node_path);
+                                               }
+                                       }
+                               }
+                               break;
+                       }
+                       
+                       default:
+                               /* everything else just uses 'color_ramp' */
+                               path = BLI_strdup("color_ramp");
+                               break;
 +
 +                      case ID_LS:
 +                      {
 +                              char *path = FRS_path_from_ID_to_color_ramp((FreestyleLineStyle *)id, (ColorBand *)ptr->data);
 +                              if (path)
 +                                      return path;
 +                      }
 +                              break;
                }
        }
+       else {
+               /* everything else just uses 'color_ramp' */
+               path = BLI_strdup("color_ramp");
+       }
        
-       /* everything else just uses 'color_ramp' */
-       return BLI_strdup("color_ramp");
+       return path;
  }
  
  static char *rna_ColorRampElement_path(PointerRNA *ptr)
index 4a46568c98c6424bb657814cfc10ed8777463d7d,275aeb3317c3f86caaaedb6931b60eb4e8df64dc..a1dd999a921fe149b2c64d0af2bae695cd86a02e
@@@ -30,8 -30,8 +30,9 @@@ set(IN
        ../blenlib
        ../blenloader
        ../editors/include
+       ../editors/io
        ../gpu
 +      ../freestyle
        ../imbuf
        ../makesdna
        ../makesrna
Simple merge
Simple merge