Merging r38951 through r38987 from trunk into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 3 Aug 2011 14:02:08 +0000 (14:02 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 3 Aug 2011 14:02:08 +0000 (14:02 +0000)
1  2 
CMakeLists.txt
build_files/scons/tools/btools.py
source/blender/editors/include/ED_transform.h
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ops.c
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/intern/rna_scene.c

diff --combined CMakeLists.txt
index 2ef487022e83e8ce2be472c0a6d09f550bf14600,aba96f6dd853938c11a3aebba01ad27a669a8a57..89ee95df4575af265d0c9e79914c77f3c09d7d15
@@@ -178,11 -178,8 +178,11 @@@ option(WITH_SAMPLERATE    "Enable sampl
  option(WITH_LZO           "Enable fast LZO compression (used for pointcache)" ON)
  option(WITH_LZMA          "Enable best LZMA compression, (used for pointcache)" ON)
  
 +# Tracking
 +option(WITH_LIBMV         "Enable libmv structure from motion library" ON)
 +
  # Misc
- option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON)
+ option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" OFF)
  option(WITH_RAYOPTIMIZATION   "Enable use of SIMD (SSE) optimizations for the raytracer" ON) 
  if(UNIX AND NOT APPLE)
        option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
index 3894eee0236ec679f28149b664cd7e8561f4b1b1,9b911b9d6f0c719cee97595647f60232cdc63064..5508b8d35cd9754c958af29655d428bdb52deb95
@@@ -87,7 -87,7 +87,7 @@@ def validate_arguments(args, bc)
              'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH',
              'WITH_BF_OPENEXR', 'BF_OPENEXR', 'BF_OPENEXR_INC', 'BF_OPENEXR_LIB', 'BF_OPENEXR_LIBPATH', 'WITH_BF_STATICOPENEXR', 'BF_OPENEXR_LIB_STATIC',
              'WITH_BF_DDS', 'WITH_BF_CINEON', 'WITH_BF_HDR',
-             'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB','BF_FFMPEG_EXTRA', 'BF_FFMPEG',  'BF_FFMPEG_INC',
+             'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB','BF_FFMPEG_EXTRA', 'BF_FFMPEG',  'BF_FFMPEG_INC', 'BF_FFMPEG_DLL',
              'WITH_BF_STATICFFMPEG', 'BF_FFMPEG_LIB_STATIC',
              'WITH_BF_OGG', 'BF_OGG', 'BF_OGG_LIB',
              'WITH_BF_JPEG', 'BF_JPEG', 'BF_JPEG_INC', 'BF_JPEG_LIB', 'BF_JPEG_LIBPATH',
              'BF_NO_ELBEEM',
              'WITH_BF_CXX_GUARDEDALLOC',
              'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC',
-             'BUILDBOT_BRANCH', 'WITH_BF_3DMOUSE'
+             'BUILDBOT_BRANCH', 'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC'
              ]
      
      # Have options here that scons expects to be lists
              'BF_BSC', 'BF_CONFIG',
              'BF_PRIORITYLIST', 'BF_BUILDINFO','CC', 'CXX', 'BF_QUICKDEBUG',
              'BF_LISTDEBUG', 'LCGDIR', 'BF_X264_CONFIG', 'BF_XVIDCORE_CONFIG',
-             'BF_UNIT_TEST']
+             'BF_UNIT_TEST', 'BF_BITNESS']
  
      okdict = {}
  
@@@ -291,6 -291,7 +291,7 @@@ def read_opts(env, cfg, args)
          (BoolVariable('WITH_BF_FFMPEG', 'Use FFMPEG if true', False)),
          ('BF_FFMPEG', 'FFMPEG base path', ''),
          ('BF_FFMPEG_LIB', 'FFMPEG library', ''),
