Blender V2.61 - r43446

DNA_movieclip_types.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00019  * All rights reserved.
00020  *
00021  * The Original Code is: all of this file.
00022  *
00023  * Contributor(s): Blender Foundation,
00024  *                 Sergey Sharybin
00025  *
00026  * ***** END GPL LICENSE BLOCK *****
00027  */
00028 
00035 #ifndef DNA_MOVIECLIP_TYPES_H
00036 #define DNA_MOVIECLIP_TYPES_H
00037 
00038 #include "DNA_ID.h"
00039 #include "DNA_tracking_types.h"
00040 
00041 struct anim;
00042 struct bGPdata;
00043 struct ImBuf;
00044 struct MovieClipProxy;
00045 struct MovieTrackingTrack;
00046 struct MovieTrackingMarker;
00047 
00048 typedef struct MovieClipUser {
00049     int framenr;    /* current frame number */
00050     short render_size, render_flag;     /* proxy render size */
00051 } MovieClipUser;
00052 
00053 typedef struct MovieClipProxy {
00054     char dir[160];          /* custom directory for index and proxy files (defaults to BL_proxy) */
00055 
00056     short tc;               /* time code in use */
00057     short quality;          /* proxy build quality */
00058     short build_size_flag;  /* size flags (see below) of all proxies to build */
00059     short build_tc_flag;    /* time code flags (see below) of all tc indices to build */
00060     short build_flag, pad;  /* other build flags */
00061     char pad2[4];
00062 } MovieClipProxy;
00063 
00064 typedef struct MovieClip {
00065     ID id;
00066 
00067     char name[240];     /* file path, 240 = FILE_MAX */
00068 
00069     int source;         /* sequence or movie */
00070     int lastframe;      /* last accessed frame number */
00071     int lastsize[2];    /* size of last accessed frame */
00072 
00073     float aspx, aspy;   /* display aspect */
00074 
00075     struct anim *anim;  /* movie source data */
00076     struct MovieClipCache *cache;       /* cache for different stuff, not in file */
00077     struct bGPdata *gpd;                /* grease pencil data */
00078 
00079     struct MovieTracking tracking;      /* data for SfM tracking */
00080     void *tracking_context;             /* context of tracking job
00081                                            used to synchronize data like framenumber
00082                                            in SpaceClip clip user */
00083 
00084     struct MovieClipProxy proxy;        /* proxy to clip data */
00085     int flag, pad;
00086 } MovieClip;
00087 
00088 typedef struct MovieClipScopes {
00089     int ok;                         /* 1 means scopes are ok and recalculation is unneeded */
00090     int track_preview_height;       /* height of track preview widget */
00091     struct ImBuf *track_preview;    /* ImBuf displayed in track preview */
00092     float track_pos[2];             /* sub-pizel position of marker in track ImBuf */
00093     short track_disabled;           /* active track is disabled, special notifier should be drawn */
00094     char pad[2];
00095     int framenr;                    /* frame number scopes are created for */
00096     struct MovieTrackingTrack *track;   /* track scopes are created for */
00097     struct MovieTrackingMarker *marker; /* marker scopes are created for */
00098     float slide_scale[2];           /* scale used for sliding from previewe area */
00099 } MovieClipScopes;
00100 
00101 /* MovieClipProxy->build_flag */
00102 #define MCLIP_PROXY_BUILD_UNDISTORT 1   /* build undistorted proxies as well */
00103 
00104 /* MovieClip->source */
00105 #define MCLIP_SRC_SEQUENCE  1
00106 #define MCLIP_SRC_MOVIE     2
00107 
00108 /* MovieClip->selection types */
00109 #define MCLIP_SEL_NONE      0
00110 #define MCLIP_SEL_TRACK     1
00111 
00112 /* MovieClip->flag */
00113 #define MCLIP_USE_PROXY                 (1<<0)
00114 #define MCLIP_USE_PROXY_CUSTOM_DIR      (1<<1)
00115 
00116 #define MCLIP_TIMECODE_FLAGS            (MCLIP_USE_PROXY|MCLIP_USE_PROXY_CUSTOM_DIR)
00117 
00118 /* MovieClip->render_size */
00119 #define MCLIP_PROXY_RENDER_SIZE_FULL    0
00120 #define MCLIP_PROXY_RENDER_SIZE_25      1
00121 #define MCLIP_PROXY_RENDER_SIZE_50      2
00122 #define MCLIP_PROXY_RENDER_SIZE_75      3
00123 #define MCLIP_PROXY_RENDER_SIZE_100     4
00124 
00125 /* MovieClip->render_flag */
00126 #define MCLIP_PROXY_RENDER_UNDISTORT    1
00127 
00128 #endif