tahoma2d/toonz/sources/include/toonz/scenefx.h

86 lines
3.3 KiB
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
#ifndef SCENEFX_INCLUDED
#define SCENEFX_INCLUDED
#include "tfx.h"
#undef DVAPI
#undef DVVAR
#ifdef TOONZLIB_EXPORTS
#define DVAPI DV_EXPORT_API
#define DVVAR DV_EXPORT_VAR
#else
#define DVAPI DV_IMPORT_API
#define DVVAR DV_IMPORT_VAR
#endif
class TXsheet;
class ToonzScene;
/*
2016-06-15 18:43:10 +12:00
NOTE: The following functions are DEPRECATED, but still in use throughout
Toonz at the moment.
2016-03-19 06:57:51 +13:00
Please use the unified function below in newly written code.
*/
2016-06-15 18:43:10 +12:00
DVAPI TFxP buildSceneFx(ToonzScene *scene, TXsheet *xsh, double row,
int whichLevels, int shrink, bool isPreview);
DVAPI TFxP buildSceneFx(ToonzScene *scene, double row, int shrink,
bool isPreview);
DVAPI TFxP buildSceneFx(ToonzScene *scene, TXsheet *xsh, double row, int shrink,
bool isPreview);
DVAPI TFxP buildSceneFx(ToonzScene *scene, double row, const TFxP &root,
bool isPreview);
DVAPI TFxP buildSceneFx(ToonzScene *scene, TXsheet *xsh, double row,
const TFxP &root, bool isPreview);
DVAPI TFxP buildPartialSceneFx(ToonzScene *scene, double row, const TFxP &root,
int shrink, bool isPreview);
DVAPI TFxP buildPartialSceneFx(ToonzScene *scene, TXsheet *xsh, double row,
const TFxP &root, int shrink, bool isPreview);
DVAPI TFxP buildPostSceneFx(ToonzScene *scene, double row, int shrink,
bool isPreview);
2016-03-19 06:57:51 +13:00
//-------------------------------------------------------------------------------------------------------------------------
enum BSFX_Transforms_Enum {
2016-06-15 18:43:10 +12:00
BSFX_NO_TR = 0x0, //!< No transform is applied.
BSFX_CAMERA_TR = 0x1, //!< Adds the current camera transform.
BSFX_CAMERA_DPI_TR = 0x2, //!< Adds the current camera DPI transform.
BSFX_COLUMN_TR = 0x4, //!< Adds column transforms to all columns.
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
BSFX_DEFAULT_TR = BSFX_CAMERA_TR | BSFX_CAMERA_DPI_TR |
BSFX_COLUMN_TR //!< Default includes all transforms.
}; //!< Affine transform included in a built scene
//! fx whenever <I>a root fx is specified</I>.
2016-03-19 06:57:51 +13:00
/*!
2016-06-15 18:43:10 +12:00
\brief The buildSceneFx() function implements all the supported parameter
combinations
historically used by Toonz to decorate a schematic tree for
rendering purposes.
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
\details Only two parameters are explicitly required from the user: the scene
to be decorated,
2016-03-19 06:57:51 +13:00
and the frame at which the decoration takes place.
2016-06-15 18:43:10 +12:00
All the other parameters are turned to default or taken by current
settings if not
2016-03-19 06:57:51 +13:00
specified by the user.
*/
2016-06-15 18:43:10 +12:00
DVAPI TFxP buildSceneFx(ToonzScene *scene, double frame, TXsheet *xsh = 0,
const TFxP &root = TFxP(),
BSFX_Transforms_Enum transforms = BSFX_DEFAULT_TR,
bool isPreview = false, int whichLevels = -1,
int shrink = 1);
2016-03-19 06:57:51 +13:00
// temo non debba andare qui
// in ogni caso gestisce anche lo zdepth
// (utilizzando la camera corrente, il che forse non e' una buona idea)
// ritorna false se la colonna e' "dietro la camera" e quindi non visibile
2016-06-15 18:43:10 +12:00
bool DVAPI getColumnPlacement(TAffine &aff, TXsheet *xsh, double row, int col,
bool isPreview);
2016-03-19 06:57:51 +13:00
#endif