diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-08-04 18:39:37 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-08-04 18:39:37 +0400 |
commit | 6cc4952ca3105a6c044027cb17e86ee57444fc35 (patch) | |
tree | 8745254b52313cffa3f53b52c091f9e797d4a836 /source/blender/editors/space_clip/space_clip.c | |
parent | f56590a5f5b32a2b924eb4ed914794657f2d145b (diff) |
Camera tracking integration
===========================
- Fixed bug with resetting marker's flag for non-transforming
tracks when canceling transformation.
- Fixed bug with keyframing non-selected tracks when initializing
tracking tools.
- Changed selection policy: now invisible parts of marker
can be selected.
- Added operator redo panel to Clip Editor.
- Set Scale operator now uses operator property for scale.
- Added operator "Clean Tracks" which currently checks if tracks
are tracked long enough and can select bad tracks, delete them
or delete tracking segments which are too short.
Diffstat (limited to 'source/blender/editors/space_clip/space_clip.c')
-rw-r--r-- | source/blender/editors/space_clip/space_clip.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index c880ffb3b08..412155443f4 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -124,6 +124,13 @@ static SpaceLink *clip_new(const bContext *UNUSED(C)) ar->regiontype= RGN_TYPE_TOOLS; ar->alignment= RGN_ALIGN_LEFT; + /* tool properties */ + ar= MEM_callocN(sizeof(ARegion), "tool properties for clip"); + + BLI_addtail(&sc->regionbase, ar); + ar->regiontype= RGN_TYPE_TOOL_PROPS; + ar->alignment= RGN_ALIGN_BOTTOM|RGN_SPLIT_PREV; + /* properties view */ ar= MEM_callocN(sizeof(ARegion), "properties for logic"); @@ -282,6 +289,8 @@ static void clip_operatortypes(void) WM_operatortype_append(CLIP_OT_stabilize_2d_add); WM_operatortype_append(CLIP_OT_stabilize_2d_remove); WM_operatortype_append(CLIP_OT_stabilize_2d_select); + + WM_operatortype_append(CLIP_OT_clean_tracks); } static void clip_keymap(struct wmKeyConfig *keyconf) @@ -554,6 +563,27 @@ static void clip_tools_area_draw(const bContext *C, ARegion *ar) ED_region_panels(C, ar, 1, NULL, -1); } +/****************** tool properties region ******************/ + +static void clip_props_area_listener(ARegion *ar, wmNotifier *wmn) +{ + /* context changes */ + switch(wmn->category) { + case NC_WM: + if(wmn->data == ND_HISTORY) + ED_region_tag_redraw(ar); + break; + case NC_SCENE: + if(wmn->data == ND_MODE) + ED_region_tag_redraw(ar); + break; + case NC_SPACE: + if(wmn->data == ND_SPACE_VIEW3D) + ED_region_tag_redraw(ar); + break; + } +} + /****************** properties region ******************/ /* add handlers, stuff you only do once or on area/region changes */ @@ -626,6 +656,19 @@ void ED_spacetype_clip(void) BLI_addhead(&st->regiontypes, art); + /* tool properties */ + art= MEM_callocN(sizeof(ARegionType), "spacetype clip tool properties region"); + art->regionid = RGN_TYPE_TOOL_PROPS; + art->prefsizex= 0; + art->prefsizey= 120; + art->keymapflag= ED_KEYMAP_FRAMES|ED_KEYMAP_UI; + art->listener= clip_props_area_listener; + art->init= clip_tools_area_init; + art->draw= clip_tools_area_draw; + ED_clip_tool_props_register(art); + + BLI_addhead(&st->regiontypes, art); + /* regions: header */ art= MEM_callocN(sizeof(ARegionType), "spacetype clip region"); art->regionid= RGN_TYPE_HEADER; |