* Merged changes in the trunk up to revision 33492.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Mon, 6 Dec 2010 01:23:18 +0000 (01:23 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Mon, 6 Dec 2010 01:23:18 +0000 (01:23 +0000)
* Fixed a bug in listing all style modules in source/blender/blenlib/intern/bpath.c.

46 files changed:
1  2 
release/scripts/ui/properties_render.py
release/scripts/ui/space_userpref.py
source/blender/CMakeLists.txt
source/blender/blenkernel/BKE_main.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/idcode.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/scene.c
source/blender/blenlib/BLI_bpath.h
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/intern/bpath.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/interface/interface_templates.c
source/blender/editors/render/CMakeLists.txt
source/blender/editors/render/render_shading.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_orientations.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/RNA_types.h
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_scene.c
source/blender/python/intern/CMakeLists.txt
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/pipeline.c
source/blender/render/intern/source/shadeinput.c
source/creator/CMakeLists.txt

Simple merge
Simple merge
index 3de2893fb56220882846c68e9e30dbd46c55af98,533679cead1c3e25231bf5509406cbc710f003b3..934c39505cc0403b9f6d9fdff23acfe26684ca3f
@@@ -81,7 -81,8 +81,9 @@@ typedef struct Main 
        ListBase particle;
        ListBase wm;
        ListBase gpencil;
 +      ListBase linestyle;
+       char id_tag_update[256];
  } Main;
  
  
index d7b008c5a1befe118231d616c7f9877d18b14b21,34ccb0ca1f9dc9eb7bfda55a295393bf1a4e1011..5331785387b26233bf6e07fdd914d23f97e40d46
  #ifndef BLI_BPATH_H
  #define BLI_BPATH_H
  
- struct BPathIteratorSeqData {
-       int totseq;
-       int seq;
-       struct Sequence **seqar; /* Sequence */
-       struct Scene *scene;                    /* Current scene */
- };
- struct BPathIteratorFrsModuleData {
-       struct Scene *scene;                    /* Current scene */
-       struct SceneRenderLayer *layer; /* Scene render layer */
-       struct FreestyleModuleConfig *module;
- };
- struct BPathIterator {
-       char*   path;
-       const char*     lib;
-       const char*     name;
-       void*   data;
-       int             len;
-       int             type;
-       
-       void (*setpath_callback)(struct BPathIterator *, const char *);
-       void (*getpath_callback)(struct BPathIterator *, char *);
-       
-       const char*     base_path; /* base path, the directry the blend file is in - normally G.main->name */
-       /* only for seq data */
-       struct BPathIteratorSeqData seqdata;
-       /* only for Freestyle module data */
-       struct BPathIteratorFrsModuleData frsmoduledata;
- };
+ struct BPathIterator;
  
 -
  void                  BLI_bpathIterator_init                          (struct BPathIterator *bpi, const char *base_path);
+ void                  BLI_bpathIterator_alloc                         (struct BPathIterator **bpi);
  void                  BLI_bpathIterator_free                          (struct BPathIterator *bpi);
  const char*           BLI_bpathIterator_getLib                        (struct BPathIterator *bpi);
  const char*           BLI_bpathIterator_getName                       (struct BPathIterator *bpi);
Simple merge
index 61cec1f74869438538c4d8fe0bce0ba6881367e5,ab25f9f898285e231b490f174ae5d70583a52068..52e8a080560aee26437138b1c1bb4b502f6f8907
  //XXX #include "BSE_sequence.h"
  //XXX define below from BSE_sequence.h - otherwise potentially odd behaviour
  
