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.
|
|
|
|
|
*
|
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.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \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 <string.h>
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
|
|
#include "DNA_scene_types.h"
|
2012-06-04 16:42:58 +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"
|
2019-04-17 06:17:24 +02: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_utildefines.h"
|
2011-10-19 12:46:30 +00:00
|
|
|
#include "BLI_math.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"
|
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
|
|
|
#include "BKE_library.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"
|
2011-06-27 14:24:23 +00:00
|
|
|
#include "BKE_tracking.h"
|
2018-11-07 18:00:24 +01:00
|
|
|
#include "BKE_screen.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"
|
|
|
|
|
|
2018-05-10 17:56:12 +02:00
|
|
|
#include "ED_anim_api.h" /* for timeline cursor drawing */
|
2012-06-04 16:42:58 +00:00
|
|
|
#include "ED_mask.h"
|
|
|
|
|
#include "ED_space_api.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"
|
2019-05-14 11:39:15 +02:00
|
|
|
#include "ED_time_scrub_ui.h"
|
2018-08-14 10:28:41 +10:00
|
|
|
#include "ED_select_utils.h"
|
2011-06-03 15:39:53 +00:00
|
|
|
#include "ED_clip.h"
|
|
|
|
|
#include "ED_transform.h"
|
2019-04-17 06:17:24 +02: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
|
|
|
|
2011-07-18 14:54:32 +00:00
|
|
|
#include "IMB_imbuf.h"
|
|
|
|
|
|
2017-08-21 01:39:03 +10:00
|
|
|
#include "GPU_glew.h"
|
2017-03-21 16:08:14 -04:00
|
|
|
#include "GPU_matrix.h"
|
2018-06-27 19:07:23 -06:00
|
|
|
#include "GPU_framebuffer.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"
|
|
|
|
|
|
2019-04-17 06:17:24 +02: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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
static void init_preview_region(const Scene *scene,
|
|
|
|
|
const ScrArea *sa,
|
|
|
|
|
const SpaceClip *sc,
|
|
|
|
|
ARegion *ar)
|
2011-10-19 12:46:30 +00:00
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
ar->regiontype = RGN_TYPE_PREVIEW;
|
|
|
|
|
ar->alignment = RGN_ALIGN_TOP;
|
|
|
|
|
ar->flag |= RGN_FLAG_HIDDEN;
|
|
|
|
|
|
|
|
|
|
if (sc->view == SC_VIEW_DOPESHEET) {
|
|
|
|
|
ar->v2d.tot.xmin = -10.0f;
|
|
|
|
|
ar->v2d.tot.ymin = (float)(-sa->winy) / 3.0f;
|
|
|
|
|
ar->v2d.tot.xmax = (float)(sa->winx);
|
|
|
|
|
ar->v2d.tot.ymax = 0.0f;
|
|
|
|
|
|
|
|
|
|
ar->v2d.cur = ar->v2d.tot;
|
|
|
|
|
|
|
|
|
|
ar->v2d.min[0] = 0.0f;
|
|
|
|
|
ar->v2d.min[1] = 0.0f;
|
|
|
|
|
|
|
|
|
|
ar->v2d.max[0] = MAXFRAMEF;
|
|
|
|
|
ar->v2d.max[1] = FLT_MAX;
|
|
|
|
|
|
|
|
|
|
ar->v2d.minzoom = 0.01f;
|
|
|
|
|
ar->v2d.maxzoom = 50;
|
2019-05-08 15:09:02 +02:00
|
|
|
ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES);
|
2019-04-17 06:17:24 +02:00
|
|
|
ar->v2d.scroll |= (V2D_SCROLL_RIGHT);
|
|
|
|
|
ar->v2d.keepzoom = V2D_LOCKZOOM_Y;
|
|
|
|
|
ar->v2d.keepofs = V2D_KEEPOFS_Y;
|
|
|
|
|
ar->v2d.align = V2D_ALIGN_NO_POS_Y;
|
|
|
|
|
ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
ar->v2d.tot.xmin = 0.0f;
|
|
|
|
|
ar->v2d.tot.ymin = -10.0f;
|
|
|
|
|
ar->v2d.tot.xmax = (float)scene->r.efra;
|
|
|
|
|
ar->v2d.tot.ymax = 10.0f;
|
|
|
|
|
|
|
|
|
|
ar->v2d.cur = ar->v2d.tot;
|
|
|
|
|
|
|
|
|
|
ar->v2d.min[0] = FLT_MIN;
|
|
|
|
|
ar->v2d.min[1] = FLT_MIN;
|
|
|
|
|
|
|
|
|
|
ar->v2d.max[0] = MAXFRAMEF;
|
|
|
|
|
ar->v2d.max[1] = FLT_MAX;
|
|
|
|
|
|
2019-05-08 15:09:02 +02:00
|
|
|
ar->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES);
|
|
|
|
|
ar->v2d.scroll |= (V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HANDLES);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
|
|
|
|
ar->v2d.minzoom = 0.0f;
|
|
|
|
|
ar->v2d.maxzoom = 0.0f;
|
|
|
|
|
ar->v2d.keepzoom = 0;
|
|
|
|
|
ar->v2d.keepofs = 0;
|
|
|
|
|
ar->v2d.align = 0;
|
|
|
|
|
ar->v2d.flag = 0;
|
|
|
|
|
|
|
|
|
|
ar->v2d.keeptot = 0;
|
|
|
|
|
}
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void reinit_preview_region(const bContext *C, ARegion *ar)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
Scene *scene = CTX_data_scene(C);
|
|
|
|
|
ScrArea *sa = CTX_wm_area(C);
|
|
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
|
|
|
|
|
|
|
|
|
if (sc->view == SC_VIEW_DOPESHEET) {
|
2019-04-22 09:19:45 +10:00
|
|
|
if ((ar->v2d.flag & V2D_VIEWSYNC_AREA_VERTICAL) == 0) {
|
2019-04-17 06:17:24 +02:00
|
|
|
init_preview_region(scene, sa, sc, ar);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
}
|
|
|
|
|
else {
|
2019-04-22 09:19:45 +10:00
|
|
|
if (ar->v2d.flag & V2D_VIEWSYNC_AREA_VERTICAL) {
|
2019-04-17 06:17:24 +02:00
|
|
|
init_preview_region(scene, sa, sc, ar);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
}
|
2011-10-19 12:46:30 +00:00
|
|
|
}
|
|
|
|
|
|
2012-04-29 12:32:26 +00:00
|
|
|
static ARegion *ED_clip_has_preview_region(const bContext *C, ScrArea *sa)
|
2011-10-19 12:46:30 +00:00
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
ARegion *ar, *arnew;
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
ar = BKE_area_find_region_type(sa, RGN_TYPE_PREVIEW);
|
2019-04-22 09:19:45 +10:00
|
|
|
if (ar) {
|
2019-04-17 06:17:24 +02:00
|
|
|
return ar;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* add subdiv level; after header */
|
|
|
|
|
ar = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* is error! */
|
2019-04-22 09:19:45 +10:00
|
|
|
if (ar == NULL) {
|
2019-04-17 06:17:24 +02:00
|
|
|
return NULL;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
arnew = MEM_callocN(sizeof(ARegion), "clip preview region");
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
BLI_insertlinkbefore(&sa->regionbase, ar, arnew);
|
|
|
|
|
init_preview_region(CTX_data_scene(C), sa, CTX_wm_space_clip(C), arnew);
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
return arnew;
|
2011-10-19 12:46:30 +00:00
|
|
|
}
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
static ARegion *ED_clip_has_channels_region(ScrArea *sa)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
ARegion *ar, *arnew;
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
ar = BKE_area_find_region_type(sa, RGN_TYPE_CHANNELS);
|
2019-04-22 09:19:45 +10:00
|
|
|
if (ar) {
|
2019-04-17 06:17:24 +02:00
|
|
|
return ar;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* add subdiv level; after header */
|
|
|
|
|
ar = BKE_area_find_region_type(sa, RGN_TYPE_PREVIEW);
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* is error! */
|
2019-04-22 09:19:45 +10:00
|
|
|
if (ar == NULL) {
|
2019-04-17 06:17:24 +02:00
|
|
|
return NULL;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
arnew = MEM_callocN(sizeof(ARegion), "clip channels region");
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
BLI_insertlinkbefore(&sa->regionbase, ar, arnew);
|
|
|
|
|
arnew->regiontype = RGN_TYPE_CHANNELS;
|
|
|
|
|
arnew->alignment = RGN_ALIGN_LEFT;
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
arnew->v2d.scroll = V2D_SCROLL_BOTTOM;
|
|
|
|
|
arnew->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
return arnew;
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
|
|
|
|
|
2011-07-18 14:54:32 +00:00
|
|
|
static void clip_scopes_tag_refresh(ScrArea *sa)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
SpaceClip *sc = (SpaceClip *)sa->spacedata.first;
|
|
|
|
|
ARegion *ar;
|
2011-07-18 14:54:32 +00:00
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (sc->mode != SC_MODE_TRACKING) {
|
2019-04-17 06:17:24 +02:00
|
|
|
return;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2011-10-10 15:29:39 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* only while properties are visible */
|
|
|
|
|
for (ar = sa->regionbase.first; ar; ar = ar->next) {
|
2019-04-22 09:19:45 +10:00
|
|
|
if (ar->regiontype == RGN_TYPE_UI && ar->flag & RGN_FLAG_HIDDEN) {
|
2019-04-17 06:17:24 +02:00
|
|
|
return;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
}
|
2011-07-18 14:54:32 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
sc->scopes.ok = false;
|
2011-07-18 14:54:32 +00:00
|
|
|
}
|
|
|
|
|
|
2012-06-12 11:13:53 +00:00
|
|
|
static void clip_scopes_check_gpencil_change(ScrArea *sa)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
SpaceClip *sc = (SpaceClip *)sa->spacedata.first;
|
2012-06-12 11:13:53 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
if (sc->gpencil_src == SC_GPENCIL_SRC_TRACK) {
|
|
|
|
|
clip_scopes_tag_refresh(sa);
|
|
|
|
|
}
|
2012-06-12 11:13:53 +00:00
|
|
|
}
|
|
|
|
|
|
2019-01-24 10:36:42 +01:00
|
|
|
static void clip_area_sync_frame_from_scene(ScrArea *sa, Scene *scene)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
SpaceClip *space_clip = (SpaceClip *)sa->spacedata.first;
|
|
|
|
|
BKE_movieclip_user_set_frame(&space_clip->user, scene->r.cfra);
|
2019-01-24 10:36:42 +01: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
|
|
|
/* ******************** default callbacks for clip space ***************** */
|
|
|
|
|
|
2018-04-21 19:30:56 +02:00
|
|
|
static SpaceLink *clip_new(const ScrArea *sa, 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
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
ARegion *ar;
|
|
|
|
|
SpaceClip *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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
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;
|
2019-05-08 18:08:35 +02:00
|
|
|
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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* header */
|
|
|
|
|
ar = 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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
BLI_addtail(&sc->regionbase, ar);
|
|
|
|
|
ar->regiontype = RGN_TYPE_HEADER;
|
|
|
|
|
ar->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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* tools view */
|
|
|
|
|
ar = 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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
BLI_addtail(&sc->regionbase, ar);
|
|
|
|
|
ar->regiontype = RGN_TYPE_TOOLS;
|
|
|
|
|
ar->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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* properties view */
|
|
|
|
|
ar = 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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
BLI_addtail(&sc->regionbase, ar);
|
|
|
|
|
ar->regiontype = RGN_TYPE_UI;
|
|
|
|
|
ar->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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* channels view */
|
|
|
|
|
ar = MEM_callocN(sizeof(ARegion), "channels for clip");
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
BLI_addtail(&sc->regionbase, ar);
|
|
|
|
|
ar->regiontype = RGN_TYPE_CHANNELS;
|
|
|
|
|
ar->alignment = RGN_ALIGN_LEFT;
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
ar->v2d.scroll = V2D_SCROLL_BOTTOM;
|
|
|
|
|
ar->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* preview view */
|
|
|
|
|
ar = MEM_callocN(sizeof(ARegion), "preview for clip");
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
BLI_addtail(&sc->regionbase, ar);
|
|
|
|
|
init_preview_region(scene, sa, sc, ar);
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* main region */
|
|
|
|
|
ar = 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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
BLI_addtail(&sc->regionbase, ar);
|
|
|
|
|
ar->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
|
|
|
|
2019-04-17 06:17:24 +02: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)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
SpaceClip *sc = (SpaceClip *)sl;
|
2011-07-18 14:54:32 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
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) {
|
2019-04-17 06:17:24 +02:00
|
|
|
IMB_freeImBuf(sc->scopes.track_preview);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (sc->scopes.track_search) {
|
2019-04-17 06:17:24 +02: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 */
|
2012-05-02 16:42:42 +00:00
|
|
|
static void clip_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
|
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-17 06:17:24 +02: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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* add drop boxes */
|
|
|
|
|
WM_event_add_dropbox_handler(&sa->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)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* clear or remove stuff from old */
|
|
|
|
|
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
|
|
|
|
2019-04-17 06:17:24 +02: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
|
|
|
}
|
|
|
|
|
|
2019-01-24 10:36:42 +01:00
|
|
|
static void clip_listener(wmWindow *UNUSED(win), ScrArea *sa, wmNotifier *wmn, 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
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
/* context changes */
|
|
|
|
|
switch (wmn->category) {
|
|
|
|
|
case NC_SCENE:
|
|
|
|
|
switch (wmn->data) {
|
|
|
|
|
case ND_FRAME:
|
|
|
|
|
clip_scopes_tag_refresh(sa);
|
|
|
|
|
ATTR_FALLTHROUGH;
|
|
|
|
|
|
|
|
|
|
case ND_FRAME_RANGE:
|
|
|
|
|
ED_area_tag_redraw(sa);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case NC_MOVIECLIP:
|
|
|
|
|
switch (wmn->data) {
|
|
|
|
|
case ND_DISPLAY:
|
|
|
|
|
case ND_SELECT:
|
|
|
|
|
clip_scopes_tag_refresh(sa);
|
|
|
|
|
ED_area_tag_redraw(sa);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
switch (wmn->action) {
|
|
|
|
|
case NA_REMOVED:
|
|
|
|
|
case NA_EDITED:
|
|
|
|
|
case NA_EVALUATED:
|
|
|
|
|
/* fall-through */
|
|
|
|
|
|
|
|
|
|
case NA_SELECTED:
|
|
|
|
|
clip_scopes_tag_refresh(sa);
|
|
|
|
|
ED_area_tag_redraw(sa);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case NC_MASK:
|
|
|
|
|
switch (wmn->data) {
|
|
|
|
|
case ND_SELECT:
|
|
|
|
|
case ND_DATA:
|
|
|
|
|
case ND_DRAW:
|
|
|
|
|
ED_area_tag_redraw(sa);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
switch (wmn->action) {
|
|
|
|
|
case NA_SELECTED:
|
|
|
|
|
ED_area_tag_redraw(sa);
|
|
|
|
|
break;
|
|
|
|
|
case NA_EDITED:
|
|
|
|
|
ED_area_tag_redraw(sa);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case NC_GEOM:
|
|
|
|
|
switch (wmn->data) {
|
|
|
|
|
case ND_SELECT:
|
|
|
|
|
clip_scopes_tag_refresh(sa);
|
|
|
|
|
ED_area_tag_redraw(sa);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case NC_SCREEN:
|
|
|
|
|
switch (wmn->data) {
|
|
|
|
|
case ND_ANIMPLAY:
|
|
|
|
|
ED_area_tag_redraw(sa);
|
|
|
|
|
break;
|
|
|
|
|
case ND_LAYOUTSET:
|
|
|
|
|
clip_area_sync_frame_from_scene(sa, scene);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case NC_SPACE:
|
|
|
|
|
if (wmn->data == ND_SPACE_CLIP) {
|
|
|
|
|
clip_scopes_tag_refresh(sa);
|
|
|
|
|
ED_area_tag_redraw(sa);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case NC_GPENCIL:
|
|
|
|
|
if (wmn->action == NA_EDITED) {
|
|
|
|
|
clip_scopes_check_gpencil_change(sa);
|
|
|
|
|
ED_area_tag_redraw(sa);
|
|
|
|
|
}
|
|
|
|
|
else if (wmn->data & ND_GPENCIL_EDITMODE) {
|
|
|
|
|
ED_area_tag_redraw(sa);
|
|
|
|
|
}
|
|
|
|
|
break;
|
2019-07-17 14:42:02 +02:00
|
|
|
case NC_WM:
|
|
|
|
|
switch (wmn->data) {
|
|
|
|
|
case ND_FILEREAD:
|
|
|
|
|
case ND_UNDO:
|
|
|
|
|
clip_area_sync_frame_from_scene(sa, scene);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2019-04-17 06:17:24 +02: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
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void clip_operatortypes(void)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
/* ** clip_ops.c ** */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_open);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_reload);
|
|
|
|
|
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_change_frame);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_rebuild_proxy);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_mode_set);
|
2016-08-18 00:21:55 -04:00
|
|
|
#ifdef WITH_INPUT_NDOF
|
2019-04-17 06:17:24 +02:00
|
|
|
WM_operatortype_append(CLIP_OT_view_ndof);
|
2016-08-18 00:21:55 -04:00
|
|
|
#endif
|
2019-04-17 06:17:24 +02:00
|
|
|
WM_operatortype_append(CLIP_OT_prefetch);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_set_scene_frames);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_cursor_set);
|
|
|
|
|
|
|
|
|
|
/* ** tracking_ops.c ** */
|
2011-08-08 12:18:32 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* navigation */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_frame_jump);
|
2011-06-03 15:39:53 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* set optical center to frame center */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_set_center_principal);
|
2011-08-08 12:18:32 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* selection */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_select);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_select_all);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_select_box);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_select_lasso);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_select_circle);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_select_grouped);
|
2011-06-03 15:39:53 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* markers */
|
|
|
|
|
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);
|
2011-06-10 17:17:25 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* track */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_track_markers);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_refine_markers);
|
2011-08-08 12:18:32 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* solving */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_solve_camera);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_clear_solution);
|
2011-06-14 16:22:06 +00:00
|
|
|
|
2019-04-17 06:17:24 +02: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);
|
2011-07-13 15:09:45 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
WM_operatortype_append(CLIP_OT_set_solver_keyframe);
|
2012-07-26 09:50:27 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* 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);
|
2011-07-08 08:38:54 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* detect */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_detect_features);
|
2011-07-29 15:25:00 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* 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);
|
|
|
|
|
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);
|
2011-08-04 14:39:37 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* clean-up */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_clear_track_path);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_join_tracks);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_track_copy_color);
|
2011-08-08 12:18:32 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
WM_operatortype_append(CLIP_OT_clean_tracks);
|
2011-10-29 07:14:31 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* object tracking */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_tracking_object_new);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_tracking_object_remove);
|
2012-03-08 17:06:40 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* clipboard */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_copy_tracks);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_paste_tracks);
|
2012-03-08 17:06:40 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* Plane tracker */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_create_plane_track);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_slide_plane_marker);
|
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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
WM_operatortype_append(CLIP_OT_keyframe_insert);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_keyframe_delete);
|
2013-09-09 11:55:52 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* ** clip_graph_ops.c ** */
|
2012-03-08 17:06:40 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* graph editing */
|
2012-03-08 17:06:40 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* 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);
|
2012-03-08 17:06:40 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
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);
|
2011-12-05 18:57:17 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
WM_operatortype_append(CLIP_OT_graph_disable_markers);
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* ** clip_dopesheet_ops.c ** */
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
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)
|
|
|
|
|
{
|
2019-08-01 13:53:25 +10:00
|
|
|
/* ******** Global hotkeys available for all regions ******** */
|
2019-04-17 06:17:24 +02:00
|
|
|
WM_keymap_ensure(keyconf, "Clip", SPACE_CLIP, 0);
|
2013-04-04 09:50:38 +00:00
|
|
|
|
2019-08-01 13:53:25 +10:00
|
|
|
/* ******** Hotkeys available for main region only ******** */
|
2019-04-17 06:17:24 +02:00
|
|
|
WM_keymap_ensure(keyconf, "Clip Editor", SPACE_CLIP, 0);
|
|
|
|
|
// keymap->poll = ED_space_clip_tracking_poll;
|
2014-09-26 14:45:34 +06:00
|
|
|
|
2019-08-01 13:53:25 +10:00
|
|
|
/* ******** Hotkeys available for preview region only ******** */
|
2019-04-17 06:17:24 +02:00
|
|
|
WM_keymap_ensure(keyconf, "Clip Graph Editor", SPACE_CLIP, 0);
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-08-01 13:53:25 +10:00
|
|
|
/* ******** Hotkeys available for channels region only ******** */
|
2019-04-17 06:17:24 +02:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
2017-08-06 17:35:41 +02:00
|
|
|
/* DO NOT make this static, this hides the symbol and breaks API generation script. */
|
2019-04-17 06:17:24 +02:00
|
|
|
extern const char *clip_context_dir[]; /* quiet warning. */
|
2017-08-06 17:35:41 +02:00
|
|
|
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 clip_context(const bContext *C, const char *member, bContextDataResult *result)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
|
|
|
|
|
|
|
|
|
if (CTX_data_dir(member)) {
|
|
|
|
|
CTX_data_dir_set(result, clip_context_dir);
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else if (CTX_data_equals(member, "edit_movieclip")) {
|
2019-04-22 09:19:45 +10:00
|
|
|
if (sc->clip) {
|
2019-04-17 06:17:24 +02:00
|
|
|
CTX_data_id_pointer_set(result, &sc->clip->id);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else if (CTX_data_equals(member, "edit_mask")) {
|
2019-04-22 09:19:45 +10:00
|
|
|
if (sc->mask_info.mask) {
|
2019-04-17 06:17:24 +02:00
|
|
|
CTX_data_id_pointer_set(result, &sc->mask_info.mask->id);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 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
|
|
|
}
|
|
|
|
|
|
2012-05-02 16:42:42 +00:00
|
|
|
/* dropboxes */
|
2019-04-17 06:17:24 +02:00
|
|
|
static bool clip_drop_poll(bContext *UNUSED(C),
|
|
|
|
|
wmDrag *drag,
|
|
|
|
|
const wmEvent *UNUSED(event),
|
|
|
|
|
const char **UNUSED(tooltip))
|
2012-05-02 16:42:42 +00:00
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
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;
|
2012-05-02 16:42:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void clip_drop_copy(wmDrag *drag, wmDropBox *drop)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
PointerRNA itemptr;
|
|
|
|
|
char dir[FILE_MAX], file[FILE_MAX];
|
2012-07-12 11:52:09 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
BLI_split_dirfile(drag->path, dir, file, sizeof(dir), sizeof(file));
|
2012-07-12 11:52:09 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
RNA_string_set(drop->ptr, "directory", dir);
|
2012-07-12 11:52:09 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
RNA_collection_clear(drop->ptr, "files");
|
|
|
|
|
RNA_collection_add(drop->ptr, "files", &itemptr);
|
|
|
|
|
RNA_string_set(&itemptr, "name", file);
|
2012-05-02 16:42:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* area+region dropbox definition */
|
|
|
|
|
static void clip_dropboxes(void)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
ListBase *lb = WM_dropboxmap_find("Clip", SPACE_CLIP, 0);
|
2012-05-02 16:42:42 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
WM_dropbox_add(lb, "CLIP_OT_open", clip_drop_poll, clip_drop_copy);
|
2012-05-02 16:42:42 +00:00
|
|
|
}
|
|
|
|
|
|
2011-10-19 12:46:30 +00:00
|
|
|
static void clip_refresh(const bContext *C, ScrArea *sa)
|
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-17 06:17:24 +02:00
|
|
|
wmWindowManager *wm = CTX_wm_manager(C);
|
|
|
|
|
wmWindow *window = CTX_wm_window(C);
|
|
|
|
|
Scene *scene = CTX_data_scene(C);
|
|
|
|
|
SpaceClip *sc = (SpaceClip *)sa->spacedata.first;
|
|
|
|
|
ARegion *ar_main = BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
|
|
|
|
|
ARegion *ar_tools = BKE_area_find_region_type(sa, RGN_TYPE_TOOLS);
|
|
|
|
|
ARegion *ar_preview = ED_clip_has_preview_region(C, sa);
|
|
|
|
|
ARegion *ar_properties = ED_clip_has_properties_region(sa);
|
|
|
|
|
ARegion *ar_channels = ED_clip_has_channels_region(sa);
|
|
|
|
|
bool main_visible = false, preview_visible = false, tools_visible = false;
|
|
|
|
|
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, ar_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, ar_preview);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (main_visible) {
|
|
|
|
|
if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
ar_main->flag &= ~RGN_FLAG_HIDDEN;
|
|
|
|
|
ar_main->v2d.flag &= ~V2D_IS_INITIALISED;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) {
|
|
|
|
|
ar_main->alignment = RGN_ALIGN_NONE;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (ar_main && !(ar_main->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
ar_main->flag |= RGN_FLAG_HIDDEN;
|
|
|
|
|
ar_main->v2d.flag &= ~V2D_IS_INITIALISED;
|
|
|
|
|
WM_event_remove_handlers((bContext *)C, &ar_main->handlers);
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) {
|
|
|
|
|
ar_main->alignment = RGN_ALIGN_NONE;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (properties_visible) {
|
|
|
|
|
if (ar_properties && (ar_properties->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
ar_properties->flag &= ~RGN_FLAG_HIDDEN;
|
|
|
|
|
ar_properties->v2d.flag &= ~V2D_IS_INITIALISED;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
if (ar_properties && ar_properties->alignment != RGN_ALIGN_RIGHT) {
|
|
|
|
|
ar_properties->alignment = RGN_ALIGN_RIGHT;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (ar_properties && !(ar_properties->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
ar_properties->flag |= RGN_FLAG_HIDDEN;
|
|
|
|
|
ar_properties->v2d.flag &= ~V2D_IS_INITIALISED;
|
|
|
|
|
WM_event_remove_handlers((bContext *)C, &ar_properties->handlers);
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
if (ar_properties && ar_properties->alignment != RGN_ALIGN_NONE) {
|
|
|
|
|
ar_properties->alignment = RGN_ALIGN_NONE;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (tools_visible) {
|
|
|
|
|
if (ar_tools && (ar_tools->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
ar_tools->flag &= ~RGN_FLAG_HIDDEN;
|
|
|
|
|
ar_tools->v2d.flag &= ~V2D_IS_INITIALISED;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
if (ar_tools && ar_tools->alignment != RGN_ALIGN_LEFT) {
|
|
|
|
|
ar_tools->alignment = RGN_ALIGN_LEFT;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (ar_tools && !(ar_tools->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
ar_tools->flag |= RGN_FLAG_HIDDEN;
|
|
|
|
|
ar_tools->v2d.flag &= ~V2D_IS_INITIALISED;
|
|
|
|
|
WM_event_remove_handlers((bContext *)C, &ar_tools->handlers);
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
if (ar_tools && ar_tools->alignment != RGN_ALIGN_NONE) {
|
|
|
|
|
ar_tools->alignment = RGN_ALIGN_NONE;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (preview_visible) {
|
|
|
|
|
if (ar_preview && (ar_preview->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
ar_preview->flag &= ~RGN_FLAG_HIDDEN;
|
|
|
|
|
ar_preview->v2d.flag &= ~V2D_IS_INITIALISED;
|
|
|
|
|
ar_preview->v2d.cur = ar_preview->v2d.tot;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
if (ar_preview && ar_preview->alignment != RGN_ALIGN_NONE) {
|
|
|
|
|
ar_preview->alignment = RGN_ALIGN_NONE;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (ar_preview && !(ar_preview->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
ar_preview->flag |= RGN_FLAG_HIDDEN;
|
|
|
|
|
ar_preview->v2d.flag &= ~V2D_IS_INITIALISED;
|
|
|
|
|
WM_event_remove_handlers((bContext *)C, &ar_preview->handlers);
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
if (ar_preview && ar_preview->alignment != RGN_ALIGN_NONE) {
|
|
|
|
|
ar_preview->alignment = RGN_ALIGN_NONE;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (channels_visible) {
|
|
|
|
|
if (ar_channels && (ar_channels->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
ar_channels->flag &= ~RGN_FLAG_HIDDEN;
|
|
|
|
|
ar_channels->v2d.flag &= ~V2D_IS_INITIALISED;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
if (ar_channels && ar_channels->alignment != RGN_ALIGN_LEFT) {
|
|
|
|
|
ar_channels->alignment = RGN_ALIGN_LEFT;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (ar_channels && !(ar_channels->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
ar_channels->flag |= RGN_FLAG_HIDDEN;
|
|
|
|
|
ar_channels->v2d.flag &= ~V2D_IS_INITIALISED;
|
|
|
|
|
WM_event_remove_handlers((bContext *)C, &ar_channels->handlers);
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
if (ar_channels && ar_channels->alignment != RGN_ALIGN_NONE) {
|
|
|
|
|
ar_channels->alignment = RGN_ALIGN_NONE;
|
|
|
|
|
view_changed = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (view_changed) {
|
|
|
|
|
ED_area_initialize(wm, window, sa);
|
|
|
|
|
ED_area_tag_redraw(sa);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
2019-05-31 21:45:28 +10: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 */
|
2012-06-20 10:28:51 +00:00
|
|
|
static void movieclip_main_area_set_view2d(const bContext *C, ARegion *ar)
|
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-17 06:17:24 +02:00
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
|
|
|
|
float x1, y1, w, h, aspx, aspy;
|
|
|
|
|
int width, height, winx, 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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
w = width * aspx;
|
|
|
|
|
h = height * aspy;
|
2011-07-21 09:23:25 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
winx = BLI_rcti_size_x(&ar->winrct) + 1;
|
|
|
|
|
winy = BLI_rcti_size_y(&ar->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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
ar->v2d.tot.xmin = 0;
|
|
|
|
|
ar->v2d.tot.ymin = 0;
|
|
|
|
|
ar->v2d.tot.xmax = w;
|
|
|
|
|
ar->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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
ar->v2d.mask.xmin = ar->v2d.mask.ymin = 0;
|
|
|
|
|
ar->v2d.mask.xmax = winx;
|
|
|
|
|
ar->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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* which part of the image space do we see? */
|
|
|
|
|
x1 = ar->winrct.xmin + (winx - sc->zoom * w) / 2.0f;
|
|
|
|
|
y1 = ar->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
|
|
|
|
2019-04-17 06:17:24 +02: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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* relative display right */
|
|
|
|
|
ar->v2d.cur.xmin = (ar->winrct.xmin - (float)x1) / sc->zoom;
|
|
|
|
|
ar->v2d.cur.xmax = ar->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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* relative display left */
|
|
|
|
|
ar->v2d.cur.ymin = (ar->winrct.ymin - (float)y1) / sc->zoom;
|
|
|
|
|
ar->v2d.cur.ymax = ar->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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* normalize 0.0..1.0 */
|
|
|
|
|
ar->v2d.cur.xmin /= w;
|
|
|
|
|
ar->v2d.cur.xmax /= w;
|
|
|
|
|
ar->v2d.cur.ymin /= h;
|
|
|
|
|
ar->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 */
|
2015-11-28 17:14:45 +01:00
|
|
|
static void clip_main_region_init(wmWindowManager *wm, ARegion *ar)
|
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-17 06:17:24 +02:00
|
|
|
wmKeyMap *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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* mask polls mode */
|
|
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Mask Editing", 0, 0);
|
2019-04-24 17:34:48 +02:00
|
|
|
WM_event_add_keymap_handler_v2d_mask(&ar->handlers, keymap);
|
2012-06-04 16:42:58 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* own keymap */
|
|
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
|
2019-04-24 17:34:48 +02:00
|
|
|
WM_event_add_keymap_handler_v2d_mask(&ar->handlers, keymap);
|
2011-07-25 18:11:22 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip Editor", SPACE_CLIP, 0);
|
2019-04-24 17:34:48 +02:00
|
|
|
WM_event_add_keymap_handler_v2d_mask(&ar->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
|
|
|
}
|
|
|
|
|
|
2015-11-28 17:14:45 +01:00
|
|
|
static void clip_main_region_draw(const bContext *C, ARegion *ar)
|
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-17 06:17:24 +02: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;
|
|
|
|
|
|
|
|
|
|
/* 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) {
|
2019-04-17 06:17:24 +02:00
|
|
|
BKE_autotrack_context_sync_user(clip->tracking_context, &sc->user);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02: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, ar, 0)) {
|
|
|
|
|
sc->xof += sc->xlockof;
|
|
|
|
|
sc->yof += sc->ylockof;
|
|
|
|
|
}
|
|
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (tmpibuf) {
|
2019-04-17 06:17:24 +02:00
|
|
|
IMB_freeImBuf(tmpibuf);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* clear and setup matrix */
|
|
|
|
|
UI_ThemeClearColor(TH_BACK);
|
|
|
|
|
GPU_clear(GPU_COLOR_BIT);
|
|
|
|
|
|
|
|
|
|
/* data... */
|
|
|
|
|
movieclip_main_area_set_view2d(C, ar);
|
|
|
|
|
|
|
|
|
|
/* callback */
|
|
|
|
|
ED_region_draw_cb_draw(C, ar, REGION_DRAW_PRE_VIEW);
|
|
|
|
|
|
|
|
|
|
clip_draw_main(C, sc, ar);
|
|
|
|
|
|
|
|
|
|
/* TODO(sergey): would be nice to find a way to de-duplicate all this space conversions */
|
|
|
|
|
UI_view2d_view_to_region_fl(&ar->v2d, 0.0f, 0.0f, &x, &y);
|
|
|
|
|
ED_space_clip_get_size(sc, &width, &height);
|
|
|
|
|
ED_space_clip_get_zoom(sc, ar, &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 *sa = CTX_wm_area(C);
|
|
|
|
|
int mask_width, mask_height;
|
|
|
|
|
ED_mask_get_size(sa, &mask_width, &mask_height);
|
2019-07-25 16:36:22 +02:00
|
|
|
ED_mask_draw_region(CTX_data_expect_evaluated_depsgraph(C),
|
2019-05-21 17:29:58 +02:00
|
|
|
mask,
|
2019-04-17 06:17:24 +02:00
|
|
|
ar,
|
|
|
|
|
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(ar, sc->cursor);
|
|
|
|
|
GPU_matrix_pop();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
clip_draw_cache_and_notes(C, sc, ar);
|
|
|
|
|
|
|
|
|
|
if (sc->flag & SC_SHOW_ANNOTATION) {
|
|
|
|
|
/* Grease Pencil */
|
|
|
|
|
clip_draw_grease_pencil((bContext *)C, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* callback */
|
|
|
|
|
ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_VIEW);
|
|
|
|
|
|
|
|
|
|
/* 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);
|
|
|
|
|
}
|
2019-05-31 21:45:28 +10:00
|
|
|
|
|
|
|
|
WM_gizmomap_draw(ar->gizmo_map, C, WM_GIZMOMAP_DRAWSTEP_2D);
|
2011-08-08 16:30:09 +00:00
|
|
|
}
|
|
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
static void clip_main_region_listener(wmWindow *UNUSED(win),
|
|
|
|
|
ScrArea *UNUSED(sa),
|
|
|
|
|
ARegion *ar,
|
|
|
|
|
wmNotifier *wmn,
|
|
|
|
|
const Scene *UNUSED(scene))
|
2011-08-08 16:30:09 +00:00
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
/* context changes */
|
|
|
|
|
switch (wmn->category) {
|
|
|
|
|
case NC_GPENCIL:
|
2019-04-22 09:19:45 +10:00
|
|
|
if (wmn->action == NA_EDITED) {
|
2019-04-17 06:17:24 +02:00
|
|
|
ED_region_tag_redraw(ar);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
|
|
|
|
else if (wmn->data & ND_GPENCIL_EDITMODE) {
|
2019-04-17 06:17:24 +02:00
|
|
|
ED_region_tag_redraw(ar);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02: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
|
|
|
}
|
|
|
|
|
|
2011-10-19 12:46:30 +00:00
|
|
|
/****************** preview region ******************/
|
|
|
|
|
|
2015-11-28 17:14:45 +01:00
|
|
|
static void clip_preview_region_init(wmWindowManager *wm, ARegion *ar)
|
2011-10-19 12:46:30 +00:00
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
wmKeyMap *keymap;
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* own keymap */
|
2019-05-08 14:10:09 +02:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
|
2019-04-24 17:34:48 +02:00
|
|
|
WM_event_add_keymap_handler_v2d_mask(&ar->handlers, keymap);
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2019-05-28 16:17:15 +10:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip Time Scrub", SPACE_CLIP, RGN_TYPE_PREVIEW);
|
|
|
|
|
WM_event_add_keymap_handler_poll(&ar->handlers, keymap, ED_time_scrub_event_in_region);
|
2019-05-08 14:10:09 +02:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip Graph Editor", SPACE_CLIP, 0);
|
2019-04-24 17:34:48 +02:00
|
|
|
WM_event_add_keymap_handler_v2d_mask(&ar->handlers, keymap);
|
2013-03-05 12:41:17 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip Dopesheet Editor", SPACE_CLIP, 0);
|
2019-04-24 17:34:48 +02:00
|
|
|
WM_event_add_keymap_handler_v2d_mask(&ar->handlers, keymap);
|
2011-10-19 12:46:30 +00:00
|
|
|
}
|
|
|
|
|
|
2015-11-28 17:14:45 +01:00
|
|
|
static void graph_region_draw(const bContext *C, ARegion *ar)
|
2011-10-19 12:46:30 +00:00
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
View2D *v2d = &ar->v2d;
|
|
|
|
|
View2DScrollers *scrollers;
|
|
|
|
|
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) {
|
2019-04-17 06:17:24 +02:00
|
|
|
ED_clip_graph_center_current_frame(scene, ar);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
|
|
|
|
/* clear and setup matrix */
|
|
|
|
|
UI_ThemeClearColor(TH_BACK);
|
|
|
|
|
GPU_clear(GPU_COLOR_BIT);
|
|
|
|
|
|
|
|
|
|
UI_view2d_view_ortho(v2d);
|
|
|
|
|
|
|
|
|
|
/* data... */
|
|
|
|
|
clip_draw_graph(sc, ar, scene);
|
|
|
|
|
|
|
|
|
|
/* current frame indicator line */
|
2019-04-22 09:19:45 +10:00
|
|
|
if (sc->flag & SC_SHOW_SECONDS) {
|
2019-04-17 06:17:24 +02:00
|
|
|
cfra_flag |= DRAWCFRA_UNIT_SECONDS;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
ANIM_draw_cfra(C, v2d, cfra_flag);
|
|
|
|
|
|
|
|
|
|
/* reset view matrix */
|
|
|
|
|
UI_view2d_view_restore(C);
|
|
|
|
|
|
2019-05-07 15:09:14 +02:00
|
|
|
/* time-scrubbing */
|
2019-05-28 16:17:15 +10:00
|
|
|
ED_time_scrub_draw(ar, scene, sc->flag & SC_SHOW_SECONDS, true);
|
2019-05-07 15:09:14 +02:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* scrollers */
|
2019-04-30 14:10:53 +02:00
|
|
|
scrollers = UI_view2d_scrollers_calc(v2d, NULL);
|
|
|
|
|
UI_view2d_scrollers_draw(v2d, scrollers);
|
2019-04-17 06:17:24 +02:00
|
|
|
UI_view2d_scrollers_free(scrollers);
|
|
|
|
|
|
2019-04-30 14:10:53 +02:00
|
|
|
/* scale indicators */
|
2019-05-08 15:09:02 +02:00
|
|
|
{
|
|
|
|
|
rcti rect;
|
|
|
|
|
BLI_rcti_init(&rect,
|
|
|
|
|
0,
|
|
|
|
|
15 * UI_DPI_FAC,
|
|
|
|
|
15 * UI_DPI_FAC,
|
2019-05-28 16:17:15 +10:00
|
|
|
UI_DPI_FAC * ar->sizey - UI_TIME_SCRUB_MARGIN_Y);
|
2019-05-08 15:09:02 +02:00
|
|
|
UI_view2d_draw_scale_y__values(ar, v2d, &rect, TH_TEXT);
|
|
|
|
|
}
|
2011-10-19 12:46:30 +00:00
|
|
|
}
|
|
|
|
|
|
2015-11-28 17:14:45 +01:00
|
|
|
static void dopesheet_region_draw(const bContext *C, ARegion *ar)
|
2012-04-30 16:19:20 +00:00
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
Scene *scene = CTX_data_scene(C);
|
|
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
|
|
|
|
MovieClip *clip = ED_space_clip_get_clip(sc);
|
|
|
|
|
View2D *v2d = &ar->v2d;
|
|
|
|
|
View2DScrollers *scrollers;
|
Refactor grid and scale indicator text drawing
This affects the timeline, dopesheet, graph editor, sequencer,
clip editor and nla editor.
Removed structs and enums: `V2D_ARG_DUMMY`, `eView2D_Units`,
`eView2D_Clamp`, `eView2D_Gridlines`, `View2DGrid`.
A main goal of this refactor is to get rid of the very generic
`View2DGrid` struct. The drawing code became very complex
because there were many different combinations of settings.
This refactor implements a different approach.
Instead of one very generic API, there are many slighly
different functions that do exactly, what we need in the
different editors. Only very little code is duplicated,
because the API functions compose some shared low level code.
This structure makes the code much easier to debug and change,
because every function has much fewer responsibilities.
Additionally, this refactor fixes some long standing bugs.
E.g. when `Show Seconds` is enabled, you zoom in and pan the view.
Or that the step size between displayed frame numbers was
always `>= 2`, no matter how close you zoom in.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4776
2019-05-02 12:00:12 +02:00
|
|
|
short cfra_flag = 0;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (clip) {
|
2019-04-17 06:17:24 +02:00
|
|
|
BKE_tracking_dopesheet_update(&clip->tracking);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
|
|
|
|
/* clear and setup matrix */
|
|
|
|
|
UI_ThemeClearColor(TH_BACK);
|
|
|
|
|
GPU_clear(GPU_COLOR_BIT);
|
|
|
|
|
|
|
|
|
|
UI_view2d_view_ortho(v2d);
|
|
|
|
|
|
|
|
|
|
/* time grid */
|
Refactor grid and scale indicator text drawing
This affects the timeline, dopesheet, graph editor, sequencer,
clip editor and nla editor.
Removed structs and enums: `V2D_ARG_DUMMY`, `eView2D_Units`,
`eView2D_Clamp`, `eView2D_Gridlines`, `View2DGrid`.
A main goal of this refactor is to get rid of the very generic
`View2DGrid` struct. The drawing code became very complex
because there were many different combinations of settings.
This refactor implements a different approach.
Instead of one very generic API, there are many slighly
different functions that do exactly, what we need in the
different editors. Only very little code is duplicated,
because the API functions compose some shared low level code.
This structure makes the code much easier to debug and change,
because every function has much fewer responsibilities.
Additionally, this refactor fixes some long standing bugs.
E.g. when `Show Seconds` is enabled, you zoom in and pan the view.
Or that the step size between displayed frame numbers was
always `>= 2`, no matter how close you zoom in.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4776
2019-05-02 12:00:12 +02:00
|
|
|
UI_view2d_draw_lines_x__discrete_frames_or_seconds(v2d, scene, sc->flag & SC_SHOW_SECONDS);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
|
|
|
|
/* data... */
|
|
|
|
|
clip_draw_dopesheet_main(sc, ar, scene);
|
|
|
|
|
|
|
|
|
|
/* current frame indicator line */
|
2019-04-22 09:19:45 +10:00
|
|
|
if (sc->flag & SC_SHOW_SECONDS) {
|
2019-04-17 06:17:24 +02:00
|
|
|
cfra_flag |= DRAWCFRA_UNIT_SECONDS;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
ANIM_draw_cfra(C, v2d, cfra_flag);
|
|
|
|
|
|
|
|
|
|
/* reset view matrix */
|
|
|
|
|
UI_view2d_view_restore(C);
|
|
|
|
|
|
2019-05-07 15:09:14 +02:00
|
|
|
/* time-scrubbing */
|
2019-05-28 16:17:15 +10:00
|
|
|
ED_time_scrub_draw(ar, scene, sc->flag & SC_SHOW_SECONDS, true);
|
2019-05-07 15:09:14 +02:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* scrollers */
|
2019-04-30 14:10:53 +02:00
|
|
|
scrollers = UI_view2d_scrollers_calc(v2d, NULL);
|
|
|
|
|
UI_view2d_scrollers_draw(v2d, scrollers);
|
2019-04-17 06:17:24 +02:00
|
|
|
UI_view2d_scrollers_free(scrollers);
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
|
|
|
|
|
2015-11-28 17:14:45 +01:00
|
|
|
static void clip_preview_region_draw(const bContext *C, ARegion *ar)
|
2012-04-29 12:32:26 +00:00
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (sc->view == SC_VIEW_GRAPH) {
|
2019-04-17 06:17:24 +02:00
|
|
|
graph_region_draw(C, ar);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
|
|
|
|
else if (sc->view == SC_VIEW_DOPESHEET) {
|
2019-04-17 06:17:24 +02:00
|
|
|
dopesheet_region_draw(C, ar);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
|
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
static void clip_preview_region_listener(wmWindow *UNUSED(win),
|
|
|
|
|
ScrArea *UNUSED(sa),
|
|
|
|
|
ARegion *UNUSED(ar),
|
|
|
|
|
wmNotifier *UNUSED(wmn),
|
|
|
|
|
const Scene *UNUSED(scene))
|
2011-10-19 12:46:30 +00:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
/****************** channels region ******************/
|
|
|
|
|
|
2015-11-28 17:14:45 +01:00
|
|
|
static void clip_channels_region_init(wmWindowManager *wm, ARegion *ar)
|
2012-04-30 16:19:20 +00:00
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
wmKeyMap *keymap;
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* ensure the 2d view sync works - main region has bottom scroller */
|
|
|
|
|
ar->v2d.scroll = V2D_SCROLL_BOTTOM;
|
2013-02-14 13:47:49 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_LIST, ar->winx, ar->winy);
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip Dopesheet Editor", SPACE_CLIP, 0);
|
2019-04-24 17:34:48 +02:00
|
|
|
WM_event_add_keymap_handler_v2d_mask(&ar->handlers, keymap);
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
|
|
|
|
|
2015-11-28 17:14:45 +01:00
|
|
|
static void clip_channels_region_draw(const bContext *C, ARegion *ar)
|
2012-04-30 16:19:20 +00:00
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
|
|
|
|
MovieClip *clip = ED_space_clip_get_clip(sc);
|
|
|
|
|
View2D *v2d = &ar->v2d;
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (clip) {
|
2019-04-17 06:17:24 +02:00
|
|
|
BKE_tracking_dopesheet_update(&clip->tracking);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2012-05-03 19:28:41 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* clear and setup matrix */
|
|
|
|
|
UI_ThemeClearColor(TH_BACK);
|
|
|
|
|
GPU_clear(GPU_COLOR_BIT);
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
UI_view2d_view_ortho(v2d);
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* data... */
|
|
|
|
|
clip_draw_dopesheet_channels(C, ar);
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
/* reset view matrix */
|
|
|
|
|
UI_view2d_view_restore(C);
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
|
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
static void clip_channels_region_listener(wmWindow *UNUSED(win),
|
|
|
|
|
ScrArea *UNUSED(sa),
|
|
|
|
|
ARegion *UNUSED(ar),
|
|
|
|
|
wmNotifier *UNUSED(wmn),
|
|
|
|
|
const Scene *UNUSED(scene))
|
2012-04-30 16:19:20 +00: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
|
|
|
/****************** header region ******************/
|
|
|
|
|
|
|
|
|
|
/* add handlers, stuff you only do once or on area/region changes */
|
2015-11-28 17:14:45 +01:00
|
|
|
static void clip_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar)
|
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-17 06:17:24 +02:00
|
|
|
ED_region_header_init(ar);
|
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
|
|
|
}
|
|
|
|
|
|
2015-11-28 17:14:45 +01:00
|
|
|
static void clip_header_region_draw(const bContext *C, ARegion *ar)
|
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-17 06:17:24 +02:00
|
|
|
ED_region_header(C, ar);
|
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-17 06:17:24 +02:00
|
|
|
static void clip_header_region_listener(wmWindow *UNUSED(win),
|
|
|
|
|
ScrArea *UNUSED(sa),
|
|
|
|
|
ARegion *ar,
|
|
|
|
|
wmNotifier *wmn,
|
|
|
|
|
const Scene *UNUSED(scene))
|
2012-06-04 16:42:58 +00:00
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
/* context changes */
|
|
|
|
|
switch (wmn->category) {
|
|
|
|
|
case NC_SCENE:
|
|
|
|
|
switch (wmn->data) {
|
|
|
|
|
/* for proportional editmode only */
|
|
|
|
|
case ND_TOOLSETTINGS:
|
2019-08-01 13:53:25 +10:00
|
|
|
/* TODO - should do this when in mask mode only but no data available */
|
2019-04-17 06:17:24 +02:00
|
|
|
// if (sc->mode == SC_MODE_MASKEDIT)
|
|
|
|
|
{
|
|
|
|
|
ED_region_tag_redraw(ar);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
2012-06-04 16:42:58 +00: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
|
|
|
/****************** tools region ******************/
|
|
|
|
|
|
|
|
|
|
/* add handlers, stuff you only do once or on area/region changes */
|
2015-11-28 17:14:45 +01:00
|
|
|
static void clip_tools_region_init(wmWindowManager *wm, ARegion *ar)
|
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-17 06:17:24 +02:00
|
|
|
wmKeyMap *keymap;
|
2013-04-29 13:18:29 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
ED_region_panels_init(wm, ar);
|
2013-04-29 13:18:29 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
|
|
|
|
|
WM_event_add_keymap_handler(&ar->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
|
|
|
}
|
|
|
|
|
|
2015-11-28 17:14:45 +01:00
|
|
|
static void clip_tools_region_draw(const bContext *C, ARegion *ar)
|
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-17 06:17:24 +02:00
|
|
|
ED_region_panels(C, ar);
|
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
|
|
|
}
|
|
|
|
|
|
2011-08-04 14:39:37 +00:00
|
|
|
/****************** tool properties region ******************/
|
|
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
static void clip_props_region_listener(wmWindow *UNUSED(win),
|
|
|
|
|
ScrArea *UNUSED(sa),
|
|
|
|
|
ARegion *ar,
|
|
|
|
|
wmNotifier *wmn,
|
|
|
|
|
const Scene *UNUSED(scene))
|
2011-08-04 14:39:37 +00:00
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
/* context changes */
|
|
|
|
|
switch (wmn->category) {
|
|
|
|
|
case NC_WM:
|
2019-04-22 09:19:45 +10:00
|
|
|
if (wmn->data == ND_HISTORY) {
|
2019-04-17 06:17:24 +02:00
|
|
|
ED_region_tag_redraw(ar);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
break;
|
|
|
|
|
case NC_SCENE:
|
2019-04-22 09:19:45 +10:00
|
|
|
if (wmn->data == ND_MODE) {
|
2019-04-17 06:17:24 +02:00
|
|
|
ED_region_tag_redraw(ar);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
break;
|
|
|
|
|
case NC_SPACE:
|
2019-04-22 09:19:45 +10:00
|
|
|
if (wmn->data == ND_SPACE_CLIP) {
|
2019-04-17 06:17:24 +02:00
|
|
|
ED_region_tag_redraw(ar);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
break;
|
|
|
|
|
case NC_GPENCIL:
|
2019-04-22 09:19:45 +10:00
|
|
|
if (wmn->action == NA_EDITED) {
|
2019-04-17 06:17:24 +02:00
|
|
|
ED_region_tag_redraw(ar);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
break;
|
|
|
|
|
}
|
2011-08-04 14:39:37 +00: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
|
|
|
/****************** properties region ******************/
|
|
|
|
|
|
|
|
|
|
/* add handlers, stuff you only do once or on area/region changes */
|
2015-11-28 17:14:45 +01:00
|
|
|
static void clip_properties_region_init(wmWindowManager *wm, ARegion *ar)
|
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-17 06:17:24 +02:00
|
|
|
wmKeyMap *keymap;
|
2011-07-25 18:11:22 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
ED_region_panels_init(wm, ar);
|
2011-07-25 18:11:22 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
|
|
|
|
|
WM_event_add_keymap_handler(&ar->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
|
|
|
}
|
|
|
|
|
|
2015-11-28 17:14:45 +01:00
|
|
|
static void clip_properties_region_draw(const bContext *C, ARegion *ar)
|
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-17 06:17:24 +02:00
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
2011-07-18 14:54:32 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
BKE_movieclip_update_scopes(sc->clip, &sc->user, &sc->scopes);
|
2011-07-18 14:54:32 +00:00
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
ED_region_panels(C, ar);
|
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-17 06:17:24 +02:00
|
|
|
static void clip_properties_region_listener(wmWindow *UNUSED(win),
|
|
|
|
|
ScrArea *UNUSED(sa),
|
|
|
|
|
ARegion *ar,
|
|
|
|
|
wmNotifier *wmn,
|
|
|
|
|
const Scene *UNUSED(scene))
|
2011-08-08 16:30:09 +00:00
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
/* 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)) {
|
2019-04-17 06:17:24 +02:00
|
|
|
ED_region_tag_redraw(ar);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
break;
|
|
|
|
|
case NC_BRUSH:
|
2019-04-22 09:19:45 +10:00
|
|
|
if (wmn->action == NA_EDITED) {
|
2019-04-17 06:17:24 +02:00
|
|
|
ED_region_tag_redraw(ar);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
break;
|
|
|
|
|
}
|
2011-08-08 16:30:09 +00: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
|
|
|
/********************* registration ********************/
|
|
|
|
|
|
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
|
|
|
static void clip_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID *new_id)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
SpaceClip *sclip = (SpaceClip *)slink;
|
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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
if (!ELEM(GS(old_id->name), ID_MC, ID_MSK)) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
if ((ID *)sclip->clip == old_id) {
|
|
|
|
|
sclip->clip = (MovieClip *)new_id;
|
|
|
|
|
id_us_ensure_real(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
|
|
|
|
2019-04-17 06:17:24 +02:00
|
|
|
if ((ID *)sclip->mask_info.mask == old_id) {
|
|
|
|
|
sclip->mask_info.mask = (Mask *)new_id;
|
|
|
|
|
id_us_ensure_real(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
|
|
|
}
|
|
|
|
|
|
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)
|
|
|
|
|
{
|
2019-04-17 06:17:24 +02:00
|
|
|
SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype clip");
|
|
|
|
|
ARegionType *art;
|
|
|
|
|
|
|
|
|
|
st->spaceid = SPACE_CLIP;
|
|
|
|
|
strncpy(st->name, "Clip", BKE_ST_MAXNAME);
|
|
|
|
|
|
|
|
|
|
st->new = clip_new;
|
|
|
|
|
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;
|
2019-05-31 21:45:28 +10:00
|
|
|
st->gizmos = clip_gizmos;
|
2019-04-17 06:17:24 +02:00
|
|
|
st->dropboxes = clip_dropboxes;
|
|
|
|
|
st->refresh = clip_refresh;
|
|
|
|
|
st->id_remap = clip_id_remap;
|
|
|
|
|
|
|
|
|
|
/* 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;
|
2019-05-31 21:45:28 +10:00
|
|
|
art->keymapflag = ED_KEYMAP_GIZMO | ED_KEYMAP_FRAMES | ED_KEYMAP_UI | ED_KEYMAP_GPENCIL;
|
2019-04-17 06:17:24 +02: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);
|
|
|
|
|
|
|
|
|
|
/* regions: properties */
|
|
|
|
|
art = MEM_callocN(sizeof(ARegionType), "spacetype clip region properties");
|
|
|
|
|
art->regionid = RGN_TYPE_UI;
|
2019-05-20 18:12:46 +02:00
|
|
|
art->prefsizex = UI_SIDEBAR_PANEL_WIDTH;
|
2019-04-17 06:17:24 +02:00
|
|
|
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;
|
|
|
|
|
BLI_addhead(&st->regiontypes, art);
|
|
|
|
|
ED_clip_buttons_register(art);
|
|
|
|
|
|
|
|
|
|
/* regions: tools */
|
|
|
|
|
art = MEM_callocN(sizeof(ARegionType), "spacetype clip region tools");
|
|
|
|
|
art->regionid = RGN_TYPE_TOOLS;
|
2019-05-20 18:12:46 +02:00
|
|
|
art->prefsizex = UI_SIDEBAR_PANEL_WIDTH;
|
2019-04-17 06:17:24 +02:00
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
BLI_addhead(&st->regiontypes, art);
|
|
|
|
|
|
|
|
|
|
/* 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;
|
|
|
|
|
|
|
|
|
|
BLI_addhead(&st->regiontypes, art);
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
/* 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
|
|
|
}
|