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 <stdio.h>
|
2020-03-19 09:33:03 +01:00
|
|
|
#include <string.h>
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
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"
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "DNA_scene_types.h"
|
2012-06-10 19:59:02 +00:00
|
|
|
#include "DNA_view3d_types.h" /* for pivot point */
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
|
|
|
|
#include "MEM_guardedalloc.h"
|
|
|
|
|
|
|
|
|
|
#include "BLI_blenlib.h"
|
2011-10-19 12:46:30 +00:00
|
|
|
#include "BLI_math.h"
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "BLI_utildefines.h"
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
|
|
|
|
#include "BKE_context.h"
|
2020-02-10 12:58:59 +01:00
|
|
|
#include "BKE_lib_id.h"
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
#include "BKE_movieclip.h"
|
2018-11-07 18:00:24 +01:00
|
|
|
#include "BKE_screen.h"
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "BKE_tracking.h"
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
|
|
|
|
#include "IMB_imbuf_types.h"
|
|
|
|
|
|
2018-05-10 17:56:12 +02:00
|
|
|
#include "ED_anim_api.h" /* for timeline cursor drawing */
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "ED_clip.h"
|
2012-06-04 16:42:58 +00:00
|
|
|
#include "ED_mask.h"
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
#include "ED_screen.h"
|
2018-08-14 10:28:41 +10:00
|
|
|
#include "ED_select_utils.h"
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "ED_space_api.h"
|
|
|
|
|
#include "ED_time_scrub_ui.h"
|
2011-06-03 15:39:53 +00:00
|
|
|
#include "ED_transform.h"
|
2014-10-31 15:32:59 +01:00
|
|
|
#include "ED_uvedit.h" /* just for ED_image_draw_cursor */
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
2011-07-18 14:54:32 +00:00
|
|
|
#include "IMB_imbuf.h"
|
|
|
|
|
|
2020-03-19 09:33:03 +01:00
|
|
|
#include "GPU_framebuffer.h"
|
2017-03-21 16:08:14 -04:00
|
|
|
#include "GPU_matrix.h"
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
|
|
|
|
#include "WM_api.h"
|
|
|
|
|
#include "WM_types.h"
|
|
|
|
|
|
|
|
|
|
#include "UI_interface.h"
|
|
|
|
|
#include "UI_resources.h"
|
|
|
|
|
#include "UI_view2d.h"
|
|
|
|
|
|
|
|
|
|
#include "RNA_access.h"
|
|
|
|
|
|
2012-06-10 19:59:02 +00:00
|
|
|
#include "clip_intern.h" /* own include */
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
2018-04-21 19:30:56 +02:00
|
|
|
static void init_preview_region(const Scene *scene,
|
2020-04-03 13:25:03 +02:00
|
|
|
const ScrArea *area,
|
2018-04-21 19:30:56 +02:00
|
|
|
const SpaceClip *sc,
|
2020-03-06 16:56:42 +01:00
|
|
|
ARegion *region)
|
2011-10-19 12:46:30 +00:00
|
|
|
{
|
2020-03-06 16:56:42 +01:00
|
|
|
region->regiontype = RGN_TYPE_PREVIEW;
|
|
|
|
|
region->alignment = RGN_ALIGN_TOP;
|
|
|
|
|
region->flag |= RGN_FLAG_HIDDEN;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
if (sc->view == SC_VIEW_DOPESHEET) {
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.tot.xmin = -10.0f;
|
2020-04-03 13:25:03 +02:00
|
|
|
region->v2d.tot.ymin = (float)(-area->winy) / 3.0f;
|
|
|
|
|
region->v2d.tot.xmax = (float)(area->winx);
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.tot.ymax = 0.0f;
|
|
|
|
|
|
|
|
|
|
region->v2d.cur = region->v2d.tot;
|
|
|
|
|
|
|
|
|
|
region->v2d.min[0] = 0.0f;
|
|
|
|
|
region->v2d.min[1] = 0.0f;
|
|
|
|
|
|
|
|
|
|
region->v2d.max[0] = MAXFRAMEF;
|
|
|
|
|
region->v2d.max[1] = FLT_MAX;
|
|
|
|
|
|
|
|
|
|
region->v2d.minzoom = 0.01f;
|
|
|
|
|
region->v2d.maxzoom = 50;
|
|
|
|
|
region->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES);
|
2020-06-18 12:21:38 +10:00
|
|
|
region->v2d.scroll |= V2D_SCROLL_RIGHT;
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.keepzoom = V2D_LOCKZOOM_Y;
|
|
|
|
|
region->v2d.keepofs = V2D_KEEPOFS_Y;
|
|
|
|
|
region->v2d.align = V2D_ALIGN_NO_POS_Y;
|
|
|
|
|
region->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
|
|
|
|
else {
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.tot.xmin = 0.0f;
|
|
|
|
|
region->v2d.tot.ymin = -10.0f;
|
|
|
|
|
region->v2d.tot.xmax = (float)scene->r.efra;
|
|
|
|
|
region->v2d.tot.ymax = 10.0f;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.cur = region->v2d.tot;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.min[0] = FLT_MIN;
|
|
|
|
|
region->v2d.min[1] = FLT_MIN;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.max[0] = MAXFRAMEF;
|
|
|
|
|
region->v2d.max[1] = FLT_MAX;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.scroll = (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES);
|
|
|
|
|
region->v2d.scroll |= (V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HANDLES);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.minzoom = 0.0f;
|
|
|
|
|
region->v2d.maxzoom = 0.0f;
|
|
|
|
|
region->v2d.keepzoom = 0;
|
|
|
|
|
region->v2d.keepofs = 0;
|
|
|
|
|
region->v2d.align = 0;
|
|
|
|
|
region->v2d.flag = 0;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.keeptot = 0;
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
static void reinit_preview_region(const bContext *C, ARegion *region)
|
2012-04-30 16:19:20 +00:00
|
|
|
{
|
2018-04-21 19:30:56 +02:00
|
|
|
Scene *scene = CTX_data_scene(C);
|
2020-04-03 13:25:03 +02:00
|
|
|
ScrArea *area = CTX_wm_area(C);
|
2012-04-30 16:19:20 +00:00
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
if (sc->view == SC_VIEW_DOPESHEET) {
|
2020-03-06 16:56:42 +01:00
|
|
|
if ((region->v2d.flag & V2D_VIEWSYNC_AREA_VERTICAL) == 0) {
|
2020-04-03 13:25:03 +02:00
|
|
|
init_preview_region(scene, area, sc, region);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
|
|
|
|
else {
|
2020-03-06 16:56:42 +01:00
|
|
|
if (region->v2d.flag & V2D_VIEWSYNC_AREA_VERTICAL) {
|
2020-04-03 13:25:03 +02:00
|
|
|
init_preview_region(scene, area, sc, region);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
2011-10-19 12:46:30 +00:00
|
|
|
}
|
|
|
|
|
|
2020-04-03 13:25:03 +02:00
|
|
|
static ARegion *ED_clip_has_preview_region(const bContext *C, ScrArea *area)
|
2011-10-19 12:46:30 +00:00
|
|
|
{
|
2020-03-06 16:56:42 +01:00
|
|
|
ARegion *region, *arnew;
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2020-04-03 13:25:03 +02:00
|
|
|
region = BKE_area_find_region_type(area, RGN_TYPE_PREVIEW);
|
2020-03-06 16:56:42 +01:00
|
|
|
if (region) {
|
|
|
|
|
return region;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2011-10-19 12:46:30 +00:00
|
|
|
|
|
|
|
|
/* add subdiv level; after header */
|
2020-04-03 13:25:03 +02:00
|
|
|
region = BKE_area_find_region_type(area, RGN_TYPE_WINDOW);
|
2011-10-19 12:46:30 +00:00
|
|
|
|
|
|
|
|
/* is error! */
|
2020-03-06 16:56:42 +01:00
|
|
|
if (region == NULL) {
|
2011-10-19 12:46:30 +00:00
|
|
|
return NULL;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2012-03-25 23:19:21 +00:00
|
|
|
arnew = MEM_callocN(sizeof(ARegion), "clip preview region");
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2020-04-03 13:25:03 +02:00
|
|
|
BLI_insertlinkbefore(&area->regionbase, region, arnew);
|
|
|
|
|
init_preview_region(CTX_data_scene(C), area, CTX_wm_space_clip(C), arnew);
|
2011-10-19 12:46:30 +00:00
|
|
|
|
|
|
|
|
return arnew;
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-03 13:25:03 +02:00
|
|
|
static ARegion *ED_clip_has_channels_region(ScrArea *area)
|
2012-04-30 16:19:20 +00:00
|
|
|
{
|
2020-03-06 16:56:42 +01:00
|
|
|
ARegion *region, *arnew;
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2020-04-03 13:25:03 +02:00
|
|
|
region = BKE_area_find_region_type(area, RGN_TYPE_CHANNELS);
|
2020-03-06 16:56:42 +01:00
|
|
|
if (region) {
|
|
|
|
|
return region;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2012-04-30 16:19:20 +00:00
|
|
|
|
|
|
|
|
/* add subdiv level; after header */
|
2020-04-03 13:25:03 +02:00
|
|
|
region = BKE_area_find_region_type(area, RGN_TYPE_PREVIEW);
|
2012-04-30 16:19:20 +00:00
|
|
|
|
|
|
|
|
/* is error! */
|
2020-03-06 16:56:42 +01:00
|
|
|
if (region == NULL) {
|
2012-04-30 16:19:20 +00:00
|
|
|
return NULL;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2012-04-30 16:19:20 +00:00
|
|
|
|
|
|
|
|
arnew = MEM_callocN(sizeof(ARegion), "clip channels region");
|
|
|
|
|
|
2020-04-03 13:25:03 +02:00
|
|
|
BLI_insertlinkbefore(&area->regionbase, region, arnew);
|
2012-04-30 16:19:20 +00:00
|
|
|
arnew->regiontype = RGN_TYPE_CHANNELS;
|
|
|
|
|
arnew->alignment = RGN_ALIGN_LEFT;
|
|
|
|
|
|
|
|
|
|
arnew->v2d.scroll = V2D_SCROLL_BOTTOM;
|
|
|
|
|
arnew->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
|
|
|
|
|
|
|
|
|
|
return arnew;
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-03 13:25:03 +02:00
|
|
|
static void clip_scopes_tag_refresh(ScrArea *area)
|
2011-07-18 14:54:32 +00:00
|
|
|
{
|
2020-04-03 13:25:03 +02:00
|
|
|
SpaceClip *sc = (SpaceClip *)area->spacedata.first;
|
2020-03-06 16:56:42 +01:00
|
|
|
ARegion *region;
|
2011-07-18 14:54:32 +00:00
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (sc->mode != SC_MODE_TRACKING) {
|
2011-10-10 15:29:39 +00:00
|
|
|
return;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2011-10-10 15:29:39 +00:00
|
|
|
|
2015-05-01 05:45:41 +10:00
|
|
|
/* only while properties are visible */
|
2020-04-03 13:25:03 +02:00
|
|
|
for (region = area->regionbase.first; region; region = region->next) {
|
2020-03-06 16:56:42 +01:00
|
|
|
if (region->regiontype == RGN_TYPE_UI && region->flag & RGN_FLAG_HIDDEN) {
|
2011-07-18 14:54:32 +00:00
|
|
|
return;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2011-07-18 14:54:32 +00:00
|
|
|
}
|
|
|
|
|
|
2014-04-01 11:34:00 +11:00
|
|
|
sc->scopes.ok = false;
|
2011-07-18 14:54:32 +00:00
|
|
|
}
|
|
|
|
|
|
2020-04-03 13:25:03 +02:00
|
|
|
static void clip_scopes_check_gpencil_change(ScrArea *area)
|
2012-06-12 11:13:53 +00:00
|
|
|
{
|
2020-04-03 13:25:03 +02:00
|
|
|
SpaceClip *sc = (SpaceClip *)area->spacedata.first;
|
2012-06-12 11:13:53 +00:00
|
|
|
|
|
|
|
|
if (sc->gpencil_src == SC_GPENCIL_SRC_TRACK) {
|
2020-04-03 13:25:03 +02:00
|
|
|
clip_scopes_tag_refresh(area);
|
2012-06-12 11:13:53 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-18 17:28:47 -06:00
|
|
|
static void clip_area_sync_frame_from_scene(ScrArea *area, const Scene *scene)
|
2019-01-24 10:36:42 +01:00
|
|
|
{
|
2020-04-03 13:25:03 +02:00
|
|
|
SpaceClip *space_clip = (SpaceClip *)area->spacedata.first;
|
2019-01-24 10:36:42 +01:00
|
|
|
BKE_movieclip_user_set_frame(&space_clip->user, scene->r.cfra);
|
|
|
|
|
}
|
|
|
|
|
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
/* ******************** default callbacks for clip space ***************** */
|
|
|
|
|
|
2020-08-04 14:39:53 +02:00
|
|
|
static SpaceLink *clip_create(const ScrArea *area, const Scene *scene)
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
{
|
2020-03-06 16:56:42 +01:00
|
|
|
ARegion *region;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
SpaceClip *sc;
|
|
|
|
|
|
2012-03-25 23:19:21 +00:00
|
|
|
sc = MEM_callocN(sizeof(SpaceClip), "initclip");
|
|
|
|
|
sc->spacetype = SPACE_CLIP;
|
2014-02-07 20:26:43 +06:00
|
|
|
sc->flag = SC_SHOW_MARKER_PATTERN | SC_SHOW_TRACK_PATH | SC_SHOW_GRAPH_TRACKS_MOTION |
|
2018-07-31 10:22:19 +02:00
|
|
|
SC_SHOW_GRAPH_FRAMES | SC_SHOW_ANNOTATION;
|
2012-03-25 23:19:21 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
/* header */
|
2020-03-06 16:56:42 +01:00
|
|
|
region = MEM_callocN(sizeof(ARegion), "header for clip");
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
BLI_addtail(&sc->regionbase, region);
|
|
|
|
|
region->regiontype = RGN_TYPE_HEADER;
|
|
|
|
|
region->alignment = (U.uiflag & USER_HEADER_BOTTOM) ? RGN_ALIGN_BOTTOM : RGN_ALIGN_TOP;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
|
|
|
|
/* tools view */
|
2020-03-06 16:56:42 +01:00
|
|
|
region = MEM_callocN(sizeof(ARegion), "tools for clip");
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
BLI_addtail(&sc->regionbase, region);
|
|
|
|
|
region->regiontype = RGN_TYPE_TOOLS;
|
|
|
|
|
region->alignment = RGN_ALIGN_LEFT;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
|
|
|
|
/* properties view */
|
2020-03-06 16:56:42 +01:00
|
|
|
region = MEM_callocN(sizeof(ARegion), "properties for clip");
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
BLI_addtail(&sc->regionbase, region);
|
|
|
|
|
region->regiontype = RGN_TYPE_UI;
|
|
|
|
|
region->alignment = RGN_ALIGN_RIGHT;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
/* channels view */
|
2020-03-06 16:56:42 +01:00
|
|
|
region = MEM_callocN(sizeof(ARegion), "channels for clip");
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
BLI_addtail(&sc->regionbase, region);
|
|
|
|
|
region->regiontype = RGN_TYPE_CHANNELS;
|
|
|
|
|
region->alignment = RGN_ALIGN_LEFT;
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.scroll = V2D_SCROLL_BOTTOM;
|
|
|
|
|
region->v2d.flag = V2D_VIEWSYNC_AREA_VERTICAL;
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2011-10-19 12:46:30 +00:00
|
|
|
/* preview view */
|
2020-03-06 16:56:42 +01:00
|
|
|
region = MEM_callocN(sizeof(ARegion), "preview for clip");
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
BLI_addtail(&sc->regionbase, region);
|
2020-04-03 13:25:03 +02:00
|
|
|
init_preview_region(scene, area, sc, region);
|
2011-10-19 12:46:30 +00:00
|
|
|
|
2015-11-28 17:14:45 +01:00
|
|
|
/* main region */
|
2020-03-06 16:56:42 +01:00
|
|
|
region = MEM_callocN(sizeof(ARegion), "main region for clip");
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
BLI_addtail(&sc->regionbase, region);
|
|
|
|
|
region->regiontype = RGN_TYPE_WINDOW;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
2012-03-25 23:19:21 +00:00
|
|
|
return (SpaceLink *)sc;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* not spacelink itself */
|
|
|
|
|
static void clip_free(SpaceLink *sl)
|
|
|
|
|
{
|
2012-06-10 19:59:02 +00:00
|
|
|
SpaceClip *sc = (SpaceClip *)sl;
|
2011-07-18 14:54:32 +00:00
|
|
|
|
2012-03-25 23:19:21 +00: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) {
|
2011-07-18 14:54:32 +00: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) {
|
Planar tracking support for motion tracking
===========================================
Major list of changes done in tomato branch:
- Add a planar tracking implementation to libmv
This adds a new planar tracking implementation to libmv. The
tracker is based on Ceres[1], the new nonlinear minimizer that
myself and Sameer released from Google as open source. Since
the motion model is more involved, the interface is
different than the RegionTracker interface used previously
in Blender.
The start of a C API in libmv-capi.{cpp,h} is also included.
- Migrate from pat_{min,max} for markers to 4 corners representation
Convert markers in the movie clip editor / 2D tracker from using
pat_min and pat_max notation to using the a more general, 4-corner
representation.
There is still considerable porting work to do; in particular
sliding from preview widget does not work correct for rotated
markers.
All other areas should be ported to new representation:
* Added support of sliding individual corners. LMB slide + Ctrl
would scale the whole pattern
* S would scale the whole marker, S-S would scale pattern only
* Added support of marker's rotation which is currently rotates
only patterns around their centers or all markers around median,
Rotation or other non-translation/scaling transformation of search
area doesn't make sense.
* Track Preview widget would display transformed pattern which
libmv actually operates with.
- "Efficient Second-order Minimization" for the planar tracker
This implements the "Efficient Second-order Minimization"
scheme, as supported by the existing translation tracker.
This increases the amount of per-iteration work, but
decreases the number of iterations required to converge and
also increases the size of the basin of attraction for the
optimization.
- Remove the use of the legacy RegionTracker API from Blender,
and replaces it with the new TrackRegion API. This also
adds several features to the planar tracker in libmv:
* Do a brute-force initialization of tracking similar to "Hybrid"
mode in the stable release, but using all floats. This is slower
but more accurate. It is still necessary to evaluate if the
performance loss is worth it. In particular, this change is
necessary to support high bit depth imagery.
* Add support for masks over the search window. This is a step
towards supporting user-defined tracker masks. The tracker masks
will make it easy for users to make a mask for e.g. a ball.
Not exposed into interface yet/
* Add Pearson product moment correlation coefficient checking (aka
"Correlation" in the UI. This causes tracking failure if the
tracked patch is not linearly related to the template.
* Add support for warping a few points in addition to the supplied
points. This is useful because the tracking code deliberately
does not expose the underlying warp representation. Instead,
warps are specified in an aparametric way via the correspondences.
- Replace the old style tracker configuration panel with the
new planar tracking panel. From a users perspective, this means:
* The old "tracking algorithm" picker is gone. There is only 1
algorithm now. We may revisit this later, but I would much
prefer to have only 1 algorithm. So far no optimization work
has been done so the speed is not there yet.
* There is now a dropdown to select the motion model. Choices:
* Translation
* Translation, rotation
* Translation, scale
* Translation, rotation, scale
* Affine
* Perspective
* The old "Hybrid" mode is gone; instead there is a toggle to
enable or disable translation-only tracker initialization. This
is the equivalent of the hyrbid mode before, but rewritten to work
with the new planar tracking modes.
* The pyramid levels setting is gone. At a future date, the planar
tracker will decide to use pyramids or not automatically. The
pyramid setting was ultimately a mistake; with the brute force
initialization it is unnecessary.
- Add light-normalized tracking
Added the ability to normalize patterns by their average value while
tracking, to make them invariant to global illumination changes.
Additional details could be found at wiki page [2]
[1] http://code.google.com/p/ceres-solver
[2] http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Motion_Tracker
2012-06-10 15:28:19 +00:00
|
|
|
IMB_freeImBuf(sc->scopes.track_search);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* spacetype; init callback */
|
2020-04-03 13:25:03 +02:00
|
|
|
static void clip_init(struct wmWindowManager *UNUSED(wm), ScrArea *area)
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
{
|
2012-05-02 16:42:42 +00:00
|
|
|
ListBase *lb = WM_dropboxmap_find("Clip", SPACE_CLIP, 0);
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
2012-05-02 16:42:42 +00:00
|
|
|
/* add drop boxes */
|
2020-04-03 13:25:03 +02:00
|
|
|
WM_event_add_dropbox_handler(&area->handlers, lb);
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static SpaceLink *clip_duplicate(SpaceLink *sl)
|
|
|
|
|
{
|
2012-03-25 23:19:21 +00: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
|
|
|
|
|
|
|
|
/* clear or remove stuff from old */
|
Planar tracking support for motion tracking
===========================================
Major list of changes done in tomato branch:
- Add a planar tracking implementation to libmv
This adds a new planar tracking implementation to libmv. The
tracker is based on Ceres[1], the new nonlinear minimizer that
myself and Sameer released from Google as open source. Since
the motion model is more involved, the interface is
different than the RegionTracker interface used previously
in Blender.
The start of a C API in libmv-capi.{cpp,h} is also included.
- Migrate from pat_{min,max} for markers to 4 corners representation
Convert markers in the movie clip editor / 2D tracker from using
pat_min and pat_max notation to using the a more general, 4-corner
representation.
There is still considerable porting work to do; in particular
sliding from preview widget does not work correct for rotated
markers.
All other areas should be ported to new representation:
* Added support of sliding individual corners. LMB slide + Ctrl
would scale the whole pattern
* S would scale the whole marker, S-S would scale pattern only
* Added support of marker's rotation which is currently rotates
only patterns around their centers or all markers around median,
Rotation or other non-translation/scaling transformation of search
area doesn't make sense.
* Track Preview widget would display transformed pattern which
libmv actually operates with.
- "Efficient Second-order Minimization" for the planar tracker
This implements the "Efficient Second-order Minimization"
scheme, as supported by the existing translation tracker.
This increases the amount of per-iteration work, but
decreases the number of iterations required to converge and
also increases the size of the basin of attraction for the
optimization.
- Remove the use of the legacy RegionTracker API from Blender,
and replaces it with the new TrackRegion API. This also
adds several features to the planar tracker in libmv:
* Do a brute-force initialization of tracking similar to "Hybrid"
mode in the stable release, but using all floats. This is slower
but more accurate. It is still necessary to evaluate if the
performance loss is worth it. In particular, this change is
necessary to support high bit depth imagery.
* Add support for masks over the search window. This is a step
towards supporting user-defined tracker masks. The tracker masks
will make it easy for users to make a mask for e.g. a ball.
Not exposed into interface yet/
* Add Pearson product moment correlation coefficient checking (aka
"Correlation" in the UI. This causes tracking failure if the
tracked patch is not linearly related to the template.
* Add support for warping a few points in addition to the supplied
points. This is useful because the tracking code deliberately
does not expose the underlying warp representation. Instead,
warps are specified in an aparametric way via the correspondences.
- Replace the old style tracker configuration panel with the
new planar tracking panel. From a users perspective, this means:
* The old "tracking algorithm" picker is gone. There is only 1
algorithm now. We may revisit this later, but I would much
prefer to have only 1 algorithm. So far no optimization work
has been done so the speed is not there yet.
* There is now a dropdown to select the motion model. Choices:
* Translation
* Translation, rotation
* Translation, scale
* Translation, rotation, scale
* Affine
* Perspective
* The old "Hybrid" mode is gone; instead there is a toggle to
enable or disable translation-only tracker initialization. This
is the equivalent of the hyrbid mode before, but rewritten to work
with the new planar tracking modes.
* The pyramid levels setting is gone. At a future date, the planar
tracker will decide to use pyramids or not automatically. The
pyramid setting was ultimately a mistake; with the brute force
initialization it is unnecessary.
- Add light-normalized tracking
Added the ability to normalize patterns by their average value while
tracking, to make them invariant to global illumination changes.
Additional details could be found at wiki page [2]
[1] http://code.google.com/p/ceres-solver
[2] http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Motion_Tracker
2012-06-10 15:28:19 +00:00
|
|
|
scn->scopes.track_search = NULL;
|
2012-03-25 23:19:21 +00:00
|
|
|
scn->scopes.track_preview = NULL;
|
2014-04-01 11:34:00 +11:00
|
|
|
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
|
|
|
|
2011-07-18 19:39:02 +00:00
|
|
|
return (SpaceLink *)scn;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
}
|
|
|
|
|
|
2021-01-19 12:59:00 +11:00
|
|
|
static void clip_listener(const wmSpaceTypeListenerParams *params)
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
{
|
2021-01-18 17:28:47 -06:00
|
|
|
ScrArea *area = params->area;
|
|
|
|
|
wmNotifier *wmn = params->notifier;
|
|
|
|
|
const Scene *scene = params->scene;
|
|
|
|
|
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
/* context changes */
|
2012-04-28 06:31:57 +00:00
|
|
|
switch (wmn->category) {
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
case NC_SCENE:
|
2012-04-28 06:31:57 +00:00
|
|
|
switch (wmn->data) {
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
case ND_FRAME:
|
2020-04-03 13:25:03 +02:00
|
|
|
clip_scopes_tag_refresh(area);
|
2017-05-20 14:01:03 +10:00
|
|
|
ATTR_FALLTHROUGH;
|
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
|
|
|
case ND_FRAME_RANGE:
|
2020-04-03 13:25:03 +02:00
|
|
|
ED_area_tag_redraw(area);
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case NC_MOVIECLIP:
|
2012-04-28 06:31:57 +00:00
|
|
|
switch (wmn->data) {
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
case ND_DISPLAY:
|
2011-06-03 15:39:53 +00:00
|
|
|
case ND_SELECT:
|
2020-04-03 13:25:03 +02:00
|
|
|
clip_scopes_tag_refresh(area);
|
|
|
|
|
ED_area_tag_redraw(area);
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
break;
|
|
|
|
|
}
|
2012-04-28 06:31:57 +00:00
|
|
|
switch (wmn->action) {
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
case NA_REMOVED:
|
2011-06-03 15:39:53 +00:00
|
|
|
case NA_EDITED:
|
2011-06-10 17:17:25 +00:00
|
|
|
case NA_EVALUATED:
|
2013-07-21 08:16:37 +00:00
|
|
|
/* fall-through */
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-08-01 15:28:19 +00:00
|
|
|
case NA_SELECTED:
|
2020-04-03 13:25:03 +02:00
|
|
|
clip_scopes_tag_refresh(area);
|
|
|
|
|
ED_area_tag_redraw(area);
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2012-06-04 16:42:58 +00:00
|
|
|
case NC_MASK:
|
2012-06-04 20:11:09 +00:00
|
|
|
switch (wmn->data) {
|
2012-06-04 16:42:58 +00:00
|
|
|
case ND_SELECT:
|
|
|
|
|
case ND_DATA:
|
|
|
|
|
case ND_DRAW:
|
2020-04-03 13:25:03 +02:00
|
|
|
ED_area_tag_redraw(area);
|
2012-06-04 16:42:58 +00:00
|
|
|
break;
|
|
|
|
|
}
|
2012-06-04 20:11:09 +00:00
|
|
|
switch (wmn->action) {
|
2012-06-04 16:42:58 +00:00
|
|
|
case NA_SELECTED:
|
2020-04-03 13:25:03 +02:00
|
|
|
ED_area_tag_redraw(area);
|
2012-06-04 16:42:58 +00:00
|
|
|
break;
|
|
|
|
|
case NA_EDITED:
|
2020-04-03 13:25:03 +02:00
|
|
|
ED_area_tag_redraw(area);
|
2012-06-04 16:42:58 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2011-06-10 17:06:37 +00:00
|
|
|
case NC_GEOM:
|
2012-04-28 06:31:57 +00:00
|
|
|
switch (wmn->data) {
|
2011-06-10 17:06:37 +00:00
|
|
|
case ND_SELECT:
|
2020-04-03 13:25:03 +02:00
|
|
|
clip_scopes_tag_refresh(area);
|
|
|
|
|
ED_area_tag_redraw(area);
|
2011-06-10 17:06:37 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
2012-06-06 14:48:39 +00:00
|
|
|
case NC_SCREEN:
|
2012-06-10 19:59:02 +00:00
|
|
|
switch (wmn->data) {
|
2012-06-10 15:26:50 +00:00
|
|
|
case ND_ANIMPLAY:
|
2020-04-03 13:25:03 +02:00
|
|
|
ED_area_tag_redraw(area);
|
2012-06-10 15:26:50 +00:00
|
|
|
break;
|
2019-01-24 10:36:42 +01:00
|
|
|
case ND_LAYOUTSET:
|
2020-04-03 13:25:03 +02:00
|
|
|
clip_area_sync_frame_from_scene(area, scene);
|
2019-01-24 10:36:42 +01:00
|
|
|
break;
|
2011-07-28 11:05:28 +00:00
|
|
|
}
|
|
|
|
|
break;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
case NC_SPACE:
|
2012-05-07 08:53:59 +00:00
|
|
|
if (wmn->data == ND_SPACE_CLIP) {
|
2020-04-03 13:25:03 +02:00
|
|
|
clip_scopes_tag_refresh(area);
|
|
|
|
|
ED_area_tag_redraw(area);
|
2011-07-18 14:54:32 +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
|
|
|
break;
|
2012-10-05 19:51:11 +00:00
|
|
|
case NC_GPENCIL:
|
|
|
|
|
if (wmn->action == NA_EDITED) {
|
2020-04-03 13:25:03 +02:00
|
|
|
clip_scopes_check_gpencil_change(area);
|
|
|
|
|
ED_area_tag_redraw(area);
|
2012-10-05 19:51:11 +00:00
|
|
|
}
|
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch)
This merge-commit brings in a number of new features and workflow/UI improvements for
working with Grease Pencil. While these were originally targetted at improving
the workflow for creating 3D storyboards in Blender using the Grease Pencil,
many of these changes should also prove useful in other workflows too.
The main highlights here are:
1) It is now possible to edit Grease Pencil strokes
- Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions
to enter "Stroke Edit Mode". In this mode, many common editing tools will
operate on Grease Pencil stroke points instead.
- Tools implemented include Select, Select All/Border/Circle/Linked/More/Less,
Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete.
- Proportional Editing works when using the transform tools
2) Grease Pencil stroke settings can now be animated
NOTE: Currently drivers don't work, but if time allows, this may still be
added before the release.
3) Strokes can be drawn with "filled" interiors, using a separate set of
colour/opacity settings to the ones used for the lines themselves.
This makes use of OpenGL filled polys, which has the limitation of only
being able to fill convex shapes. Some artifacts may be visible on concave
shapes (e.g. pacman's mouth will be overdrawn)
4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing
has been added which draws strokes as a series of screen-aligned discs.
While this was originally a partial experimental technique at getting better
quality 3D lines, the effects possible using this technique were interesting
enough to warrant making this a dedicated feature. Best results when partial
opacity and large stroke widths are used.
5) Improved Onion Skinning Support
- Different colours can be selected for the before/after ghosts. To do so,
enable the "colour wheel" toggle beside the Onion Skinning toggle, and set
the colours accordingly.
- Different numbers of ghosts can be shown before/after the current frame
6) Grease Pencil datablocks are now attached to the scene by default instead of
the active object.
- For a long time, the object-attachment has proved to be quite problematic
for users to keep track of. Now that this is done at scene level, it is
easier for most users to use.
- An exception for old files (and for any addons which may benefit from object
attachment instead), is that if the active object has a Grease Pencil datablock,
that will be used instead.
- It is not currently possible to choose object-attachment from the UI, but
it is simple to do this from the console instead, by doing:
context.active_object.grease_pencil = bpy.data.grease_pencil["blah"]
7) Various UI Cleanups
- The layers UI has been cleaned up to use a list instead of the nested-panels
design. Apart from saving space, this is also much nicer to look at now.
- The UI code is now all defined in Python. To support this, it has been necessary
to add some new context properties to make it easier to access these settings.
e.g. "gpencil_data" for the datablock
"active_gpencil_layer" and "active_gpencil_frame" for active data,
"editable_gpencil_strokes" for the strokes that can be edited
- The "stroke placement/alignment" settings (previously "Drawing Settings" at the
bottom of the Grease Pencil panel in the Properties Region) is now located in
the toolbar. These were more toolsettings than properties for how GPencil got drawn.
- "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a
suggestion for an earlier discussion on developer.blender.org
- By default, the painting operator will wait for a mouse button to be pressed
before it starts creating the stroke. This is to make it easier to include
this operator in various toolbars/menus/etc. To get it immediately starting
(as when you hold down DKEy to draw), set "wait_for_input" to False.
- GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor
- Toolbar panels have been added to all the other editors which support these.
8) Pie menus for quick-access to tools
A set of experimental pie menus has been included for quick access to many
tools and settings. It is not necessary to use these to get things done,
but they have been designed to help make certain common tasks easier.
- Ctrl-D = The main pie menu. Reveals tools in a context sensitive and
spatially stable manner.
- D Q = "Quick Settings" pie. This allows quick access to the active
layer's settings. Notably, colours, thickness, and turning
onion skinning on/off.
2014-12-01 01:52:06 +13:00
|
|
|
else if (wmn->data & ND_GPENCIL_EDITMODE) {
|
2020-04-03 13:25:03 +02:00
|
|
|
ED_area_tag_redraw(area);
|
Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch)
This merge-commit brings in a number of new features and workflow/UI improvements for
working with Grease Pencil. While these were originally targetted at improving
the workflow for creating 3D storyboards in Blender using the Grease Pencil,
many of these changes should also prove useful in other workflows too.
The main highlights here are:
1) It is now possible to edit Grease Pencil strokes
- Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions
to enter "Stroke Edit Mode". In this mode, many common editing tools will
operate on Grease Pencil stroke points instead.
- Tools implemented include Select, Select All/Border/Circle/Linked/More/Less,
Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete.
- Proportional Editing works when using the transform tools
2) Grease Pencil stroke settings can now be animated
NOTE: Currently drivers don't work, but if time allows, this may still be
added before the release.
3) Strokes can be drawn with "filled" interiors, using a separate set of
colour/opacity settings to the ones used for the lines themselves.
This makes use of OpenGL filled polys, which has the limitation of only
being able to fill convex shapes. Some artifacts may be visible on concave
shapes (e.g. pacman's mouth will be overdrawn)
4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing
has been added which draws strokes as a series of screen-aligned discs.
While this was originally a partial experimental technique at getting better
quality 3D lines, the effects possible using this technique were interesting
enough to warrant making this a dedicated feature. Best results when partial
opacity and large stroke widths are used.
5) Improved Onion Skinning Support
- Different colours can be selected for the before/after ghosts. To do so,
enable the "colour wheel" toggle beside the Onion Skinning toggle, and set
the colours accordingly.
- Different numbers of ghosts can be shown before/after the current frame
6) Grease Pencil datablocks are now attached to the scene by default instead of
the active object.
- For a long time, the object-attachment has proved to be quite problematic
for users to keep track of. Now that this is done at scene level, it is
easier for most users to use.
- An exception for old files (and for any addons which may benefit from object
attachment instead), is that if the active object has a Grease Pencil datablock,
that will be used instead.
- It is not currently possible to choose object-attachment from the UI, but
it is simple to do this from the console instead, by doing:
context.active_object.grease_pencil = bpy.data.grease_pencil["blah"]
7) Various UI Cleanups
- The layers UI has been cleaned up to use a list instead of the nested-panels
design. Apart from saving space, this is also much nicer to look at now.
- The UI code is now all defined in Python. To support this, it has been necessary
to add some new context properties to make it easier to access these settings.
e.g. "gpencil_data" for the datablock
"active_gpencil_layer" and "active_gpencil_frame" for active data,
"editable_gpencil_strokes" for the strokes that can be edited
- The "stroke placement/alignment" settings (previously "Drawing Settings" at the
bottom of the Grease Pencil panel in the Properties Region) is now located in
the toolbar. These were more toolsettings than properties for how GPencil got drawn.
- "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a
suggestion for an earlier discussion on developer.blender.org
- By default, the painting operator will wait for a mouse button to be pressed
before it starts creating the stroke. This is to make it easier to include
this operator in various toolbars/menus/etc. To get it immediately starting
(as when you hold down DKEy to draw), set "wait_for_input" to False.
- GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor
- Toolbar panels have been added to all the other editors which support these.
8) Pie menus for quick-access to tools
A set of experimental pie menus has been included for quick access to many
tools and settings. It is not necessary to use these to get things done,
but they have been designed to help make certain common tasks easier.
- Ctrl-D = The main pie menu. Reveals tools in a context sensitive and
spatially stable manner.
- D Q = "Quick Settings" pie. This allows quick access to the active
layer's settings. Notably, colours, thickness, and turning
onion skinning on/off.
2014-12-01 01:52:06 +13:00
|
|
|
}
|
2012-10-05 19:51:11 +00:00
|
|
|
break;
|
2019-07-17 14:42:02 +02:00
|
|
|
case NC_WM:
|
|
|
|
|
switch (wmn->data) {
|
|
|
|
|
case ND_FILEREAD:
|
|
|
|
|
case ND_UNDO:
|
2020-04-03 13:25:03 +02:00
|
|
|
clip_area_sync_frame_from_scene(area, scene);
|
2019-07-17 14:42:02 +02:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void clip_operatortypes(void)
|
|
|
|
|
{
|
2011-08-08 12:18:32 +00:00
|
|
|
/* ** clip_ops.c ** */
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_open);
|
2011-06-03 15:39:53 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_reload);
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_view_pan);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_view_zoom);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_view_zoom_in);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_view_zoom_out);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_view_zoom_ratio);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_view_all);
|
2011-06-15 17:23:08 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_view_selected);
|
2019-10-01 20:19:44 +10:00
|
|
|
WM_operatortype_append(CLIP_OT_view_center_cursor);
|
2011-08-07 12:09:56 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_change_frame);
|
2011-08-08 12:18:32 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_rebuild_proxy);
|
2011-08-16 15:56:21 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_mode_set);
|
2016-08-18 00:21:55 -04:00
|
|
|
#ifdef WITH_INPUT_NDOF
|
2012-08-12 12:15:23 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_view_ndof);
|
2016-08-18 00:21:55 -04:00
|
|
|
#endif
|
2013-04-04 09:50:38 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_prefetch);
|
2013-05-10 15:56:32 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_set_scene_frames);
|
2013-08-26 20:23:26 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_cursor_set);
|
2019-09-13 11:38:16 +02:00
|
|
|
WM_operatortype_append(CLIP_OT_lock_selection_toggle);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-08-08 12:18:32 +00:00
|
|
|
/* ** tracking_ops.c ** */
|
|
|
|
|
|
|
|
|
|
/* navigation */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_frame_jump);
|
2011-06-03 15:39:53 +00:00
|
|
|
|
Rework 2D stabilizator
See this page for motivation and description of concepts:
https://github.com/Ichthyostega/blender/wiki
See this video for UI explanation and demonstration of usage
http://vimeo.com/blenderHack/stabilizerdemo
This proposal attempts to improve usability of Blender's image stabilization
feature for real-world footage esp. with moving and panning camera. It builds
upon the feature tracking to get a measurement of 2D image movement.
- Use a weighted average of movement contributions (instead of a median).
- Allow for rotation compensation and zoom (image scale) compensation.
- Allow to pick a different set of tracks for translation and for
rotation/zoom.
- Treat translation / rotation / zoom contributions systematically in a
similar way.
- Improve handling of partial tracking data with gaps and varying
start / end points.
- Have a user definable anchor frame and interpolate / extrapolate data to
avoid jumping back to "neutral" position when no tracking data is available.
- Support for travelling and panning shots by including an //intended//
position/rotation/zoom ("target position"). The idea is for these parameters
to be //animated// by the user, in order to supply an smooth, intended
camera movement. This way, we can keep the image content roughly in frame
even when moving completely away from the initial view.
A known shortcoming is that the pivot point for rotation compensation is set to
the translation compensated image center. This can produce spurious rotation on
travelling shots, which needs to be compensated manually (by animating the
target rotation parameter). There are several possible ways to address that
problem, yet all of them are considered beyond the scope of this improvement
proposal for now.
Own modifications:
- Restrict line length, it's really handy for split-view editing
- In motion tracking we prefer fully human-readable comments, meaning we
don't use doxygen with it's weird markup and comments are supposed to
start with capital and end with a full stop,
- Add explicit comparison of pointer to NULL.
Reviewers: sergey
Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung
Maniphest Tasks: T49036
Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
|
|
|
/* set optical center to frame center */
|
2011-08-08 12:18:32 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_set_center_principal);
|
|
|
|
|
|
|
|
|
|
/* selection */
|
2011-06-03 15:39:53 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_select);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_select_all);
|
2018-10-05 10:27:04 +10:00
|
|
|
WM_operatortype_append(CLIP_OT_select_box);
|
2012-05-14 12:04:00 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_select_lasso);
|
2011-06-03 15:39:53 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_select_circle);
|
2011-07-22 16:18:51 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_select_grouped);
|
2011-06-03 15:39:53 +00:00
|
|
|
|
2011-08-08 12:18:32 +00:00
|
|
|
/* markers */
|
2011-06-03 15:39:53 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_add_marker);
|
2013-05-30 11:37:53 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_add_marker_at_click);
|
2011-08-08 12:18:32 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_slide_marker);
|
2011-06-29 18:05:07 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_delete_track);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_delete_marker);
|
2011-06-10 17:17:25 +00:00
|
|
|
|
2011-08-08 12:18:32 +00:00
|
|
|
/* track */
|
2011-06-10 17:17:25 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_track_markers);
|
2013-05-12 16:04:14 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_refine_markers);
|
2011-08-08 12:18:32 +00:00
|
|
|
|
|
|
|
|
/* solving */
|
2011-07-07 17:58:33 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_solve_camera);
|
2011-08-16 08:01:23 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_clear_solution);
|
2011-06-14 16:22:06 +00:00
|
|
|
|
2011-07-08 08:38:54 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_disable_markers);
|
2011-07-09 19:51:23 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_hide_tracks);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_hide_tracks_clear);
|
2011-07-20 10:51:47 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_lock_tracks);
|
2011-07-13 15:09:45 +00:00
|
|
|
|
2012-07-26 09:50:27 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_set_solver_keyframe);
|
|
|
|
|
|
2011-08-08 12:18:32 +00:00
|
|
|
/* orientation */
|
2011-07-08 08:38:54 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_set_origin);
|
2012-03-06 12:27:42 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_set_plane);
|
2011-07-13 16:06:53 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_set_axis);
|
2011-07-14 12:52:50 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_set_scale);
|
2011-12-19 15:12:33 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_set_solution_scale);
|
2013-05-09 16:38:55 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_apply_solution_scale);
|
2011-07-08 08:38:54 +00:00
|
|
|
|
2011-08-08 12:18:32 +00:00
|
|
|
/* detect */
|
2011-07-15 20:44:19 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_detect_features);
|
2011-07-29 15:25:00 +00:00
|
|
|
|
2011-08-08 12:18:32 +00:00
|
|
|
/* stabilization */
|
2011-07-29 15:25:00 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_stabilize_2d_add);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_stabilize_2d_remove);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_stabilize_2d_select);
|
Rework 2D stabilizator
See this page for motivation and description of concepts:
https://github.com/Ichthyostega/blender/wiki
See this video for UI explanation and demonstration of usage
http://vimeo.com/blenderHack/stabilizerdemo
This proposal attempts to improve usability of Blender's image stabilization
feature for real-world footage esp. with moving and panning camera. It builds
upon the feature tracking to get a measurement of 2D image movement.
- Use a weighted average of movement contributions (instead of a median).
- Allow for rotation compensation and zoom (image scale) compensation.
- Allow to pick a different set of tracks for translation and for
rotation/zoom.
- Treat translation / rotation / zoom contributions systematically in a
similar way.
- Improve handling of partial tracking data with gaps and varying
start / end points.
- Have a user definable anchor frame and interpolate / extrapolate data to
avoid jumping back to "neutral" position when no tracking data is available.
- Support for travelling and panning shots by including an //intended//
position/rotation/zoom ("target position"). The idea is for these parameters
to be //animated// by the user, in order to supply an smooth, intended
camera movement. This way, we can keep the image content roughly in frame
even when moving completely away from the initial view.
A known shortcoming is that the pivot point for rotation compensation is set to
the translation compensated image center. This can produce spurious rotation on
travelling shots, which needs to be compensated manually (by animating the
target rotation parameter). There are several possible ways to address that
problem, yet all of them are considered beyond the scope of this improvement
proposal for now.
Own modifications:
- Restrict line length, it's really handy for split-view editing
- In motion tracking we prefer fully human-readable comments, meaning we
don't use doxygen with it's weird markup and comments are supposed to
start with capital and end with a full stop,
- Add explicit comparison of pointer to NULL.
Reviewers: sergey
Subscribers: kusi, kdawg, forest-house, mardy, Samoth, plasmasolutions, willolis, sebastian_k, hype, enetheru, sunboy, jta, leon_cheung
Maniphest Tasks: T49036
Differential Revision: https://developer.blender.org/D583
2016-08-16 10:32:55 +02:00
|
|
|
WM_operatortype_append(CLIP_OT_stabilize_2d_rotation_add);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_stabilize_2d_rotation_remove);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_stabilize_2d_rotation_select);
|
2011-08-04 14:39:37 +00:00
|
|
|
|
2011-08-08 12:18:32 +00:00
|
|
|
/* clean-up */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_clear_track_path);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_join_tracks);
|
2019-11-28 11:14:32 +01:00
|
|
|
WM_operatortype_append(CLIP_OT_average_tracks);
|
2011-08-08 12:18:32 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_track_copy_color);
|
|
|
|
|
|
2011-08-04 14:39:37 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_clean_tracks);
|
2011-10-29 07:14:31 +00:00
|
|
|
|
2012-03-08 17:06:40 +00:00
|
|
|
/* object tracking */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_tracking_object_new);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_tracking_object_remove);
|
|
|
|
|
|
|
|
|
|
/* clipboard */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_copy_tracks);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_paste_tracks);
|
|
|
|
|
|
Merge plane track feature from tomato branch
This commit includes all the changes made for plane tracker
in tomato branch.
Movie clip editor changes:
- Artist might create a plane track out of multiple point
tracks which belongs to the same track (minimum amount of
point tracks is 4, maximum is not actually limited).
When new plane track is added, it's getting "tracked"
across all point tracks, which makes it stick to the same
plane point tracks belong to.
- After plane track was added, it need to be manually adjusted
in a way it covers feature one might to mask/replace.
General transform tools (G, R, S) or sliding corners with
a mouse could be sued for this. Plane corner which
corresponds to left bottom image corner has got X/Y axis
on it (red is for X axis, green for Y).
- Re-adjusting plane corners makes plane to be "re-tracked"
for the frames sequence between current frame and next
and previous keyframes.
- Kayframes might be removed from the plane, using Shit-X
(Marker Delete) operator. However, currently manual
re-adjustment or "re-track" trigger is needed.
Compositor changes:
- Added new node called Plane Track Deform.
- User selects which plane track to use (for this he need
to select movie clip datablock, object and track names).
- Node gets an image input, which need to be warped into
the plane.
- Node outputs:
* Input image warped into the plane.
* Plane, rasterized to a mask.
Masking changes:
- Mask points might be parented to a plane track, which
makes this point deforming in a way as if it belongs
to the tracked plane.
Some video tutorials are available:
- Coder video: http://www.youtube.com/watch?v=vISEwqNHqe4
- Artist video: https://vimeo.com/71727578
This is mine and Keir's holiday code project :)
2013-08-16 09:46:30 +00:00
|
|
|
/* Plane tracker */
|
|
|
|
|
WM_operatortype_append(CLIP_OT_create_plane_track);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_slide_plane_marker);
|
|
|
|
|
|
2013-09-09 11:55:52 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_keyframe_insert);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_keyframe_delete);
|
|
|
|
|
|
2012-03-08 17:06:40 +00:00
|
|
|
/* ** clip_graph_ops.c ** */
|
|
|
|
|
|
2011-10-29 07:14:31 +00:00
|
|
|
/* graph editing */
|
2012-03-08 17:06:40 +00:00
|
|
|
|
|
|
|
|
/* selection */
|
2011-10-29 07:14:31 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_graph_select);
|
2018-10-05 10:27:04 +10:00
|
|
|
WM_operatortype_append(CLIP_OT_graph_select_box);
|
2012-03-08 17:06:40 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_graph_select_all_markers);
|
|
|
|
|
|
2011-10-29 07:14:31 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_graph_delete_curve);
|
|
|
|
|
WM_operatortype_append(CLIP_OT_graph_delete_knot);
|
2012-01-26 09:29:49 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_graph_view_all);
|
2012-01-26 11:49:38 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_graph_center_current_frame);
|
2011-12-05 18:57:17 +00:00
|
|
|
|
2012-03-08 17:06:40 +00:00
|
|
|
WM_operatortype_append(CLIP_OT_graph_disable_markers);
|
2012-04-30 16:19:20 +00:00
|
|
|
|
|
|
|
|
/* ** clip_dopesheet_ops.c ** */
|
|
|
|
|
|
|
|
|
|
WM_operatortype_append(CLIP_OT_dopesheet_select_channel);
|
2013-03-05 12:41:17 +00:00
|
|
|
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 ******** */
|
2018-11-08 15:59:51 +11: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 ******** */
|
2018-11-08 15:59:51 +11:00
|
|
|
WM_keymap_ensure(keyconf, "Clip Editor", SPACE_CLIP, 0);
|
2012-06-04 16:42:58 +00:00
|
|
|
// 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 ******** */
|
2018-11-08 15:59:51 +11: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 ******** */
|
2018-11-08 15:59:51 +11: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-02-23 19:17:30 +11: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
|
|
|
|
Cleanup: Use enum for return values in context callbacks
Define enum `eContextResult` and use its values for returns, instead of
just returning 1, 0, or -1 (and always having some comment that explains
what -1 means).
This also cleans up the mixup between returning `0` and `false`, and `1`
and `true`. An inconsistency was discovered during this cleanup, and
marked with `TODO(sybren)`. It's not fixed here, as it would consititute
a functional change.
The enum isn't used everywhere, as enums in C and C++ can have different
storage sizes. To prevent issues, callback functions are still declared
as returning`int`. To at least make things easier to understand for
humans, I marked those with `int /*eContextResult*/`.
This is a followup of D9090, and is intended to unify how context
callbacks return values. This will make it easier to extend the approach
in D9090 to those functions.
No functional changes.
Differential Revision: https://developer.blender.org/D9095
2020-10-02 18:56:25 +02:00
|
|
|
static int /*eContextResult*/ clip_context(const bContext *C,
|
|
|
|
|
const char *member,
|
|
|
|
|
bContextDataResult *result)
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
{
|
2012-03-25 23:19:21 +00:00
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-03-24 06:38:07 +00:00
|
|
|
if (CTX_data_dir(member)) {
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
CTX_data_dir_set(result, clip_context_dir);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
Cleanup: Use enum for return values in context callbacks
Define enum `eContextResult` and use its values for returns, instead of
just returning 1, 0, or -1 (and always having some comment that explains
what -1 means).
This also cleans up the mixup between returning `0` and `false`, and `1`
and `true`. An inconsistency was discovered during this cleanup, and
marked with `TODO(sybren)`. It's not fixed here, as it would consititute
a functional change.
The enum isn't used everywhere, as enums in C and C++ can have different
storage sizes. To prevent issues, callback functions are still declared
as returning`int`. To at least make things easier to understand for
humans, I marked those with `int /*eContextResult*/`.
This is a followup of D9090, and is intended to unify how context
callbacks return values. This will make it easier to extend the approach
in D9090 to those functions.
No functional changes.
Differential Revision: https://developer.blender.org/D9095
2020-10-02 18:56:25 +02:00
|
|
|
return CTX_RESULT_OK;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
}
|
2020-07-03 17:20:41 +02:00
|
|
|
if (CTX_data_equals(member, "edit_movieclip")) {
|
2019-04-22 09:19:45 +10:00
|
|
|
if (sc->clip) {
|
2012-04-29 12:32:26 +00:00
|
|
|
CTX_data_id_pointer_set(result, &sc->clip->id);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
Cleanup: Use enum for return values in context callbacks
Define enum `eContextResult` and use its values for returns, instead of
just returning 1, 0, or -1 (and always having some comment that explains
what -1 means).
This also cleans up the mixup between returning `0` and `false`, and `1`
and `true`. An inconsistency was discovered during this cleanup, and
marked with `TODO(sybren)`. It's not fixed here, as it would consititute
a functional change.
The enum isn't used everywhere, as enums in C and C++ can have different
storage sizes. To prevent issues, callback functions are still declared
as returning`int`. To at least make things easier to understand for
humans, I marked those with `int /*eContextResult*/`.
This is a followup of D9090, and is intended to unify how context
callbacks return values. This will make it easier to extend the approach
in D9090 to those functions.
No functional changes.
Differential Revision: https://developer.blender.org/D9095
2020-10-02 18:56:25 +02:00
|
|
|
return CTX_RESULT_OK;
|
2012-06-04 16:42:58 +00:00
|
|
|
}
|
2020-07-03 17:20:41 +02:00
|
|
|
if (CTX_data_equals(member, "edit_mask")) {
|
2019-04-22 09:19:45 +10:00
|
|
|
if (sc->mask_info.mask) {
|
2012-07-24 20:33:55 +00:00
|
|
|
CTX_data_id_pointer_set(result, &sc->mask_info.mask->id);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
Cleanup: Use enum for return values in context callbacks
Define enum `eContextResult` and use its values for returns, instead of
just returning 1, 0, or -1 (and always having some comment that explains
what -1 means).
This also cleans up the mixup between returning `0` and `false`, and `1`
and `true`. An inconsistency was discovered during this cleanup, and
marked with `TODO(sybren)`. It's not fixed here, as it would consititute
a functional change.
The enum isn't used everywhere, as enums in C and C++ can have different
storage sizes. To prevent issues, callback functions are still declared
as returning`int`. To at least make things easier to understand for
humans, I marked those with `int /*eContextResult*/`.
This is a followup of D9090, and is intended to unify how context
callbacks return values. This will make it easier to extend the approach
in D9090 to those functions.
No functional changes.
Differential Revision: https://developer.blender.org/D9095
2020-10-02 18:56:25 +02:00
|
|
|
return CTX_RESULT_OK;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
Cleanup: Use enum for return values in context callbacks
Define enum `eContextResult` and use its values for returns, instead of
just returning 1, 0, or -1 (and always having some comment that explains
what -1 means).
This also cleans up the mixup between returning `0` and `false`, and `1`
and `true`. An inconsistency was discovered during this cleanup, and
marked with `TODO(sybren)`. It's not fixed here, as it would consititute
a functional change.
The enum isn't used everywhere, as enums in C and C++ can have different
storage sizes. To prevent issues, callback functions are still declared
as returning`int`. To at least make things easier to understand for
humans, I marked those with `int /*eContextResult*/`.
This is a followup of D9090, and is intended to unify how context
callbacks return values. This will make it easier to extend the approach
in D9090 to those functions.
No functional changes.
Differential Revision: https://developer.blender.org/D9095
2020-10-02 18:56:25 +02:00
|
|
|
return CTX_RESULT_MEMBER_NOT_FOUND;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
}
|
|
|
|
|
|
2012-05-02 16:42:42 +00:00
|
|
|
/* dropboxes */
|
2018-08-07 10:38:20 +02:00
|
|
|
static bool clip_drop_poll(bContext *UNUSED(C),
|
|
|
|
|
wmDrag *drag,
|
|
|
|
|
const wmEvent *UNUSED(event),
|
2020-03-25 17:58:58 +11:00
|
|
|
const char **UNUSED(r_tooltip))
|
2012-05-02 16:42:42 +00:00
|
|
|
{
|
2019-01-15 23:24:20 +11: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)) {
|
2014-04-01 11:34:00 +11:00
|
|
|
return true;
|
2019-01-15 23:24:20 +11:00
|
|
|
}
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2014-04-01 11:34:00 +11:00
|
|
|
return false;
|
2012-05-02 16:42:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void clip_drop_copy(wmDrag *drag, wmDropBox *drop)
|
|
|
|
|
{
|
2012-07-12 11:52:09 +00:00
|
|
|
PointerRNA itemptr;
|
|
|
|
|
char dir[FILE_MAX], file[FILE_MAX];
|
|
|
|
|
|
|
|
|
|
BLI_split_dirfile(drag->path, dir, file, sizeof(dir), sizeof(file));
|
|
|
|
|
|
|
|
|
|
RNA_string_set(drop->ptr, "directory", dir);
|
|
|
|
|
|
|
|
|
|
RNA_collection_clear(drop->ptr, "files");
|
|
|
|
|
RNA_collection_add(drop->ptr, "files", &itemptr);
|
|
|
|
|
RNA_string_set(&itemptr, "name", file);
|
2012-05-02 16:42:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* area+region dropbox definition */
|
|
|
|
|
static void clip_dropboxes(void)
|
|
|
|
|
{
|
|
|
|
|
ListBase *lb = WM_dropboxmap_find("Clip", SPACE_CLIP, 0);
|
|
|
|
|
|
|
|
|
|
WM_dropbox_add(lb, "CLIP_OT_open", clip_drop_poll, clip_drop_copy);
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-03 13:25:03 +02:00
|
|
|
static void clip_refresh(const bContext *C, ScrArea *area)
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
{
|
2012-03-25 23:19:21 +00:00
|
|
|
wmWindowManager *wm = CTX_wm_manager(C);
|
|
|
|
|
wmWindow *window = CTX_wm_window(C);
|
2012-02-06 22:17:41 +00:00
|
|
|
Scene *scene = CTX_data_scene(C);
|
2020-04-03 13:25:03 +02:00
|
|
|
SpaceClip *sc = (SpaceClip *)area->spacedata.first;
|
|
|
|
|
ARegion *region_main = BKE_area_find_region_type(area, RGN_TYPE_WINDOW);
|
|
|
|
|
ARegion *region_tools = BKE_area_find_region_type(area, RGN_TYPE_TOOLS);
|
|
|
|
|
ARegion *region_preview = ED_clip_has_preview_region(C, area);
|
|
|
|
|
ARegion *region_properties = ED_clip_has_properties_region(area);
|
|
|
|
|
ARegion *region_channels = ED_clip_has_channels_region(area);
|
2013-09-05 13:37:53 +00:00
|
|
|
bool main_visible = false, preview_visible = false, tools_visible = false;
|
UI: New Global Top-Bar (WIP)
== Main Features/Changes for Users
* Add horizontal bar at top of all non-temp windows, consisting out of two horizontal sub-bars.
* Upper sub-bar contains global menus (File, Render, etc.), tabs for workspaces and scene selector.
* Lower sub-bar contains object mode selector, screen-layout and render-layer selector. Later operator and/or tool settings will be placed here.
* Individual sections of the topbar are individually scrollable.
* Workspace tabs can be double- or ctrl-clicked for renaming and contain 'x' icon for deleting.
* Top-bar should scale nicely with DPI.
* The lower half of the top-bar can be hided by dragging the lower top-bar edge up. Better hiding options are planned (e.g. hide in fullscreen modes).
* Info editors at the top of the window and using the full window width with be replaced by the top-bar.
* In fullscreen modes, no more info editor is added on top, the top-bar replaces it.
== Technical Features/Changes
* Adds initial support for global areas
A global area is part of the window, not part of the regular screen-layout.
I've added a macro iterator to iterate over both, global and screen-layout level areas. When iterating over areas, from now on developers should always consider if they have to include global areas.
* Adds a TOPBAR editor type
The editor type is hidden in the UI editor type menu.
* Adds a variation of the ID template to display IDs as tab buttons (template_ID_tabs in BPY)
* Does various changes to RNA button creation code to improve their appearance in the horizontal top-bar.
* Adds support for dynamically sized regions. That is, regions that scale automatically to the layout bounds.
The code for this is currently a big hack (it's based on drawing the UI multiple times). This should definitely be improved.
* Adds a template for displaying operator properties optimized for the top-bar. This will probably change a lot still and is in fact disabled in code.
Since the final top-bar design depends a lot on other 2.8 designs (mainly tool-system and workspaces), we decided to not show the operator or tool settings in the top-bar for now. That means most of the lower sub-bar is empty for the time being.
NOTE: Top-bar or global area data is not written to files or SDNA. They are simply added to the window when opening Blender or reading a file. This allows us doing changes to the top-bar without having to care for compatibility.
== ToDo's
It's a bit hard to predict all the ToDo's here are the known main ones:
* Add options for the new active-tool system and for operator redo to the topbar.
* Automatically hide the top-bar in fullscreen modes.
* General visual polish.
* Top-bar drag & drop support (WIP in temp-tab_drag_drop).
* Improve dynamic regions (should also fix some layout glitches).
* Make internal terminology consistent.
* Enable topbar file writing once design is more advanced.
* Address TODO's and XXX's in code :)
Thanks @brecht for the review! And @sergey for the complaining ;)
Differential Revision: D2758
2018-04-20 17:14:03 +02:00
|
|
|
bool properties_visible = false, channels_visible = false;
|
2013-09-05 13:37:53 +00:00
|
|
|
bool view_changed = false;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-10-19 12:46:30 +00:00
|
|
|
switch (sc->view) {
|
|
|
|
|
case SC_VIEW_CLIP:
|
2013-09-05 13:37:53 +00:00
|
|
|
main_visible = true;
|
|
|
|
|
preview_visible = false;
|
|
|
|
|
tools_visible = true;
|
|
|
|
|
properties_visible = true;
|
|
|
|
|
channels_visible = false;
|
2011-10-19 12:46:30 +00:00
|
|
|
break;
|
|
|
|
|
case SC_VIEW_GRAPH:
|
2013-09-05 13:37:53 +00:00
|
|
|
main_visible = false;
|
|
|
|
|
preview_visible = true;
|
|
|
|
|
tools_visible = false;
|
|
|
|
|
properties_visible = false;
|
|
|
|
|
channels_visible = false;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-04-03 12:51:03 +02:00
|
|
|
reinit_preview_region(C, region_preview);
|
2012-04-30 16:19:20 +00:00
|
|
|
break;
|
|
|
|
|
case SC_VIEW_DOPESHEET:
|
2013-09-05 13:37:53 +00:00
|
|
|
main_visible = false;
|
|
|
|
|
preview_visible = true;
|
|
|
|
|
tools_visible = false;
|
|
|
|
|
properties_visible = false;
|
|
|
|
|
channels_visible = true;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-04-03 12:51:03 +02:00
|
|
|
reinit_preview_region(C, region_preview);
|
2011-10-19 12:46:30 +00:00
|
|
|
break;
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-04-29 12:32:26 +00:00
|
|
|
if (main_visible) {
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_main && (region_main->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
region_main->flag &= ~RGN_FLAG_HIDDEN;
|
2020-08-01 13:02:21 +10:00
|
|
|
region_main->v2d.flag &= ~V2D_IS_INIT;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_main && region_main->alignment != RGN_ALIGN_NONE) {
|
|
|
|
|
region_main->alignment = RGN_ALIGN_NONE;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_main && !(region_main->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
region_main->flag |= RGN_FLAG_HIDDEN;
|
2020-08-01 13:02:21 +10:00
|
|
|
region_main->v2d.flag &= ~V2D_IS_INIT;
|
2020-04-03 12:51:03 +02:00
|
|
|
WM_event_remove_handlers((bContext *)C, ®ion_main->handlers);
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_main && region_main->alignment != RGN_ALIGN_NONE) {
|
|
|
|
|
region_main->alignment = RGN_ALIGN_NONE;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-04-29 12:32:26 +00:00
|
|
|
if (properties_visible) {
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_properties && (region_properties->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
region_properties->flag &= ~RGN_FLAG_HIDDEN;
|
2020-08-01 13:02:21 +10:00
|
|
|
region_properties->v2d.flag &= ~V2D_IS_INIT;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_properties && region_properties->alignment != RGN_ALIGN_RIGHT) {
|
|
|
|
|
region_properties->alignment = RGN_ALIGN_RIGHT;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_properties && !(region_properties->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
region_properties->flag |= RGN_FLAG_HIDDEN;
|
2020-08-01 13:02:21 +10:00
|
|
|
region_properties->v2d.flag &= ~V2D_IS_INIT;
|
2020-04-03 12:51:03 +02:00
|
|
|
WM_event_remove_handlers((bContext *)C, ®ion_properties->handlers);
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_properties && region_properties->alignment != RGN_ALIGN_NONE) {
|
|
|
|
|
region_properties->alignment = RGN_ALIGN_NONE;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-04-29 12:32:26 +00:00
|
|
|
if (tools_visible) {
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_tools && (region_tools->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
region_tools->flag &= ~RGN_FLAG_HIDDEN;
|
2020-08-01 13:02:21 +10:00
|
|
|
region_tools->v2d.flag &= ~V2D_IS_INIT;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_tools && region_tools->alignment != RGN_ALIGN_LEFT) {
|
|
|
|
|
region_tools->alignment = RGN_ALIGN_LEFT;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_tools && !(region_tools->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
region_tools->flag |= RGN_FLAG_HIDDEN;
|
2020-08-01 13:02:21 +10:00
|
|
|
region_tools->v2d.flag &= ~V2D_IS_INIT;
|
2020-04-03 12:51:03 +02:00
|
|
|
WM_event_remove_handlers((bContext *)C, ®ion_tools->handlers);
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_tools && region_tools->alignment != RGN_ALIGN_NONE) {
|
|
|
|
|
region_tools->alignment = RGN_ALIGN_NONE;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-04-29 12:32:26 +00:00
|
|
|
if (preview_visible) {
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_preview && (region_preview->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
region_preview->flag &= ~RGN_FLAG_HIDDEN;
|
2020-08-01 13:02:21 +10:00
|
|
|
region_preview->v2d.flag &= ~V2D_IS_INIT;
|
2020-04-03 12:51:03 +02:00
|
|
|
region_preview->v2d.cur = region_preview->v2d.tot;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_preview && region_preview->alignment != RGN_ALIGN_NONE) {
|
|
|
|
|
region_preview->alignment = RGN_ALIGN_NONE;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_preview && !(region_preview->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
region_preview->flag |= RGN_FLAG_HIDDEN;
|
2020-08-01 13:02:21 +10:00
|
|
|
region_preview->v2d.flag &= ~V2D_IS_INIT;
|
2020-04-03 12:51:03 +02:00
|
|
|
WM_event_remove_handlers((bContext *)C, ®ion_preview->handlers);
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_preview && region_preview->alignment != RGN_ALIGN_NONE) {
|
|
|
|
|
region_preview->alignment = RGN_ALIGN_NONE;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
if (channels_visible) {
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_channels && (region_channels->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
region_channels->flag &= ~RGN_FLAG_HIDDEN;
|
2020-08-01 13:02:21 +10:00
|
|
|
region_channels->v2d.flag &= ~V2D_IS_INIT;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_channels && region_channels->alignment != RGN_ALIGN_LEFT) {
|
|
|
|
|
region_channels->alignment = RGN_ALIGN_LEFT;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_channels && !(region_channels->flag & RGN_FLAG_HIDDEN)) {
|
|
|
|
|
region_channels->flag |= RGN_FLAG_HIDDEN;
|
2020-08-01 13:02:21 +10:00
|
|
|
region_channels->v2d.flag &= ~V2D_IS_INIT;
|
2020-04-03 12:51:03 +02:00
|
|
|
WM_event_remove_handlers((bContext *)C, ®ion_channels->handlers);
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
2020-04-03 12:51:03 +02:00
|
|
|
if (region_channels && region_channels->alignment != RGN_ALIGN_NONE) {
|
|
|
|
|
region_channels->alignment = RGN_ALIGN_NONE;
|
2013-09-05 13:37:53 +00:00
|
|
|
view_changed = true;
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
|
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-03-24 06:38:07 +00:00
|
|
|
if (view_changed) {
|
2020-08-01 13:02:21 +10:00
|
|
|
ED_area_init(wm, window, area);
|
2020-04-03 13:25:03 +02:00
|
|
|
ED_area_tag_redraw(area);
|
2011-10-19 12:46:30 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-02-06 22:17:41 +00:00
|
|
|
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 */
|
2020-03-06 16:56:42 +01:00
|
|
|
static void movieclip_main_area_set_view2d(const bContext *C, ARegion *region)
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
{
|
2012-06-20 10:28:51 +00:00
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
2012-11-20 11:44:55 +00:00
|
|
|
float x1, y1, w, h, aspx, aspy;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
int width, height, winx, winy;
|
|
|
|
|
|
2012-07-26 22:41:40 +00:00
|
|
|
ED_space_clip_get_size(sc, &width, &height);
|
2012-11-20 11:44:55 +00:00
|
|
|
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
|
|
|
|
2012-11-20 11:44:55 +00:00
|
|
|
w = width * aspx;
|
|
|
|
|
h = height * aspy;
|
2011-07-21 09:23:25 +00:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
winx = BLI_rcti_size_x(®ion->winrct) + 1;
|
|
|
|
|
winy = BLI_rcti_size_y(®ion->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
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.tot.xmin = 0;
|
|
|
|
|
region->v2d.tot.ymin = 0;
|
|
|
|
|
region->v2d.tot.xmax = w;
|
|
|
|
|
region->v2d.tot.ymax = h;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.mask.xmin = region->v2d.mask.ymin = 0;
|
|
|
|
|
region->v2d.mask.xmax = winx;
|
|
|
|
|
region->v2d.mask.ymax = winy;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
|
|
|
|
/* which part of the image space do we see? */
|
2020-03-06 16:56:42 +01:00
|
|
|
x1 = region->winrct.xmin + (winx - sc->zoom * w) / 2.0f;
|
|
|
|
|
y1 = region->winrct.ymin + (winy - sc->zoom * h) / 2.0f;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
2012-05-03 23:47:39 +00:00
|
|
|
x1 -= sc->zoom * sc->xof;
|
|
|
|
|
y1 -= sc->zoom * sc->yof;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
|
|
|
|
/* relative display right */
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.cur.xmin = (region->winrct.xmin - (float)x1) / sc->zoom;
|
|
|
|
|
region->v2d.cur.xmax = region->v2d.cur.xmin + ((float)winx / sc->zoom);
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
|
|
|
|
/* relative display left */
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.cur.ymin = (region->winrct.ymin - (float)y1) / sc->zoom;
|
|
|
|
|
region->v2d.cur.ymax = region->v2d.cur.ymin + ((float)winy / sc->zoom);
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
|
|
|
|
/* normalize 0.0..1.0 */
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.cur.xmin /= w;
|
|
|
|
|
region->v2d.cur.xmax /= w;
|
|
|
|
|
region->v2d.cur.ymin /= h;
|
|
|
|
|
region->v2d.cur.ymax /= h;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* add handlers, stuff you only do once or on area/region changes */
|
2020-03-06 16:56:42 +01:00
|
|
|
static void clip_main_region_init(wmWindowManager *wm, ARegion *region)
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
{
|
|
|
|
|
wmKeyMap *keymap;
|
|
|
|
|
|
2021-01-19 20:29:05 +11:00
|
|
|
/* NOTE: don't use `UI_view2d_region_reinit(®ion->v2d, ...)`
|
|
|
|
|
* since the space clip manages own v2d in #movieclip_main_area_set_view2d */
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
|
2012-07-25 14:46:38 +00:00
|
|
|
/* mask polls mode */
|
2018-08-31 13:36:14 +10:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Mask Editing", 0, 0);
|
2020-03-06 16:56:42 +01:00
|
|
|
WM_event_add_keymap_handler_v2d_mask(®ion->handlers, keymap);
|
2012-06-04 16:42:58 +00:00
|
|
|
|
2012-07-24 09:53:29 +00:00
|
|
|
/* own keymap */
|
2018-08-31 13:36:14 +10:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
|
2020-03-06 16:56:42 +01:00
|
|
|
WM_event_add_keymap_handler_v2d_mask(®ion->handlers, keymap);
|
2011-07-25 18:11:22 +00:00
|
|
|
|
2018-08-31 13:36:14 +10:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip Editor", SPACE_CLIP, 0);
|
2020-03-06 16:56:42 +01:00
|
|
|
WM_event_add_keymap_handler_v2d_mask(®ion->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
|
|
|
}
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
static void clip_main_region_draw(const bContext *C, ARegion *region)
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
{
|
|
|
|
|
/* draw entirely, view changes should be handled here */
|
2012-03-25 23:19:21 +00:00
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
2012-06-19 14:26:29 +00:00
|
|
|
MovieClip *clip = ED_space_clip_get_clip(sc);
|
2013-08-29 13:04:12 +00:00
|
|
|
float aspx, aspy, zoomx, zoomy, x, y;
|
|
|
|
|
int width, height;
|
2013-09-10 12:46:23 +00:00
|
|
|
bool show_cursor = false;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-03-08 04:12:11 +00:00
|
|
|
/* if tracking is in progress, we should synchronize framenr from clipuser
|
2012-03-03 16:31:46 +00:00
|
|
|
* so latest tracked frame would be shown */
|
2019-04-22 09:19:45 +10:00
|
|
|
if (clip && clip->tracking_context) {
|
2014-06-22 20:19:48 +06: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
|
|
|
|
2012-03-25 23:19:21 +00:00
|
|
|
if (sc->flag & SC_LOCK_SELECTION) {
|
|
|
|
|
ImBuf *tmpibuf = NULL;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-03-25 23:19:21 +00:00
|
|
|
if (clip && clip->tracking.stabilization.flag & TRACKING_2D_STABILIZATION) {
|
|
|
|
|
tmpibuf = ED_space_clip_get_stable_buffer(sc, NULL, NULL, NULL);
|
2011-07-29 15:25:00 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
if (ED_clip_view_selection(C, region, 0)) {
|
2012-03-25 23:19:21 +00:00
|
|
|
sc->xof += sc->xlockof;
|
|
|
|
|
sc->yof += sc->ylockof;
|
2011-10-29 11:34:26 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (tmpibuf) {
|
2011-07-29 15:25:00 +00:00
|
|
|
IMB_freeImBuf(tmpibuf);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2011-07-29 15:25:00 +00:00
|
|
|
}
|
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
|
|
|
/* clear and setup matrix */
|
|
|
|
|
UI_ThemeClearColor(TH_BACK);
|
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
|
|
|
/* data... */
|
2020-03-06 16:56:42 +01:00
|
|
|
movieclip_main_area_set_view2d(C, region);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-11-16 13:58:11 +01:00
|
|
|
/* callback */
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_draw_cb_draw(C, region, REGION_DRAW_PRE_VIEW);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
clip_draw_main(C, sc, region);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2013-08-29 13:04:12 +00:00
|
|
|
/* TODO(sergey): would be nice to find a way to de-duplicate all this space conversions */
|
2020-03-06 16:56:42 +01:00
|
|
|
UI_view2d_view_to_region_fl(®ion->v2d, 0.0f, 0.0f, &x, &y);
|
2013-08-29 13:04:12 +00:00
|
|
|
ED_space_clip_get_size(sc, &width, &height);
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_space_clip_get_zoom(sc, region, &zoomx, &zoomy);
|
2013-08-29 13:04:12 +00:00
|
|
|
ED_space_clip_get_aspect(sc, &aspx, &aspy);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2013-08-29 13:04:12 +00:00
|
|
|
if (sc->mode == SC_MODE_MASKEDIT) {
|
2012-07-24 19:29:24 +00:00
|
|
|
Mask *mask = CTX_data_edit_mask(C);
|
2014-02-17 12:58:50 +06:00
|
|
|
if (mask && clip) {
|
2020-04-03 13:25:03 +02:00
|
|
|
ScrArea *area = CTX_wm_area(C);
|
2013-08-29 13:04:12 +00:00
|
|
|
int mask_width, mask_height;
|
2020-04-03 13:25:03 +02:00
|
|
|
ED_mask_get_size(area, &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,
|
2020-03-06 16:56:42 +01:00
|
|
|
region,
|
2013-10-12 14:09:05 +00:00
|
|
|
sc->mask_info.draw_flag,
|
|
|
|
|
sc->mask_info.draw_type,
|
|
|
|
|
sc->mask_info.overlay_mode,
|
2013-08-29 13:04:12 +00:00
|
|
|
mask_width,
|
|
|
|
|
mask_height,
|
2012-09-13 02:28:48 +00:00
|
|
|
aspx,
|
|
|
|
|
aspy,
|
2014-03-20 15:52:00 +06:00
|
|
|
true,
|
|
|
|
|
true,
|
2012-07-24 19:29:24 +00:00
|
|
|
sc->stabmat,
|
|
|
|
|
C);
|
2012-06-04 16:42:58 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
}
|
|
|
|
|
|
2013-09-10 12:46:23 +00:00
|
|
|
show_cursor |= sc->mode == SC_MODE_MASKEDIT;
|
2015-12-01 18:52:24 +11:00
|
|
|
show_cursor |= sc->around == V3D_AROUND_CURSOR;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2013-09-10 12:46:23 +00:00
|
|
|
if (show_cursor) {
|
2018-07-15 15:27:15 +02:00
|
|
|
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);
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_image_draw_cursor(region, sc->cursor);
|
2018-07-15 15:27:15 +02:00
|
|
|
GPU_matrix_pop();
|
2013-09-10 12:46:23 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
clip_draw_cache_and_notes(C, sc, region);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
if (sc->flag & SC_SHOW_ANNOTATION) {
|
2012-12-17 02:34:53 +00:00
|
|
|
/* Grease Pencil */
|
2013-09-05 13:37:53 +00:00
|
|
|
clip_draw_grease_pencil((bContext *)C, true);
|
2012-12-17 02:34:53 +00:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-11-16 13:58:11 +01:00
|
|
|
/* callback */
|
2020-12-31 15:09:26 +01:00
|
|
|
GPU_matrix_push_projection();
|
|
|
|
|
wmOrtho2(region->v2d.cur.xmin, region->v2d.cur.xmax, region->v2d.cur.ymin, region->v2d.cur.ymax);
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_draw_cb_draw(C, region, REGION_DRAW_POST_VIEW);
|
2020-12-31 15:09:26 +01:00
|
|
|
GPU_matrix_pop_projection();
|
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
|
|
|
/* reset view matrix */
|
|
|
|
|
UI_view2d_view_restore(C);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
if (sc->flag & SC_SHOW_ANNOTATION) {
|
2012-12-17 02:34:53 +00:00
|
|
|
/* draw Grease Pencil - screen space only */
|
2013-09-05 13:37:53 +00:00
|
|
|
clip_draw_grease_pencil((bContext *)C, false);
|
2012-12-17 02:34:53 +00:00
|
|
|
}
|
2019-05-31 21:45:28 +10:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
WM_gizmomap_draw(region->gizmo_map, C, WM_GIZMOMAP_DRAWSTEP_2D);
|
2011-08-08 16:30:09 +00:00
|
|
|
}
|
|
|
|
|
|
2021-01-19 12:59:00 +11:00
|
|
|
static void clip_main_region_listener(const wmRegionListenerParams *params)
|
2011-08-08 16:30:09 +00:00
|
|
|
{
|
2021-01-18 17:28:47 -06:00
|
|
|
ARegion *region = params->region;
|
|
|
|
|
wmNotifier *wmn = params->notifier;
|
|
|
|
|
|
2011-08-08 16:30:09 +00:00
|
|
|
/* context changes */
|
2012-04-28 06:31:57 +00:00
|
|
|
switch (wmn->category) {
|
2012-10-05 19:51:11 +00:00
|
|
|
case NC_GPENCIL:
|
2019-04-22 09:19:45 +10:00
|
|
|
if (wmn->action == NA_EDITED) {
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_tag_redraw(region);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
|
|
|
|
else if (wmn->data & ND_GPENCIL_EDITMODE) {
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_tag_redraw(region);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2012-06-10 19:59:02 +00: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
|
|
|
}
|
|
|
|
|
|
2011-10-19 12:46:30 +00:00
|
|
|
/****************** preview region ******************/
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
static void clip_preview_region_init(wmWindowManager *wm, ARegion *region)
|
2011-10-19 12:46:30 +00:00
|
|
|
{
|
|
|
|
|
wmKeyMap *keymap;
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
UI_view2d_region_reinit(®ion->v2d, V2D_COMMONVIEW_CUSTOM, region->winx, region->winy);
|
2011-10-19 12:46:30 +00:00
|
|
|
|
|
|
|
|
/* own keymap */
|
2019-05-08 14:10:09 +02:00
|
|
|
|
2018-08-31 13:36:14 +10:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
|
2020-03-06 16:56:42 +01:00
|
|
|
WM_event_add_keymap_handler_v2d_mask(®ion->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);
|
2020-03-06 16:56:42 +01:00
|
|
|
WM_event_add_keymap_handler_poll(®ion->handlers, keymap, ED_time_scrub_event_in_region);
|
2019-05-08 14:10:09 +02:00
|
|
|
|
2018-08-31 13:36:14 +10:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip Graph Editor", SPACE_CLIP, 0);
|
2020-03-06 16:56:42 +01:00
|
|
|
WM_event_add_keymap_handler_v2d_mask(®ion->handlers, keymap);
|
2013-03-05 12:41:17 +00:00
|
|
|
|
2018-08-31 13:36:14 +10:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip Dopesheet Editor", SPACE_CLIP, 0);
|
2020-03-06 16:56:42 +01:00
|
|
|
WM_event_add_keymap_handler_v2d_mask(®ion->handlers, keymap);
|
2011-10-19 12:46:30 +00:00
|
|
|
}
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
static void graph_region_draw(const bContext *C, ARegion *region)
|
2011-10-19 12:46:30 +00:00
|
|
|
{
|
2020-03-06 16:56:42 +01:00
|
|
|
View2D *v2d = ®ion->v2d;
|
2012-03-25 23:19:21 +00:00
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
|
|
|
|
Scene *scene = CTX_data_scene(C);
|
2018-05-10 17:56:12 +02:00
|
|
|
short cfra_flag = 0;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (sc->flag & SC_LOCK_TIMECURSOR) {
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_clip_graph_center_current_frame(scene, region);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-10-19 12:46:30 +00:00
|
|
|
/* clear and setup matrix */
|
|
|
|
|
UI_ThemeClearColor(TH_BACK);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-10-19 12:46:30 +00:00
|
|
|
UI_view2d_view_ortho(v2d);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-10-19 12:46:30 +00:00
|
|
|
/* data... */
|
2020-03-06 16:56:42 +01:00
|
|
|
clip_draw_graph(sc, region, scene);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-05-10 17:56:12 +02:00
|
|
|
/* current frame indicator line */
|
2019-04-22 09:19:45 +10:00
|
|
|
if (sc->flag & SC_SHOW_SECONDS) {
|
2018-05-10 17:56:12 +02:00
|
|
|
cfra_flag |= DRAWCFRA_UNIT_SECONDS;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2018-05-10 17:56:12 +02:00
|
|
|
ANIM_draw_cfra(C, v2d, cfra_flag);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-10-19 12:46:30 +00:00
|
|
|
/* reset view matrix */
|
|
|
|
|
UI_view2d_view_restore(C);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-05-07 15:09:14 +02:00
|
|
|
/* time-scrubbing */
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_time_scrub_draw(region, scene, sc->flag & SC_SHOW_SECONDS, true);
|
2019-05-07 15:09:14 +02:00
|
|
|
|
2011-10-19 12:46:30 +00:00
|
|
|
/* scrollers */
|
2020-06-22 21:44:18 +02:00
|
|
|
UI_view2d_scrollers_draw(v2d, NULL);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-04-30 14:10:53 +02:00
|
|
|
/* scale indicators */
|
2019-05-08 15:09:02 +02:00
|
|
|
{
|
|
|
|
|
rcti rect;
|
2020-03-06 16:56:42 +01:00
|
|
|
BLI_rcti_init(
|
|
|
|
|
&rect, 0, 15 * UI_DPI_FAC, 15 * UI_DPI_FAC, region->winy - UI_TIME_SCRUB_MARGIN_Y);
|
|
|
|
|
UI_view2d_draw_scale_y__values(region, v2d, &rect, TH_TEXT);
|
2019-05-08 15:09:02 +02:00
|
|
|
}
|
2011-10-19 12:46:30 +00:00
|
|
|
}
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
static void dopesheet_region_draw(const bContext *C, ARegion *region)
|
2012-04-30 16:19:20 +00:00
|
|
|
{
|
|
|
|
|
Scene *scene = CTX_data_scene(C);
|
|
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
2012-06-19 14:26:29 +00:00
|
|
|
MovieClip *clip = ED_space_clip_get_clip(sc);
|
2020-03-06 16:56:42 +01:00
|
|
|
View2D *v2d = ®ion->v2d;
|
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) {
|
2012-06-12 17:10:24 +00:00
|
|
|
BKE_tracking_dopesheet_update(&clip->tracking);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
/* clear and setup matrix */
|
|
|
|
|
UI_ThemeClearColor(TH_BACK);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
UI_view2d_view_ortho(v2d);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
/* 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
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
/* data... */
|
2020-03-06 16:56:42 +01:00
|
|
|
clip_draw_dopesheet_main(sc, region, scene);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-05-10 17:56:12 +02:00
|
|
|
/* current frame indicator line */
|
2019-04-22 09:19:45 +10:00
|
|
|
if (sc->flag & SC_SHOW_SECONDS) {
|
2018-05-10 17:56:12 +02:00
|
|
|
cfra_flag |= DRAWCFRA_UNIT_SECONDS;
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2018-05-10 17:56:12 +02:00
|
|
|
ANIM_draw_cfra(C, v2d, cfra_flag);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
/* reset view matrix */
|
|
|
|
|
UI_view2d_view_restore(C);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2019-05-07 15:09:14 +02:00
|
|
|
/* time-scrubbing */
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_time_scrub_draw(region, scene, sc->flag & SC_SHOW_SECONDS, true);
|
2019-05-07 15:09:14 +02:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
/* scrollers */
|
2020-06-22 21:44:18 +02:00
|
|
|
UI_view2d_scrollers_draw(v2d, NULL);
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
static void clip_preview_region_draw(const bContext *C, ARegion *region)
|
2012-04-29 12:32:26 +00:00
|
|
|
{
|
2012-04-30 16:19:20 +00:00
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
|
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (sc->view == SC_VIEW_GRAPH) {
|
2020-03-06 16:56:42 +01:00
|
|
|
graph_region_draw(C, region);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
|
|
|
|
else if (sc->view == SC_VIEW_DOPESHEET) {
|
2020-03-06 16:56:42 +01:00
|
|
|
dopesheet_region_draw(C, region);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2012-04-29 12:32:26 +00:00
|
|
|
}
|
|
|
|
|
|
2021-01-19 12:59:00 +11:00
|
|
|
static void clip_preview_region_listener(const wmRegionListenerParams *UNUSED(params))
|
2011-10-19 12:46:30 +00:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
/****************** channels region ******************/
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
static void clip_channels_region_init(wmWindowManager *wm, ARegion *region)
|
2012-04-30 16:19:20 +00:00
|
|
|
{
|
|
|
|
|
wmKeyMap *keymap;
|
|
|
|
|
|
2013-02-14 13:47:49 +00:00
|
|
|
/* ensure the 2d view sync works - main region has bottom scroller */
|
2020-03-06 16:56:42 +01:00
|
|
|
region->v2d.scroll = V2D_SCROLL_BOTTOM;
|
2013-02-14 13:47:49 +00:00
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
UI_view2d_region_reinit(®ion->v2d, V2D_COMMONVIEW_LIST, region->winx, region->winy);
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2018-08-31 13:36:14 +10:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip Dopesheet Editor", SPACE_CLIP, 0);
|
2020-03-06 16:56:42 +01:00
|
|
|
WM_event_add_keymap_handler_v2d_mask(®ion->handlers, keymap);
|
2012-04-30 16:19:20 +00:00
|
|
|
}
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
static void clip_channels_region_draw(const bContext *C, ARegion *region)
|
2012-04-30 16:19:20 +00:00
|
|
|
{
|
2012-05-03 19:28:41 +00:00
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
2012-06-19 14:26:29 +00:00
|
|
|
MovieClip *clip = ED_space_clip_get_clip(sc);
|
2020-03-06 16:56:42 +01:00
|
|
|
View2D *v2d = ®ion->v2d;
|
2012-04-30 16:19:20 +00:00
|
|
|
|
2019-04-22 09:19:45 +10:00
|
|
|
if (clip) {
|
2012-06-12 17:10:24 +00:00
|
|
|
BKE_tracking_dopesheet_update(&clip->tracking);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2012-05-03 19:28:41 +00:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
/* clear and setup matrix */
|
|
|
|
|
UI_ThemeClearColor(TH_BACK);
|
|
|
|
|
|
|
|
|
|
UI_view2d_view_ortho(v2d);
|
|
|
|
|
|
|
|
|
|
/* data... */
|
2020-03-06 16:56:42 +01:00
|
|
|
clip_draw_dopesheet_channels(C, region);
|
2012-04-30 16:19:20 +00:00
|
|
|
|
|
|
|
|
/* reset view matrix */
|
|
|
|
|
UI_view2d_view_restore(C);
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-19 12:59:00 +11:00
|
|
|
static void clip_channels_region_listener(const wmRegionListenerParams *UNUSED(params))
|
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 */
|
2020-03-06 16:56:42 +01:00
|
|
|
static void clip_header_region_init(wmWindowManager *UNUSED(wm), ARegion *region)
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
{
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_header_init(region);
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
}
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
static void clip_header_region_draw(const bContext *C, ARegion *region)
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
{
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_header(C, region);
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
}
|
|
|
|
|
|
2021-01-19 12:59:00 +11:00
|
|
|
static void clip_header_region_listener(const wmRegionListenerParams *params)
|
2012-06-04 16:42:58 +00:00
|
|
|
{
|
2021-01-18 17:28:47 -06:00
|
|
|
ARegion *region = params->region;
|
|
|
|
|
wmNotifier *wmn = params->notifier;
|
|
|
|
|
|
2012-06-04 16:42:58 +00: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 */
|
2012-06-04 20:11:09 +00:00
|
|
|
// if (sc->mode == SC_MODE_MASKEDIT)
|
2012-06-10 19:59:02 +00:00
|
|
|
{
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_tag_redraw(region);
|
2013-07-19 15:23:42 +00:00
|
|
|
break;
|
2012-06-10 19:59:02 +00:00
|
|
|
}
|
2012-06-04 16:42:58 +00:00
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
/****************** tools region ******************/
|
|
|
|
|
|
|
|
|
|
/* add handlers, stuff you only do once or on area/region changes */
|
2020-03-06 16:56:42 +01:00
|
|
|
static void clip_tools_region_init(wmWindowManager *wm, ARegion *region)
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
{
|
2013-04-29 13:18:29 +00:00
|
|
|
wmKeyMap *keymap;
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_panels_init(wm, region);
|
2013-04-29 13:18:29 +00:00
|
|
|
|
2018-08-31 13:36:14 +10:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
|
2020-03-06 16:56:42 +01:00
|
|
|
WM_event_add_keymap_handler(®ion->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
|
|
|
}
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
static void clip_tools_region_draw(const bContext *C, ARegion *region)
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
{
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_panels(C, region);
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
}
|
|
|
|
|
|
2011-08-04 14:39:37 +00:00
|
|
|
/****************** tool properties region ******************/
|
|
|
|
|
|
2021-01-19 12:59:00 +11:00
|
|
|
static void clip_props_region_listener(const wmRegionListenerParams *params)
|
2011-08-04 14:39:37 +00:00
|
|
|
{
|
2021-01-18 17:28:47 -06:00
|
|
|
ARegion *region = params->region;
|
|
|
|
|
wmNotifier *wmn = params->notifier;
|
|
|
|
|
|
2011-08-04 14:39:37 +00:00
|
|
|
/* context changes */
|
2012-04-28 06:31:57 +00:00
|
|
|
switch (wmn->category) {
|
2011-08-04 14:39:37 +00:00
|
|
|
case NC_WM:
|
2019-04-22 09:19:45 +10:00
|
|
|
if (wmn->data == ND_HISTORY) {
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_tag_redraw(region);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2011-08-04 14:39:37 +00:00
|
|
|
break;
|
|
|
|
|
case NC_SCENE:
|
2019-04-22 09:19:45 +10:00
|
|
|
if (wmn->data == ND_MODE) {
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_tag_redraw(region);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2011-08-04 14:39:37 +00:00
|
|
|
break;
|
|
|
|
|
case NC_SPACE:
|
2019-04-22 09:19:45 +10:00
|
|
|
if (wmn->data == ND_SPACE_CLIP) {
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_tag_redraw(region);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2011-09-26 10:25:38 +00:00
|
|
|
break;
|
2012-10-05 19:51:11 +00:00
|
|
|
case NC_GPENCIL:
|
2019-04-22 09:19:45 +10:00
|
|
|
if (wmn->action == NA_EDITED) {
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_tag_redraw(region);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2011-08-04 14:39:37 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
/****************** properties region ******************/
|
|
|
|
|
|
|
|
|
|
/* add handlers, stuff you only do once or on area/region changes */
|
2020-03-06 16:56:42 +01:00
|
|
|
static void clip_properties_region_init(wmWindowManager *wm, ARegion *region)
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
{
|
2011-07-25 18:11:22 +00:00
|
|
|
wmKeyMap *keymap;
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_panels_init(wm, region);
|
2011-07-25 18:11:22 +00:00
|
|
|
|
2018-08-31 13:36:14 +10:00
|
|
|
keymap = WM_keymap_ensure(wm->defaultconf, "Clip", SPACE_CLIP, 0);
|
2020-03-06 16:56:42 +01:00
|
|
|
WM_event_add_keymap_handler(®ion->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
|
|
|
}
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
static void clip_properties_region_draw(const bContext *C, ARegion *region)
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
{
|
2012-03-25 23:19:21 +00:00
|
|
|
SpaceClip *sc = CTX_wm_space_clip(C);
|
2011-07-18 14:54:32 +00:00
|
|
|
|
|
|
|
|
BKE_movieclip_update_scopes(sc->clip, &sc->user, &sc->scopes);
|
|
|
|
|
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_panels(C, region);
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
}
|
|
|
|
|
|
2021-01-19 12:59:00 +11:00
|
|
|
static void clip_properties_region_listener(const wmRegionListenerParams *params)
|
2011-08-08 16:30:09 +00:00
|
|
|
{
|
2021-01-18 17:28:47 -06:00
|
|
|
ARegion *region = params->region;
|
|
|
|
|
wmNotifier *wmn = params->notifier;
|
|
|
|
|
|
2011-08-08 16:30:09 +00:00
|
|
|
/* context changes */
|
2012-04-28 06:31:57 +00:00
|
|
|
switch (wmn->category) {
|
2012-10-05 19:51:11 +00:00
|
|
|
case NC_GPENCIL:
|
2019-04-22 09:19:45 +10:00
|
|
|
if (ELEM(wmn->data, ND_DATA, ND_GPENCIL_EDITMODE)) {
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_tag_redraw(region);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2011-08-08 16:30:09 +00:00
|
|
|
break;
|
|
|
|
|
case NC_BRUSH:
|
2019-04-22 09:19:45 +10:00
|
|
|
if (wmn->action == NA_EDITED) {
|
2020-03-06 16:56:42 +01:00
|
|
|
ED_region_tag_redraw(region);
|
2019-04-22 09:19:45 +10:00
|
|
|
}
|
2011-08-08 16:30:09 +00:00
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
/********************* registration ********************/
|
|
|
|
|
|
2020-04-03 13:25:03 +02:00
|
|
|
static void clip_id_remap(ScrArea *UNUSED(area), SpaceLink *slink, ID *old_id, ID *new_id)
|
ID-Remap - Step one: core work (cleanup and rework of generic ID datablock handling).
This commit changes a lot of how IDs are handled internally, especially the unlinking/freeing
processes. So far, this was very fuzy, to summarize cleanly deleting or replacing a datablock
was pretty much impossible, except for a few special cases.
Also, unlinking was handled by each datatype, in a rather messy and prone-to-errors way (quite
a few ID usages were missed or wrongly handled that way).
One of the main goal of id-remap branch was to cleanup this, and fatorize ID links handling
by using library_query utils to allow generic handling of those, which is now the case
(now, generic ID links handling is only "knwon" from readfile.c and library_query.c).
This commit also adds backends to allow live replacement and deletion of datablocks in Blender
(so-called 'remapping' process, where we replace all usages of a given ID pointer by a new one,
or NULL one in case of unlinking).
This will allow nice new features, like ability to easily reload or relocate libraries, real immediate
deletion of datablocks in blender, replacement of one datablock by another, etc.
Some of those are for next commits.
A word of warning: this commit is highly risky, because it affects potentially a lot in Blender core.
Though it was tested rather deeply, being totally impossible to check all possible ID usage cases,
it's likely there are some remaining issues and bugs in new code... Please report them! ;)
Review task: D2027 (https://developer.blender.org/D2027).
Reviewed by campbellbarton, thanks a bunch.
2016-06-22 17:29:38 +02:00
|
|
|
{
|
|
|
|
|
SpaceClip *sclip = (SpaceClip *)slink;
|
|
|
|
|
|
|
|
|
|
if (!ELEM(GS(old_id->name), ID_MC, ID_MSK)) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((ID *)sclip->clip == old_id) {
|
|
|
|
|
sclip->clip = (MovieClip *)new_id;
|
|
|
|
|
id_us_ensure_real(new_id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ((ID *)sclip->mask_info.mask == old_id) {
|
|
|
|
|
sclip->mask_info.mask = (Mask *)new_id;
|
|
|
|
|
id_us_ensure_real(new_id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
/* only called once, from space/spacetypes.c */
|
|
|
|
|
void ED_spacetype_clip(void)
|
|
|
|
|
{
|
2012-03-25 23:19:21 +00:00
|
|
|
SpaceType *st = MEM_callocN(sizeof(SpaceType), "spacetype clip");
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
ARegionType *art;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-03-25 23:19:21 +00:00
|
|
|
st->spaceid = SPACE_CLIP;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
strncpy(st->name, "Clip", BKE_ST_MAXNAME);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2020-08-04 14:39:53 +02:00
|
|
|
st->create = clip_create;
|
2012-03-25 23:19:21 +00:00
|
|
|
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;
|
2012-05-02 16:42:42 +00:00
|
|
|
st->dropboxes = clip_dropboxes;
|
2012-03-25 23:19:21 +00:00
|
|
|
st->refresh = clip_refresh;
|
ID-Remap - Step one: core work (cleanup and rework of generic ID datablock handling).
This commit changes a lot of how IDs are handled internally, especially the unlinking/freeing
processes. So far, this was very fuzy, to summarize cleanly deleting or replacing a datablock
was pretty much impossible, except for a few special cases.
Also, unlinking was handled by each datatype, in a rather messy and prone-to-errors way (quite
a few ID usages were missed or wrongly handled that way).
One of the main goal of id-remap branch was to cleanup this, and fatorize ID links handling
by using library_query utils to allow generic handling of those, which is now the case
(now, generic ID links handling is only "knwon" from readfile.c and library_query.c).
This commit also adds backends to allow live replacement and deletion of datablocks in Blender
(so-called 'remapping' process, where we replace all usages of a given ID pointer by a new one,
or NULL one in case of unlinking).
This will allow nice new features, like ability to easily reload or relocate libraries, real immediate
deletion of datablocks in blender, replacement of one datablock by another, etc.
Some of those are for next commits.
A word of warning: this commit is highly risky, because it affects potentially a lot in Blender core.
Though it was tested rather deeply, being totally impossible to check all possible ID usage cases,
it's likely there are some remaining issues and bugs in new code... Please report them! ;)
Review task: D2027 (https://developer.blender.org/D2027).
Reviewed by campbellbarton, thanks a bunch.
2016-06-22 17:29:38 +02:00
|
|
|
st->id_remap = clip_id_remap;
|
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
|
|
|
/* regions: main window */
|
2012-03-25 23:19:21 +00:00
|
|
|
art = MEM_callocN(sizeof(ARegionType), "spacetype clip region");
|
|
|
|
|
art->regionid = RGN_TYPE_WINDOW;
|
2015-11-28 17:14:45 +01:00
|
|
|
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
|
|
|
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
BLI_addhead(&st->regiontypes, art);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-10-19 12:46:30 +00:00
|
|
|
/* preview */
|
2012-03-25 23:19:21 +00:00
|
|
|
art = MEM_callocN(sizeof(ARegionType), "spacetype clip region preview");
|
2011-10-19 12:46:30 +00:00
|
|
|
art->regionid = RGN_TYPE_PREVIEW;
|
|
|
|
|
art->prefsizey = 240;
|
2015-11-28 17:14:45 +01:00
|
|
|
art->init = clip_preview_region_init;
|
|
|
|
|
art->draw = clip_preview_region_draw;
|
|
|
|
|
art->listener = clip_preview_region_listener;
|
2012-05-07 08:53:59 +00:00
|
|
|
art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI | ED_KEYMAP_VIEW2D;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2011-10-19 12:46:30 +00:00
|
|
|
BLI_addhead(&st->regiontypes, art);
|
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
|
|
|
/* regions: properties */
|
2012-03-25 23:19:21 +00:00
|
|
|
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;
|
2012-05-07 08:53:59 +00:00
|
|
|
art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI;
|
2015-11-28 17:14:45 +01:00
|
|
|
art->init = clip_properties_region_init;
|
|
|
|
|
art->draw = clip_properties_region_draw;
|
|
|
|
|
art->listener = clip_properties_region_listener;
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
BLI_addhead(&st->regiontypes, art);
|
2011-06-17 14:47:22 +00:00
|
|
|
ED_clip_buttons_register(art);
|
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
|
|
|
/* regions: tools */
|
2012-03-25 23:19:21 +00:00
|
|
|
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;
|
2012-05-07 08:53:59 +00:00
|
|
|
art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI;
|
2015-11-28 17:14:45 +01:00
|
|
|
art->listener = clip_props_region_listener;
|
|
|
|
|
art->init = clip_tools_region_init;
|
|
|
|
|
art->draw = clip_tools_region_draw;
|
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
|
|
|
BLI_addhead(&st->regiontypes, art);
|
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
|
|
|
/* regions: header */
|
2012-03-25 23:19:21 +00:00
|
|
|
art = MEM_callocN(sizeof(ARegionType), "spacetype clip region");
|
|
|
|
|
art->regionid = RGN_TYPE_HEADER;
|
|
|
|
|
art->prefsizey = HEADERY;
|
2012-05-07 08:53:59 +00:00
|
|
|
art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_HEADER;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2015-11-28 17:14:45 +01:00
|
|
|
art->init = clip_header_region_init;
|
|
|
|
|
art->draw = clip_header_region_draw;
|
|
|
|
|
art->listener = clip_header_region_listener;
|
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
|
|
|
BLI_addhead(&st->regiontypes, art);
|
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
|
|
|
BKE_spacetype_register(st);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
/* channels */
|
|
|
|
|
art = MEM_callocN(sizeof(ARegionType), "spacetype clip channels region");
|
|
|
|
|
art->regionid = RGN_TYPE_CHANNELS;
|
|
|
|
|
art->prefsizex = UI_COMPACT_PANEL_WIDTH;
|
2012-05-07 08:53:59 +00:00
|
|
|
art->keymapflag = ED_KEYMAP_FRAMES | ED_KEYMAP_UI;
|
2015-11-28 17:14:45 +01:00
|
|
|
art->listener = clip_channels_region_listener;
|
|
|
|
|
art->init = clip_channels_region_init;
|
|
|
|
|
art->draw = clip_channels_region_draw;
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2012-04-30 16:19:20 +00:00
|
|
|
BLI_addhead(&st->regiontypes, art);
|
2019-04-17 06:17:24 +02:00
|
|
|
|
2018-08-16 20:23:15 +10:00
|
|
|
/* regions: hud */
|
|
|
|
|
art = ED_area_type_hud(st->spaceid);
|
|
|
|
|
BLI_addhead(&st->regiontypes, art);
|
Camera tracking integration
===========================
- Initial implementaiton of new ID named MovieClip.
Currently it has plactically the same functionality as
images, but this functionality would be widen in nearest future.
- Initial implementation of SpaceClip.
This space is supposed to be used for acting with MovieClips
(opening, playbacking, math-moving interaction and so on).
Currently you could open image sequence/movie file here, pan/zoom,
use a playback here.
I've added cache visualizer to this space, but it's currently more
a developer's feature to see how cache system works, but it could
be adopted for further artists' usage (something like cache visuzlizer
for simulations).
- Added new theme area for Space Clip.
No special colors were defined here yet.
- Implementation of basic cache system for movies.
This cache system is very familiar with sequence cache system,
but it supposed to be more portable: at least cache keys aren't
limited with sequence-based data and current seqcache could
became an interface between sequencer and moviecache without
much logic (only logic related on keys handling would be necessary
here).
Implemented basic limitors (ab\mount of cached imbuf's), so it'll
be a bit more difficult to go out of memory when playing long
animations in Image Editor (this cache system could be used for
images too, in the future).
- Very basic tools implementation -- only sceletion added, no
real tool implemented (only camera focal length added to the UI
which hasn't got real affect on anything).
Assorted notes:
- Not sure about best behaviour for Unlink clip button: should
it be imageeditor-like (with de-referencing only) or text-editor
like (with removing datablock from file).
- Also not sure if tools/properties should be splitted into
different areas or it'll be better to have tools and settings
for this tool/item/etc in the same area (tools at the top,
properties are under them).
Code for properties area is '#if 0'-ed.
- Sound isn't supported during playback in movie clip.
2011-05-30 04:18:02 +00:00
|
|
|
}
|