+ typedef struct BPathIteratorSeqData {
+       int totseq;
+       int seq;
+       struct Sequence **seqar; /* Sequence */
+       struct Scene *scene;                    /* Current scene */
+ } BPathIteratorSeqData;
++typedef struct BPathIteratorFrsModuleData {
++      struct Scene *scene;                    /* Current scene */
++      struct SceneRenderLayer *layer; /* Scene render layer */
++      struct FreestyleModuleConfig *module;
++} BPathIteratorFrsModuleData;
++
+ typedef struct BPathIterator {
+       char*   _path; /* never access directly, use BLI_bpathIterator_getPath */
+       const char*     _lib;
+       const char*     _name;
+       void*   data;
+       int             len;
+       int             type;
+       void (*setpath_callback)(struct BPathIterator *, const char *);
+       void (*getpath_callback)(struct BPathIterator *, char *);
+       const char*     base_path; /* base path, the directry the blend file is in - normally G.main->name */
+       /* only for seq data */
+       struct BPathIteratorSeqData seqdata;
++      /* only for Freestyle module data */
++      struct BPathIteratorFrsModuleData frsmoduledata;
+ } BPathIterator;
  #define FILE_MAX                      240
  
  /* TODO - BPATH_PLUGIN, BPATH_SEQ */
  enum BPathTypes {
-       BPATH_IMAGE = 0,
+       BPATH_IMAGE= 0,
+       BPATH_TEXTURE,
+       BPATH_TEXT,
        BPATH_SOUND,
        BPATH_FONT,
        BPATH_LIB,
  };
  
  void BLI_bpathIterator_init( struct BPathIterator *bpi, const char *base_path ) {
-       bpi->type = BPATH_IMAGE;
-       bpi->data = NULL;
+       bpi->type= BPATH_IMAGE;
+       bpi->data= NULL;
        
-       bpi->getpath_callback = NULL;
-       bpi->setpath_callback = NULL;
+       bpi->getpath_callback= NULL;
+       bpi->setpath_callback= NULL;
        
        /* Sequencer specific */
-       bpi->seqdata.totseq = 0;
-       bpi->seqdata.seq = 0;
-       bpi->seqdata.seqar = NULL;
-       bpi->seqdata.scene = NULL;
+       bpi->seqdata.totseq= 0;
+       bpi->seqdata.seq= 0;
+       bpi->seqdata.seqar= NULL;
+       bpi->seqdata.scene= NULL;
        
-       bpi->frsmoduledata.scene = NULL;
-       bpi->frsmoduledata.layer = NULL;
-       bpi->frsmoduledata.module = NULL;
 +      /* Freestyle module specific */
++      bpi->frsmoduledata.scene= NULL;
++      bpi->frsmoduledata.layer= NULL;
++      bpi->frsmoduledata.module= NULL;
 +
        bpi->base_path= base_path ? base_path : G.main->name;
  
        BLI_bpathIterator_step(bpi);
@@@ -107,8 -135,8 +150,11 @@@ void BLI_bpathIterator_alloc(struct BPa
  void BLI_bpathIterator_free( struct BPathIterator *bpi ) {
        if (bpi->seqdata.seqar)
                MEM_freeN((void *)bpi->seqdata.seqar);
-       bpi->seqdata.seqar = NULL;
-       bpi->seqdata.scene = NULL;
+       bpi->seqdata.seqar= NULL;
+       bpi->seqdata.scene= NULL;
++      bpi->frsmoduledata.scene= NULL;
++      bpi->frsmoduledata.layer= NULL;
++      bpi->frsmoduledata.module= NULL;
  }
  
  void BLI_bpathIterator_getPath( struct BPathIterator *bpi, char *path) {
@@@ -261,37 -324,11 +342,40 @@@ static struct Sequence *seq_stepdata__i
        return NULL;
  }
  
-               bpi->frsmoduledata.layer= bpi->frsmoduledata.scene->r.layers.first;
-               bpi->frsmoduledata.module= bpi->frsmoduledata.layer->freestyleConfig.modules.first;
 +static struct FreestyleModuleConfig *frs_module_stepdata__internal(struct BPathIterator *bpi, int step_next)
 +{
 +      struct FreestyleModuleConfig *module;
 +
 +      /* Initializing */
 +      if (bpi->frsmoduledata.scene==NULL) {
 +              bpi->frsmoduledata.scene= G.main->scene.first;
++              bpi->frsmoduledata.layer= (bpi->frsmoduledata.scene) ? bpi->frsmoduledata.scene->r.layers.first : NULL;
++              bpi->frsmoduledata.module= (bpi->frsmoduledata.layer) ? bpi->frsmoduledata.layer->freestyleConfig.modules.first : NULL;
 +      }
 +
 +      while (bpi->frsmoduledata.scene) {
 +              while (bpi->frsmoduledata.layer) {
 +                      while (bpi->frsmoduledata.module) {
 +                              module= bpi->frsmoduledata.module;
 +                              bpi->frsmoduledata.module= module->next;
 +                              return module;
 +                      }
 +                      bpi->frsmoduledata.layer= bpi->frsmoduledata.layer->next;
++                      bpi->frsmoduledata.module= (bpi->frsmoduledata.layer) ? bpi->frsmoduledata.layer->freestyleConfig.modules.first : NULL;
 +              }
 +              bpi->frsmoduledata.scene= bpi->frsmoduledata.scene->id.next;
++              bpi->frsmoduledata.layer= (bpi->frsmoduledata.scene) ? bpi->frsmoduledata.scene->r.layers.first : NULL;
++              bpi->frsmoduledata.module= (bpi->frsmoduledata.layer) ? bpi->frsmoduledata.layer->freestyleConfig.modules.first : NULL;
 +      }
 +
 +      return NULL;
 +}
 +
  static void seq_getpath(struct BPathIterator *bpi, char *path) {
-       Sequence *seq = (Sequence *)bpi->data;
+       Sequence *seq= (Sequence *)bpi->data;
  
        
-       path[0] = '\0'; /* incase we cant get the path */
+       path[0]= '\0'; /* incase we cant get the path */
        if (seq==NULL) return;
        if (SEQ_HAS_PATH(seq)) {
                if (ELEM3(seq->type, SEQ_IMAGE, SEQ_MOVIE, SEQ_SOUND)) {
@@@ -464,20 -581,6 +628,20 @@@ void BLI_bpathIterator_step( struct BPa
                        } else {
                                bpi_type_step__internal(bpi);
                        }
-                       if (bpi->data)  bpi->data = frs_module_stepdata__internal( bpi, 1 );
-                       else                    bpi->data = frs_module_stepdata__internal( bpi, 0 );
 +              } else if  ((bpi->type) == BPATH_FRS_MODULE) {
-                               FreestyleModuleConfig *module = (FreestyleModuleConfig *)bpi->data;
-                               bpi->lib = NULL;
-                               bpi->path = module->module_path;
-                               bpi->name = NULL;
-                               bpi->len = sizeof(module->module_path);
++                      if (bpi->data)  bpi->data= frs_module_stepdata__internal( bpi, 1 );
++                      else                    bpi->data= frs_module_stepdata__internal( bpi, 0 );
 +
 +                      if (bpi->data) {
++                              FreestyleModuleConfig *module= (FreestyleModuleConfig *)bpi->data;
++                              bpi->_lib= NULL;
++                              bpi->_path= module->module_path;
++                              bpi->_name= NULL;
++                              bpi->len= sizeof(module->module_path);
 +                              break;
 +                      } else {
 +                              bpi_type_step__internal(bpi);
 +                      }
                }
        }
  }
Simple merge
Simple merge
Simple merge
index ac744ae835ecfd7f3dd12b3206ac6bf8ae2df431,bf9ba2dcc70457160150d05b003e204a8b4a67b8..80eb82bbb8778c6601c902700035266027e325a3
@@@ -62,8 -63,8 +63,9 @@@ INCLUDE_DIRECTORIES
        ../../imbuf
        ../../render/extern/include
        ../../../../extern/glew/include
-       . )
 +      ../../freestyle
+       .
+ )
  
  FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
  
Simple merge
Simple merge
Simple merge