diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-17 12:13:45 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-02-17 12:13:45 +0400 |
commit | 9d0b7b168fdd69108f095cefed6c3feb0e327ea2 (patch) | |
tree | 7035547fe2c14ec11a3458b3b300bb6aeaa2ba49 /source/blender | |
parent | 5fd24dc3f2f4ad440a7032325fad999b32726c4e (diff) |
Camera tracking: animation datablock for MovieClip
Added AnimData block to MovieClip datablock which allows to animate different properties in clip.
Currently supports animation of stabilization influence only.
--
svn merge -r44129:44130 ^/branches/soc-2011-tomato
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/anim_sys.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/movieclip.c | 3 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 5 | ||||
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 3 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_movieclip_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_movieclip.c | 16 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_tracking.c | 56 |
7 files changed, 89 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index b32421a6b3d..9ae3ad95d5c 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -88,6 +88,7 @@ short id_type_can_have_animdata (ID *id) case ID_LA: case ID_CA: case ID_WO: case ID_SPK: case ID_SCE: + case ID_MC: { return 1; } @@ -2335,6 +2336,9 @@ void BKE_animsys_evaluate_all_animation (Main *main, Scene *scene, float ctime) /* speakers */ EVAL_ANIM_IDS(main->speaker.first, ADT_RECALC_ANIM); + /* movie clips */ + EVAL_ANIM_IDS(main->movieclip.first, ADT_RECALC_ANIM); + /* objects */ /* ADT_RECALC_ANIM doesn't need to be supplied here, since object AnimData gets * this tagged by Depsgraph on framechange. This optimisation means that objects diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index c90faa7e0ca..03fe18e4bd8 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -64,6 +64,7 @@ #include "BLI_mempool.h" #include "BLI_threads.h" +#include "BKE_animsys.h" #include "BKE_constraint.h" #include "BKE_library.h" #include "BKE_global.h" @@ -889,6 +890,8 @@ static void free_buffers(MovieClip *clip) IMB_free_anim(clip->anim); clip->anim= FALSE; } + + BKE_free_animdata((ID *) clip); } void BKE_movieclip_reload(MovieClip *clip) diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index ff737339835..fe80dd7bd90 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6050,6 +6050,8 @@ static void direct_link_movieclip(FileData *fd, MovieClip *clip) MovieTracking *tracking= &clip->tracking; MovieTrackingObject *object; + clip->adt= newdataadr(fd, clip->adt); + if(fd->movieclipmap) clip->cache= newmclipadr(fd, clip->cache); else clip->cache= NULL; @@ -6087,6 +6089,9 @@ static void lib_link_movieclip(FileData *fd, Main *main) clip= main->movieclip.first; while(clip) { if(clip->id.flag & LIB_NEEDLINK) { + if (clip->adt) + lib_link_animdata(fd, &clip->id, clip->adt); + clip->gpd= newlibadr_us(fd, clip->id.lib, clip->gpd); clip->id.flag -= LIB_NEEDLINK; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index ae4bc936193..e221f261d55 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -2564,6 +2564,9 @@ static void write_movieclips(WriteData *wd, ListBase *idbase) MovieTrackingObject *object; writestruct(wd, ID_MC, "MovieClip", 1, clip); + if(clip->adt) + write_animdata(wd, clip->adt); + write_movieTracks(wd, &tracking->tracks); write_movieReconstruction(wd, &tracking->reconstruction); diff --git a/source/blender/makesdna/DNA_movieclip_types.h b/source/blender/makesdna/DNA_movieclip_types.h index 80728cd9817..71029293d09 100644 --- a/source/blender/makesdna/DNA_movieclip_types.h +++ b/source/blender/makesdna/DNA_movieclip_types.h @@ -39,6 +39,7 @@ #include "DNA_tracking_types.h" struct anim; +struct AnimData; struct bGPdata; struct ImBuf; struct MovieClipProxy; @@ -61,6 +62,7 @@ typedef struct MovieClipProxy { typedef struct MovieClip { ID id; + struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ char name[1024]; /* file path, 1024 = FILE_MAX */ diff --git a/source/blender/makesrna/intern/rna_movieclip.c b/source/blender/makesrna/intern/rna_movieclip.c index 1d79040c4eb..a640f996b1a 100644 --- a/source/blender/makesrna/intern/rna_movieclip.c +++ b/source/blender/makesrna/intern/rna_movieclip.c @@ -88,57 +88,70 @@ static void rna_def_movieclip_proxy(BlenderRNA *brna) /* build proxy sized */ prop= RNA_def_property(srna, "build_25", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_SIZE_25); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "25%", "Build proxy resolution 25% of the original footage dimension"); prop= RNA_def_property(srna, "build_50", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_SIZE_50); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "50%", "Build proxy resolution 50% of the original footage dimension"); prop= RNA_def_property(srna, "build_75", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_SIZE_75); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "75%", "Build proxy resolution 75% of the original footage dimension"); prop= RNA_def_property(srna, "build_100", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_SIZE_100); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "100%", "Build proxy resolution 100% of the original footage dimension"); prop= RNA_def_property(srna, "build_undistorted_25", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_UNDISTORTED_SIZE_25); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "25%", "Build proxy resolution 25% of the original undistorted footage dimension"); prop= RNA_def_property(srna, "build_undistorted_50", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_UNDISTORTED_SIZE_50); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "50%", "Build proxy resolution 50% of the original undistorted footage dimension"); prop= RNA_def_property(srna, "build_undistorted_75", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_UNDISTORTED_SIZE_75); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "75%", "Build proxy resolution 75% of the original undistorted footage dimension"); prop= RNA_def_property(srna, "build_undistorted_100", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "build_size_flag", MCLIP_PROXY_UNDISTORTED_SIZE_100); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "100%", "Build proxy resolution 100% of the original undistorted footage dimension"); /* build timecodes */ prop= RNA_def_property(srna, "build_record_run", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flag", IMB_TC_RECORD_RUN); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Rec Run", "Build record run time code index"); prop= RNA_def_property(srna, "build_free_run", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flag", IMB_TC_FREE_RUN); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Free Run", "Build free run time code index"); prop= RNA_def_property(srna, "build_free_run_rec_date", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flag", IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Free Run (Rec Date)", "Build free run time code index using Record Date/Time"); /* quality of proxied image */ prop= RNA_def_property(srna, "quality", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "quality"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Quality", "JPEG quality of proxy images"); RNA_def_property_ui_range(prop, 1, 100, 1, 0); prop= RNA_def_property(srna, "timecode", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "tc"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, clip_tc_items); RNA_def_property_ui_text(prop, "Timecode", ""); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); @@ -146,6 +159,7 @@ static void rna_def_movieclip_proxy(BlenderRNA *brna) /* directory */ prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "dir"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Directory", "Location to store the proxy files"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_MovieClip_reload_update"); } @@ -223,6 +237,7 @@ static void rna_def_movieclip(BlenderRNA *brna) /* use proxy */ prop= RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", MCLIP_USE_PROXY); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Use Proxy / Timecode", "Use a preview proxy and/or timecode index for this clip"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); @@ -247,6 +262,7 @@ static void rna_def_movieclip(BlenderRNA *brna) /* custom proxy directory */ prop= RNA_def_property(srna, "use_proxy_custom_directory", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", MCLIP_USE_PROXY_CUSTOM_DIR); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Proxy Custom Directory", "Create proxy images in a custom directory (default is movie location)"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_MovieClip_reload_update"); diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index aff8a85dd26..ba4e5199f73 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -54,6 +54,11 @@ #include "WM_api.h" +static char *rna_tracking_path(PointerRNA *UNUSED(ptr)) +{ + return BLI_sprintfN("tracking"); +} + static void rna_tracking_defaultSettings_levelsUpdate(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr) { MovieClip *clip= (MovieClip*)ptr->id.data; @@ -88,6 +93,13 @@ static void rna_tracking_defaultSettings_searchUpdate(Main *UNUSED(bmain), Scene settings->default_pattern_size= settings->default_search_size; } +static char *rna_trackingTrack_path(PointerRNA *ptr) +{ + MovieTrackingTrack *track = (MovieTrackingTrack *) ptr->data; + + return BLI_sprintfN("tracking.tracks[\"%s\"]", track->name); +} + static void rna_trackingTracks_begin(CollectionPropertyIterator *iter, PointerRNA *ptr) { MovieClip *clip= (MovieClip*)ptr->id.data; @@ -228,6 +240,11 @@ static void rna_tracking_trackerPyramid_update(Main *UNUSED(bmain), Scene *UNUSE BKE_tracking_clamp_track(track, CLAMP_PYRAMID_LEVELS); } +static char *rna_trackingCamera_path(PointerRNA *UNUSED(ptr)) +{ + return BLI_sprintfN("tracking.camera"); +} + static float rna_trackingCamera_focal_mm_get(PointerRNA *ptr) { MovieClip *clip= (MovieClip*)ptr->id.data; @@ -252,6 +269,11 @@ static void rna_trackingCamera_focal_mm_set(PointerRNA *ptr, float value) camera->focal= value; } +static char *rna_trackingStabilization_path(PointerRNA *UNUSED(ptr)) +{ + return BLI_sprintfN("tracking.stabilization"); +} + static int rna_track_2d_stabilization(CollectionPropertyIterator *UNUSED(iter), void *data) { MovieTrackingTrack *track= (MovieTrackingTrack*)data; @@ -681,11 +703,13 @@ static void rna_def_trackingCamera(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; srna= RNA_def_struct(brna, "MovieTrackingCamera", NULL); + RNA_def_struct_path_func(srna, "rna_trackingCamera_path"); RNA_def_struct_ui_text(srna, "Movie tracking camera data", "Match-moving camera data for tracking"); /* Sensor */ prop= RNA_def_property(srna, "sensor_width", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "sensor_width"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, 500.0f); RNA_def_property_ui_text(prop, "Sensor", "Width of CCD sensor in millimeters"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL); @@ -693,6 +717,7 @@ static void rna_def_trackingCamera(BlenderRNA *brna) /* Focal Length */ prop= RNA_def_property(srna, "focal_length", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "focal"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0001f, 5000.0f); RNA_def_property_float_funcs(prop, "rna_trackingCamera_focal_mm_get", "rna_trackingCamera_focal_mm_set", NULL); RNA_def_property_ui_text(prop, "Focal Length", "Camera's focal length"); @@ -701,6 +726,7 @@ static void rna_def_trackingCamera(BlenderRNA *brna) /* Focal Length in pixels */ prop= RNA_def_property(srna, "focal_length_pixels", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "focal"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.0f, 5000.0f); RNA_def_property_ui_text(prop, "Focal Length", "Camera's focal length"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL); @@ -709,6 +735,7 @@ static void rna_def_trackingCamera(BlenderRNA *brna) prop= RNA_def_property(srna, "units", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "units"); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, camera_units_items); RNA_def_property_ui_text(prop, "Units", "Units used for camera focal length"); @@ -716,24 +743,28 @@ static void rna_def_trackingCamera(BlenderRNA *brna) prop= RNA_def_property(srna, "principal", PROP_FLOAT, PROP_NONE); RNA_def_property_array(prop, 2); RNA_def_property_float_sdna(prop, NULL, "principal"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Principal Point", "Optical center of lens"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, NULL); /* Radial distortion parameters */ prop= RNA_def_property(srna, "k1", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "k1"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_range(prop, -10, 10, .1, 3); RNA_def_property_ui_text(prop, "K1", "First coefficient of third order polynomial radial distortion"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_flushUpdate"); prop= RNA_def_property(srna, "k2", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "k2"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_range(prop, -10, 10, .1, 3); RNA_def_property_ui_text(prop, "K2", "Second coefficient of third order polynomial radial distortion"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_flushUpdate"); prop= RNA_def_property(srna, "k3", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "k3"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_range(prop, -10, 10, .1, 3); RNA_def_property_ui_text(prop, "K3", "Third coefficient of third order polynomial radial distortion"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_flushUpdate"); @@ -741,6 +772,7 @@ static void rna_def_trackingCamera(BlenderRNA *brna) /* pixel aspect */ prop= RNA_def_property(srna, "pixel_aspect", PROP_FLOAT, PROP_XYZ); RNA_def_property_float_sdna(prop, NULL, "pixel_aspect"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0.1f, 5000.0f); RNA_def_property_ui_range(prop, 0.1f, 5000.0f, 1, 2); RNA_def_property_ui_text(prop, "Pixel Aspect Ratio", "Pixel aspect ratio"); @@ -822,6 +854,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna) rna_def_trackingMarker(brna); srna= RNA_def_struct(brna, "MovieTrackingTrack", NULL); + RNA_def_struct_path_func(srna, "rna_trackingTrack_path"); RNA_def_struct_ui_text(srna, "Movie tracking track data", "Match-moving track data for tracking"); RNA_def_struct_ui_icon(srna, ICON_ANIM_DATA); @@ -838,6 +871,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna) RNA_def_property_array(prop, 2); RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 5); RNA_def_property_float_sdna(prop, NULL, "pat_min"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Pattern Min", "Left-bottom corner of pattern area in normalized coordinates relative to marker position"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_trackerPattern_update"); @@ -845,6 +879,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna) RNA_def_property_array(prop, 2); RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 5); RNA_def_property_float_sdna(prop, NULL, "pat_max"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Pattern Max", "Right-bottom corner of pattern area in normalized coordinates relative to marker position"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_trackerPattern_update"); @@ -853,6 +888,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna) RNA_def_property_array(prop, 2); RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 5); RNA_def_property_float_sdna(prop, NULL, "search_min"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Search Min", "Left-bottom corner of search area in normalized coordinates relative to marker position"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_trackerSearch_update"); @@ -860,6 +896,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna) RNA_def_property_array(prop, 2); RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, 5); RNA_def_property_float_sdna(prop, NULL, "search_max"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Search Max", "Right-bottom corner of search area in normalized coordinates relative to marker position"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_trackerSearch_update"); @@ -867,6 +904,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna) prop= RNA_def_property(srna, "frames_limit", PROP_INT, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_sdna(prop, NULL, "frames_limit"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0, SHRT_MAX); RNA_def_property_ui_text(prop, "Frames Limit", "Every tracking cycle, this number of frames are tracked"); @@ -874,6 +912,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna) prop= RNA_def_property(srna, "pattern_match", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_sdna(prop, NULL, "pattern_match"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, pattern_match_items); RNA_def_property_ui_text(prop, "Pattern Match", "Track pattern from given frame when tracking marker to next frame"); @@ -881,6 +920,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna) prop= RNA_def_property(srna, "margin", PROP_INT, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_sdna(prop, NULL, "margin"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 0, 300); RNA_def_property_ui_text(prop, "Margin", "Distance from image boudary at which marker stops tracking"); @@ -888,6 +928,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna) prop= RNA_def_property(srna, "tracker", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, tracker_items); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Tracker", "Tracking algorithm to use"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_trackerAlgorithm_update"); @@ -895,6 +936,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna) prop= RNA_def_property(srna, "pyramid_levels", PROP_INT, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_sdna(prop, NULL, "pyramid_levels"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 1, 16); RNA_def_property_ui_text(prop, "Pyramid levels", "Number of pyramid levels (increase on blurry footage)"); RNA_def_property_update(prop, NC_MOVIECLIP|NA_EDITED, "rna_tracking_trackerPyramid_update"); @@ -919,24 +961,28 @@ static void rna_def_trackingTrack(BlenderRNA *brna) /* use_red_channel */ prop= RNA_def_property(srna, "use_red_channel", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", TRACK_DISABLE_RED); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Use Red Channel", "Use red channel from footage for tracking"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); /* use_green_channel */ prop= RNA_def_property(srna, "use_green_channel", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", TRACK_DISABLE_GREEN); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Use Green Channel", "Use green channel from footage for tracking"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); /* use_blue_channel */ prop= RNA_def_property(srna, "use_blue_channel", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", TRACK_DISABLE_BLUE); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Use Blue Channel", "Use blue channel from footage for tracking"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); /* preview_grayscale */ prop= RNA_def_property(srna, "use_grayscale_preview", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACK_PREVIEW_GRAYSCALE); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Grayscale", "Display what the tracking algorithm sees in the preview"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); @@ -956,6 +1002,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna) /* hide */ prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACK_HIDDEN); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Hide", "Track is hidden"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); @@ -986,12 +1033,14 @@ static void rna_def_trackingTrack(BlenderRNA *brna) /* locked */ prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACK_LOCKED); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Lock", "Track is locked and all changes to it are disabled"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); /* custom color */ prop= RNA_def_property(srna, "use_custom_color", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACK_CUSTOMCOLOR); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Custom Color", "Use custom color instead of theme-defined"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); @@ -1015,11 +1064,13 @@ static void rna_def_trackingStabilization(BlenderRNA *brna) PropertyRNA *prop; srna= RNA_def_struct(brna, "MovieTrackingStabilization", NULL); + RNA_def_struct_path_func(srna, "rna_trackingStabilization_path"); RNA_def_struct_ui_text(srna, "Movie tracking stabilization data", "Match-moving stabilization data for tracking"); /* 2d stabilization */ prop= RNA_def_property(srna, "use_2d_stabilization", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACKING_2D_STABILIZATION); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Use 2D stabilization", "Use 2D stabilization for footage"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_tracking_flushUpdate"); @@ -1040,12 +1091,14 @@ static void rna_def_trackingStabilization(BlenderRNA *brna) /* active track index */ prop= RNA_def_property(srna, "active_track_index", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "act_track"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_funcs(prop, "rna_tracking_stabTracks_active_index_get", "rna_tracking_stabTracks_active_index_set", "rna_tracking_stabTracks_active_index_range"); RNA_def_property_ui_text(prop, "Active Track Index", "Index of active track in stabilization tracks list"); /* autoscale */ prop= RNA_def_property(srna, "use_autoscale", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACKING_AUTOSCALE); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_ui_text(prop, "Autoscale", "Automatically scale footage to cover unfilled areas when stabilizating"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_tracking_flushUpdate"); @@ -1072,6 +1125,7 @@ static void rna_def_trackingStabilization(BlenderRNA *brna) /* use_stabilize_rotation */ prop= RNA_def_property(srna, "use_stabilize_rotation", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACKING_STABILIZE_ROTATION); RNA_def_property_ui_text(prop, "Stabilize Rotation", "Stabilize horizon line on the shot"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, "rna_tracking_flushUpdate"); @@ -1280,6 +1334,7 @@ static void rna_def_tracking(BlenderRNA *brna) rna_def_trackingObject(brna); srna= RNA_def_struct(brna, "MovieTracking", NULL); + RNA_def_struct_path_func(srna, "rna_tracking_path"); RNA_def_struct_ui_text(srna, "Movie tracking data", "Match-moving data for tracking"); /* settings */ @@ -1315,6 +1370,7 @@ static void rna_def_tracking(BlenderRNA *brna) /* active object index */ prop= RNA_def_property(srna, "active_object_index", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "objectnr"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_int_funcs(prop, "rna_tracking_active_object_index_get", "rna_tracking_active_object_index_set", "rna_tracking_active_object_index_range"); RNA_def_property_ui_text(prop, "Active Object Index", "Index of active object"); RNA_def_property_update(prop, NC_MOVIECLIP|ND_DISPLAY, NULL); |