This repository has been archived on 2023-10-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
blender-archive/source/blender/editors/space_clip/space_clip.c

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

1434 lines
41 KiB
C
Raw Normal View History

Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
Camera tracking integraiton =========================== - Corrected copyrights in my new files header. - Added debug option to dump as PNG image content of search areas tracking between which was failed. - Removed internal tracking settings like pyramid level and tolerance. Weren't useful neither for me nor for artists. - Fixed bug in BKE_tracking_get_marker which could lead to failure of getting marker for current frame when there's marker for requested frame. - Fixed bug with disappearing markers after tracking for cases when marker was added at frame different from tracking start frame and tracking start frame is equal to tracking end frame. - Stop tracking when no markers could be tracked. - Changed marker selection rules: * If marker isn't selected, all it's areas are getting selected with mouse. * If marker is selected and selection type doesn't have "extend" mode (SHIFT isn't holded down) the nearest to mouse cursor area would be selected. All the reast areas would loose selection. - Limit number of frames which would be used in "Track Markers" operator. So now you could easily track along 10/20/etc frames. - Change scene current frame after "Track Markers" operator. - Implemented speed limitors. Now tracking could happen: * As fast as possible * With reatime speed (scene FPS) * With half of realtime speed * With quarter of realtime speed. - Got rid of orig_user in MovieTrackingContext and user in TrackMarkersJob. This prevents crashes when user joins some space to SpaceClip from which tracking was started. - Made keyframes on path bigger and do not draw keyframes for non-selected markers. TODO: need to get rid of storing main, scene and screen in TrackMarkersJob. This is needed to set scene's current frame after tracking (such behavior is comfortable for artists) but this could lead to crash if scene is getting removed when tracking job is running. Render animation operator also stores scene and main, so such solution could be fine for first time before we've got something smarter.
2011-06-22 14:54:53 +00:00
* The Original Code is Copyright (C) 2011 Blender Foundation.
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
* All rights reserved.
*/
/** \file
* \ingroup spclip
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
*/
#include <stdio.h>
#include <string.h>
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
#include "DNA_mask_types.h"
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
#include "DNA_movieclip_types.h"
#include "DNA_scene_types.h"
2012-06-10 19:59:02 +00:00
#include "DNA_view3d_types.h" /* for pivot point */
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
#include "BKE_context.h"
#include "BKE_lib_id.h"
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
#include "BKE_movieclip.h"
#include "BKE_screen.h"
#include "BKE_tracking.h"
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
#include "IMB_imbuf_types.h"
#include "ED_anim_api.h" /* for timeline cursor drawing */
#include "ED_clip.h"
#include "ED_mask.h"
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
#include "ED_screen.h"
#include "ED_select_utils.h"
#include "ED_space_api.h"
#include "ED_time_scrub_ui.h"
Camera tracking integration =========================== Implemented basic structures and operators for markers manipulaiton. Markers contains: - Position of marker at frame in unified 0..1 coordinates - Relative positions of left-bottom and right-top corners of pattern area - Relative positions of left-bottom and right-top corners of search area - Selection flags New operators: - Create new maerker. It's a modal operator which creates markers at mouse position when LMB is clicking. - Delete selected markers. - Select marker using RMB. Some parts of marker (point, patter, search) could be deselected. - Select markers using rectangular selection. - Select markers using circle selection. - Marker translation (G-key). - Marker scaling (S-key). UI changes: - Added mode to space clip. Currently supported modes are: * View mode * Tracking mode This was intended to separate different categories of tools, so interface shouldn't be overheaded with plenty of tools which aren't actually using in the same time. - Created new panel when actiev tool is 'MARKER' and there's active marker where positions could be adjusted in pixel space. Internal changes: - Splitted DNA/RNA movieclip files to make separation of tracking data and movie data more clear. This could be useful in the future when we'll want to support multiplie moies for single camera tracking (to make tracking more accurate). - Added new file in blenkernel, where all tracking-related function would be stored. Not very much function here at this moment, but in the future all stuff related on converting DNA to external tracking data would be stored here.
2011-06-03 15:39:53 +00:00
#include "ED_transform.h"
2014-10-31 15:32:59 +01:00
#include "ED_uvedit.h" /* just for ED_image_draw_cursor */
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
#include "IMB_imbuf.h"
#include "GPU_framebuffer.h"
#include "GPU_matrix.h"
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
#include "WM_api.h"
#include "WM_types.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "UI_view2d.h"
#include "RNA_access.h"
2012-06-10 19:59:02 +00:00
#include "clip_intern.h" /* own include */
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
static void init_preview_region(const Scene *scene,
const ScrArea *area,
const SpaceClip *sc,
ARegion *region)
{
region->regiontype = RGN_TYPE_PREVIEW;
region->alignment = RGN_ALIGN_TOP;
region->flag |= RGN_FLAG_HIDDEN;
if (sc->view == SC_VIEW_DOPESHEET) {
region->v2d.tot.xmin = -10.0f;
region->v2d.tot.ymin = (float)(-area->winy) / 3.0f;
region->v2d.tot.xmax = (float)(area->winx);
region->v2d.tot.ymax = 0.0f;
region->v2d.cur = region->v2d.tot;
region->v2d.min[0] = 0.0f;
region->v2d.min[1] = 0.0f;
region->v2d.max[0] = MAXFRAMEF;
region->v2d.max[1] = FLT_MAX;
region->v2d.minzoom = 0.01f;
region->v2d.maxzoom = 50;
region->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES);
2020-06-18 12:21:38 +10:00
region->v2d.scroll |= V2D_SCROLL_RIGHT;
region->v2d.keepzoom = V2D_LOCKZOOM_Y;
region->v2d.keepofs = V2D_KEEPOFS_Y;
region->v2d.align = V2D_ALIGN_NO_POS_Y;
region->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
}
else {
region->v2d.tot.xmin = 0.0f;
region->v2d.tot.ymin = -10.0f;
region->v2d.tot.xmax = (float)scene->r.efra;
region->v2d.tot.ymax = 10.0f;
region->v2d.cur = region->v2d.tot;
region->v2d.min[0] = FLT_MIN;
region->v2d.min[1] = FLT_MIN;
region->v2d.max[0] = MAXFRAMEF;
region->v2d.max[1] = FLT_MAX;
region->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES);
region->v2d.scroll |= (V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HANDLES);
region->v2d.minzoom = 0.0f;
region->v2d.maxzoom = 0.0f;
region->v2d.keepzoom = 0;
region->v2d.keepofs = 0;
region->v2d.align = 0;
region->v2d.flag = 0;
region->v2d.keeptot = 0;
}
}
static void reinit_preview_region(const bContext *C, ARegion *region)
{
Scene *scene = CTX_data_scene(C);
ScrArea *area = CTX_wm_area(C);
SpaceClip *sc = CTX_wm_space_clip(C);
if (sc->view == SC_VIEW_DOPESHEET) {
if ((region->v2d.flag & V2D_VIEWSYNC_AREA_VERTICAL) == 0) {
init_preview_region(scene, area, sc, region);
2019-04-22 09:19:45 +10:00
}
}
else {
if (region->v2d.flag & V2D_VIEWSYNC_AREA_VERTICAL) {
init_preview_region(scene, area, sc, region);
2019-04-22 09:19:45 +10:00
}
}
}
static ARegion *ED_clip_has_preview_region(const bContext *C, ScrArea *area)
{
ARegion *region, *arnew;
region = BKE_area_find_region_type(area, RGN_TYPE_PREVIEW);
if (region) {
return region;
2019-04-22 09:19:45 +10:00
}
/* add subdiv level; after header */
region = BKE_area_find_region_type(area, RGN_TYPE_WINDOW);
/* is error! */
if (region == NULL) {
return NULL;
2019-04-22 09:19:45 +10:00
}
arnew = MEM_callocN(sizeof(ARegion), "clip preview region");
BLI_insertlinkbefore(&area->regionbase, region, arnew);
init_preview_region(CTX_data_scene(C), area, CTX_wm_space_clip(C), arnew);
return arnew;
}
static ARegion *ED_clip_has_channels_region(ScrArea *area)
{
ARegion *region, *arnew;
region = BKE_area_find_region_type(area, RGN_TYPE_CHANNELS);
if (region) {
return region;
2019-04-22 09:19:45 +10:00
}
/* add subdiv level; after header */
region = BKE_area_find_region_type(area, RGN_TYPE_PREVIEW);
/* is error! */
if (region == NULL) {
return NULL;
2019-04-22 09:19:45 +10:00
}
arnew = MEM_callocN(sizeof(ARegion), "clip channels region");
BLI_insertlinkbefore(&area->regionbase, region, arnew);
arnew->regiontype = RGN_TYPE_CHANNELS;
arnew->alignment = RGN_ALIGN_LEFT;
arnew->v2d.scroll = V2D_SCROLL_BOTTOM;
arnew->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
return arnew;
}
static void clip_scopes_tag_refresh(ScrArea *area)
{
SpaceClip *sc = (SpaceClip *)area->spacedata.first;
ARegion *region;
2019-04-22 09:19:45 +10:00
if (sc->mode != SC_MODE_TRACKING) {
return;
2019-04-22 09:19:45 +10:00
}
2015-05-01 05:45:41 +10:00
/* only while properties are visible */
for (region = area->regionbase.first; region; region = region->next) {
if (region->regiontype == RGN_TYPE_UI && region->flag & RGN_FLAG_HIDDEN) {
return;
2019-04-22 09:19:45 +10:00
}
}
sc->scopes.ok = false;
}
static void clip_scopes_check_gpencil_change(ScrArea *area)
{
SpaceClip *sc = (SpaceClip *)area->spacedata.first;
if (sc->gpencil_src == SC_GPENCIL_SRC_TRACK) {
clip_scopes_tag_refresh(area);
}
}
static void clip_area_sync_frame_from_scene(ScrArea *area, const Scene *scene)
{
SpaceClip *space_clip = (SpaceClip *)area->spacedata.first;
BKE_movieclip_user_set_frame(&space_clip->user, scene->r.cfra);
}
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* ******************** default callbacks for clip space ***************** */
static SpaceLink *clip_create(const ScrArea *area, const Scene *scene)
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
{
ARegion *region;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
SpaceClip *sc;
sc = MEM_callocN(sizeof(SpaceClip), "initclip");
sc->spacetype = SPACE_CLIP;
sc->flag = SC_SHOW_MARKER_PATTERN | SC_SHOW_TRACK_PATH | SC_SHOW_GRAPH_TRACKS_MOTION |
SC_SHOW_GRAPH_FRAMES | SC_SHOW_ANNOTATION;
sc->zoom = 1.0f;
sc->path_length = 20;
sc->scopes.track_preview_height = 120;
sc->around = V3D_AROUND_CENTER_MEDIAN;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* header */
region = MEM_callocN(sizeof(ARegion), "header for clip");
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
BLI_addtail(&sc->regionbase, region);
region->regiontype = RGN_TYPE_HEADER;
region->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_BOTTOM : RGN_ALIGN_TOP;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* tools view */
region = MEM_callocN(sizeof(ARegion), "tools for clip");
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
BLI_addtail(&sc->regionbase, region);
region->regiontype = RGN_TYPE_TOOLS;
region->alignment = RGN_ALIGN_LEFT;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* properties view */
region = MEM_callocN(sizeof(ARegion), "properties for clip");
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
BLI_addtail(&sc->regionbase, region);
region->regiontype = RGN_TYPE_UI;
region->alignment = RGN_ALIGN_RIGHT;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* channels view */
region = MEM_callocN(sizeof(ARegion), "channels for clip");
BLI_addtail(&sc->regionbase, region);
region->regiontype = RGN_TYPE_CHANNELS;
region->alignment = RGN_ALIGN_LEFT;
region->v2d.scroll = V2D_SCROLL_BOTTOM;
region->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
/* preview view */
region = MEM_callocN(sizeof(ARegion), "preview for clip");
BLI_addtail(&sc->regionbase, region);
init_preview_region(scene, area, sc, region);
/* main region */
region = MEM_callocN(sizeof(ARegion), "main region for clip");
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
BLI_addtail(&sc->regionbase, region);
region->regiontype = RGN_TYPE_WINDOW;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
return (SpaceLink *)sc;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
/* not spacelink itself */
static void clip_free(SpaceLink *sl)
{
2012-06-10 19:59:02 +00:00
SpaceClip *sc = (SpaceClip *)sl;
sc->clip = NULL;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
2019-04-22 09:19:45 +10:00
if (sc->scopes.track_preview) {
IMB_freeImBuf(sc->scopes.track_preview);
2019-04-22 09:19:45 +10:00
}
2019-04-22 09:19:45 +10:00
if (sc->scopes.track_search) {
Planar tracking support for motion tracking =========================================== Major list of changes done in tomato branch: - Add a planar tracking implementation to libmv This adds a new planar tracking implementation to libmv. The tracker is based on Ceres[1], the new nonlinear minimizer that myself and Sameer released from Google as open source. Since the motion model is more involved, the interface is different than the RegionTracker interface used previously in Blender. The start of a C API in libmv-capi.{cpp,h} is also included. - Migrate from pat_{min,max} for markers to 4 corners representation Convert markers in the movie clip editor / 2D tracker from using pat_min and pat_max notation to using the a more general, 4-corner representation. There is still considerable porting work to do; in particular sliding from preview widget does not work correct for rotated markers. All other areas should be ported to new representation: * Added support of sliding individual corners. LMB slide + Ctrl would scale the whole pattern * S would scale the whole marker, S-S would scale pattern only * Added support of marker's rotation which is currently rotates only patterns around their centers or all markers around median, Rotation or other non-translation/scaling transformation of search area doesn't make sense. * Track Preview widget would display transformed pattern which libmv actually operates with. - "Efficient Second-order Minimization" for the planar tracker This implements the "Efficient Second-order Minimization" scheme, as supported by the existing translation tracker. This increases the amount of per-iteration work, but decreases the number of iterations required to converge and also increases the size of the basin of attraction for the optimization. - Remove the use of the legacy RegionTracker API from Blender, and replaces it with the new TrackRegion API. This also adds several features to the planar tracker in libmv: * Do a brute-force initialization of tracking similar to "Hybrid" mode in the stable release, but using all floats. This is slower but more accurate. It is still necessary to evaluate if the performance loss is worth it. In particular, this change is necessary to support high bit depth imagery. * Add support for masks over the search window. This is a step towards supporting user-defined tracker masks. The tracker masks will make it easy for users to make a mask for e.g. a ball. Not exposed into interface yet/ * Add Pearson product moment correlation coefficient checking (aka "Correlation" in the UI. This causes tracking failure if the tracked patch is not linearly related to the template. * Add support for warping a few points in addition to the supplied points. This is useful because the tracking code deliberately does not expose the underlying warp representation. Instead, warps are specified in an aparametric way via the correspondences. - Replace the old style tracker configuration panel with the new planar tracking panel. From a users perspective, this means: * The old "tracking algorithm" picker is gone. There is only 1 algorithm now. We may revisit this later, but I would much prefer to have only 1 algorithm. So far no optimization work has been done so the speed is not there yet. * There is now a dropdown to select the motion model. Choices: * Translation * Translation, rotation * Translation, scale * Translation, rotation, scale * Affine * Perspective * The old "Hybrid" mode is gone; instead there is a toggle to enable or disable translation-only tracker initialization. This is the equivalent of the hyrbid mode before, but rewritten to work with the new planar tracking modes. * The pyramid levels setting is gone. At a future date, the planar tracker will decide to use pyramids or not automatically. The pyramid setting was ultimately a mistake; with the brute force initialization it is unnecessary. - Add light-normalized tracking Added the ability to normalize patterns by their average value while tracking, to make them invariant to global illumination changes. Additional details could be found at wiki page [2] [1] http://code.google.com/p/ceres-solver [2] http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Motion_Tracker
2012-06-10 15:28:19 +00:00
IMB_freeImBuf(sc->scopes.track_search);
2019-04-22 09:19:45 +10:00
}
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
/* spacetype; init callback */
static void clip_init(struct wmWindowManager *UNUSED(wm), ScrArea *area)
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
{
ListBase *lb = WM_dropboxmap_find("Clip", SPACE_CLIP, 0);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* add drop boxes */
WM_event_add_dropbox_handler(&area->handlers, lb);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
static SpaceLink *clip_duplicate(SpaceLink *sl)
{
SpaceClip *scn = MEM_dupallocN(sl);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* clear or remove stuff from old */
Planar tracking support for motion tracking =========================================== Major list of changes done in tomato branch: - Add a planar tracking implementation to libmv This adds a new planar tracking implementation to libmv. The tracker is based on Ceres[1], the new nonlinear minimizer that myself and Sameer released from Google as open source. Since the motion model is more involved, the interface is different than the RegionTracker interface used previously in Blender. The start of a C API in libmv-capi.{cpp,h} is also included. - Migrate from pat_{min,max} for markers to 4 corners representation Convert markers in the movie clip editor / 2D tracker from using pat_min and pat_max notation to using the a more general, 4-corner representation. There is still considerable porting work to do; in particular sliding from preview widget does not work correct for rotated markers. All other areas should be ported to new representation: * Added support of sliding individual corners. LMB slide + Ctrl would scale the whole pattern * S would scale the whole marker, S-S would scale pattern only * Added support of marker's rotation which is currently rotates only patterns around their centers or all markers around median, Rotation or other non-translation/scaling transformation of search area doesn't make sense. * Track Preview widget would display transformed pattern which libmv actually operates with. - "Efficient Second-order Minimization" for the planar tracker This implements the "Efficient Second-order Minimization" scheme, as supported by the existing translation tracker. This increases the amount of per-iteration work, but decreases the number of iterations required to converge and also increases the size of the basin of attraction for the optimization. - Remove the use of the legacy RegionTracker API from Blender, and replaces it with the new TrackRegion API. This also adds several features to the planar tracker in libmv: * Do a brute-force initialization of tracking similar to "Hybrid" mode in the stable release, but using all floats. This is slower but more accurate. It is still necessary to evaluate if the performance loss is worth it. In particular, this change is necessary to support high bit depth imagery. * Add support for masks over the search window. This is a step towards supporting user-defined tracker masks. The tracker masks will make it easy for users to make a mask for e.g. a ball. Not exposed into interface yet/ * Add Pearson product moment correlation coefficient checking (aka "Correlation" in the UI. This causes tracking failure if the tracked patch is not linearly related to the template. * Add support for warping a few points in addition to the supplied points. This is useful because the tracking code deliberately does not expose the underlying warp representation. Instead, warps are specified in an aparametric way via the correspondences. - Replace the old style tracker configuration panel with the new planar tracking panel. From a users perspective, this means: * The old "tracking algorithm" picker is gone. There is only 1 algorithm now. We may revisit this later, but I would much prefer to have only 1 algorithm. So far no optimization work has been done so the speed is not there yet. * There is now a dropdown to select the motion model. Choices: * Translation * Translation, rotation * Translation, scale * Translation, rotation, scale * Affine * Perspective * The old "Hybrid" mode is gone; instead there is a toggle to enable or disable translation-only tracker initialization. This is the equivalent of the hyrbid mode before, but rewritten to work with the new planar tracking modes. * The pyramid levels setting is gone. At a future date, the planar tracker will decide to use pyramids or not automatically. The pyramid setting was ultimately a mistake; with the brute force initialization it is unnecessary. - Add light-normalized tracking Added the ability to normalize patterns by their average value while tracking, to make them invariant to global illumination changes. Additional details could be found at wiki page [2] [1] http://code.google.com/p/ceres-solver [2] http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Motion_Tracker
2012-06-10 15:28:19 +00:00
scn->scopes.track_search = NULL;
scn->scopes.track_preview = NULL;
scn->scopes.ok = false;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
return (SpaceLink *)scn;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
static void clip_listener(const wmSpaceTypeListenerParams *params)
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
{
ScrArea *area = params->area;
wmNotifier *wmn = params->notifier;
const Scene *scene = params->scene;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* context changes */
switch (wmn->category) {
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
case NC_SCENE:
switch (wmn->data) {
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
case ND_FRAME:
clip_scopes_tag_refresh(area);
ATTR_FALLTHROUGH;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
case ND_FRAME_RANGE:
ED_area_tag_redraw(area);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
break;
}
break;
case NC_MOVIECLIP:
switch (wmn->data) {
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
case ND_DISPLAY:
Camera tracking integration =========================== Implemented basic structures and operators for markers manipulaiton. Markers contains: - Position of marker at frame in unified 0..1 coordinates - Relative positions of left-bottom and right-top corners of pattern area - Relative positions of left-bottom and right-top corners of search area - Selection flags New operators: - Create new maerker. It's a modal operator which creates markers at mouse position when LMB is clicking. - Delete selected markers. - Select marker using RMB. Some parts of marker (point, patter, search) could be deselected. - Select markers using rectangular selection. - Select markers using circle selection. - Marker translation (G-key). - Marker scaling (S-key). UI changes: - Added mode to space clip. Currently supported modes are: * View mode * Tracking mode This was intended to separate different categories of tools, so interface shouldn't be overheaded with plenty of tools which aren't actually using in the same time. - Created new panel when actiev tool is 'MARKER' and there's active marker where positions could be adjusted in pixel space. Internal changes: - Splitted DNA/RNA movieclip files to make separation of tracking data and movie data more clear. This could be useful in the future when we'll want to support multiplie moies for single camera tracking (to make tracking more accurate). - Added new file in blenkernel, where all tracking-related function would be stored. Not very much function here at this moment, but in the future all stuff related on converting DNA to external tracking data would be stored here.
2011-06-03 15:39:53 +00:00
case ND_SELECT:
clip_scopes_tag_refresh(area);
ED_area_tag_redraw(area);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
break;
}
switch (wmn->action) {
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
case NA_REMOVED:
Camera tracking integration =========================== Implemented basic structures and operators for markers manipulaiton. Markers contains: - Position of marker at frame in unified 0..1 coordinates - Relative positions of left-bottom and right-top corners of pattern area - Relative positions of left-bottom and right-top corners of search area - Selection flags New operators: - Create new maerker. It's a modal operator which creates markers at mouse position when LMB is clicking. - Delete selected markers. - Select marker using RMB. Some parts of marker (point, patter, search) could be deselected. - Select markers using rectangular selection. - Select markers using circle selection. - Marker translation (G-key). - Marker scaling (S-key). UI changes: - Added mode to space clip. Currently supported modes are: * View mode * Tracking mode This was intended to separate different categories of tools, so interface shouldn't be overheaded with plenty of tools which aren't actually using in the same time. - Created new panel when actiev tool is 'MARKER' and there's active marker where positions could be adjusted in pixel space. Internal changes: - Splitted DNA/RNA movieclip files to make separation of tracking data and movie data more clear. This could be useful in the future when we'll want to support multiplie moies for single camera tracking (to make tracking more accurate). - Added new file in blenkernel, where all tracking-related function would be stored. Not very much function here at this moment, but in the future all stuff related on converting DNA to external tracking data would be stored here.
2011-06-03 15:39:53 +00:00
case NA_EDITED:
case NA_EVALUATED:
/* fall-through */
Camera tracking integration =========================== - Do not show frame boundary border when stabilization isn't enabled. - Separate stabilization settings from display in clip editor. Now clip can contain stabilization data but still be displayed un-stabilized in clip editor. - Internal changes in stabilization: * Use separated location/scale parameters rather than 4x4 matrix. In some ares "decomposed" data is needed (text draw functions, i.e.). Also such decomposed data could be used in compositor. * MovieClip now uses own structure for cache where additional data can be stored. MovieCache structure now one of properties in this new structure. * Get rid of stable image buffer stored in MovieClipStabilization structure. Pre-created buffer for scaling still stored there. This helps to keep playback realtime -- re-creating this buffer introduces ~15% slowdown. - Added sliders to 2D stabilization panel which controls intensity of translation/scale which applies on shot. - Added filter type to Stabilize2D compositor node. Supports nearest, bilinear and bicubic interpolation. - After discussion with Sebastian and Francois added new node called Transformation. It can apply translation, rotation and scale. It's not the same thing as applying this components separately -- all transformation is happening inside "canvas". And it should be more accurate on interpolation and sub-pixel translation. Need to check order of applying translation/scale/rotation btw. - Added output sockets to movie clip compositor node. They holds stabilization data which can be used by Translate or Transform nodes. - Minor fix of UI issues in Display panel.
2011-08-01 15:28:19 +00:00
case NA_SELECTED:
clip_scopes_tag_refresh(area);
ED_area_tag_redraw(area);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
break;
}
break;
case NC_MASK:
2012-06-04 20:11:09 +00:00
switch (wmn->data) {
case ND_SELECT:
case ND_DATA:
case ND_DRAW:
ED_area_tag_redraw(area);
break;
}
2012-06-04 20:11:09 +00:00
switch (wmn->action) {
case NA_SELECTED:
ED_area_tag_redraw(area);
break;
case NA_EDITED:
ED_area_tag_redraw(area);
break;
}
break;
case NC_GEOM:
switch (wmn->data) {
case ND_SELECT:
clip_scopes_tag_refresh(area);
ED_area_tag_redraw(area);
break;
}
break;
2012-06-06 14:48:39 +00:00
case NC_SCREEN:
2012-06-10 19:59:02 +00:00
switch (wmn->data) {
case ND_ANIMPLAY:
ED_area_tag_redraw(area);
break;
case ND_LAYOUTSET:
clip_area_sync_frame_from_scene(area, scene);
break;
}
break;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
case NC_SPACE:
if (wmn->data == ND_SPACE_CLIP) {
clip_scopes_tag_refresh(area);
ED_area_tag_redraw(area);
}
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
break;
case NC_GPENCIL:
if (wmn->action == NA_EDITED) {
clip_scopes_check_gpencil_change(area);
ED_area_tag_redraw(area);
}
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch) This merge-commit brings in a number of new features and workflow/UI improvements for working with Grease Pencil. While these were originally targetted at improving the workflow for creating 3D storyboards in Blender using the Grease Pencil, many of these changes should also prove useful in other workflows too. The main highlights here are: 1) It is now possible to edit Grease Pencil strokes - Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions to enter "Stroke Edit Mode". In this mode, many common editing tools will operate on Grease Pencil stroke points instead. - Tools implemented include Select, Select All/Border/Circle/Linked/More/Less, Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete. - Proportional Editing works when using the transform tools 2) Grease Pencil stroke settings can now be animated NOTE: Currently drivers don't work, but if time allows, this may still be added before the release. 3) Strokes can be drawn with "filled" interiors, using a separate set of colour/opacity settings to the ones used for the lines themselves. This makes use of OpenGL filled polys, which has the limitation of only being able to fill convex shapes. Some artifacts may be visible on concave shapes (e.g. pacman's mouth will be overdrawn) 4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing has been added which draws strokes as a series of screen-aligned discs. While this was originally a partial experimental technique at getting better quality 3D lines, the effects possible using this technique were interesting enough to warrant making this a dedicated feature. Best results when partial opacity and large stroke widths are used. 5) Improved Onion Skinning Support - Different colours can be selected for the before/after ghosts. To do so, enable the "colour wheel" toggle beside the Onion Skinning toggle, and set the colours accordingly. - Different numbers of ghosts can be shown before/after the current frame 6) Grease Pencil datablocks are now attached to the scene by default instead of the active object. - For a long time, the object-attachment has proved to be quite problematic for users to keep track of. Now that this is done at scene level, it is easier for most users to use. - An exception for old files (and for any addons which may benefit from object attachment instead), is that if the active object has a Grease Pencil datablock, that will be used instead. - It is not currently possible to choose object-attachment from the UI, but it is simple to do this from the console instead, by doing: context.active_object.grease_pencil = bpy.data.grease_pencil["blah"] 7) Various UI Cleanups - The layers UI has been cleaned up to use a list instead of the nested-panels design. Apart from saving space, this is also much nicer to look at now. - The UI code is now all defined in Python. To support this, it has been necessary to add some new context properties to make it easier to access these settings. e.g. "gpencil_data" for the datablock "active_gpencil_layer" and "active_gpencil_frame" for active data, "editable_gpencil_strokes" for the strokes that can be edited - The "stroke placement/alignment" settings (previously "Drawing Settings" at the bottom of the Grease Pencil panel in the Properties Region) is now located in the toolbar. These were more toolsettings than properties for how GPencil got drawn. - "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a suggestion for an earlier discussion on developer.blender.org - By default, the painting operator will wait for a mouse button to be pressed before it starts creating the stroke. This is to make it easier to include this operator in various toolbars/menus/etc. To get it immediately starting (as when you hold down DKEy to draw), set "wait_for_input" to False. - GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor - Toolbar panels have been added to all the other editors which support these. 8) Pie menus for quick-access to tools A set of experimental pie menus has been included for quick access to many tools and settings. It is not necessary to use these to get things done, but they have been designed to help make certain common tasks easier. - Ctrl-D = The main pie menu. Reveals tools in a context sensitive and spatially stable manner. - D Q = "Quick Settings" pie. This allows quick access to the active layer's settings. Notably, colours, thickness, and turning onion skinning on/off.
2014-12-01 01:52:06 +13:00
else if (wmn->data & ND_GPENCIL_EDITMODE) {
ED_area_tag_redraw(area);
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch) This merge-commit brings in a number of new features and workflow/UI improvements for working with Grease Pencil. While these were originally targetted at improving the workflow for creating 3D storyboards in Blender using the Grease Pencil, many of these changes should also prove useful in other workflows too. The main highlights here are: 1) It is now possible to edit Grease Pencil strokes - Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions to enter "Stroke Edit Mode". In this mode, many common editing tools will operate on Grease Pencil stroke points instead. - Tools implemented include Select, Select All/Border/Circle/Linked/More/Less, Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete. - Proportional Editing works when using the transform tools 2) Grease Pencil stroke settings can now be animated NOTE: Currently drivers don't work, but if time allows, this may still be added before the release. 3) Strokes can be drawn with "filled" interiors, using a separate set of colour/opacity settings to the ones used for the lines themselves. This makes use of OpenGL filled polys, which has the limitation of only being able to fill convex shapes. Some artifacts may be visible on concave shapes (e.g. pacman's mouth will be overdrawn) 4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing has been added which draws strokes as a series of screen-aligned discs. While this was originally a partial experimental technique at getting better quality 3D lines, the effects possible using this technique were interesting enough to warrant making this a dedicated feature. Best results when partial opacity and large stroke widths are used. 5) Improved Onion Skinning Support - Different colours can be selected for the before/after ghosts. To do so, enable the "colour wheel" toggle beside the Onion Skinning toggle, and set the colours accordingly. - Different numbers of ghosts can be shown before/after the current frame 6) Grease Pencil datablocks are now attached to the scene by default instead of the active object. - For a long time, the object-attachment has proved to be quite problematic for users to keep track of. Now that this is done at scene level, it is easier for most users to use. - An exception for old files (and for any addons which may benefit from object attachment instead), is that if the active object has a Grease Pencil datablock, that will be used instead. - It is not currently possible to choose object-attachment from the UI, but it is simple to do this from the console instead, by doing: context.active_object.grease_pencil = bpy.data.grease_pencil["blah"] 7) Various UI Cleanups - The layers UI has been cleaned up to use a list instead of the nested-panels design. Apart from saving space, this is also much nicer to look at now. - The UI code is now all defined in Python. To support this, it has been necessary to add some new context properties to make it easier to access these settings. e.g. "gpencil_data" for the datablock "active_gpencil_layer" and "active_gpencil_frame" for active data, "editable_gpencil_strokes" for the strokes that can be edited - The "stroke placement/alignment" settings (previously "Drawing Settings" at the bottom of the Grease Pencil panel in the Properties Region) is now located in the toolbar. These were more toolsettings than properties for how GPencil got drawn. - "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a suggestion for an earlier discussion on developer.blender.org - By default, the painting operator will wait for a mouse button to be pressed before it starts creating the stroke. This is to make it easier to include this operator in various toolbars/menus/etc. To get it immediately starting (as when you hold down DKEy to draw), set "wait_for_input" to False. - GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor - Toolbar panels have been added to all the other editors which support these. 8) Pie menus for quick-access to tools A set of experimental pie menus has been included for quick access to many tools and settings. It is not necessary to use these to get things done, but they have been designed to help make certain common tasks easier. - Ctrl-D = The main pie menu. Reveals tools in a context sensitive and spatially stable manner. - D Q = "Quick Settings" pie. This allows quick access to the active layer's settings. Notably, colours, thickness, and turning onion skinning on/off.
2014-12-01 01:52:06 +13:00
}
break;
case NC_WM:
switch (wmn->data) {
case ND_FILEREAD:
case ND_UNDO:
clip_area_sync_frame_from_scene(area, scene);
break;
}
break;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
}
static void clip_operatortypes(void)
{
/* ** clip_ops.c ** */
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
WM_operatortype_append(CLIP_OT_open);
Camera tracking integration =========================== Implemented basic structures and operators for markers manipulaiton. Markers contains: - Position of marker at frame in unified 0..1 coordinates - Relative positions of left-bottom and right-top corners of pattern area - Relative positions of left-bottom and right-top corners of search area - Selection flags New operators: - Create new maerker. It's a modal operator which creates markers at mouse position when LMB is clicking. - Delete selected markers. - Select marker using RMB. Some parts of marker (point, patter, search) could be deselected. - Select markers using rectangular selection. - Select markers using circle selection. - Marker translation (G-key). - Marker scaling (S-key). UI changes: - Added mode to space clip. Currently supported modes are: * View mode * Tracking mode This was intended to separate different categories of tools, so interface shouldn't be overheaded with plenty of tools which aren't actually using in the same time. - Created new panel when actiev tool is 'MARKER' and there's active marker where positions could be adjusted in pixel space. Internal changes: - Splitted DNA/RNA movieclip files to make separation of tracking data and movie data more clear. This could be useful in the future when we'll want to support multiplie moies for single camera tracking (to make tracking more accurate). - Added new file in blenkernel, where all tracking-related function would be stored. Not very much function here at this moment, but in the future all stuff related on converting DNA to external tracking data would be stored here.
2011-06-03 15:39:53 +00:00
WM_operatortype_append(CLIP_OT_reload);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
WM_operatortype_append(CLIP_OT_view_pan);
WM_operatortype_append(CLIP_OT_view_zoom);
WM_operatortype_append(CLIP_OT_view_zoom_in);
WM_operatortype_append(CLIP_OT_view_zoom_out);
WM_operatortype_append(CLIP_OT_view_zoom_ratio);
WM_operatortype_append(CLIP_OT_view_all);
WM_operatortype_append(CLIP_OT_view_selected);
WM_operatortype_append(CLIP_OT_view_center_cursor);
WM_operatortype_append(CLIP_OT_change_frame);
WM_operatortype_append(CLIP_OT_rebuild_proxy);
WM_operatortype_append(CLIP_OT_mode_set);
#ifdef WITH_INPUT_NDOF
WM_operatortype_append(CLIP_OT_view_ndof);
#endif
WM_operatortype_append(CLIP_OT_prefetch);
WM_operatortype_append(CLIP_OT_set_scene_frames);
WM_operatortype_append(CLIP_OT_cursor_set);
WM_operatortype_append(CLIP_OT_lock_selection_toggle);
/* ** tracking_ops.c ** */
/* navigation */
WM_operatortype_append(CLIP_OT_frame_jump);
Camera tracking integration =========================== Implemented basic structures and operators for markers manipulaiton. Markers contains: - Position of marker at frame in unified 0..1 coordinates - Relative positions of left-bottom and right-top corners of pattern area - Relative positions of left-bottom and right-top corners of search area - Selection flags New operators: - Create new maerker. It's a modal operator which creates markers at mouse position when LMB is clicking. - Delete selected markers. - Select marker using RMB. Some parts of marker (point, patter, search) could be deselected. - Select markers using rectangular selection. - Select markers using circle selection. - Marker translation (G-key). - Marker scaling (S-key). UI changes: - Added mode to space clip. Currently supported modes are: * View mode * Tracking mode This was intended to separate different categories of tools, so interface shouldn't be overheaded with plenty of tools which aren't actually using in the same time. - Created new panel when actiev tool is 'MARKER' and there's active marker where positions could be adjusted in pixel space. Internal changes: - Splitted DNA/RNA movieclip files to make separation of tracking data and movie data more clear. This could be useful in the future when we'll want to support multiplie moies for single camera tracking (to make tracking more accurate). - Added new file in blenkernel, where all tracking-related function would be stored. Not very much function here at this moment, but in the future all stuff related on converting DNA to external tracking data would be stored here.
2011-06-03 15:39:53 +00:00
Rework 2D stabilizator See this page for motivation and description of concepts: https://github.com/Ichthyostega/blender/wiki See this video for UI explanation and demonstration of usage http://vimeo.com/blenderHack/stabilizerdemo This proposal attempts to improve usability of Blender's image stabilization feature for real-world footage esp. with moving and panning camera. It builds upon the feature tracking to get a measurement of 2D image movement. - Use a weighted average of movement contributions (instead of a median). - Allow for rotation compensation and zoom (image scale) compensation. - Allow to pick a different set of tracks for translation and for rotation/zoom. - Treat translation / rotation / zoom contributions systematically in a similar way. - Improve handling of partial tracking data with gaps and varying start / end points. - Have a user definable anchor frame and interpolate / extrapolate data to avoid jumping back to "neutral" position when no tracking data is available. - Support for travelling and panning shots by including an //intended// position/rotation/zoom ("target position"). The idea is for these parameters to be //animated// by the user, in order to supply an smooth, intended camera movement. This way, we can keep the image content roughly in frame even when moving completely away from the initial view. A known shortcoming is that the pivot point for rotation compensation is set to the translation compensated image center. This can produce spurious rotation on travelling shots, which needs to be compensated manually (by animating the target rotation parameter). There are several possible ways to address that problem, yet all of them are considered beyond the scope of this improvement proposal for now. Own modifications: - Restrict line length, it's really handy for split-view editing - In motion tracking we prefer fully human-readable comments, meaning we don't use doxygen with it's weird markup and comments are supposed to start with capital and end with a full stop, - Add explicit comparison of pointer to NULL. Reviewers: sergey Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung Maniphest Tasks: T49036 Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
/* set optical center to frame center */
WM_operatortype_append(CLIP_OT_set_center_principal);
/* selection */
Camera tracking integration =========================== Implemented basic structures and operators for markers manipulaiton. Markers contains: - Position of marker at frame in unified 0..1 coordinates - Relative positions of left-bottom and right-top corners of pattern area - Relative positions of left-bottom and right-top corners of search area - Selection flags New operators: - Create new maerker. It's a modal operator which creates markers at mouse position when LMB is clicking. - Delete selected markers. - Select marker using RMB. Some parts of marker (point, patter, search) could be deselected. - Select markers using rectangular selection. - Select markers using circle selection. - Marker translation (G-key). - Marker scaling (S-key). UI changes: - Added mode to space clip. Currently supported modes are: * View mode * Tracking mode This was intended to separate different categories of tools, so interface shouldn't be overheaded with plenty of tools which aren't actually using in the same time. - Created new panel when actiev tool is 'MARKER' and there's active marker where positions could be adjusted in pixel space. Internal changes: - Splitted DNA/RNA movieclip files to make separation of tracking data and movie data more clear. This could be useful in the future when we'll want to support multiplie moies for single camera tracking (to make tracking more accurate). - Added new file in blenkernel, where all tracking-related function would be stored. Not very much function here at this moment, but in the future all stuff related on converting DNA to external tracking data would be stored here.
2011-06-03 15:39:53 +00:00
WM_operatortype_append(CLIP_OT_select);
WM_operatortype_append(CLIP_OT_select_all);
WM_operatortype_append(CLIP_OT_select_box);
2012-05-14 12:04:00 +00:00
WM_operatortype_append(CLIP_OT_select_lasso);
Camera tracking integration =========================== Implemented basic structures and operators for markers manipulaiton. Markers contains: - Position of marker at frame in unified 0..1 coordinates - Relative positions of left-bottom and right-top corners of pattern area - Relative positions of left-bottom and right-top corners of search area - Selection flags New operators: - Create new maerker. It's a modal operator which creates markers at mouse position when LMB is clicking. - Delete selected markers. - Select marker using RMB. Some parts of marker (point, patter, search) could be deselected. - Select markers using rectangular selection. - Select markers using circle selection. - Marker translation (G-key). - Marker scaling (S-key). UI changes: - Added mode to space clip. Currently supported modes are: * View mode * Tracking mode This was intended to separate different categories of tools, so interface shouldn't be overheaded with plenty of tools which aren't actually using in the same time. - Created new panel when actiev tool is 'MARKER' and there's active marker where positions could be adjusted in pixel space. Internal changes: - Splitted DNA/RNA movieclip files to make separation of tracking data and movie data more clear. This could be useful in the future when we'll want to support multiplie moies for single camera tracking (to make tracking more accurate). - Added new file in blenkernel, where all tracking-related function would be stored. Not very much function here at this moment, but in the future all stuff related on converting DNA to external tracking data would be stored here.
2011-06-03 15:39:53 +00:00
WM_operatortype_append(CLIP_OT_select_circle);
WM_operatortype_append(CLIP_OT_select_grouped);
Camera tracking integration =========================== Implemented basic structures and operators for markers manipulaiton. Markers contains: - Position of marker at frame in unified 0..1 coordinates - Relative positions of left-bottom and right-top corners of pattern area - Relative positions of left-bottom and right-top corners of search area - Selection flags New operators: - Create new maerker. It's a modal operator which creates markers at mouse position when LMB is clicking. - Delete selected markers. - Select marker using RMB. Some parts of marker (point, patter, search) could be deselected. - Select markers using rectangular selection. - Select markers using circle selection. - Marker translation (G-key). - Marker scaling (S-key). UI changes: - Added mode to space clip. Currently supported modes are: * View mode * Tracking mode This was intended to separate different categories of tools, so interface shouldn't be overheaded with plenty of tools which aren't actually using in the same time. - Created new panel when actiev tool is 'MARKER' and there's active marker where positions could be adjusted in pixel space. Internal changes: - Splitted DNA/RNA movieclip files to make separation of tracking data and movie data more clear. This could be useful in the future when we'll want to support multiplie moies for single camera tracking (to make tracking more accurate). - Added new file in blenkernel, where all tracking-related function would be stored. Not very much function here at this moment, but in the future all stuff related on converting DNA to external tracking data would be stored here.
2011-06-03 15:39:53 +00:00
/* markers */
Camera tracking integration =========================== Implemented basic structures and operators for markers manipulaiton. Markers contains: - Position of marker at frame in unified 0..1 coordinates - Relative positions of left-bottom and right-top corners of pattern area - Relative positions of left-bottom and right-top corners of search area - Selection flags New operators: - Create new maerker. It's a modal operator which creates markers at mouse position when LMB is clicking. - Delete selected markers. - Select marker using RMB. Some parts of marker (point, patter, search) could be deselected. - Select markers using rectangular selection. - Select markers using circle selection. - Marker translation (G-key). - Marker scaling (S-key). UI changes: - Added mode to space clip. Currently supported modes are: * View mode * Tracking mode This was intended to separate different categories of tools, so interface shouldn't be overheaded with plenty of tools which aren't actually using in the same time. - Created new panel when actiev tool is 'MARKER' and there's active marker where positions could be adjusted in pixel space. Internal changes: - Splitted DNA/RNA movieclip files to make separation of tracking data and movie data more clear. This could be useful in the future when we'll want to support multiplie moies for single camera tracking (to make tracking more accurate). - Added new file in blenkernel, where all tracking-related function would be stored. Not very much function here at this moment, but in the future all stuff related on converting DNA to external tracking data would be stored here.
2011-06-03 15:39:53 +00:00
WM_operatortype_append(CLIP_OT_add_marker);
WM_operatortype_append(CLIP_OT_add_marker_at_click);
WM_operatortype_append(CLIP_OT_slide_marker);
WM_operatortype_append(CLIP_OT_delete_track);
WM_operatortype_append(CLIP_OT_delete_marker);
/* track */
WM_operatortype_append(CLIP_OT_track_markers);
WM_operatortype_append(CLIP_OT_refine_markers);
/* solving */
Camera tracking integration =========================== - ColaMD moved from OpenNL to extern/. It'll be needed for libmv. Also, it's a bit updated from year 1999 to 2007. Need to be tested for regressions. - Updated bundling script for libmv. Now it uses fuller subset of this library. - Bundled new libmv. - Request from Keir: add command line argument to toggle logging stuff on. Currently, if Blender is launched with -d argument libmv would start printing logging messages. There's no argument to increase verbosity, but there's API in libmv-capi, so it'll be easy to add. - Finally fixed crash when ibuf is acquiring with user=NULL. - Added ActiveClip property to the scene. This clip is used as default value for new match-moving constraints. - Added some flags to Display panel of View3D. Related on displaying match-moving stuff. - Internal change: bundles data moved inside to MovieTrackingTrack. - Initial implementation of 3d reconstruction. - Added constraint "Camera Solver". This constraint is supposed to be used to make camera follow the reconstructed camera path. - Added "reference" property to "Follow Track" constraint. Now object could be "parented" to 2D track position or to 3D bundle position. The very quick guide: To use reconstruction you should have footage with tracked markers, choose two keyframes in "Tracking settings" panel. There should be quite noticeable parallax effect between this two frames. This is used to initialize reconstruction stuff. Camera data (focal length and optical center) should be filled in "Camera Data" panel. Optical center is often the center of image, so it'll be filled in automatically. You should also set values for undistortion (K1, K2 and K3). Currently, there's no any visualization for this parameters and approach of "change value -> reconstruct -> see what've changed" is the only way for now. Libmv team is working on auto-calibration tool, so it should be easier to gather this coefficients in nearest (i hope) future. There's also no scene orientation stuff. Basic workflow: - Open footage. - Set markers and track them. - Fill in camera data and keyframes. - Hit "Solve Camera" button. - Add "Camera Solver" constraint to camera in scene. - Choose movieclip in that constraint. - To see bundles in 3D viewport active clip should be set in scene buttons.
2011-07-07 17:58:33 +00:00
WM_operatortype_append(CLIP_OT_solve_camera);
WM_operatortype_append(CLIP_OT_clear_solution);
Camera tracking integration =========================== - itasc adopted for Eigen3 library. It compiles well, but need deeper testing for regressions. - Removed Eigen2 library. - Added settings to tracker which could be changed from UI. - Pattern area is now affects on tracker. Currently libmv supports square patterns which are centered to marker's position. Maximal pattern dimensions is sending to libmv as pattern size. Would be changed when libmv would support non-centered and non-square patterns. - Fixed bug with syncing pattern's flags when tracking. - Current frame in cache line became a bit more visible. It's useful for me to when debugging. - Changed behaviour of "Add Marekr" operator: not it's non-modal and places marker on mouse position at click. - Added macro "Add Marekr and Move" which is used to place markers from toolbar button. - Added some utility functions to get image buffer under search and pattern area which also returns relative position of marker center for this images. Generated images are more "correct" from coords rounding POV, but re-calculation of marker position back to frame coords is more complicated and not implemented yet, so old not very accurate logic is still used. - Added preview widget with content of pattern area. NOTE: files saved in previous versions of this branch could easily crash on tracking. Use "Reset To Settings" button from Tracking Settings before tracking selected markers for such files. TODO: - Implement adjusting marker position from marker's preview widget. - We've got an idea of sliding marker after click before releasing mouse button.
2011-06-14 16:22:06 +00:00
WM_operatortype_append(CLIP_OT_disable_markers);
WM_operatortype_append(CLIP_OT_hide_tracks);
WM_operatortype_append(CLIP_OT_hide_tracks_clear);
WM_operatortype_append(CLIP_OT_lock_tracks);
WM_operatortype_append(CLIP_OT_set_solver_keyframe);
/* orientation */
WM_operatortype_append(CLIP_OT_set_origin);
WM_operatortype_append(CLIP_OT_set_plane);
WM_operatortype_append(CLIP_OT_set_axis);
WM_operatortype_append(CLIP_OT_set_scale);
WM_operatortype_append(CLIP_OT_set_solution_scale);
WM_operatortype_append(CLIP_OT_apply_solution_scale);
/* detect */
WM_operatortype_append(CLIP_OT_detect_features);
/* stabilization */
WM_operatortype_append(CLIP_OT_stabilize_2d_add);
WM_operatortype_append(CLIP_OT_stabilize_2d_remove);
WM_operatortype_append(CLIP_OT_stabilize_2d_select);
Rework 2D stabilizator See this page for motivation and description of concepts: https://github.com/Ichthyostega/blender/wiki See this video for UI explanation and demonstration of usage http://vimeo.com/blenderHack/stabilizerdemo This proposal attempts to improve usability of Blender's image stabilization feature for real-world footage esp. with moving and panning camera. It builds upon the feature tracking to get a measurement of 2D image movement. - Use a weighted average of movement contributions (instead of a median). - Allow for rotation compensation and zoom (image scale) compensation. - Allow to pick a different set of tracks for translation and for rotation/zoom. - Treat translation / rotation / zoom contributions systematically in a similar way. - Improve handling of partial tracking data with gaps and varying start / end points. - Have a user definable anchor frame and interpolate / extrapolate data to avoid jumping back to "neutral" position when no tracking data is available. - Support for travelling and panning shots by including an //intended// position/rotation/zoom ("target position"). The idea is for these parameters to be //animated// by the user, in order to supply an smooth, intended camera movement. This way, we can keep the image content roughly in frame even when moving completely away from the initial view. A known shortcoming is that the pivot point for rotation compensation is set to the translation compensated image center. This can produce spurious rotation on travelling shots, which needs to be compensated manually (by animating the target rotation parameter). There are several possible ways to address that problem, yet all of them are considered beyond the scope of this improvement proposal for now. Own modifications: - Restrict line length, it's really handy for split-view editing - In motion tracking we prefer fully human-readable comments, meaning we don't use doxygen with it's weird markup and comments are supposed to start with capital and end with a full stop, - Add explicit comparison of pointer to NULL. Reviewers: sergey Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung Maniphest Tasks: T49036 Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
WM_operatortype_append(CLIP_OT_stabilize_2d_rotation_add);
WM_operatortype_append(CLIP_OT_stabilize_2d_rotation_remove);
WM_operatortype_append(CLIP_OT_stabilize_2d_rotation_select);
/* clean-up */
WM_operatortype_append(CLIP_OT_clear_track_path);
WM_operatortype_append(CLIP_OT_join_tracks);
WM_operatortype_append(CLIP_OT_average_tracks);
WM_operatortype_append(CLIP_OT_track_copy_color);
WM_operatortype_append(CLIP_OT_clean_tracks);
/* object tracking */
WM_operatortype_append(CLIP_OT_tracking_object_new);
WM_operatortype_append(CLIP_OT_tracking_object_remove);
/* clipboard */
WM_operatortype_append(CLIP_OT_copy_tracks);
WM_operatortype_append(CLIP_OT_paste_tracks);
Merge plane track feature from tomato branch This commit includes all the changes made for plane tracker in tomato branch. Movie clip editor changes: - Artist might create a plane track out of multiple point tracks which belongs to the same track (minimum amount of point tracks is 4, maximum is not actually limited). When new plane track is added, it's getting "tracked" across all point tracks, which makes it stick to the same plane point tracks belong to. - After plane track was added, it need to be manually adjusted in a way it covers feature one might to mask/replace. General transform tools (G, R, S) or sliding corners with a mouse could be sued for this. Plane corner which corresponds to left bottom image corner has got X/Y axis on it (red is for X axis, green for Y). - Re-adjusting plane corners makes plane to be "re-tracked" for the frames sequence between current frame and next and previous keyframes. - Kayframes might be removed from the plane, using Shit-X (Marker Delete) operator. However, currently manual re-adjustment or "re-track" trigger is needed. Compositor changes: - Added new node called Plane Track Deform. - User selects which plane track to use (for this he need to select movie clip datablock, object and track names). - Node gets an image input, which need to be warped into the plane. - Node outputs: * Input image warped into the plane. * Plane, rasterized to a mask. Masking changes: - Mask points might be parented to a plane track, which makes this point deforming in a way as if it belongs to the tracked plane. Some video tutorials are available: - Coder video: http://www.youtube.com/watch?v=vISEwqNHqe4 - Artist video: https://vimeo.com/71727578 This is mine and Keir's holiday code project :)
2013-08-16 09:46:30 +00:00
/* Plane tracker */
WM_operatortype_append(CLIP_OT_create_plane_track);
WM_operatortype_append(CLIP_OT_slide_plane_marker);
WM_operatortype_append(CLIP_OT_keyframe_insert);
WM_operatortype_append(CLIP_OT_keyframe_delete);
/* ** clip_graph_ops.c ** */
/* graph editing */
/* selection */
WM_operatortype_append(CLIP_OT_graph_select);
WM_operatortype_append(CLIP_OT_graph_select_box);
WM_operatortype_append(CLIP_OT_graph_select_all_markers);
WM_operatortype_append(CLIP_OT_graph_delete_curve);
WM_operatortype_append(CLIP_OT_graph_delete_knot);
WM_operatortype_append(CLIP_OT_graph_view_all);
WM_operatortype_append(CLIP_OT_graph_center_current_frame);
WM_operatortype_append(CLIP_OT_graph_disable_markers);
/* ** clip_dopesheet_ops.c ** */
WM_operatortype_append(CLIP_OT_dopesheet_select_channel);
WM_operatortype_append(CLIP_OT_dopesheet_view_all);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
static void clip_keymap(struct wmKeyConfig *keyconf)
{
/* ******** Global hotkeys available for all regions ******** */
WM_keymap_ensure(keyconf, "Clip", SPACE_CLIP, 0);
/* ******** Hotkeys available for main region only ******** */
WM_keymap_ensure(keyconf, "Clip Editor", SPACE_CLIP, 0);
// keymap->poll = ED_space_clip_tracking_poll;
/* ******** Hotkeys available for preview region only ******** */
WM_keymap_ensure(keyconf, "Clip Graph Editor", SPACE_CLIP, 0);
/* ******** Hotkeys available for channels region only ******** */
WM_keymap_ensure(keyconf, "Clip Dopesheet Editor", SPACE_CLIP, 0);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
/* DO NOT make this static, this hides the symbol and breaks API generation script. */
extern const char *clip_context_dir[]; /* quiet warning. */
const char *clip_context_dir[] = {"edit_movieclip", "edit_mask", NULL};
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
static int /*eContextResult*/ clip_context(const bContext *C,
const char *member,
bContextDataResult *result)
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
{
SpaceClip *sc = CTX_wm_space_clip(C);
if (CTX_data_dir(member)) {
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
CTX_data_dir_set(result, clip_context_dir);
return CTX_RESULT_OK;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
if (CTX_data_equals(member, "edit_movieclip")) {
2019-04-22 09:19:45 +10:00
if (sc->clip) {
CTX_data_id_pointer_set(result, &sc->clip->id);
2019-04-22 09:19:45 +10:00
}
return CTX_RESULT_OK;
}
if (CTX_data_equals(member, "edit_mask")) {
2019-04-22 09:19:45 +10:00
if (sc->mask_info.mask) {
CTX_data_id_pointer_set(result, &sc->mask_info.mask->id);
2019-04-22 09:19:45 +10:00
}
return CTX_RESULT_OK;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
return CTX_RESULT_MEMBER_NOT_FOUND;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
/* dropboxes */
static bool clip_drop_poll(bContext *UNUSED(C),
wmDrag *drag,
const wmEvent *UNUSED(event),
const char **UNUSED(r_tooltip))
{
if (drag->type == WM_DRAG_PATH) {
/* rule might not work? */
if (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE, ICON_FILE_BLANK)) {
return true;
}
}
return false;
}
static void clip_drop_copy(wmDrag *drag, wmDropBox *drop)
{
PointerRNA itemptr;
char dir[FILE_MAX], file[FILE_MAX];
BLI_split_dirfile(drag->path, dir, file, sizeof(dir), sizeof(file));
RNA_string_set(drop->ptr, "directory", dir);
RNA_collection_clear(drop->ptr, "files");
RNA_collection_add(drop->ptr, "files", &itemptr);
RNA_string_set(&itemptr, "name", file);
}
/* area+region dropbox definition */
static void clip_dropboxes(void)
{
ListBase *lb = WM_dropboxmap_find("Clip", SPACE_CLIP, 0);
WM_dropbox_add(lb, "CLIP_OT_open", clip_drop_poll, clip_drop_copy);
}
static void clip_refresh(const bContext *C, ScrArea *area)
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
{
wmWindowManager *wm = CTX_wm_manager(C);
wmWindow *window = CTX_wm_window(C);
Scene *scene = CTX_data_scene(C);
SpaceClip *sc = (SpaceClip *)area->spacedata.first;
ARegion *region_main = BKE_area_find_region_type(area, RGN_TYPE_WINDOW);
ARegion *region_tools = BKE_area_find_region_type(area, RGN_TYPE_TOOLS);
ARegion *region_preview = ED_clip_has_preview_region(C, area);
ARegion *region_properties = ED_clip_has_properties_region(area);
ARegion *region_channels = ED_clip_has_channels_region(area);
bool main_visible = false, preview_visible = false, tools_visible = false;
UI: New Global Top-Bar (WIP) == Main Features/Changes for Users * Add horizontal bar at top of all non-temp windows, consisting out of two horizontal sub-bars. * Upper sub-bar contains global menus (File, Render, etc.), tabs for workspaces and scene selector. * Lower sub-bar contains object mode selector, screen-layout and render-layer selector. Later operator and/or tool settings will be placed here. * Individual sections of the topbar are individually scrollable. * Workspace tabs can be double- or ctrl-clicked for renaming and contain 'x' icon for deleting. * Top-bar should scale nicely with DPI. * The lower half of the top-bar can be hided by dragging the lower top-bar edge up. Better hiding options are planned (e.g. hide in fullscreen modes). * Info editors at the top of the window and using the full window width with be replaced by the top-bar. * In fullscreen modes, no more info editor is added on top, the top-bar replaces it. == Technical Features/Changes * Adds initial support for global areas A global area is part of the window, not part of the regular screen-layout. I've added a macro iterator to iterate over both, global and screen-layout level areas. When iterating over areas, from now on developers should always consider if they have to include global areas. * Adds a TOPBAR editor type The editor type is hidden in the UI editor type menu. * Adds a variation of the ID template to display IDs as tab buttons (template_ID_tabs in BPY) * Does various changes to RNA button creation code to improve their appearance in the horizontal top-bar. * Adds support for dynamically sized regions. That is, regions that scale automatically to the layout bounds. The code for this is currently a big hack (it's based on drawing the UI multiple times). This should definitely be improved. * Adds a template for displaying operator properties optimized for the top-bar. This will probably change a lot still and is in fact disabled in code. Since the final top-bar design depends a lot on other 2.8 designs (mainly tool-system and workspaces), we decided to not show the operator or tool settings in the top-bar for now. That means most of the lower sub-bar is empty for the time being. NOTE: Top-bar or global area data is not written to files or SDNA. They are simply added to the window when opening Blender or reading a file. This allows us doing changes to the top-bar without having to care for compatibility. == ToDo's It's a bit hard to predict all the ToDo's here are the known main ones: * Add options for the new active-tool system and for operator redo to the topbar. * Automatically hide the top-bar in fullscreen modes. * General visual polish. * Top-bar drag & drop support (WIP in temp-tab_drag_drop). * Improve dynamic regions (should also fix some layout glitches). * Make internal terminology consistent. * Enable topbar file writing once design is more advanced. * Address TODO's and XXX's in code :) Thanks @brecht for the review! And @sergey for the complaining ;) Differential Revision: D2758
2018-04-20 17:14:03 +02:00
bool properties_visible = false, channels_visible = false;
bool view_changed = false;
switch (sc->view) {
case SC_VIEW_CLIP:
main_visible = true;
preview_visible = false;
tools_visible = true;
properties_visible = true;
channels_visible = false;
break;
case SC_VIEW_GRAPH:
main_visible = false;
preview_visible = true;
tools_visible = false;
properties_visible = false;
channels_visible = false;
reinit_preview_region(C, region_preview);
break;
case SC_VIEW_DOPESHEET:
main_visible = false;
preview_visible = true;
tools_visible = false;
properties_visible = false;
channels_visible = true;
reinit_preview_region(C, region_preview);
break;
}
if (main_visible) {
if (region_main && (region_main->flag & RGN_FLAG_HIDDEN)) {
region_main->flag &= ~RGN_FLAG_HIDDEN;
region_main->v2d.flag &= ~V2D_IS_INIT;
view_changed = true;
}
if (region_main && region_main->alignment != RGN_ALIGN_NONE) {
region_main->alignment = RGN_ALIGN_NONE;
view_changed = true;
}
}
else {
if (region_main && !(region_main->flag & RGN_FLAG_HIDDEN)) {
region_main->flag |= RGN_FLAG_HIDDEN;
region_main->v2d.flag &= ~V2D_IS_INIT;
WM_event_remove_handlers((bContext *)C, &region_main->handlers);
view_changed = true;
}
if (region_main && region_main->alignment != RGN_ALIGN_NONE) {
region_main->alignment = RGN_ALIGN_NONE;
view_changed = true;
}
}
if (properties_visible) {
if (region_properties && (region_properties->flag & RGN_FLAG_HIDDEN)) {
region_properties->flag &= ~RGN_FLAG_HIDDEN;
region_properties->v2d.flag &= ~V2D_IS_INIT;
view_changed = true;
}
if (region_properties && region_properties->alignment != RGN_ALIGN_RIGHT) {
region_properties->alignment = RGN_ALIGN_RIGHT;
view_changed = true;
}
}
else {
if (region_properties && !(region_properties->flag & RGN_FLAG_HIDDEN)) {
region_properties->flag |= RGN_FLAG_HIDDEN;
region_properties->v2d.flag &= ~V2D_IS_INIT;
WM_event_remove_handlers((bContext *)C, &region_properties->handlers);
view_changed = true;
}
if (region_properties && region_properties->alignment != RGN_ALIGN_NONE) {
region_properties->alignment = RGN_ALIGN_NONE;
view_changed = true;
}
}
if (tools_visible) {
if (region_tools && (region_tools->flag & RGN_FLAG_HIDDEN)) {
region_tools->flag &= ~RGN_FLAG_HIDDEN;
region_tools->v2d.flag &= ~V2D_IS_INIT;
view_changed = true;
}
if (region_tools && region_tools->alignment != RGN_ALIGN_LEFT) {
region_tools->alignment = RGN_ALIGN_LEFT;
view_changed = true;
}
}
else {
if (region_tools && !(region_tools->flag & RGN_FLAG_HIDDEN)) {
region_tools->flag |= RGN_FLAG_HIDDEN;
region_tools->v2d.flag &= ~V2D_IS_INIT;
WM_event_remove_handlers((bContext *)C, &region_tools->handlers);
view_changed = true;
}
if (region_tools && region_tools->alignment != RGN_ALIGN_NONE) {
region_tools->alignment = RGN_ALIGN_NONE;
view_changed = true;
}
}
if (preview_visible) {
if (region_preview && (region_preview->flag & RGN_FLAG_HIDDEN)) {
region_preview->flag &= ~RGN_FLAG_HIDDEN;
region_preview->v2d.flag &= ~V2D_IS_INIT;
region_preview->v2d.cur = region_preview->v2d.tot;
view_changed = true;
}
if (region_preview && region_preview->alignment != RGN_ALIGN_NONE) {
region_preview->alignment = RGN_ALIGN_NONE;
view_changed = true;
}
}
else {
if (region_preview && !(region_preview->flag & RGN_FLAG_HIDDEN)) {
region_preview->flag |= RGN_FLAG_HIDDEN;
region_preview->v2d.flag &= ~V2D_IS_INIT;
WM_event_remove_handlers((bContext *)C, &region_preview->handlers);
view_changed = true;
}
if (region_preview && region_preview->alignment != RGN_ALIGN_NONE) {
region_preview->alignment = RGN_ALIGN_NONE;
view_changed = true;
}
}
if (channels_visible) {
if (region_channels && (region_channels->flag & RGN_FLAG_HIDDEN)) {
region_channels->flag &= ~RGN_FLAG_HIDDEN;
region_channels->v2d.flag &= ~V2D_IS_INIT;
view_changed = true;
}
if (region_channels && region_channels->alignment != RGN_ALIGN_LEFT) {
region_channels->alignment = RGN_ALIGN_LEFT;
view_changed = true;
}
}
else {
if (region_channels && !(region_channels->flag & RGN_FLAG_HIDDEN)) {
region_channels->flag |= RGN_FLAG_HIDDEN;
region_channels->v2d.flag &= ~V2D_IS_INIT;
WM_event_remove_handlers((bContext *)C, &region_channels->handlers);
view_changed = true;
}
if (region_channels && region_channels->alignment != RGN_ALIGN_NONE) {
region_channels->alignment = RGN_ALIGN_NONE;
view_changed = true;
}
}
if (view_changed) {
ED_area_init(wm, window, area);
ED_area_tag_redraw(area);
}
BKE_movieclip_user_set_frame(&sc->user, scene->r.cfra);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
static void CLIP_GGT_navigate(wmGizmoGroupType *gzgt)
{
VIEW2D_GGT_navigate_impl(gzgt, "CLIP_GGT_navigate");
}
static void clip_gizmos(void)
{
wmGizmoMapType *gzmap_type = WM_gizmomaptype_ensure(
&(const struct wmGizmoMapType_Params){SPACE_CLIP, RGN_TYPE_WINDOW});
WM_gizmogrouptype_append_and_link(gzmap_type, CLIP_GGT_navigate);
}
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/********************* main region ********************/
/* sets up the fields of the View2D from zoom and offset */
static void movieclip_main_area_set_view2d(const bContext *C, ARegion *region)
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
{
SpaceClip *sc = CTX_wm_space_clip(C);
float x1, y1, w, h, aspx, aspy;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
int width, height, winx, winy;
ED_space_clip_get_size(sc, &width, &height);
ED_space_clip_get_aspect(sc, &aspx, &aspy);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
w = width * aspx;
h = height * aspy;
winx = BLI_rcti_size_x(&region->winrct) + 1;
winy = BLI_rcti_size_y(&region->winrct) + 1;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
region->v2d.tot.xmin = 0;
region->v2d.tot.ymin = 0;
region->v2d.tot.xmax = w;
region->v2d.tot.ymax = h;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
region->v2d.mask.xmin = region->v2d.mask.ymin = 0;
region->v2d.mask.xmax = winx;
region->v2d.mask.ymax = winy;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* which part of the image space do we see? */
x1 = region->winrct.xmin + (winx - sc->zoom * w) / 2.0f;
y1 = region->winrct.ymin + (winy - sc->zoom * h) / 2.0f;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
2012-05-03 23:47:39 +00:00
x1 -= sc->zoom * sc->xof;
y1 -= sc->zoom * sc->yof;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* relative display right */
region->v2d.cur.xmin = (region->winrct.xmin - (float)x1) / sc->zoom;
region->v2d.cur.xmax = region->v2d.cur.xmin + ((float)winx / sc->zoom);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* relative display left */
region->v2d.cur.ymin = (region->winrct.ymin - (float)y1) / sc->zoom;
region->v2d.cur.ymax = region->v2d.cur.ymin + ((float)winy / sc->zoom);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* normalize 0.0..1.0 */
region->v2d.cur.xmin /= w;
region->v2d.cur.xmax /= w;
region->v2d.cur.ymin /= h;
region->v2d.cur.ymax /= h;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
/* add handlers, stuff you only do once or on area/region changes */
static void clip_main_region_init(wmWindowManager *wm, ARegion *region)
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
{
wmKeyMap *keymap;
/* NOTE: don't use `UI_view2d_region_reinit(&region->v2d, ...)`
* since the space clip manages own v2d in #movieclip_main_area_set_view2d */
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* mask polls mode */
keymap = WM_keymap_ensure(wm->defaultconf, "Mask Editing", 0, 0);
WM_event_add_keymap_handler_v2d_mask(&region->handlers, keymap);
/* own keymap */
keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
WM_event_add_keymap_handler_v2d_mask(&region->handlers, keymap);
keymap = WM_keymap_ensure(wm->defaultconf, "Clip Editor", SPACE_CLIP, 0);
WM_event_add_keymap_handler_v2d_mask(&region->handlers, keymap);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
static void clip_main_region_draw(const bContext *C, ARegion *region)
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
{
/* draw entirely, view changes should be handled here */
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
float aspx, aspy, zoomx, zoomy, x, y;
int width, height;
bool show_cursor = false;
2012-03-08 04:12:11 +00:00
/* if tracking is in progress, we should synchronize framenr from clipuser
* so latest tracked frame would be shown */
2019-04-22 09:19:45 +10:00
if (clip && clip->tracking_context) {
BKE_autotrack_context_sync_user(clip->tracking_context, &sc->user);
2019-04-22 09:19:45 +10:00
}
if (sc->flag & SC_LOCK_SELECTION) {
ImBuf *tmpibuf = NULL;
if (clip && clip->tracking.stabilization.flag & TRACKING_2D_STABILIZATION) {
tmpibuf = ED_space_clip_get_stable_buffer(sc, NULL, NULL, NULL);
}
if (ED_clip_view_selection(C, region, 0)) {
sc->xof += sc->xlockof;
sc->yof += sc->ylockof;
}
2019-04-22 09:19:45 +10:00
if (tmpibuf) {
IMB_freeImBuf(tmpibuf);
2019-04-22 09:19:45 +10:00
}
}
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* data... */
movieclip_main_area_set_view2d(C, region);
/* callback */
ED_region_draw_cb_draw(C, region, REGION_DRAW_PRE_VIEW);
clip_draw_main(C, sc, region);
/* TODO(sergey): would be nice to find a way to de-duplicate all this space conversions */
UI_view2d_view_to_region_fl(&region->v2d, 0.0f, 0.0f, &x, &y);
ED_space_clip_get_size(sc, &width, &height);
ED_space_clip_get_zoom(sc, region, &zoomx, &zoomy);
ED_space_clip_get_aspect(sc, &aspx, &aspy);
if (sc->mode == SC_MODE_MASKEDIT) {
Mask *mask = CTX_data_edit_mask(C);
if (mask && clip) {
ScrArea *area = CTX_wm_area(C);
int mask_width, mask_height;
ED_mask_get_size(area, &mask_width, &mask_height);
Refactor access to dependency graph This change ensures that operators which needs access to evaluated data first makes sure there is a dependency graph. Other accesses to the dependency graph made it more explicit about whether they just need a valid dependency graph pointer or whether they expect the graph to be already evaluated. This replaces OPTYPE_USE_EVAL_DATA which is now removed. Some general rules about usage of accessors: - Drawing is expected to happen from a fully evaluated dependency graph. There is now a function to access it, which will in the future control that dependency graph is actually evaluated. This check is not yet done because there are some things to be taken care about first: for example, post-update hooks might leave scene in a state where something is still tagged for update. - All operators which needs to access evaluated state must use CTX_data_ensure_evaluated_depsgraph(). This function replaces OPTYPE_USE_EVAL_DATA. The call is generally to be done in the very beginning of the operator, prior other logic (unless this is some comprehensive operator which might or might not need access to an evaluated state). This call is never to be used from a loop. If some utility function requires evaluated state of dependency graph the graph is to be passed as an explicit argument. This way it is clear that no evaluation happens in a loop or something like this. - All cases which needs to know dependency graph pointer, but which doesn't want to actually evaluate it can use old-style function CTX_data_depsgraph_pointer(), assuming that underlying code will ensure dependency graph is evaluated prior to accessing it. - The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is explicit and local about where dependency graph is being ensured. This commit also contains some fixes of wrong usage of evaluation functions on original objects. Ideally should be split out, but in reality with all the APIs being renamed is quite tricky. Fixes T67454: Blender crash on rapid undo and select Speculation here is that sometimes undo and selection operators are sometimes handled in the same event loop iteration, which leaves non-evaluated dependency graph. Fixes T67973: Crash on Fix Deforms operator Fixes T67902: Crash when undo a loop cut Reviewers: brecht Reviewed By: brecht Subscribers: lichtwerk Maniphest Tasks: T67454 Differential Revision: https://developer.blender.org/D5343
2019-07-25 16:36:22 +02:00
ED_mask_draw_region(CTX_data_expect_evaluated_depsgraph(C),
mask,
region,
sc->mask_info.draw_flag,
sc->mask_info.draw_type,
sc->mask_info.overlay_mode,
mask_width,
mask_height,
aspx,
aspy,
true,
true,
sc->stabmat,
C);
}
}
show_cursor |= sc->mode == SC_MODE_MASKEDIT;
show_cursor |= sc->around == V3D_AROUND_CURSOR;
if (show_cursor) {
GPU_matrix_push();
GPU_matrix_translate_2f(x, y);
GPU_matrix_scale_2f(zoomx, zoomy);
GPU_matrix_mul(sc->stabmat);
GPU_matrix_scale_2f(width, height);
ED_image_draw_cursor(region, sc->cursor);
GPU_matrix_pop();
}
clip_draw_cache_and_notes(C, sc, region);
if (sc->flag & SC_SHOW_ANNOTATION) {
/* Grease Pencil */
clip_draw_grease_pencil((bContext *)C, true);
}
/* callback */
GPU_matrix_push_projection();
wmOrtho2(region->v2d.cur.xmin, region->v2d.cur.xmax, region->v2d.cur.ymin, region->v2d.cur.ymax);
ED_region_draw_cb_draw(C, region, REGION_DRAW_POST_VIEW);
GPU_matrix_pop_projection();
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* reset view matrix */
UI_view2d_view_restore(C);
if (sc->flag & SC_SHOW_ANNOTATION) {
/* draw Grease Pencil - screen space only */
clip_draw_grease_pencil((bContext *)C, false);
}
WM_gizmomap_draw(region->gizmo_map, C, WM_GIZMOMAP_DRAWSTEP_2D);
}
static void clip_main_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
case NC_GPENCIL:
2019-04-22 09:19:45 +10:00
if (wmn->action == NA_EDITED) {
ED_region_tag_redraw(region);
2019-04-22 09:19:45 +10:00
}
else if (wmn->data & ND_GPENCIL_EDITMODE) {
ED_region_tag_redraw(region);
2019-04-22 09:19:45 +10:00
}
2012-06-10 19:59:02 +00:00
break;
}
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
/****************** preview region ******************/
static void clip_preview_region_init(wmWindowManager *wm, ARegion *region)
{
wmKeyMap *keymap;
UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_CUSTOM, region->winx, region->winy);
/* own keymap */
keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
WM_event_add_keymap_handler_v2d_mask(&region->handlers, keymap);
keymap = WM_keymap_ensure(wm->defaultconf, "Clip Time Scrub", SPACE_CLIP, RGN_TYPE_PREVIEW);
WM_event_add_keymap_handler_poll(&region->handlers, keymap, ED_time_scrub_event_in_region);
keymap = WM_keymap_ensure(wm->defaultconf, "Clip Graph Editor", SPACE_CLIP, 0);
WM_event_add_keymap_handler_v2d_mask(&region->handlers, keymap);
keymap = WM_keymap_ensure(wm->defaultconf, "Clip Dopesheet Editor", SPACE_CLIP, 0);
WM_event_add_keymap_handler_v2d_mask(&region->handlers, keymap);
}
static void graph_region_draw(const bContext *C, ARegion *region)
{
View2D *v2d = &region->v2d;
SpaceClip *sc = CTX_wm_space_clip(C);
Scene *scene = CTX_data_scene(C);
short cfra_flag = 0;
2019-04-22 09:19:45 +10:00
if (sc->flag & SC_LOCK_TIMECURSOR) {
ED_clip_graph_center_current_frame(scene, region);
2019-04-22 09:19:45 +10:00
}
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
UI_view2d_view_ortho(v2d);
/* data... */
clip_draw_graph(sc, region, scene);
/* current frame indicator line */
2019-04-22 09:19:45 +10:00
if (sc->flag & SC_SHOW_SECONDS) {
cfra_flag |= DRAWCFRA_UNIT_SECONDS;
2019-04-22 09:19:45 +10:00
}
ANIM_draw_cfra(C, v2d, cfra_flag);
/* reset view matrix */
UI_view2d_view_restore(C);
/* time-scrubbing */
ED_time_scrub_draw(region, scene, sc->flag & SC_SHOW_SECONDS, true);
/* scrollers */
UI_view2d_scrollers_draw(v2d, NULL);
/* scale indicators */
{
rcti rect;
BLI_rcti_init(
&rect, 0, 15 * UI_DPI_FAC, 15 * UI_DPI_FAC, region->winy - UI_TIME_SCRUB_MARGIN_Y);
UI_view2d_draw_scale_y__values(region, v2d, &rect, TH_TEXT);
}
}
static void dopesheet_region_draw(const bContext *C, ARegion *region)
{
Scene *scene = CTX_data_scene(C);
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
View2D *v2d = &region->v2d;
short cfra_flag = 0;
2019-04-22 09:19:45 +10:00
if (clip) {
BKE_tracking_dopesheet_update(&clip->tracking);
2019-04-22 09:19:45 +10:00
}
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
UI_view2d_view_ortho(v2d);
/* time grid */
UI_view2d_draw_lines_x__discrete_frames_or_seconds(v2d, scene, sc->flag & SC_SHOW_SECONDS);
/* data... */
clip_draw_dopesheet_main(sc, region, scene);
/* current frame indicator line */
2019-04-22 09:19:45 +10:00
if (sc->flag & SC_SHOW_SECONDS) {
cfra_flag |= DRAWCFRA_UNIT_SECONDS;
2019-04-22 09:19:45 +10:00
}
ANIM_draw_cfra(C, v2d, cfra_flag);
/* reset view matrix */
UI_view2d_view_restore(C);
/* time-scrubbing */
ED_time_scrub_draw(region, scene, sc->flag & SC_SHOW_SECONDS, true);
/* scrollers */
UI_view2d_scrollers_draw(v2d, NULL);
}
static void clip_preview_region_draw(const bContext *C, ARegion *region)
{
SpaceClip *sc = CTX_wm_space_clip(C);
2019-04-22 09:19:45 +10:00
if (sc->view == SC_VIEW_GRAPH) {
graph_region_draw(C, region);
2019-04-22 09:19:45 +10:00
}
else if (sc->view == SC_VIEW_DOPESHEET) {
dopesheet_region_draw(C, region);
2019-04-22 09:19:45 +10:00
}
}
static void clip_preview_region_listener(const wmRegionListenerParams *UNUSED(params))
{
}
/****************** channels region ******************/
static void clip_channels_region_init(wmWindowManager *wm, ARegion *region)
{
wmKeyMap *keymap;
/* ensure the 2d view sync works - main region has bottom scroller */
region->v2d.scroll = V2D_SCROLL_BOTTOM;
UI_view2d_region_reinit(&region->v2d, V2D_COMMONVIEW_LIST, region->winx, region->winy);
keymap = WM_keymap_ensure(wm->defaultconf, "Clip Dopesheet Editor", SPACE_CLIP, 0);
WM_event_add_keymap_handler_v2d_mask(&region->handlers, keymap);
}
static void clip_channels_region_draw(const bContext *C, ARegion *region)
{
SpaceClip *sc = CTX_wm_space_clip(C);
MovieClip *clip = ED_space_clip_get_clip(sc);
View2D *v2d = &region->v2d;
2019-04-22 09:19:45 +10:00
if (clip) {
BKE_tracking_dopesheet_update(&clip->tracking);
2019-04-22 09:19:45 +10:00
}
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
UI_view2d_view_ortho(v2d);
/* data... */
clip_draw_dopesheet_channels(C, region);
/* reset view matrix */
UI_view2d_view_restore(C);
}
static void clip_channels_region_listener(const wmRegionListenerParams *UNUSED(params))
{
}
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/****************** header region ******************/
/* add handlers, stuff you only do once or on area/region changes */
static void clip_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
{
ED_region_header_init(region);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
static void clip_header_region_draw(const bContext *C, ARegion *region)
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
{
ED_region_header(C, region);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
static void clip_header_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
case NC_SCENE:
switch (wmn->data) {
/* for proportional editmode only */
case ND_TOOLSETTINGS:
/* TODO - should do this when in mask mode only but no data available */
2012-06-04 20:11:09 +00:00
// if (sc->mode == SC_MODE_MASKEDIT)
2012-06-10 19:59:02 +00:00
{
ED_region_tag_redraw(region);
break;
2012-06-10 19:59:02 +00:00
}
}
break;
}
}
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/****************** tools region ******************/
/* add handlers, stuff you only do once or on area/region changes */
static void clip_tools_region_init(wmWindowManager *wm, ARegion *region)
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
{
wmKeyMap *keymap;
ED_region_panels_init(wm, region);
keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
WM_event_add_keymap_handler(&region->handlers, keymap);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
static void clip_tools_region_draw(const bContext *C, ARegion *region)
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
{
ED_region_panels(C, region);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
/****************** tool properties region ******************/
static void clip_props_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
case NC_WM:
2019-04-22 09:19:45 +10:00
if (wmn->data == ND_HISTORY) {
ED_region_tag_redraw(region);
2019-04-22 09:19:45 +10:00
}
break;
case NC_SCENE:
2019-04-22 09:19:45 +10:00
if (wmn->data == ND_MODE) {
ED_region_tag_redraw(region);
2019-04-22 09:19:45 +10:00
}
break;
case NC_SPACE:
2019-04-22 09:19:45 +10:00
if (wmn->data == ND_SPACE_CLIP) {
ED_region_tag_redraw(region);
2019-04-22 09:19:45 +10:00
}
break;
case NC_GPENCIL:
2019-04-22 09:19:45 +10:00
if (wmn->action == NA_EDITED) {
ED_region_tag_redraw(region);
2019-04-22 09:19:45 +10:00
}
break;
}
}
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/****************** properties region ******************/
/* add handlers, stuff you only do once or on area/region changes */
static void clip_properties_region_init(wmWindowManager *wm, ARegion *region)
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
{
wmKeyMap *keymap;
ED_region_panels_init(wm, region);
keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
WM_event_add_keymap_handler(&region->handlers, keymap);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
static void clip_properties_region_draw(const bContext *C, ARegion *region)
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
{
SpaceClip *sc = CTX_wm_space_clip(C);
BKE_movieclip_update_scopes(sc->clip, &sc->user, &sc->scopes);
ED_region_panels(C, region);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}
static void clip_properties_region_listener(const wmRegionListenerParams *params)
{
ARegion *region = params->region;
wmNotifier *wmn = params->notifier;
/* context changes */
switch (wmn->category) {
case NC_GPENCIL:
2019-04-22 09:19:45 +10:00
if (ELEM(wmn->data, ND_DATA, ND_GPENCIL_EDITMODE)) {
ED_region_tag_redraw(region);
2019-04-22 09:19:45 +10:00
}
break;
case NC_BRUSH:
2019-04-22 09:19:45 +10:00
if (wmn->action == NA_EDITED) {
ED_region_tag_redraw(region);
2019-04-22 09:19:45 +10:00
}
break;
}
}
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/********************* registration ********************/
static void clip_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id)
ID-Remap - Step one: core work (cleanup and rework of generic ID datablock handling). This commit changes a lot of how IDs are handled internally, especially the unlinking/freeing processes. So far, this was very fuzy, to summarize cleanly deleting or replacing a datablock was pretty much impossible, except for a few special cases. Also, unlinking was handled by each datatype, in a rather messy and prone-to-errors way (quite a few ID usages were missed or wrongly handled that way). One of the main goal of id-remap branch was to cleanup this, and fatorize ID links handling by using library_query utils to allow generic handling of those, which is now the case (now, generic ID links handling is only "knwon" from readfile.c and library_query.c). This commit also adds backends to allow live replacement and deletion of datablocks in Blender (so-called 'remapping' process, where we replace all usages of a given ID pointer by a new one, or NULL one in case of unlinking). This will allow nice new features, like ability to easily reload or relocate libraries, real immediate deletion of datablocks in blender, replacement of one datablock by another, etc. Some of those are for next commits. A word of warning: this commit is highly risky, because it affects potentially a lot in Blender core. Though it was tested rather deeply, being totally impossible to check all possible ID usage cases, it's likely there are some remaining issues and bugs in new code... Please report them! ;) Review task: D2027 (https://developer.blender.org/D2027). Reviewed by campbellbarton, thanks a bunch.
2016-06-22 17:29:38 +02:00
{
SpaceClip *sclip = (SpaceClip *)slink;
if (!ELEM(GS(old_id->name), ID_MC, ID_MSK)) {
return;
}
if ((ID *)sclip->clip == old_id) {
sclip->clip = (MovieClip *)new_id;
id_us_ensure_real(new_id);
}
if ((ID *)sclip->mask_info.mask == old_id) {
sclip->mask_info.mask = (Mask *)new_id;
id_us_ensure_real(new_id);
}
}
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* only called once, from space/spacetypes.c */
void ED_spacetype_clip(void)
{
SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype clip");
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
ARegionType *art;
st->spaceid = SPACE_CLIP;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
strncpy(st->name, "Clip", BKE_ST_MAXNAME);
st->create = clip_create;
st->free = clip_free;
st->init = clip_init;
st->duplicate = clip_duplicate;
st->operatortypes = clip_operatortypes;
st->keymap = clip_keymap;
st->listener = clip_listener;
st->context = clip_context;
st->gizmos = clip_gizmos;
st->dropboxes = clip_dropboxes;
st->refresh = clip_refresh;
ID-Remap - Step one: core work (cleanup and rework of generic ID datablock handling). This commit changes a lot of how IDs are handled internally, especially the unlinking/freeing processes. So far, this was very fuzy, to summarize cleanly deleting or replacing a datablock was pretty much impossible, except for a few special cases. Also, unlinking was handled by each datatype, in a rather messy and prone-to-errors way (quite a few ID usages were missed or wrongly handled that way). One of the main goal of id-remap branch was to cleanup this, and fatorize ID links handling by using library_query utils to allow generic handling of those, which is now the case (now, generic ID links handling is only "knwon" from readfile.c and library_query.c). This commit also adds backends to allow live replacement and deletion of datablocks in Blender (so-called 'remapping' process, where we replace all usages of a given ID pointer by a new one, or NULL one in case of unlinking). This will allow nice new features, like ability to easily reload or relocate libraries, real immediate deletion of datablocks in blender, replacement of one datablock by another, etc. Some of those are for next commits. A word of warning: this commit is highly risky, because it affects potentially a lot in Blender core. Though it was tested rather deeply, being totally impossible to check all possible ID usage cases, it's likely there are some remaining issues and bugs in new code... Please report them! ;) Review task: D2027 (https://developer.blender.org/D2027). Reviewed by campbellbarton, thanks a bunch.
2016-06-22 17:29:38 +02:00
st->id_remap = clip_id_remap;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* regions: main window */
art = MEM_callocN(sizeof(ARegionType), "spacetype clip region");
art->regionid = RGN_TYPE_WINDOW;
art->init = clip_main_region_init;
art->draw = clip_main_region_draw;
art->listener = clip_main_region_listener;
art->keymapflag = ED_KEYMAP_GIZMO | ED_KEYMAP_FRAMES | ED_KEYMAP_UI | ED_KEYMAP_GPENCIL;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
BLI_addhead(&st->regiontypes, art);
/* preview */
art = MEM_callocN(sizeof(ARegionType), "spacetype clip region preview");
art->regionid = RGN_TYPE_PREVIEW;
art->prefsizey = 240;
art->init = clip_preview_region_init;
art->draw = clip_preview_region_draw;
art->listener = clip_preview_region_listener;
art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI | ED_KEYMAP_VIEW2D;
BLI_addhead(&st->regiontypes, art);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* regions: properties */
art = MEM_callocN(sizeof(ARegionType), "spacetype clip region properties");
art->regionid = RGN_TYPE_UI;
art->prefsizex = UI_SIDEBAR_PANEL_WIDTH;
art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI;
art->init = clip_properties_region_init;
art->draw = clip_properties_region_draw;
art->listener = clip_properties_region_listener;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
BLI_addhead(&st->regiontypes, art);
ED_clip_buttons_register(art);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* regions: tools */
art = MEM_callocN(sizeof(ARegionType), "spacetype clip region tools");
art->regionid = RGN_TYPE_TOOLS;
art->prefsizex = UI_SIDEBAR_PANEL_WIDTH;
art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI;
art->listener = clip_props_region_listener;
art->init = clip_tools_region_init;
art->draw = clip_tools_region_draw;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
BLI_addhead(&st->regiontypes, art);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
/* regions: header */
art = MEM_callocN(sizeof(ARegionType), "spacetype clip region");
art->regionid = RGN_TYPE_HEADER;
art->prefsizey = HEADERY;
art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER;
art->init = clip_header_region_init;
art->draw = clip_header_region_draw;
art->listener = clip_header_region_listener;
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
BLI_addhead(&st->regiontypes, art);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
BKE_spacetype_register(st);
/* channels */
art = MEM_callocN(sizeof(ARegionType), "spacetype clip channels region");
art->regionid = RGN_TYPE_CHANNELS;
art->prefsizex = UI_COMPACT_PANEL_WIDTH;
art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI;
art->listener = clip_channels_region_listener;
art->init = clip_channels_region_init;
art->draw = clip_channels_region_draw;
BLI_addhead(&st->regiontypes, art);
2018-08-16 20:23:15 +10:00
/* regions: hud */
art = ED_area_type_hud(st->spaceid);
BLI_addhead(&st->regiontypes, art);
Camera tracking integration =========================== - Initial implementaiton of new ID named MovieClip. Currently it has plactically the same functionality as images, but this functionality would be widen in nearest future. - Initial implementation of SpaceClip. This space is supposed to be used for acting with MovieClips (opening, playbacking, math-moving interaction and so on). Currently you could open image sequence/movie file here, pan/zoom, use a playback here. I've added cache visualizer to this space, but it's currently more a developer's feature to see how cache system works, but it could be adopted for further artists' usage (something like cache visuzlizer for simulations). - Added new theme area for Space Clip. No special colors were defined here yet. - Implementation of basic cache system for movies. This cache system is very familiar with sequence cache system, but it supposed to be more portable: at least cache keys aren't limited with sequence-based data and current seqcache could became an interface between sequencer and moviecache without much logic (only logic related on keys handling would be necessary here). Implemented basic limitors (ab\mount of cached imbuf's), so it'll be a bit more difficult to go out of memory when playing long animations in Image Editor (this cache system could be used for images too, in the future). - Very basic tools implementation -- only sceletion added, no real tool implemented (only camera focal length added to the UI which hasn't got real affect on anything). Assorted notes: - Not sure about best behaviour for Unlink clip button: should it be imageeditor-like (with de-referencing only) or text-editor like (with removing datablock from file). - Also not sure if tools/properties should be splitted into different areas or it'll be better to have tools and settings for this tool/item/etc in the same area (tools at the top, properties are under them). Code for properties area is '#if 0'-ed. - Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
}