Merging r37863 through r3789 form trunk1 into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 28 Jun 2011 10:06:06 +0000 (10:06 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 28 Jun 2011 10:06:06 +0000 (10:06 +0000)
1  2 
CMakeLists.txt
source/blender/makesdna/DNA_space_types.h
source/blender/makesrna/intern/rna_space.c

diff --combined CMakeLists.txt
index fda6459efbb23954601d5da12c2b0778cfacf035,ad2c6f89c0839c5a812402d0f8f1a7e4db83b6bc..cc8f97ceb40fd00cb0441e4a50b1919a84e4b1a3
@@@ -165,9 -165,6 +165,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_RAYOPTIMIZATION   "Enable use of SIMD (SSE) optimizations for the raytracer" ON) 
  if(UNIX AND NOT APPLE)
@@@ -246,11 -243,24 +246,24 @@@ TEST_SSE_SUPPORT(
  set(WITH_BINRELOC OFF)
  
  # MAXOSX only, set to avoid uninitialized 
- set(EXETYPE "")
+ set(EXETYPE)
+ # C/C++ flags
+ set(PLATFORM_CFLAGS)
  
  # these are added to later on.
- set(C_WARNINGS "")
- set(CXX_WARNINGS "")
+ set(C_WARNINGS)
+ set(CXX_WARNINGS)
+ # libraries to link the binary with passed to target_link_libraries()
+ # known as LLIBS to scons
+ set(PLATFORM_LINKLIBS)
+ # Added to linker flags in setup_liblinks
+ # - CMAKE_EXE_LINKER_FLAGS
+ # - CMAKE_EXE_LINKER_FLAGS_DEBUG
+ set(PLATFORM_LINKFLAGS)
+ set(PLATFORM_LINKFLAGS_DEBUG)
  
  
  # disabled for now, not supported
@@@ -422,24 -432,24 +435,24 @@@ if(UNIX AND NOT APPLE
        endif()
  
        # OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
-       set(LLIBS "-lutil -lc -lm -lpthread -lstdc++")
+       set(PLATFORM_LINKLIBS "-lutil -lc -lm -lpthread -lstdc++")
  
        if(NOT WITH_HEADLESS)
                find_package(X11 REQUIRED)
                find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
                mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
  
-               list(APPEND LLIBS ${X11_X11_LIB})
+               list(APPEND PLATFORM_LINKLIBS ${X11_X11_LIB})
  
                if(WITH_X11_XINPUT)
-                       list(APPEND LLIBS ${X11_Xinput_LIB})
+                       list(APPEND PLATFORM_LINKLIBS ${X11_Xinput_LIB})
                endif()
        endif()
  
        if(CMAKE_SYSTEM_NAME MATCHES "Linux")
                if(NOT WITH_PYTHON_MODULE)
                        # BSD's dont use libdl.so
-                       list(APPEND LLIBS -ldl)
+                       list(APPEND PLATFORM_LINKLIBS -ldl)
                        # binreloc is linux only
                        set(BINRELOC_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/extern/binreloc/include)
                        set(WITH_BINRELOC ON)
@@@ -550,13 -560,15 +563,15 @@@ elseif(WIN32
  
        if(MSVC)
                if(CMAKE_CL_64)
-                       set(LLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
+                       set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
                else()
-                       set(LLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
+                       set(PLATFORM_LINKLIBS ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid)
                endif()
-               
-               set(CMAKE_CXX_FLAGS "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_CONSOLE /D_LIB /nologo /Ob1 /J /W0 /Gd /wd4018 /wd4244 /wd4305 /wd4800 /wd4065 /wd4267 /we4013" CACHE STRING "MSVC MT C++ flags " FORCE)
-               set(CMAKE_C_FLAGS   "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_CONSOLE /D_LIB /nologo /Ob1 /J /W0 /Gd /wd4018 /wd4244 /wd4305 /wd4800 /wd4065 /wd4267 /we4013 /EHsc" CACHE STRING "MSVC MT C++ flags " FORCE)
+               add_definitions(/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_CONSOLE /D_LIB)
+               set(CMAKE_CXX_FLAGS "/nologo /J /W0 /Gd /wd4018 /wd4244 /wd4305 /wd4800 /wd4065 /wd4267 /we4013" CACHE STRING "MSVC MT C++ flags " FORCE)
+               set(CMAKE_C_FLAGS   "/nologo /J /W0 /Gd /wd4018 /wd4244 /wd4305 /wd4800 /wd4065 /wd4267 /we4013 /EHsc" CACHE STRING "MSVC MT C++ flags " FORCE)
  
                if(CMAKE_CL_64)
                        set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
                endif()
                set(JPEG_LIBRARIES libjpeg)
  
-               set(ZLIB ${LIBDIR}/zlib)
-               set(ZLIB_INCLUDE_DIRS ${ZLIB}/include)
-               set(ZLIB_LIBPATH ${ZLIB}/lib)
+               set(ZLIB_INCLUDE_DIRS ${LIBDIR}/zlib/include)
                if(CMAKE_CL_64)
-                       set(ZLIB_LIBRARIES libz)
+                       set(ZLIB_LIBRARIES ${LIBDIR}/zlib/lib/libz.lib)
                else()
-                       set(ZLIB_LIBRARIES zlib)
+                       set(ZLIB_LIBRARIES ${LIBDIR}/zlib/lib/zlib.lib)
                endif()
  
-               set(PTHREADS ${LIBDIR}/pthreads)
-               set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
-               set(PTHREADS_LIBPATH ${PTHREADS}/lib)
-               set(PTHREADS_LIBRARIES pthreadVC2)
-               
-               set(FREETYPE ${LIBDIR}/freetype)
-               set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
-               set(FREETYPE_LIBPATH ${FREETYPE}/lib)
-               set(FREETYPE_LIBRARY freetype2ST)
+               set(PTHREADS_INCLUDE_DIRS ${LIBDIR}/pthreads/include)
+               set(PTHREADS_LIBRARIES ${LIBDIR}/pthreads/lib/pthreadVC2.lib)
+               set(FREETYPE_INCLUDE_DIRS
+                       ${FREETYPE}/include
+                       ${FREETYPE}/include/freetype2
+               )
+               set(FREETYPE_LIBRARY ${LIBDIR}/freetype/lib/freetype2ST.lib)
  
                if(WITH_FFTW3)
                        set(FFTW3 ${LIBDIR}/fftw3)
                endif()
  
                if(WITH_CODEC_FFMPEG)
-                       set(FFMPEG ${LIBDIR}/ffmpeg)
-                       set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include ${FFMPEG}/include/msvc)
-                       set(FFMPEG_LIBRARIES avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
-                       set(FFMPEG_LIBPATH ${FFMPEG}/lib)
+                       set(FFMPEG_INCLUDE_DIRS
+                               ${LIBDIR}/ffmpeg/include
+                               ${LIBDIR}/ffmpeg/include/msvc
+                       )
+                       set(FFMPEG_LIBRARIES
+                               ${LIBDIR}/ffmpeg/lib/avcodec-52.lib
+                               ${LIBDIR}/ffmpeg/lib/avformat-52.lib
+                               ${LIBDIR}/ffmpeg/lib/avdevice-52.lib
+                               ${LIBDIR}/ffmpeg/lib/avutil-50.lib
+                               ${LIBDIR}/ffmpeg/lib/swscale-0.lib
+                       )
                endif()
  
                if(WITH_IMAGE_OPENEXR)
                endif()
  
                if(WITH_IMAGE_TIFF)
-                       set(TIFF ${LIBDIR}/tiff)
-                       set(TIFF_LIBRARY libtiff)
-                       set(TIFF_INCLUDE_DIR ${TIFF}/include)
-                       set(TIFF_LIBPATH ${TIFF}/lib)
+                       set(TIFF_LIBRARY ${LIBDIR}/tiff/lib/libtiff.lib)
+                       set(TIFF_INCLUDE_DIR ${LIBDIR}/tiff/include)
                endif()
  
                if(WITH_JACK)
-                       set(JACK ${LIBDIR}/jack)
-                       set(JACK_INCLUDE_DIRS ${JACK}/include/jack ${JACK}/include)
-                       set(JACK_LIBRARIES libjack)
-                       set(JACK_LIBPATH ${JACK}/lib)
+                       set(JACK_INCLUDE_DIRS
+                               ${LIBDIR}/jack/include/jack
+                               ${LIBDIR}/jack/include
+                       )
+                       set(JACK_LIBRARIES ${LIBDIR}/jack/lib/libjack.lib)
                endif()
  
                if(WITH_PYTHON)
                        set(PYTHON_LIBRARIES ${LIBDIR}/python/lib/python32.lib)
                endif()
  
+               set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /STACK:2097152 /INCREMENTAL:NO  /NODEFAULTLIB:msvcrt.lib\;msvcmrt.lib\;msvcurt.lib\;msvcrtd.lib ")
                # MSVC only, Mingw doesnt need
                if(CMAKE_CL_64)
-                       set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /MACHINE:X64 /STACK:2097152 /OPT:NOREF /INCREMENTAL:NO /NODEFAULTLIB:\"msvcrt.lib\" /NODEFAULTLIB:\"msvcmrt.lib\" /NODEFAULTLIB:\"msvcurt.lib\" /NODEFAULTLIB:\"msvcrtd.lib\" ")
+                       set(PLATFORM_LINKFLAGS "/MACHINE:X64 /OPT:NOREF ${PLATFORM_LINKFLAGS}")
                else()
-                       set(PLATFORM_LINKFLAGS "/SUBSYSTEM:CONSOLE /MACHINE:IX86 /STACK:2097152 /INCREMENTAL:NO /LARGEADDRESSAWARE /NODEFAULTLIB:\"msvcrt.lib\" /NODEFAULTLIB:\"msvcmrt.lib\" /NODEFAULTLIB:\"msvcurt.lib\" /NODEFAULTLIB:\"msvcrtd.lib\" ")
+                       set(PLATFORM_LINKFLAGS "/MACHINE:IX86 /LARGEADDRESSAWARE ${PLATFORM_LINKFLAGS}")
                endif()
  
-               set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
+               set(PLATFORM_LINKFLAGS_DEBUG "/NODEFAULTLIB:libcmt.lib\;libc.lib")
  
        else()
                # keep GCC spesific stuff here
                if(CMAKE_COMPILER_IS_GNUCC)
-                       set(LLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid")
+                       set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid")
                        set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
  
-                       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
-                       set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
+                       add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
                endif()
  
                add_definitions(-DFREE_WINDOWS)
@@@ -925,7 -941,7 +944,7 @@@ elseif(APPLE
                set(SAMPLERATE_LIBPATH ${SAMPLERATE}/lib)
        endif()
  
-       set(LLIBS stdc++ SystemStubs)
+       set(PLATFORM_LINKLIBS stdc++ SystemStubs)
  
        if(WITH_COCOA)
                set(PLATFORM_CFLAGS "-pipe -funsigned-char -DGHOST_COCOA")
@@@ -1149,6 -1165,18 +1168,18 @@@ elseif(CMAKE_C_COMPILER_ID MATCHES "Int
  
  endif()
  
+ # MSVC2010 fails to links C++ libs right
+ if(MSVC10)
+       if(WITH_IMAGE_OPENEXR)
+               message(WARNING "MSVC 2010 does not support OpenEXR, disabling WITH_IMAGE_OPENEXR. To enable support use Use MSVC 2008")
+               set(WITH_IMAGE_OPENEXR OFF)
+       endif()
+       if(WITH_OPENCOLLADA)
+               message(WARNING "MSVC 2010 does not support OpenCollada, disabling WITH_OPENCOLLADA. To enable support use Use MSVC 2008")
+               set(WITH_OPENCOLLADA OFF)
+       endif()
+ endif()
  if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
        if(WITH_IK_ITASC OR WITH_MOD_FLUID)
                message(WARNING "Using Clang as CXX compiler: disabling WITH_IK_ITASC and WITH_MOD_FLUID, these features will be missing.")
index 4844ded574330703b10d1302c1bb57f89ef6e38b,ff9f2269f53f1c3cd71e09056a8e7d0cf26b8457..e5b9c3f374b72d1fb4666bc7c99ac38e6ab7258a
@@@ -39,7 -39,6 +39,7 @@@
  #include "DNA_vec_types.h"
  #include "DNA_outliner_types.h"               /* for TreeStoreElem */
  #include "DNA_image_types.h"  /* ImageUser */
 +#include "DNA_movieclip_types.h"      /* MovieClipUser */
  /* Hum ... Not really nice... but needed for spacebuts. */
  #include "DNA_view2d_types.h"
  
@@@ -65,7 -64,6 +65,7 @@@ struct bScreen
  struct Scene;
  struct wmOperator;
  struct wmTimer;
 +struct MovieClip;
  
        /**
         * The base structure all the other spaces
@@@ -564,30 -562,6 +564,30 @@@ typedef struct SpaceSound 
        int pad2;
  } SpaceSound;
  
 +typedef struct SpaceClip {
 +      SpaceLink *next, *prev;
 +      ListBase regionbase;            /* storage of regions for inactive spaces */
 +      int spacetype;
 +
 +      float xof, yof;                         /* user defined offset, image is centered */
 +      float zoom;                                     /* user defined zoom level */
 +
 +      struct MovieClipUser user;      /* user of clip */
 +      struct MovieClip *clip;         /* clip data */
 +
 +      int flag;                                       /* flags */
 +      int debug_flag;                         /* flags for debugging */
 +
 +      int path_length;                        /* length of displaying path, in frames */
 +
 +      /* ** some runtime vars which aren't really in file ** */
 +      /* marker data displayed in panel */
 +      float marker_pos[2];                                            /* position of marker in pixel coords */
 +      float track_pat_pos[2], track_pat[2];           /* position and dimensions of marker pattern in pixel coords */
 +      float track_search_pos[2], track_search[2];     /* position and dimensions of marker search in pixel coords */
 +      int marker_flag;                                                        /* marker's flags */
 +} SpaceClip;
 +
  /* view3d  Now in DNA_view3d_types.h */
  
  
@@@ -780,7 -754,7 +780,7 @@@ enum FileSortTypeE 
  #define SI_EDITTILE           (1<<1)
  #define SI_CLIP_UV            (1<<2)
  #define SI_DRAWTOOL           (1<<3)
- #define SI_DEPRECATED1  (1<<4)        /* stick UVs to others in the same location */
+ #define SI_NO_DRAWFACES       (1<<4)
  #define SI_DRAWSHADOW   (1<<5)
  #define SI_SELACTFACE   (1<<6)        /* deprecated */
  #define SI_DEPRECATED2        (1<<7)
@@@ -922,7 -896,6 +922,7 @@@ enum 
  #define TIME_ALL_IMAGE_WIN            64
  #define TIME_CONTINUE_PHYSICS 128
  #define TIME_NODES                            256
 +#define TIME_CLIPS                            512
  
  /* time->cache */
  #define TIME_CACHE_DISPLAY            1
  #define SEQ_PROXY_RENDER_SIZE_75        75
  #define SEQ_PROXY_RENDER_SIZE_FULL      100
  
 +/* SpaceClip->flag */
 +#define SC_SHOW_MARKER_PATTERN        (1<<0)
 +#define SC_SHOW_MARKER_SEARCH (1<<1)
 +#define SC_LOCK_SELECTION             (1<<2)
 +#define SC_SHOW_TINY_MARKER           (1<<3)
 +#define SC_SHOW_MARKER_PATH           (1<<4)
 +
 +/* SpaceClip->debug_flag */
 +#define SC_DBG_SHOW_CACHE     (1<<0)
 +
  
  /* space types, moved from DNA_screen_types.h */
  /* Do NOT change order, append on end. types are hardcoded needed */
@@@ -993,8 -956,7 +993,8 @@@ enum 
        SPACE_LOGIC,
        SPACE_CONSOLE,
        SPACE_USERPREF,
 -      SPACEICONMAX = SPACE_USERPREF
 +      SPACE_CLIP,
 +      SPACEICONMAX = SPACE_CLIP
  };
  
  #endif
index 139d2ec3168a008904caca455edbead0d4132b11,b79d5395eec7a668e757a3e68b5cbff9070c4a10..b2c6c873885f75064fbd2fd07c6481eb93e5dd1a
@@@ -69,7 -69,6 +69,7 @@@ EnumPropertyItem space_type_items[] = 
        {SPACE_LOGIC, "LOGIC_EDITOR", 0, "Logic Editor", ""},
        {SPACE_CONSOLE, "CONSOLE", 0, "Python Console", ""},
        {SPACE_USERPREF, "USER_PREFERENCES", 0, "User Preferences", ""},
 +      {SPACE_CLIP, "CLIP_EDITOR", 0, "Clip Editor", ""},
        {0, NULL, 0, NULL, NULL}};
  
  static EnumPropertyItem draw_channels_items[] = {
@@@ -123,7 -122,6 +123,7 @@@ EnumPropertyItem viewport_shade_items[
  #include "ED_screen.h"
  #include "ED_view3d.h"
  #include "ED_sequencer.h"
 +#include "ED_clip.h"
  
  #include "IMB_imbuf_types.h"
  
@@@ -170,8 -168,6 +170,8 @@@ static StructRNA* rna_Space_refine(stru
                        return &RNA_SpaceConsole;
                case SPACE_USERPREF:
                        return &RNA_SpaceUserPreferences;
 +              case SPACE_CLIP:
 +                      return &RNA_SpaceClipEditor;
                default:
                        return &RNA_Space;
        }
@@@ -897,13 -893,6 +897,13 @@@ static EnumPropertyItem *rna_SpacePrope
        return item;
  }
  
 +static void rna_SpaceClipEditor_clip_set(PointerRNA *ptr, PointerRNA value)
 +{
 +      SpaceClip *sc= (SpaceClip*)(ptr->data);
 +
 +      ED_space_clip_set(NULL, sc, (MovieClip*)value.data);
 +}
 +
  #else
  
  static void rna_def_space(BlenderRNA *brna)
@@@ -1001,7 -990,12 +1001,12 @@@ static void rna_def_space_image_uv(Blen
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_COORDFLOATS);
        RNA_def_property_ui_text(prop, "Normalized Coordinates", "Display UV coordinates from 0.0 to 1.0 rather than in pixels");
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
-       
+       prop= RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SI_NO_DRAWFACES);
+       RNA_def_property_ui_text(prop, "Draw Faces", "Draw faces over the image");
+       RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
        prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ);
        RNA_def_property_array(prop, 2);
        RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_cursor_location_get", "rna_SpaceImageEditor_cursor_location_set", NULL);
@@@ -1107,45 -1101,21 +1112,45 @@@ static void rna_def_background_image(Bl
                {(1<<RV3D_VIEW_CAMERA), "CAMERA", 0, "Camera", "Show background image in camera view"},
                {0, NULL, 0, NULL, NULL}};
  
 +      static EnumPropertyItem bgpic_source_items[] = {
 +              {V3D_BGPIC_IMAGE, "IMAGE", 0, "Image", ""},
 +              {V3D_BGPIC_MOVIE, "MOVIE", 0, "Movie", ""},
 +          {0, NULL, 0, NULL, NULL}
 +      };
 +
        srna= RNA_def_struct(brna, "BackgroundImage", NULL);
        RNA_def_struct_sdna(srna, "BGpic");
        RNA_def_struct_ui_text(srna, "Background Image", "Image and settings for display in the 3d View background");
  
 +      prop= RNA_def_property(srna, "source", PROP_ENUM, PROP_NONE);
 +      RNA_def_property_enum_sdna(prop, NULL, "source");
 +      RNA_def_property_enum_items(prop, bgpic_source_items);
 +      RNA_def_property_ui_text(prop, "Background Source", "Data source used for background");
 +      RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
 +
        prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "ima");
        RNA_def_property_ui_text(prop, "Image", "Image displayed and edited in this space");
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
  
 +      prop= RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
 +      RNA_def_property_pointer_sdna(prop, NULL, "clip");
 +      RNA_def_property_ui_text(prop, "MovieClip", "Movie clip displayed and edited in this space");
 +      RNA_def_property_flag(prop, PROP_EDITABLE);
 +      RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
 +
        prop= RNA_def_property(srna, "image_user", PROP_POINTER, PROP_NONE);
        RNA_def_property_flag(prop, PROP_NEVER_NULL);
        RNA_def_property_pointer_sdna(prop, NULL, "iuser");
        RNA_def_property_ui_text(prop, "Image User", "Parameters defining which layer, pass and frame of the image is displayed");
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
 +
 +      prop= RNA_def_property(srna, "clip_user", PROP_POINTER, PROP_NONE);
 +      RNA_def_property_flag(prop, PROP_NEVER_NULL);
 +      RNA_def_property_pointer_sdna(prop, NULL, "cuser");
 +      RNA_def_property_ui_text(prop, "Clip User", "Parameters defining which frame of the movie clip is displayed");
 +      RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
        
        prop= RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_NONE);
        RNA_def_property_float_sdna(prop, NULL, "xof");
@@@ -2596,75 -2566,6 +2601,75 @@@ static void rna_def_space_logic(Blender
  
  }
  
 +static void rna_def_space_clip(BlenderRNA *brna)
 +{
 +      StructRNA *srna;
 +      PropertyRNA *prop;
 +
 +      srna= RNA_def_struct(brna, "SpaceClipEditor", "Space");
 +      RNA_def_struct_sdna(srna, "SpaceClip");
 +      RNA_def_struct_ui_text(srna, "Space Clip Editor", "Clip editor space data");
 +
 +      /* movieclip */
 +      prop= RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
 +      RNA_def_property_flag(prop, PROP_EDITABLE);
 +      RNA_def_property_ui_text(prop, "Movie Clip", "Movie clip displayed and edited in this space");
 +      RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceClipEditor_clip_set", NULL, NULL);
 +      RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
 +
 +      /* clip user */
 +      prop= RNA_def_property(srna, "clip_user", PROP_POINTER, PROP_NONE);
 +      RNA_def_property_flag(prop, PROP_NEVER_NULL);
 +      RNA_def_property_pointer_sdna(prop, NULL, "user");
 +      RNA_def_property_ui_text(prop, "Movie Clip User", "Parameters defining which frame of the movie clip is displayed");
 +      RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
 +
 +      /* show pattern */
 +      prop= RNA_def_property(srna, "show_marker_pattern", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_ui_text(prop, "Show Marker Pattern", "Show pattern boundbox for markers");
 +      RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_MARKER_PATTERN);
 +      RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
 +
 +      /* show search */
 +      prop= RNA_def_property(srna, "show_marker_search", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_ui_text(prop, "Show Marker Search", "Show search boundbox for markers");
 +      RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_MARKER_SEARCH);
 +      RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
 +
 +      /* lock to selection */
 +      prop= RNA_def_property(srna, "lock_selection", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_ui_text(prop, "Lock to Selection", "Lock viewport to selected markers during playback");
 +      RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_LOCK_SELECTION);
 +      RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
 +
 +      /* show markers pathes */
 +      prop= RNA_def_property(srna, "show_marker_path", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_MARKER_PATH);
 +      RNA_def_property_ui_text(prop, "Show Marker Path", "Show path of markers");
 +      RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
 +
 +      /* path length */
 +      prop= RNA_def_property(srna, "path_length", PROP_INT, PROP_NONE);
 +      RNA_def_property_int_sdna(prop, NULL, "path_length");
 +      RNA_def_property_range(prop, 0, 50);
 +      RNA_def_property_ui_text(prop, "Path Length", "Length of displaying path, in frames");
 +      RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
 +
 +      /* ** debug flags ** */
 +
 +      /* show cache */
 +      prop= RNA_def_property(srna, "show_cache", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_ui_text(prop, "Show Cache", "Show cached frames for current clip");
 +      RNA_def_property_boolean_sdna(prop, NULL, "debug_flag", SC_DBG_SHOW_CACHE);
 +      RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
 +
 +      /* show tiny markers */
 +      prop= RNA_def_property(srna, "show_tiny_markers", PROP_BOOLEAN, PROP_NONE);
 +      RNA_def_property_ui_text(prop, "Show Tiny Markers", "Show markers tiny");
 +      RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_TINY_MARKER);
 +      RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
 +}
 +
  void RNA_def_space(BlenderRNA *brna)
  {
        rna_def_space(brna);
        rna_def_space_userpref(brna);
        rna_def_space_node(brna);
        rna_def_space_logic(brna);
 +      rna_def_space_clip(brna);
  }
  
  #endif