Merging r39135 through r39172 from trunk into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 8 Aug 2011 07:14:59 +0000 (07:14 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 8 Aug 2011 07:14:59 +0000 (07:14 +0000)
1  2 
CMakeLists.txt
build_files/scons/tools/btools.py
source/blender/editors/interface/resources.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ops.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/windowmanager/WM_types.h

diff --combined CMakeLists.txt
index e054eb9ce7ed5987ab1b077d33eb4fcef2dcc70b,cf083b87bc77a0f73cfcb7f7f276ae6474f1181f..641e798b0ef00fde66531f239efb210d58336a95
@@@ -178,9 -178,6 +178,9 @@@ 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_RAYOPTIMIZATION   "Enable use of SIMD (SSE) optimizations for the raytracer" ON) 
@@@ -1013,6 -1010,10 +1013,10 @@@ elseif(APPLE
                        if(NOT 3D_CONNEXION_CLIENT_LIBRARY)
                                set(WITH_INPUT_NDOF OFF)
                        endif()
+                       if(WITH_INPUT_NDOF)
+                               set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -weak_framework 3DconnexionClient")
+                       endif()
                endif()
  
        else()
index 5508b8d35cd9754c958af29655d428bdb52deb95,aac16555df98bcc81d520fc9e5bb7435e6f2849c..0259d93f6edf1e1c7c5b64f835cf187192a021b9
@@@ -136,7 -136,7 +136,7 @@@ def validate_arguments(args, bc)
              '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', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC'
+             'BUILDBOT_BRANCH', 'WITH_BF_3DMOUSE', 'FOUND_NDOF_DRIVERS', '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_PROFILE_CFLAGS', 'BF_PROFILE_CCFLAGS', 'BF_PROFILE_CXXFLAGS', 'BF_PROFILE_LINKFLAGS',
              'BF_DEBUG_CFLAGS', 'BF_DEBUG_CCFLAGS', 'BF_DEBUG_CXXFLAGS',
              'C_WARN', 'CC_WARN', 'CXX_WARN',
-             'LLIBS', 'PLATFORM_LINKFLAGS','MACOSX_ARCHITECTURE',
+             'LLIBS', 'PLATFORM_LINKFLAGS','MACOSX_ARCHITECTURE', 'MACOSX_SDK_CHECK', 'XCODE_CUR_VER',
      ]
      
      
@@@ -439,6 -439,7 +439,7 @@@ def read_opts(env, cfg, args)
          (BoolVariable('WITH_BF_NOBLENDER', 'Do not build blender if true', False)),
  
          (BoolVariable('WITH_BF_3DMOUSE', 'Build blender with support of 3D mouses', False)),
+         (BoolVariable('FOUND_NDOF_DRIVERS', 'We detected NDOF libs or framework', False)),
          (BoolVariable('WITH_BF_STATIC3DMOUSE', 'Staticly link to 3d mouse library', False)),
          ('BF_3DMOUSE', '3d mouse library base path', ''),
          ('BF_3DMOUSE_INC', '3d mouse library include path', ''),
          ('LLIBS', 'Platform libs', []),
          ('PLATFORM_LINKFLAGS', 'Platform linkflags', []),
          ('MACOSX_ARCHITECTURE', 'python_arch.zip select', ''),
