#include <AutoGizmoC.h>
Inheritance diagram for AutoGizmoC:
Public Methods | |
virtual Edit::DataBlockI * | create () |
Creates new datablock. See DataBlockI. | |
virtual Edit::DataBlockI * | create (Edit::EditableI *pOriginal) |
Creates new layer (used internally), see Edit::EditableI::create(). | |
virtual void | copy (Edit::EditableI *pEditable) |
Deep copy from a data block, see Edit::DataBlockI::copy(). | |
virtual void | restore (Edit::EditableI *pEditable) |
Shallow copy from a editable, see Edit::EditableI::restore(). | |
virtual PajaTypes::int32 | get_parameter_count () |
Returns number of parameters in the gizmo. | |
virtual void | add_parameter (ParamI *pParam) |
Returns parameter at specified index. | |
virtual void | del_parameter (PajaTypes::int32 i32Index) |
Returns parameter at specified index. | |
virtual ParamI * | get_parameter (PajaTypes::int32 i32Index) |
Returns parameter at specified index. | |
virtual ParamI * | get_parameter_by_id (PajaTypes::int32 i32Id) |
Returns parameter with spcified id. | |
virtual PajaTypes::uint32 | save (FileIO::SaveC *pSave) |
Serialize the auto gizmo to a Demopaja output stream. | |
virtual PajaTypes::uint32 | load (FileIO::LoadC *pLoad) |
Serialize the auto gizmo from a Demopaja input stream. | |
Static Public Methods | |
AutoGizmoC * | create_new (EffectI *pParent, const char *szName, PajaTypes::uint32 ui32Id) |
Creates new datablock. | |
Protected Methods | |
AutoGizmoC () | |
Default constructor. | |
AutoGizmoC (EffectI *pParent, const char *szName, PajaTypes::uint32 ui32Id) | |
Constructor. | |
AutoGizmoC (Edit::EditableI *pOriginal) | |
Constructor with reference to the original. | |
virtual | ~AutoGizmoC () |
Default destructor. |
Auto gizmo is a class derived from GizmoI interface. Auto gizmo class provides an easy way to implement a basic gizmo. This class has methods to create a gizmo without writing a new class. New parameters can be added and existing deleted. The changes made with add_parameter() and del_parameter() methods are not stored into the undo object.
The auto gizmo has to be created in the constructor of the plugin effect class. The auto gizmo has to be completely created at the time the auto gizmo is serialized.
The parameters are saved and loaded based on their IDs, so make them unique.
Example use:
PlaaEffect::PlaaEffect() { // Create Transform gizmo. m_pTransGizmo = AutoGizmoC::create_new( this, "Transform", ID_TRANSFORM ); m_pTransGizmo->add_parameter( ParamVector2C::create_new( this, "Position", Vector2C(), ID_TRANS_POS, PARAM_STYLE_EDITBOX | PARAM_STYLE_ABS_POSITION, PARAM_ANIMATABLE ) ); m_pTransGizmo->add_parameter( ParamVector2C::create_new( this, "Pivot", Vector2C(), ID_TRANS_PIVOT, PARAM_STYLE_EDITBOX | PARAM_STYLE_REL_POSITION | PARAM_STYLE_WORLD_SPACE, PARAM_ANIMATABLE ); m_pTransGizmo->add_parameter( ParamFloatC::create_new( this, "Rotation", 0, ID_TRANS_ROT, PARAM_STYLE_EDITBOX | PARAM_STYLE_ANGLE, PARAM_ANIMATABLE, 0, 0, 1.0f ); m_pTransGizmo->add_parameter( ParamVector2C::create_new( this, "Scale", Vector2C( 1, 1 ), ID_TRANS_SCALE, PARAM_STYLE_EDITBOX | PARAM_STYLE_PERCENT, PARAM_ANIMATABLE, Vector2C(), Vector2C(), 0.01f ); }
|
Default constructor.
|
|
Constructor.
|
|
Constructor with reference to the original.
|
|
Default destructor.
|
|
Returns parameter at specified index.
|
|
Deep copy from a data block, see Edit::DataBlockI::copy().
Reimplemented from GizmoI. |
|
Creates new layer (used internally), see Edit::EditableI::create().
Implements EditableI. |
|
Creates new datablock. See DataBlockI.
Implements EditableI. |
|
Creates new datablock.
|
|
Returns parameter at specified index.
|
|
Returns parameter at specified index.
Implements GizmoI. |
|
Returns parameter with spcified id. The param ID is the ID set when the parameter is created. |
|
Returns number of parameters in the gizmo.
Implements GizmoI. |
|
Serialize the auto gizmo from a Demopaja input stream.
Reimplemented from GizmoI. |
|
Shallow copy from a editable, see Edit::EditableI::restore().
Reimplemented from GizmoI. |
|
Serialize the auto gizmo to a Demopaja output stream.
Reimplemented from GizmoI. |