Cycles: svn merge -r41232:41266 ^/trunk/blender
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 24 Oct 2011 22:51:44 +0000 (22:51 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Mon, 24 Oct 2011 22:51:44 +0000 (22:51 +0000)
1  2 
source/blender/imbuf/CMakeLists.txt
source/blender/makesdna/DNA_ID.h
source/blender/makesrna/intern/rna_ID.c

index 76c69292b0ff5d0b93f1a2c583c9fc271fb44190,1b190ae96def6ffd5825abf55486d92c96c62dd2..6aef9a4254e64c2f0f088d79fbeeb02d2d131b44
@@@ -61,7 -61,7 +61,8 @@@ set(SR
        intern/md5.c
        intern/metadata.c
        intern/module.c
+       intern/moviecache.c
 +      intern/openimageio.cpp
        intern/png.c
        intern/readimage.c
        intern/rectop.c
@@@ -75,6 -75,7 +76,7 @@@
  
        IMB_imbuf.h
        IMB_imbuf_types.h
+       IMB_moviecache.h
        IMB_thumbs.h
        intern/IMB_allocimbuf.h
        intern/IMB_anim.h
@@@ -176,11 -177,4 +178,11 @@@ if(WITH_IMAGE_HDR
        add_definitions(-DWITH_HDR)
  endif()
  
 +if(WITH_OPENIMAGEIO)
 +      list(APPEND INC_SYS
 +              ${OPENIMAGEIO_INCLUDES}
 +      )
 +      # disabled for now add_definitions(-DWITH_OPENIMAGEIO ${OPENIMAGEIO_DEFINITIONS})
 +endif()
 +
  blender_add_lib(bf_imbuf "${SRC}" "${INC}" "${INC_SYS}")
index 48ad8a0c017e1a3eb4e65a61c1f8b814c347add2,d2c7d49e5f9a27d654f17fe5b440d82b9d8a0d1a..6f2933d154b1d8c8e8136b79f7dfd33600381417
@@@ -116,7 -116,13 +116,13 @@@ typedef struct Library 
        ID *idblock;
        struct FileData *filedata;
        char name[240];                 /* path name used for reading, can be relative and edited in the outliner */
-       char filepath[240];             /* temp. absolute filepath, only used while reading */
+       char filepath[240];             /* absolute filepath, this is only for convenience,
+                                                        * 'name' is the real path used on file read but in
+                                                        * some cases its useful to access the absolute one,
+                                                        * This is set on file read.
+                                                        * Use BKE_library_filepath_set() rather than
+                                                        * setting 'name' directly and it will be kepk in
+                                                        * sync - campbell */
        int tot, pad;                   /* tot, idblock and filedata are only fo read and write */
        struct Library *parent; /* set for indirectly linked libs, used in the outliner and while reading */
  } Library;
@@@ -229,7 -235,6 +235,7 @@@ typedef struct PreviewImage 
  #define LIB_PRE_EXISTING      2048
  /* runtime */
  #define LIB_ID_RECALC         4096
 +#define LIB_ID_RECALC_DATA    8192
  
  #ifdef __cplusplus
  }
index 71b34d31e96c6b6c9711ec7a10e0c5e8695a9143,194c3e8d18e57324c807de0e935e0304aa6bd139..ba7d2881ad87c80714faa9f35b769201e6152944
@@@ -326,6 -326,12 +326,12 @@@ int rna_IDMaterials_assign_int(PointerR
        }
  }
  
+ void rna_Library_filepath_set(PointerRNA *ptr, const char *value)
+ {
+       Library *lib= (Library*)ptr->data;
+       BKE_library_filepath_set(lib, value);
+ }
  #else
  
  static void rna_def_ID_properties(BlenderRNA *brna)
@@@ -480,16 -486,6 +486,16 @@@ static void rna_def_ID(BlenderRNA *brna
        RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
        RNA_def_property_ui_text(prop, "Tag", "Tools can use this to tag data (initial state is undefined)");
  
 +      prop= RNA_def_property(srna, "recalc", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_boolean_sdna(prop, NULL, "flag", LIB_ID_RECALC);
 +      RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 +      RNA_def_property_ui_text(prop, "Recalc", "Datablock is tagged for recalculation");
 +
 +      prop= RNA_def_property(srna, "recalc_data", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_boolean_sdna(prop, NULL, "flag", LIB_ID_RECALC_DATA);
 +      RNA_def_property_clear_flag(prop, PROP_EDITABLE);
 +      RNA_def_property_ui_text(prop, "Recalc Data", "Datablock data is tagged for recalculation");
 +
        prop= RNA_def_property(srna, "library", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "lib");
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@@ -531,7 -527,7 +537,7 @@@ static void rna_def_library(BlenderRNA 
        prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
        RNA_def_property_string_sdna(prop, NULL, "name");
        RNA_def_property_ui_text(prop, "File Path", "Path to the library .blend file");
-       /* TODO - lib->filename isnt updated, however the outliner also skips this, probably only needed on read. */
+       RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Library_filepath_set");
        
        prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
        RNA_def_property_struct_type(prop, "Library");