+         ('MACOSX_SDK_CHECK', 'detect available OSX sdk`s', ''),
+         ('XCODE_CUR_VER', 'detect XCode version', ''),
  
          (BoolVariable('BF_PROFILE', 'Add profiling information if true', False)),
          ('BF_PROFILE_CFLAGS', 'C only profiling flags', []),
          (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 aeacdac5d141eaed557c178af9324bb7a7cc3856,e71f709f89b8127f19b340ef7722cb025b49d750..3c5ce0bc3e5f72e1276f803a55acf50e57910263
@@@ -161,9 -161,6 +161,9 @@@ const unsigned char *UI_ThemeGetColorPt
                        case SPACE_LOGIC:
                                ts= &btheme->tlogic;
                                break;
 +                      case SPACE_CLIP:
 +                              ts= &btheme->tclip;
 +                              break;
                        default:
                                ts= &btheme->tv3d;
                                break;
                        case TH_PREVIEW_BACK:
                                cp= ts->preview_back;
                                break;  
 +
 +                      case TH_MARKER_OUTLINE:
 +                              cp= ts->marker_outline; break;
 +                      case TH_MARKER:
 +                              cp= ts->marker; break;
 +                      case TH_ACT_MARKER:
 +                              cp= ts->act_marker; break;
 +                      case TH_SEL_MARKER:
 +                              cp= ts->sel_marker; break;
 +                      case TH_BUNDLE_SOLID:
 +                              cp= ts->bundle_solid; break;
 +                      case TH_DIS_MARKER:
 +                              cp= ts->dis_marker; break;
 +                      case TH_PATH_BEFORE:
 +                              cp= ts->path_before; break;
 +                      case TH_PATH_AFTER:
 +                              cp= ts->path_after; break;
 +                      case TH_CAMERA_PATH:
 +                              cp= ts->camera_path; break;
 +                      case TH_LOCK_MARKER:
 +                              cp= ts->lock_marker; break;
                        }
                }
        }
@@@ -561,7 -537,6 +561,7 @@@ static void ui_theme_init_new(bTheme *b
        ui_theme_init_new_do(&btheme->tlogic);
        ui_theme_init_new_do(&btheme->tuserpref);
        ui_theme_init_new_do(&btheme->tconsole);
 +      ui_theme_init_new_do(&btheme->tclip);
        
  }
  
@@@ -667,9 -642,7 +667,9 @@@ void ui_theme_init_default(void
  
        SETCOL(btheme->tv3d.bone_solid, 200, 200, 200, 255);
        SETCOL(btheme->tv3d.bone_pose, 80, 200, 255, 80);               // alpha 80 is not meant editable, used for wire+action draw
 -      
 +
 +      SETCOL(btheme->tv3d.bundle_solid, 200, 200, 200, 255);
 +      SETCOL(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255);
        
        /* space buttons */
        /* to have something initialized */
        btheme->tlogic= btheme->tv3d;
        SETCOL(btheme->tlogic.back, 100, 100, 100, 255);
        
 +      /* space clip */
 +      btheme->tclip= btheme->tv3d;
 +
 +      SETCOL(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255);
 +      SETCOL(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255);
 +      SETCOL(btheme->tclip.act_marker, 0xff, 0xff, 0xff, 255);
 +      SETCOL(btheme->tclip.sel_marker, 0xff, 0xff, 0x00, 255);
 +      SETCOL(btheme->tclip.dis_marker, 0x7f, 0x00, 0x00, 255);
 +      SETCOL(btheme->tclip.lock_marker, 0x7f, 0x7f, 0x7f, 255);
 +      SETCOL(btheme->tclip.path_before, 0xff, 0x00, 0x00, 255);
 +      SETCOL(btheme->tclip.path_after, 0x00, 0x00, 0xff, 255);
  }
  
  
@@@ -1595,37 -1557,13 +1595,37 @@@ void init_userdef_do_versions(void
                U.autokey_flag &= ~AUTOKEY_FLAG_ONLYKEYINGSET;
        }
  
