Merging r38988 through r38992 from trunk into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 3 Aug 2011 16:39:16 +0000 (16:39 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 3 Aug 2011 16:39:16 +0000 (16:39 +0000)
1  2 
CMakeLists.txt
source/blender/editors/transform/transform_generics.c

diff --combined CMakeLists.txt
@@@ -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)" OFF)
+ 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) 
  if(UNIX AND NOT APPLE)
        option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
@@@ -1001,9 -998,24 +1001,24 @@@ elseif(APPLE
                elseif(WITH_CODEC_QUICKTIME)
                        set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime")
                endif()
+               # XXX - SOME MAC DEV PLEASE TEST WITH THE SDK INSTALLED! 
+               # ALSO SHOULD BE MOVED INTO OWN MODULE WHEN FUNCTIONAL
+               if(WITH_INPUT_NDOF)
+                       # This thread it *should* work and check the framework - campbell
+                       # http://www.cmake.org/pipermail/cmake/2005-December/007740.html
+                       find_library(3D_CONNEXION_CLIENT_LIBRARY
+                               NAMES 3DconnexionClient
+                       )
+                       if(NOT 3D_CONNEXION_CLIENT_LIBRARY)
+                               set(WITH_INPUT_NDOF OFF)
+                       endif()
+               endif()
        else()
                set(PLATFORM_CFLAGS "-pipe -funsigned-char")
                set(PLATFORM_LINKFLAGS "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime")
+               set(WITH_INPUT_NDOF OFF)  # unsupported
        endif()
  
        if(WITH_OPENCOLLADA)
@@@ -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)
@@@ -930,6 -887,7 +930,7 @@@ void resetTransRestrictions(TransInfo *
        t->flag &= ~T_ALL_RESTRICTIONS;
  }
  
+ /* the *op can be NULL */
  int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
  {
        Scene *sce = CTX_data_scene(C);
                }
  
                /* initialize UV transform from */
-               if (RNA_struct_find_property(op->ptr, "correct_uv")) {
+               if (op && 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;