Merging r44140 through r44226 from trunk into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 18 Feb 2012 16:12:22 +0000 (16:12 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 18 Feb 2012 16:12:22 +0000 (16:12 +0000)
1  2 
source/blender/blenloader/intern/readfile.c
source/blender/editors/include/ED_clip.h
source/blender/makesdna/DNA_space_types.h

@@@ -3838,7 -3838,7 +3838,7 @@@ static void direct_link_mesh(FileData *
        
        if((fd->flags & FD_FLAGS_SWITCH_ENDIAN) && mesh->tface) {
                TFace *tf= mesh->tface;
-               unsigned int i;
+               int i;
  
                for (i=0; i< (mesh->totface); i++, tf++) {
                        SWITCH_INT(tf->col[0]);
@@@ -5273,7 -5273,6 +5273,7 @@@ static void lib_link_screen(FileData *f
                                                sclip->clip= newlibadr_us(fd, sc->id.lib, sclip->clip);
  
                                                sclip->scopes.track_preview = NULL;
 +                                              sclip->draw_context = NULL;
                                                sclip->scopes.ok = 0;
                                        }
                                }
@@@ -7498,15 -7497,16 +7498,16 @@@ static void do_versions_nodetree_conver
  
  void do_versions_image_settings_2_60(Scene *sce)
  {
-       /* note: rd->subimtype is moved into indervidual settings now and no longer
+       /* note: rd->subimtype is moved into individual settings now and no longer
         * exists */
        RenderData *rd= &sce->r;
        ImageFormatData *imf= &sce->r.im_format;
  
-       imf->imtype= rd->imtype;
-       imf->planes= rd->planes;
-       imf->compress= rd->quality;
-       imf->quality= rd->quality;
+       /* we know no data loss happens here, the old values were in char range */
+       imf->imtype=   (char)rd->imtype;
+       imf->planes=   (char)rd->planes;
+       imf->compress= (char)rd->quality;
+       imf->quality=  (char)rd->quality;
  
        /* default, was stored in multiple places, may override later */
        imf->depth= R_IMF_CHAN_DEPTH_8;
@@@ -14086,6 -14086,11 +14087,11 @@@ static void expand_sound(FileData *fd, 
        expand_doit(fd, mainvar, snd->ipo); // XXX depreceated - old animation system
  }
  
+ static void expand_movieclip(FileData *fd, Main *mainvar, MovieClip *clip)
+ {
+       if (clip->adt)
+               expand_animdata(fd, mainvar, clip->adt);
+ }
  
  static void expand_main(FileData *fd, Main *mainvar)
  {
                                                break;
                                        case ID_PA:
                                                expand_particlesettings(fd, mainvar, (ParticleSettings *)id);
+                                               break;
+                                       case ID_MC:
+                                               expand_movieclip(fd, mainvar, (MovieClip *)id);
+                                               break;
                                        }
  
                                        doit= 1;
@@@ -28,8 -28,8 +28,8 @@@
   *  \ingroup editors
   */
  
- #ifndef ED_MOVIECLIP_H
- #define ED_MOVIECLIP_H
+ #ifndef __ED_CLIP_H__
+ #define __ED_CLIP_H__
  
  struct ARegion;
  struct bContext;
@@@ -58,10 -58,6 +58,10 @@@ void ED_clip_point_undistorted_pos(Spac
  void ED_clip_point_stable_pos(struct bContext *C, float x, float y, float *xr, float *yr);
  void ED_clip_mouse_pos(struct bContext *C, struct wmEvent *event, float co[2]);
  
 +void ED_space_clip_load_movieclip_buffer(struct SpaceClip *sc, struct ImBuf *ibuf);
 +void ED_space_clip_unload_movieclip_buffer(struct SpaceClip *sc);
 +void ED_space_clip_free_texture_buffer(struct SpaceClip *sc);
 +
  /* clip_ops.c */
  void ED_operatormacros_clip(void);
  
@@@ -30,8 -30,8 +30,8 @@@
   *  \author nzc
   */
  
- #ifndef DNA_SPACE_TYPES_H
- #define DNA_SPACE_TYPES_H
+ #ifndef __DNA_SPACE_TYPES_H__
+ #define __DNA_SPACE_TYPES_H__
  
  #include "DNA_defs.h"
  #include "DNA_listBase.h"
@@@ -521,8 -521,6 +521,8 @@@ typedef struct SpaceClip 
  
        /* movie postprocessing */
        int postproc_flag, pad2;
 +
 +      void *draw_context;
  } SpaceClip;
  
  /* view3d  Now in DNA_view3d_types.h */
@@@ -904,7 -902,6 +904,7 @@@ enum 
  #define SC_SHOW_GRAPH_TRACKS  (1<<15)
  /*#define SC_SHOW_PYRAMID_LEVELS      (1<<16) */      /* UNUSED */
  #define SC_LOCK_TIMECURSOR            (1<<17)
 +#define SC_TEXTURE_BUFFER             (1<<18)
  
  /* SpaceClip->mode */
  #define SC_MODE_TRACKING              0