-       if (bmain->versionfile < 258 || (bmain->versionfile == 258 && bmain->subversionfile < 1)) {
+       if (bmain->versionfile < 258 || (bmain->versionfile == 258 && bmain->subversionfile < 2)) {
                bTheme *btheme;
                for(btheme= U.themes.first; btheme; btheme= btheme->next) {
                        btheme->tnode.noodle_curving = 5;
                }
        }
  
 +      {
 +              bTheme *btheme;
 +              for(btheme= U.themes.first; btheme; btheme= btheme->next) {
 +                      if(btheme->tv3d.bundle_solid[3] == 0)
 +                              SETCOL(btheme->tv3d.bundle_solid, 200, 200, 200, 255);
 +
 +                      if(btheme->tv3d.camera_path[3] == 0)
 +                              SETCOL(btheme->tv3d.camera_path, 0x00, 0x00, 0x00, 255);
 +
 +                      if((btheme->tclip.back[3]) == 0) {
 +                              btheme->tclip= btheme->tv3d;
 +
 +                              SETCOL(btheme->tclip.marker_outline, 0x00, 0x00, 0x00, 255);
 +                              SETCOL(btheme->tclip.marker, 0x7f, 0x7f, 0x00, 255);
 +                              SETCOL(btheme->tclip.act_marker, 0xff, 0xff, 0xff, 255);
 +                              SETCOL(btheme->tclip.sel_marker, 0xff, 0xff, 0x00, 255);
 +                              SETCOL(btheme->tclip.dis_marker, 0x7f, 0x00, 0x00, 255);
 +                              SETCOL(btheme->tclip.lock_marker, 0x7f, 0x7f, 0x7f, 255);
 +                              SETCOL(btheme->tclip.path_before, 0xff, 0x00, 0x00, 255);
 +                              SETCOL(btheme->tclip.path_after, 0x00, 0x00, 0xff, 255);
 +                      }
 +              }
 +      }
 +
        /* GL Texture Garbage Collection (variable abused above!) */
        if (U.textimeout == 0) {
                U.texcollectrate = 60;
index 7f7bc0e63a71ec3cad7e204d9043bced63495631,c1c812e8c68d3f6121a647e5b59e6977d43cafb4..190d93b176beb7cbfa6d2799e42515678b601b49
@@@ -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);
                        else view_editmove(event->type);
                        t->redraw= 1;
                        break;
- #if 0
-               case NDOF_MOTION:
-                       // should have been caught by tranform_modal
-                       return OPERATOR_PASS_THROUGH;
- #endif
                default:
                        handled = 0;
                        break;
                                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 -1519,6 +1561,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 -3287,7 +3334,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;
index 4fa15ac85c4c4847e57d4a1b13fb4632e834384a,485344875d445761152616c484681b232ffea110..d95bb0e73aab296194e6c533c33a16402ac8dbe6
@@@ -67,14 -67,6 +67,6 @@@ struct wmTimer
  struct ARegion;
  struct ReportList;
  
- typedef struct NDofInput {
-       int             flag;
-       int             axis;
-       float   fval[7];
-       float   factor[3];
- } NDofInput;
  /*
        The ctrl value has different meaning:
                0                       : No value has been typed
@@@ -273,7 -265,6 +265,6 @@@ typedef struct TransInfo 
        TransCon    con;            /* transformed constraint               */
        TransSnap       tsnap;
        NumInput    num;            /* numerical input                      */
-       NDofInput   ndof;           /* ndof input                           */
        MouseInput      mouse;                  /* mouse input                          */
        char        redraw;         /* redraw flag                          */
        float           prop_size;              /* proportional circle radius           */
  
  /* ******************** Macros & Prototypes *********************** */
  
- /* NDOFINPUT FLAGS */
- #define NDOF_INIT                     1
  /* transinfo->state */
  #define TRANS_STARTING  0
  #define TRANS_RUNNING 1
  
  #define T_RELEASE_CONFIRM     (1 << 23)
  
 +      /* relative position changes. used to add offset to tracking markers */
 +#define T_RELATIVE_POSITION   (1 << 24)
 +
  /* TransInfo->modifiers */
  #define       MOD_CONSTRAINT_SELECT   0x01
  #define       MOD_PRECISION                   0x02
@@@ -563,7 -548,6 +551,7 @@@ void flushTransParticles(TransInfo *t)
  int clipUVTransform(TransInfo *t, float *vec, int resize);
  void flushTransNodes(TransInfo *t);
  void flushTransSeq(TransInfo *t);
 +void flushTransTracking(TransInfo *t);
  
  /*********************** exported from transform_manipulator.c ********** */
  int gimbal_axis(struct Object *ob, float gmat[][3]); /* return 0 when no gimbal for selection */
@@@ -687,20 -671,6 +675,6 @@@ void calculatePropRatio(TransInfo *t)
  
  void getViewVector(TransInfo *t, float coord[3], float vec[3]);
  
- /*********************** NDofInput ********************************/
- void initNDofInput(NDofInput *n);
- int hasNDofInput(NDofInput *n);
- void applyNDofInput(NDofInput *n, float *vec);
- int handleNDofInput(NDofInput *n, struct wmEvent *event);
- /* handleNDofInput return values */
- #define NDOF_REFRESH  1
- #define NDOF_NOMOVE           2
- #define NDOF_CONFIRM  3
- #define NDOF_CANCEL           4
  /*********************** Transform Orientations ******************************/
  
  void initTransformOrientation(struct bContext *C, TransInfo *t);
index c22fef8c66063a0e349694a04829e4a3a604b02f,306796efee9c08ea3d01ac998f26fe4d754734c8..44b8afcb8bbdeb60e865a3a2f133310055beb1e8
@@@ -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,48 -841,6 +844,48 @@@ 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) {
 +                              if(TRACK_VIEW_SELECTED(sc, 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_VIEW_SELECTED(sc, 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)
@@@ -1210,7 -1165,6 +1210,6 @@@ int initTransInfo (bContext *C, TransIn
        
        setTransformViewMatrices(t);
        initNumInput(&t->num);
-       initNDofInput(&t->ndof);
        
        return 1;
  }
index a6c8d1fd82d2016b1be475f1ad278c4a2ba7ed27,231293024f035d0d2d56f143f579d360e2aa745b..7754d9973a33d85c0c6cd4e5621e1f8291526bf2
@@@ -360,17 -360,14 +360,14 @@@ static int transform_modal(bContext *C
  
        TransInfo *t = op->customdata;
  
      #if 0
+ #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
+ #endif
  
        /* XXX insert keys are called here, and require context */
        t->context= C;
@@@ -978,11 -975,6 +975,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 738802feba370b992437015c60057affdadefbb0,a685c6deb342e36654711f91480b78b5990f5bd6..bc8a169cff6de357f615f0ddb0e0dcb15738ceb9
@@@ -1003,21 -1003,8 +1003,21 @@@ static void rna_def_userdef_theme_space
        RNA_def_property_range(prop, 1, 5);
        RNA_def_property_ui_text(prop, "Outline Width", "");
        RNA_def_property_update(prop, 0, "rna_userdef_update");
 +
 +      prop= RNA_def_property(srna, "bundle_solid", PROP_FLOAT, PROP_COLOR_GAMMA);
 +      RNA_def_property_float_sdna(prop, NULL, "bundle_solid");
 +      RNA_def_property_array(prop, 3);
 +      RNA_def_property_ui_text(prop, "Bundle Solid", "");
 +      RNA_def_property_update(prop, 0, "rna_userdef_update");
 +
 +      prop= RNA_def_property(srna, "camera_path", PROP_FLOAT, PROP_COLOR_GAMMA);
 +      RNA_def_property_float_sdna(prop, NULL, "camera_path");
 +      RNA_def_property_array(prop, 3);
 +      RNA_def_property_ui_text(prop, "Camera Path", "");
 +      RNA_def_property_update(prop, 0, "rna_userdef_update");
  }
  
 +
  static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
  {
        StructRNA *srna;
@@@ -1758,68 -1745,6 +1758,68 @@@ static void rna_def_userdef_theme_color
        RNA_def_property_update(prop, 0, "rna_userdef_update");
  }
  
 +static void rna_def_userdef_theme_space_clip(BlenderRNA *brna)
 +{
 +      StructRNA *srna;
 +      PropertyRNA *prop;
 +
 +      /* space_clip */
 +
 +      srna= RNA_def_struct(brna, "ThemeClipEditor", NULL);
 +      RNA_def_struct_sdna(srna, "ThemeSpace");
 +      RNA_def_struct_ui_text(srna, "Theme Clip Editor", "Theme settings for the Movie Clip Editor");
 +
 +      rna_def_userdef_theme_spaces_main(srna, SPACE_CLIP);
 +
 +      prop= RNA_def_property(srna, "marker_outline", PROP_FLOAT, PROP_COLOR_GAMMA);
 +      RNA_def_property_float_sdna(prop, NULL, "marker_outline");
 +      RNA_def_property_array(prop, 3);
 +      RNA_def_property_ui_text(prop, "Marker Outline Color", "Color of marker's outile");
 +      RNA_def_property_update(prop, 0, "rna_userdef_update");
 +
 +      prop= RNA_def_property(srna, "marker", PROP_FLOAT, PROP_COLOR_GAMMA);
 +      RNA_def_property_float_sdna(prop, NULL, "marker");
 +      RNA_def_property_array(prop, 3);
 +      RNA_def_property_ui_text(prop, "Marker Color", "Color of marker");
 +      RNA_def_property_update(prop, 0, "rna_userdef_update");
 +
 +      prop= RNA_def_property(srna, "active_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
 +      RNA_def_property_float_sdna(prop, NULL, "act_marker");
 +      RNA_def_property_array(prop, 3);
 +      RNA_def_property_ui_text(prop, "Active Marker", "Color of active marker");
 +      RNA_def_property_update(prop, 0, "rna_userdef_update");
 +
 +      prop= RNA_def_property(srna, "selected_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
 +      RNA_def_property_float_sdna(prop, NULL, "sel_marker");
 +      RNA_def_property_array(prop, 3);
 +      RNA_def_property_ui_text(prop, "Selected Marker", "Color of sleected marker");
 +      RNA_def_property_update(prop, 0, "rna_userdef_update");
 +
 +      prop= RNA_def_property(srna, "disabled_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
 +      RNA_def_property_float_sdna(prop, NULL, "dis_marker");
 +      RNA_def_property_array(prop, 3);
 +      RNA_def_property_ui_text(prop, "Disabled Marker", "Color of disabled marker");
 +      RNA_def_property_update(prop, 0, "rna_userdef_update");
 +
 +      prop= RNA_def_property(srna, "locked_marker", PROP_FLOAT, PROP_COLOR_GAMMA);
 +      RNA_def_property_float_sdna(prop, NULL, "lock_marker");
 +      RNA_def_property_array(prop, 3);
 +      RNA_def_property_ui_text(prop, "Locked Marker", "Color of locked marker");
 +      RNA_def_property_update(prop, 0, "rna_userdef_update");
 +
 +      prop= RNA_def_property(srna, "path_before", PROP_FLOAT, PROP_COLOR_GAMMA);
 +      RNA_def_property_float_sdna(prop, NULL, "path_before");
 +      RNA_def_property_array(prop, 3);
 +      RNA_def_property_ui_text(prop, "Path Before", "Color of path before current frame");
 +      RNA_def_property_update(prop, 0, "rna_userdef_update");
 +
 +      prop= RNA_def_property(srna, "path_after", PROP_FLOAT, PROP_COLOR_GAMMA);
 +      RNA_def_property_float_sdna(prop, NULL, "path_after");
 +      RNA_def_property_array(prop, 3);
 +      RNA_def_property_ui_text(prop, "Path After", "Color of path after current frame");
 +      RNA_def_property_update(prop, 0, "rna_userdef_update");
 +}
 +
  static void rna_def_userdef_themes(BlenderRNA *brna)
  {
        StructRNA *srna;
                {15, "INFO", ICON_INFO, "Info", ""},
                {16, "FILE_BROWSER", ICON_FILESEL, "File Browser", ""},
                {17, "CONSOLE", ICON_CONSOLE, "Python Console", ""},
 +          {20, "CLIP_EDITOR", ICON_CLIP, "Movie Clip Editor", ""},
                {0, NULL, 0, NULL, NULL}};
  
        srna= RNA_def_struct(brna, "Theme", NULL);
        RNA_def_property_collection_sdna(prop, NULL, "tarm", "");
        RNA_def_property_struct_type(prop, "ThemeBoneColorSet");
        RNA_def_property_ui_text(prop, "Bone Color Sets", "");
 +
 +      prop= RNA_def_property(srna, "clip_editor", PROP_POINTER, PROP_NONE);
 +      RNA_def_property_flag(prop, PROP_NEVER_NULL);
 +      RNA_def_property_pointer_sdna(prop, NULL, "tclip");
 +      RNA_def_property_struct_type(prop, "ThemeClipEditor");
 +      RNA_def_property_ui_text(prop, "Clip Editor", "");
  }
  
  static void rna_def_userdef_addon(BlenderRNA *brna)
@@@ -2013,7 -1931,6 +2013,7 @@@ static void rna_def_userdef_dothemes(Bl
        rna_def_userdef_theme_space_console(brna);
        rna_def_userdef_theme_space_sound(brna);
        rna_def_userdef_theme_space_logic(brna);
 +      rna_def_userdef_theme_space_clip(brna);
        rna_def_userdef_theme_colorset(brna);
        rna_def_userdef_themes(brna);
  }
@@@ -2852,7 -2769,7 +2852,7 @@@ static void rna_def_userdef_input(Blend
        prop= RNA_def_property(srna, "ndof_orbit_invert_axes", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ORBIT_INVERT_AXES);
        RNA_def_property_ui_text(prop, "Invert Axes", "Toggle between moving the viewpoint or moving the scene being viewed");
-       /* in 3Dx docs, this is called 'object mode' vs. 'target camera mode'
+       /* in 3Dx docs, this is called 'object mode' vs. 'target camera mode' */
  
        /* 3D view: fly */
        prop= RNA_def_property(srna, "ndof_lock_horizon", PROP_BOOLEAN, PROP_NONE);
index a489845881f918763f89ec861e3f9813f7977c42,697133bb163644247b2afcec824241cabe2ac8ab..830ccfa7d1c7337df676a94f681f10d148bc524d
@@@ -163,7 -163,6 +163,7 @@@ typedef struct wmNotifier 
  #define NC_NODE                               (17<<24)
  #define NC_ID                         (18<<24)
  #define NC_LOGIC                      (19<<24)
 +#define NC_MOVIECLIP                  (20<<24)
  
  /* data type, 256 entries is enough, it can overlap */
  #define NOTE_DATA                     0x00FF0000
  #define ND_SPACE_SEQUENCER            (16<<16)
  #define ND_SPACE_NODE_VIEW            (17<<16)
  #define ND_SPACE_CHANGED              (18<<16) /*sent to a new editor type after it's replaced an old one*/
 +#define ND_SPACE_CLIP                 (19<<16)
  
  /* subtype, 256 entries too */
  #define NOTE_SUBTYPE          0x0000FF00
@@@ -391,8 -389,14 +391,14 @@@ typedef struct wmNDOFMotionData 
        /* awfully similar to GHOST_TEventNDOFMotionData... */
        // Each component normally ranges from -1 to +1, but can exceed that.
        // These use blender standard view coordinates, with positive rotations being CCW about the axis.
-       float tvec[3]; // translation
-       float rvec[3]; // rotation:
+       union {
+               float tvec[3]; // translation
+               struct { float tx, ty, tz; };
+               };
+       union {
+               float rvec[3]; // rotation:
+               struct { float rx, ry, rz; };
+               };
                // axis = (rx,ry,rz).normalized
                // amount = (rx,ry,rz).magnitude [in revolutions, 1.0 = 360 deg]
        float dt; // time since previous NDOF Motion event