+         ('BF_FFMPEG_DLL', 'FFMPEG dll libraries to be installed', ''),
          ('BF_FFMPEG_EXTRA', 'FFMPEG flags that must be preserved', ''),
  
          ('BF_FFMPEG_INC', 'FFMPEG includes', ''),
          (BoolVariable('WITH_BF_LZO', 'Enable fast LZO pointcache compression', True)),
          (BoolVariable('WITH_BF_LZMA', 'Enable best LZMA pointcache compression', True)),
          
 +        (BoolVariable('WITH_BF_LIBMV', 'Enable libmv structure from motion library', True)),
 +
          ('BF_X264_CONFIG', 'configuration flags for x264', ''),
          ('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''),
  #        (BoolVariable('WITH_BF_DOCS', 'Generate API documentation', False)),
index 3fd3a0ba0e1878708c083a17de4f2663dcf0de06,00ae7dda2e3871c9782d4f1b80b63d16f04d19a9..6b66d051a3ca0265feab0a282408cc58811e0839
@@@ -96,7 -96,6 +96,7 @@@ enum 
  #define CTX_AUTOCONFIRM               32
  #define CTX_BMESH                     64
  #define CTX_NDOF                      128
 +#define CTX_MOVIECLIP         256
  
  /* Standalone call to get the transformation center corresponding to the current situation
   * returns 1 if successful, 0 otherwise (usually means there's no selection)
@@@ -149,6 -148,7 +149,7 @@@ void BIF_selectOrientation(void)
  #define P_ALIGN_SNAP  (P_GEO_SNAP|(1 << 5))
  #define P_CONSTRAINT  (1 << 6)
  #define P_OPTIONS             (1 << 7)
+ #define P_CORRECT_UV  (1 << 8)
  
  void Transform_Properties(struct wmOperatorType *ot, int flags);
  
index 8f6474184b2df2835716fe596454bad56cfc01fe,ed0b2645c992608d19e0fc1c655b8460fa495a85..acb6f5c1268ade428770163d2b8b2fc7b737952a
@@@ -950,7 -950,7 +950,7 @@@ int ED_view3d_clip_range_get(View3D *v3
  int ED_view3d_viewplane_get(View3D *v3d, RegionView3D *rv3d, int winxi, int winyi, rctf *viewplane, float *clipsta, float *clipend, float *pixsize)
  {
        Camera *cam=NULL;
 -      float lens, fac, x1, y1, x2, y2;
 +      float lens, sensor=32.f, fac, x1, y1, x2, y2;
        float winx= (float)winxi, winy= (float)winyi;
        int orth= 0;
        
                        else if(v3d->camera->type==OB_CAMERA) {
                                cam= v3d->camera->data;
                                lens= cam->lens;
 +                              sensor= cam->sensor_x;
                                *clipsta= cam->clipsta;
                                *clipend= cam->clipend;
                        }
                else {
                        float dfac;
                        
 -                      if(winx>winy) dfac= 64.0f/(fac*winx*lens);
 -                      else dfac= 64.0f/(fac*winy*lens);
 +                      if(winx>winy) dfac= (sensor * 2.0) / (fac*winx*lens);
 +                      else dfac= (sensor * 2.0) / (fac*winy*lens);
                        
                        x1= - *clipsta * winx*dfac;
                        x2= -x1;
                                dy += cam->shifty * cam->ortho_scale;
                        }
                        else {
 -                              dx += cam->shiftx * (cam->clipsta / cam->lens) * 32.0f;
 -                              dy += cam->shifty * (cam->clipsta / cam->lens) * 32.0f;
 +                              dx += cam->shiftx * (cam->clipsta / cam->lens) * sensor;
 +                              dy += cam->shifty * (cam->clipsta / cam->lens) * sensor;
                        }
  
                        x1+= dx;
@@@ -1191,7 -1190,7 +1191,7 @@@ int ED_view3d_lock(RegionView3D *rv3d
        return TRUE;
  }
  
- /* dont set windows active in in here, is used by renderwin too */
+ /* dont set windows active in here, is used by renderwin too */
  void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d)
  {
        if(rv3d->persp==RV3D_CAMOB) {       /* obs/camera */
index f3bb779b02425a736085556f8b089b71ab824bd8,39e26bc6436dfcce9fe6d3e877a1c9353ad15c34..7f7bc0e63a71ec3cad7e204d9043bced63495631
@@@ -50,7 -50,6 +50,7 @@@
  #include "DNA_armature_types.h"
  #include "DNA_constraint_types.h"
  #include "DNA_meshdata_types.h"
 +#include "DNA_movieclip_types.h"
  #include "DNA_scene_types.h"          /* PET modes                    */
  
  #include "RNA_access.h"
@@@ -74,7 -73,6 +74,7 @@@
  #include "ED_markers.h"
  #include "ED_view3d.h"
  #include "ED_mesh.h"
 +#include "ED_clip.h"
  
  #include "UI_view2d.h"
  #include "WM_types.h"
@@@ -174,17 -172,6 +174,17 @@@ void convertViewVec(TransInfo *t, floa
                divx= v2d->mask.xmax-v2d->mask.xmin;
                divy= v2d->mask.ymax-v2d->mask.ymin;
  
 +              vec[0]= (v2d->cur.xmax-v2d->cur.xmin)*(dx)/divx;
 +              vec[1]= (v2d->cur.ymax-v2d->cur.ymin)*(dy)/divy;
 +              vec[2]= 0.0f;
 +      }
 +      else if(t->spacetype==SPACE_CLIP) {
 +              View2D *v2d = t->view;
 +              float divx, divy;
 +
 +              divx= v2d->mask.xmax-v2d->mask.xmin;
 +              divy= v2d->mask.ymax-v2d->mask.ymin;
 +
                vec[0]= (v2d->cur.xmax-v2d->cur.xmin)*(dx)/divx;
                vec[1]= (v2d->cur.ymax-v2d->cur.ymin)*(dy)/divy;
                vec[2]= 0.0f;
@@@ -239,9 -226,6 +239,9 @@@ void projectIntView(TransInfo *t, floa
                adr[0]= out[0];
                adr[1]= out[1];
        }
 +      else if(t->spacetype==SPACE_CLIP) {
 +              UI_view2d_to_region_no_clip(t->view, vec[0], vec[1], adr, adr+1);
 +      }
  }
  
  void projectFloatView(TransInfo *t, float *vec, float *adr)
                if(t->ar->regiontype == RGN_TYPE_WINDOW)
                        project_float_noclip(t->ar, vec, adr);
        }
 -      else if(t->spacetype==SPACE_IMAGE) {
 +      else if(ELEM(t->spacetype, SPACE_IMAGE, SPACE_CLIP)) {
                int a[2];
  
                projectIntView(t, vec, a);
@@@ -348,15 -332,6 +348,15 @@@ static void viewRedrawForce(const bCont
                if(sima->lock) WM_event_add_notifier(C, NC_GEOM|ND_DATA, t->obedit->data);
                else ED_area_tag_redraw(t->sa);
        }
 +      else if (t->spacetype==SPACE_CLIP) {
 +              SpaceClip *sc= (SpaceClip*)t->sa->spacedata.first;
 +              MovieClip *clip= ED_space_clip(sc);
 +
 +              /* objects could be parented to tracking data, so send this for viewport refresh */
 +              WM_event_add_notifier(C, NC_OBJECT|ND_TRANSFORM, NULL);
 +
 +              WM_event_add_notifier(C, NC_MOVIECLIP|NA_EDITED, clip);
 +      }
  }
  
  static void viewRedrawPost(bContext *C, TransInfo *t)
@@@ -628,7 -603,7 +628,7 @@@ int transformEvent(TransInfo *t, wmEven
                                break;
                        case TFM_MODAL_ROTATE:
                                /* only switch when... */
 -                              if(!(t->options & CTX_TEXTURE)) {
 +                              if(!(t->options & CTX_TEXTURE) && !(t->options & CTX_MOVIECLIP)) {
                                        if( ELEM4(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL, TFM_TRANSLATION) ) {
                                                
                                                resetTransRestrictions(t);
                        t->redraw |= TREDRAW_HARD;
                        break;
  
 +              case LEFTALTKEY:
 +                      if(t->options&CTX_MOVIECLIP) {
 +                              restoreTransObjects(t);
 +
 +                              t->flag|= T_RELATIVE_POSITION;
 +                              t->redraw |= TREDRAW_HARD;
 +                      }
 +                      break;
 +
                case SPACEKEY:
                        if ((t->spacetype==SPACE_VIEW3D) && event->alt) {
  #if 0 // TRANSFORM_FIX_ME
                        break;
                case RKEY:
                        /* only switch when... */
 -                      if(!(t->options & CTX_TEXTURE)) {
 +                      if(!(t->options & CTX_TEXTURE) && !(t->options & CTX_MOVIECLIP)) {
                                if( ELEM4(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL, TFM_TRANSLATION) ) {
  
                                        resetTransRestrictions(t);
                                t->redraw |= TREDRAW_HARD;
                        }
                        break;
 +              case LEFTALTKEY:
 +                      if(t->options&CTX_MOVIECLIP) {
 +                              restoreTransObjects(t);
 +
 +                              t->flag&= ~T_RELATIVE_POSITION;
 +                              t->redraw |= TREDRAW_HARD;
 +                      }
 +                      break;
  //            case LEFTMOUSE:
  //            case RIGHTMOUSE:
  //                    if(WM_modal_tweak_exit(event, t->event_type))
@@@ -1566,11 -1524,6 +1566,11 @@@ int initTransform(bContext *C, TransInf
                t->draw_handle_view = ED_region_draw_cb_activate(t->ar->type, drawTransformView, t, REGION_DRAW_POST_VIEW);
                //t->draw_handle_pixel = ED_region_draw_cb_activate(t->ar->type, drawTransformPixel, t, REGION_DRAW_POST_PIXEL);
        }
 +      else if(t->spacetype == SPACE_CLIP) {
 +              unit_m3(t->spacemtx);
 +              t->draw_handle_view = ED_region_draw_cb_activate(t->ar->type, drawTransformView, t, REGION_DRAW_POST_VIEW);
 +              t->options |= CTX_MOVIECLIP;
 +      }
        else
                unit_m3(t->spacemtx);
  
@@@ -3339,7 -3292,7 +3339,7 @@@ void initTranslation(TransInfo *t
                        t->snap[2] = t->snap[1] * 0.1f;
                }
        }
 -      else if(t->spacetype == SPACE_IMAGE) {
 +      else if(ELEM(t->spacetype, SPACE_IMAGE, SPACE_CLIP)) {
                t->snap[0] = 0.0f;
                t->snap[1] = 0.125f;
                t->snap[2] = 0.0625f;
@@@ -4290,7 -4243,7 +4290,7 @@@ static int createSlideVerts(TransInfo *
        /* UV correction vars */
        GHash **uvarray= NULL;
        SlideData *sld = MEM_callocN(sizeof(*sld), "sld");
-       int  uvlay_tot= CustomData_number_of_layers(&em->fdata, CD_MTFACE);
+       const int  uvlay_tot=  (t->settings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT) ? CustomData_number_of_layers(&em->fdata, CD_MTFACE) : 0;
        int uvlay_idx;
        TransDataSlideUv *slideuvs=NULL, *suv=NULL, *suv_last=NULL;
        RegionView3D *v3d = t->ar ? t->ar->regiondata : NULL; /* background mode support */
        sld->end[0] = (int) end[0];
        sld->end[1] = (int) end[1];
        
-       if (uvlay_tot) { // XXX && (scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT)) {
+       if (uvlay_tot) {
                int maxnum = 0;
  
                uvarray = MEM_callocN( uvlay_tot * sizeof(GHash *), "SlideUVs Array");
@@@ -4852,8 -4805,6 +4852,6 @@@ void initEdgeSlide(TransInfo *t
  
  int doEdgeSlide(TransInfo *t, float perc)
  {
-       Mesh *me= t->obedit->data;
-       EditMesh *em = me->edit_mesh;
        SlideData *sld = t->customData;
        EditVert *ev, *nearest = sld->nearest;
        EditVert *centerVert, *upVert, *downVert;
        int prop=1, flip=0;
        /* UV correction vars */
        GHash **uvarray= sld->uvhash;
-       int  uvlay_tot= CustomData_number_of_layers(&em->fdata, CD_MTFACE);
+       const int  uvlay_tot= sld->uvlay_tot;
        int uvlay_idx;
        TransDataSlideUv *suv;
        float uv_tmp[2];
                        tempev = editedge_getOtherVert((perc>=0)?tempsv->up:tempsv->down, ev);
                        interp_v3_v3v3(ev->co, tempsv->origvert.co, tempev->co, fabs(perc));
  
-                       if (uvlay_tot) { // XXX scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT) {
+                       if (uvlay_tot) {
                                for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) {
                                        suv = BLI_ghash_lookup( uvarray[uvlay_idx], ev );
                                        if (suv && suv->fuv_list && suv->uv_up && suv->uv_down) {
                        if(newlen < 0.0f) {newlen = 0.0;}
                        if(flip == 0) {
                                interp_v3_v3v3(ev->co, editedge_getOtherVert(tempsv->down,ev)->co, editedge_getOtherVert(tempsv->up,ev)->co, fabs(newlen));
-                               if (uvlay_tot) { // XXX scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT) {
+                               if (uvlay_tot) {
                                        /* dont do anything if no UVs */
                                        for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) {
                                                suv = BLI_ghash_lookup( uvarray[uvlay_idx], ev );
                        } else{
                                interp_v3_v3v3(ev->co, editedge_getOtherVert(tempsv->up,ev)->co, editedge_getOtherVert(tempsv->down,ev)->co, fabs(newlen));
  
-                               if (uvlay_tot) { // XXX scene->toolsettings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT) {
+                               if (uvlay_tot) {
                                        /* dont do anything if no UVs */
                                        for (uvlay_idx=0; uvlay_idx<uvlay_tot; uvlay_idx++) {
                                                suv = BLI_ghash_lookup( uvarray[uvlay_idx], ev );
index d62005c1074302bd68377d36be150656068c25b0,f8df4e4ee754c56f54a3c4c1e0617ce540d92c70..837bc1cf3eadb7c68f3f907c958e7ee6a42c0d1e
@@@ -49,7 -49,6 +49,7 @@@
  #include "DNA_meshdata_types.h"
  #include "DNA_view3d_types.h"
  #include "DNA_modifier_types.h"
 +#include "DNA_movieclip_types.h"
  
  #include "RNA_access.h"
  
@@@ -73,7 -72,6 +73,7 @@@
  #include "BKE_mesh.h"
  #include "BKE_nla.h"
  #include "BKE_context.h"
 +#include "BKE_tracking.h"
  
  #include "ED_anim_api.h"
  #include "ED_armature.h"
@@@ -87,7 -85,6 +87,7 @@@
  #include "ED_uvedit.h"
  #include "ED_view3d.h"
  #include "ED_curve.h" /* for ED_curve_editnurbs */
 +#include "ED_clip.h"
  
  //#include "BDR_unwrapper.h"
  
@@@ -844,46 -841,6 +844,46 @@@ void recalcData(TransInfo *t
                        }
                }
        }
 +      else if (t->spacetype == SPACE_CLIP) {
 +              SpaceClip *sc= t->sa->spacedata.first;
 +              MovieClip *clip= ED_space_clip(sc);
 +              MovieTrackingTrack *track;
 +
 +              if(t->state == TRANS_CANCEL) {
 +                      track= clip->tracking.tracks.first;
 +                      while(track) {
 +                              MovieTrackingMarker *marker= BKE_tracking_ensure_marker(track, sc->user.framenr);
 +
 +                              marker->flag= track->transflag;
 +
 +                              track= track->next;
 +                      }
 +              }
 +
 +              flushTransTracking(t);
 +
 +              track= clip->tracking.tracks.first;
 +              while(track) {
 +                      if(TRACK_SELECTED(track)) {
 +                              if (t->mode == TFM_TRANSLATION) {
 +                                      if(TRACK_AREA_SELECTED(track, TRACK_AREA_PAT))
 +                                              BKE_tracking_clamp_track(track, CLAMP_PAT_POS);
 +                                      if(TRACK_AREA_SELECTED(track, TRACK_AREA_SEARCH))
 +                                              BKE_tracking_clamp_track(track, CLAMP_SEARCH_POS);
 +                              }
 +                              else if (t->mode == TFM_RESIZE) {
 +                                      if(TRACK_AREA_SELECTED(track, TRACK_AREA_PAT))
 +                                              BKE_tracking_clamp_track(track, CLAMP_PAT_DIM);
 +                                      if(TRACK_AREA_SELECTED(track, TRACK_AREA_SEARCH))
 +                                              BKE_tracking_clamp_track(track, CLAMP_SEARCH_DIM);
 +                              }
 +                      }
 +
 +                      track= track->next;
 +              }
 +
 +              DAG_id_tag_update(&clip->id, 0);
 +      }
  }
  
  void drawLine(TransInfo *t, float *center, float *dir, char axis, short options)
@@@ -1056,6 -1013,22 +1056,22 @@@ int initTransInfo (bContext *C, TransIn
                                t->options |= CTX_NO_PET;
                        }
                }
+               /* initialize UV transform from */
+               if (RNA_struct_find_property(op->ptr, "correct_uv")) {
+                       if(RNA_property_is_set(op->ptr, "correct_uv")) {
+                               if(RNA_boolean_get(op->ptr, "correct_uv")) {
+                                       t->settings->uvcalc_flag |= UVCALC_TRANSFORM_CORRECT;
+                               }
+                               else {
+                                       t->settings->uvcalc_flag &= ~UVCALC_TRANSFORM_CORRECT;
+                               }
+                       }
+                       else {
+                               RNA_boolean_set(op->ptr, "correct_uv", t->settings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT);
+                       }
+               }
        }
        else if(t->spacetype==SPACE_IMAGE)
        {
index e4ca1cfb90a947c681a60f909c30eb74d0c2f604,54e0b31e201e75244b0bfa3b1a44da916095c926..a6c8d1fd82d2016b1be475f1ad278c4a2ba7ed27
@@@ -360,11 -360,17 +360,17 @@@ static int transform_modal(bContext *C
  
        TransInfo *t = op->customdata;
  
+       #if 0
+       // stable 2D mouse coords map to different 3D coords while the 3D mouse is active
+       // in other words, 2D deltas are no longer good enough!
+       // disable until individual 'transformers' behave better
        if (event->type == NDOF_MOTION)
        {
                /* puts("transform_modal: passing through NDOF_MOTION"); */
                return OPERATOR_PASS_THROUGH;
        }
+       #endif
  
        /* XXX insert keys are called here, and require context */
        t->context= C;
@@@ -502,6 -508,11 +508,11 @@@ void Transform_Properties(struct wmOper
                RNA_def_boolean(ot->srna, "texture_space", 0, "Edit Object data texture space", "");
        }
  
+       if (flags & P_CORRECT_UV)
+       {
+               RNA_def_boolean(ot->srna, "correct_uv", 0, "Correct UV coords when transforming", "");
+       }
        // Add confirm method all the time. At the end because it's not really that important and should be hidden only in log, not in keymap edit
        /*prop =*/ RNA_def_boolean(ot->srna, "release_confirm", 0, "Confirm on Release", "Always confirm operation when releasing button");
        //RNA_def_property_flag(prop, PROP_HIDDEN);
@@@ -749,7 -760,7 +760,7 @@@ void TRANSFORM_OT_edge_slide(struct wmO
  
        RNA_def_float_factor(ot->srna, "value", 0, -1.0f, 1.0f, "Factor", "", -1.0f, 1.0f);
  
-       Transform_Properties(ot, P_MIRROR|P_SNAP);
+       Transform_Properties(ot, P_MIRROR|P_SNAP|P_CORRECT_UV);
  }
  
  void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot)
@@@ -967,11 -978,6 +978,11 @@@ void transform_keymap_for_space(wmKeyCo
                        km = WM_keymap_add_item(keymap, "WM_OT_context_toggle", TABKEY, KM_PRESS, KM_SHIFT, 0);
                        RNA_string_set(km->ptr, "data_path", "tool_settings.use_snap");
                        break;
 +              case SPACE_CLIP:
 +                      WM_keymap_add_item(keymap, OP_TRANSLATION, GKEY, KM_PRESS, 0, 0);
 +                      WM_keymap_add_item(keymap, OP_TRANSLATION, EVT_TWEAK_S, KM_ANY, 0, 0);
 +                      WM_keymap_add_item(keymap, OP_RESIZE, SKEY, KM_PRESS, 0, 0);
 +                      break;
                default:
                        break;
        }
index f9b9874aa11fa234646474ee7fd1f8c92a7b6027,0bf812f1ec22eea0ea539f77e09024a621d28567..e615b41723738b2f532ed688c7ffcbd95c017d70
@@@ -233,11 -233,6 +233,11 @@@ typedef struct ThemeSpace 
        char handle_vertex_select[4];
        
        char handle_vertex_size;
 +      
 +      char marker_outline[4], marker[4], act_marker[4], sel_marker[4], dis_marker[4], lock_marker[4];
 +      char bundle_solid[4];
 +      char path_before[4], path_after[4];
 +      char camera_path[4];
        char hpad[7];
        
        char preview_back[4];
@@@ -285,7 -280,6 +285,7 @@@ typedef struct bTheme 
        ThemeSpace tlogic;
        ThemeSpace tuserpref;   
        ThemeSpace tconsole;
 +      ThemeSpace tclip;
        
        /* 20 sets of bone colors for this theme */
        ThemeWireColor tarm[20];
@@@ -606,6 -600,9 +606,9 @@@ extern UserDef U; /* from blenkernel bl
  /* actually... users probably don't care about what the mode
     is called, just that it feels right */
  #define NDOF_ORBIT_INVERT_AXES (1 << 6)
+ /* zoom is up/down if this flag is set (otherwise forward/backward) */
+ #define NDOF_ZOOM_UPDOWN (1 << 7)
+ #define NDOF_INVERT_ZOOM (1 << 8)
  
  
  #ifdef __cplusplus
index 6c0228757488295a7093d8cf2cdec045b3abdfce,b3d8bc8ea183b147b7ff89c466630fbf84991fd7..6a169a482fb0bc1604c80f3bcb28c9cd02aba3ea
@@@ -1018,15 -1018,6 +1018,15 @@@ static KeyingSet *rna_Scene_keying_set_
        }
  }
  
 +static void rna_SceneCamera_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
 +{
 +      Scene *scene= (Scene*)ptr->id.data;
 +      Object *camera= scene->camera;
 +
 +      if(camera)
 +              DAG_id_tag_update(&camera->id, 0);
 +}
 +
  #else
  
  static void rna_def_transform_orientation(BlenderRNA *brna)
@@@ -2211,13 -2202,13 +2211,13 @@@ static void rna_def_scene_render_data(B
        RNA_def_property_int_sdna(prop, NULL, "xsch");
        RNA_def_property_range(prop, 4, 10000);
        RNA_def_property_ui_text(prop, "Resolution X", "Number of horizontal pixels in the rendered image");
 -      RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
 +      RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
        
        prop= RNA_def_property(srna, "resolution_y", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "ysch");
        RNA_def_property_range(prop, 4, 10000);
        RNA_def_property_ui_text(prop, "Resolution Y", "Number of vertical pixels in the rendered image");
 -      RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
 +      RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
        
        prop= RNA_def_property(srna, "resolution_percentage", PROP_INT, PROP_PERCENTAGE);
        RNA_def_property_int_sdna(prop, NULL, "size");
        RNA_def_property_float_sdna(prop, NULL, "xasp");
        RNA_def_property_range(prop, 1.0f, 200.0f);
        RNA_def_property_ui_text(prop, "Pixel Aspect X", "Horizontal aspect ratio - for anamorphic or non-square pixel output");
 -      RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
 +      RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
        
        prop= RNA_def_property(srna, "pixel_aspect_y", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "yasp");
        RNA_def_property_range(prop, 1.0f, 200.0f);
        RNA_def_property_ui_text(prop, "Pixel Aspect Y", "Vertical aspect ratio - for anamorphic or non-square pixel output");
 -      RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
 +      RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
        
        /* JPEG and AVI JPEG */
        
@@@ -3260,7 -3251,7 +3260,7 @@@ void RNA_def_scene(BlenderRNA *brna
        RNA_def_property_int_sdna(prop, NULL, "r.cfra");
        RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
        RNA_def_property_int_funcs(prop, NULL, "rna_Scene_current_frame_set", NULL);
-       RNA_def_property_ui_text(prop, "Current Frame", "Current Frame");
+       RNA_def_property_ui_text(prop, "Current Frame", "Current Frame, to update animation data from python frame_set() instead");
        RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
        RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update");
        
        RNA_def_property_struct_type(prop, "TransformOrientation");
        RNA_def_property_ui_text(prop, "Transform Orientations", "");
  
 +      /* acctive MovieClip */
 +      prop= RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
 +      RNA_def_property_pointer_sdna(prop, NULL, "clip");
 +      RNA_def_property_flag(prop, PROP_EDITABLE);
 +      RNA_def_property_struct_type(prop, "MovieClip");
 +      RNA_def_property_ui_text(prop, "Active Movie Clip", "Active movie clip used for constraints and viewport drawing");
 +      RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
 +
        /* Nestled Data  */
        rna_def_tool_settings(brna);
        rna_def_unit_settings(brna);