diff options
Diffstat (limited to 'source/blender/makesdna/DNA_camera_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_camera_types.h | 57 |
1 files changed, 55 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_camera_types.h b/source/blender/makesdna/DNA_camera_types.h index 52e40cbc098..b3c568fab98 100644 --- a/source/blender/makesdna/DNA_camera_types.h +++ b/source/blender/makesdna/DNA_camera_types.h @@ -34,6 +34,8 @@ #include "DNA_defs.h" #include "DNA_gpu_types.h" +#include "DNA_movieclip_types.h" +#include "DNA_image_types.h" #include "DNA_ID.h" #ifdef __cplusplus @@ -59,6 +61,20 @@ typedef struct CameraStereoSettings { float pole_merge_angle_to; } CameraStereoSettings; +/* Background Picture */ +typedef struct CameraBGImage { + struct CameraBGImage *next, *prev; + + struct Image *ima; + struct ImageUser iuser; + struct MovieClip *clip; + struct MovieClipUser cuser; + float offset[2], scale, rotation; + float alpha; + short flag; + short source; +} CameraBGImage; + typedef struct Camera { ID id; struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */ @@ -82,9 +98,19 @@ typedef struct Camera { struct Object *dof_ob; struct GPUDOFSettings gpu_dof; + /* CameraBGImage reference images */ + struct ListBase bg_images; + char sensor_fit; char pad[7]; + /* runtime only, used for drawing */ + float drwcorners[4][2]; + float drwtria[2][2]; + float drwdepth, pad1; + float drwfocusmat[4][4]; + float drwnormalmat[4][4]; + /* Stereo settings */ struct CameraStereoSettings stereo; } Camera; @@ -124,6 +150,7 @@ enum { #endif CAM_SHOWSENSOR = (1 << 8), CAM_SHOW_SAFE_CENTER = (1 << 9), + CAM_SHOW_BG_IMAGE = (1 << 10), }; /* yafray: dof sampling switch */ @@ -136,8 +163,8 @@ enum { CAMERA_SENSOR_FIT_VERT = 2, }; -#define DEFAULT_SENSOR_WIDTH 32.0f -#define DEFAULT_SENSOR_HEIGHT 18.0f +#define DEFAULT_SENSOR_WIDTH 36.0f +#define DEFAULT_SENSOR_HEIGHT 24.0f /* stereo->convergence_mode */ enum { @@ -159,6 +186,32 @@ enum { CAM_S3D_POLE_MERGE = (1 << 1), }; +/* CameraBGImage->flag */ +/* may want to use 1 for select ? */ +enum { + CAM_BGIMG_FLAG_EXPANDED = (1 << 1), + CAM_BGIMG_FLAG_CAMERACLIP = (1 << 2), + CAM_BGIMG_FLAG_DISABLED = (1 << 3), + CAM_BGIMG_FLAG_FOREGROUND = (1 << 4), + + /* Camera framing options */ + CAM_BGIMG_FLAG_CAMERA_ASPECT = (1 << 5), /* don't stretch to fit the camera view */ + CAM_BGIMG_FLAG_CAMERA_CROP = (1 << 6), /* crop out the image */ + + /* Axis flip options */ + CAM_BGIMG_FLAG_FLIP_X = (1 << 7), + CAM_BGIMG_FLAG_FLIP_Y = (1 << 8), +}; + +#define CAM_BGIMG_FLAG_EXPANDED (CAM_BGIMG_FLAG_EXPANDED | CAM_BGIMG_FLAG_CAMERACLIP) + +/* CameraBGImage->source */ +/* may want to use 1 for select ?*/ +enum { + CAM_BGIMG_SOURCE_IMAGE = 0, + CAM_BGIMG_SOURCE_MOVIE = 1, +}; + #ifdef __cplusplus } #endif |