2
* ***** BEGIN GPL LICENSE BLOCK *****
4
* This program is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU General Public License
6
* as published by the Free Software Foundation; either version 2
7
* of the License, or (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software Foundation,
16
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
* The Original Code is Copyright (C) 2011 Blender Foundation.
19
* All rights reserved.
21
* The Original Code is: all of this file.
23
* Contributor(s): Blender Foundation,
26
* ***** END GPL LICENSE BLOCK *****
29
/** \file DNA_movieclip_types.h
32
* \author Sergey Sharybin
35
#ifndef __DNA_MOVIECLIP_TYPES_H__
36
#define __DNA_MOVIECLIP_TYPES_H__
39
#include "DNA_tracking_types.h"
45
struct MovieClipProxy;
46
struct MovieTrackingTrack;
47
struct MovieTrackingMarker;
49
typedef struct MovieClipUser {
50
int framenr; /* current frame number */
51
short render_size, render_flag; /* proxy render size */
54
typedef struct MovieClipProxy {
55
char dir[768]; /* 768=FILE_MAXDIR custom directory for index and proxy files (defaults to BL_proxy) */
57
short tc; /* time code in use */
58
short quality; /* proxy build quality */
59
short build_size_flag; /* size flags (see below) of all proxies to build */
60
short build_tc_flag; /* time code flags (see below) of all tc indices to build */
63
typedef struct MovieClip {
65
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
67
char name[1024]; /* file path, 1024 = FILE_MAX */
69
int source; /* sequence or movie */
70
int lastframe; /* last accessed frame number */
71
int lastsize[2]; /* size of last accessed frame */
73
float aspx, aspy; /* display aspect */
75
struct anim *anim; /* movie source data */
76
struct MovieClipCache *cache; /* cache for different stuff, not in file */
77
struct bGPdata *gpd; /* grease pencil data */
79
struct MovieTracking tracking; /* data for SfM tracking */
80
void *tracking_context; /* context of tracking job
81
* used to synchronize data like framenumber
82
* in SpaceClip clip user */
84
struct MovieClipProxy proxy; /* proxy to clip data */
87
int len; /* lenght of movie */
90
typedef struct MovieClipScopes {
91
int ok; /* 1 means scopes are ok and recalculation is unneeded */
92
int track_preview_height; /* height of track preview widget */
93
struct ImBuf *track_preview; /* ImBuf displayed in track preview */
94
float track_pos[2]; /* sub-pizel position of marker in track ImBuf */
95
short track_disabled; /* active track is disabled, special notifier should be drawn */
97
int framenr; /* frame number scopes are created for */
98
struct MovieTrackingTrack *track; /* track scopes are created for */
99
struct MovieTrackingMarker *marker; /* marker scopes are created for */
100
float slide_scale[2]; /* scale used for sliding from previewe area */
103
/* MovieClipProxy->build_size_flag */
104
#define MCLIP_PROXY_SIZE_25 (1<<0)
105
#define MCLIP_PROXY_SIZE_50 (1<<1)
106
#define MCLIP_PROXY_SIZE_75 (1<<2)
107
#define MCLIP_PROXY_SIZE_100 (1<<3)
108
#define MCLIP_PROXY_UNDISTORTED_SIZE_25 (1<<4)
109
#define MCLIP_PROXY_UNDISTORTED_SIZE_50 (1<<5)
110
#define MCLIP_PROXY_UNDISTORTED_SIZE_75 (1<<6)
111
#define MCLIP_PROXY_UNDISTORTED_SIZE_100 (1<<7)
113
/* MovieClip->source */
114
#define MCLIP_SRC_SEQUENCE 1
115
#define MCLIP_SRC_MOVIE 2
117
/* MovieClip->selection types */
118
#define MCLIP_SEL_NONE 0
119
#define MCLIP_SEL_TRACK 1
121
/* MovieClip->flag */
122
#define MCLIP_USE_PROXY (1<<0)
123
#define MCLIP_USE_PROXY_CUSTOM_DIR (1<<1)
125
#define MCLIP_TIMECODE_FLAGS (MCLIP_USE_PROXY|MCLIP_USE_PROXY_CUSTOM_DIR)
127
/* MovieClip->render_size */
128
#define MCLIP_PROXY_RENDER_SIZE_FULL 0
129
#define MCLIP_PROXY_RENDER_SIZE_25 1
130
#define MCLIP_PROXY_RENDER_SIZE_50 2
131
#define MCLIP_PROXY_RENDER_SIZE_75 3
132
#define MCLIP_PROXY_RENDER_SIZE_100 4
134
/* MovieClip->render_flag */
135
#define MCLIP_PROXY_RENDER_UNDISTORT 1