Plasma Engine
2.0
Loading...
Searching...
No Matches
PropertyAnimObjectAccessor.h
1
#pragma once
2
#include <ToolsFoundation/Object/ObjectCommandAccessor.h>
3
4
class
plPropertyAnimAssetDocument
;
5
class
plPropertyAnimObjectManager
;
6
7
class
plPropertyAnimObjectAccessor
:
public
plObjectCommandAccessor
8
{
9
public
:
10
plPropertyAnimObjectAccessor
(
plPropertyAnimAssetDocument
* pDoc,
plCommandHistory
* pHistory);
11
12
virtual
plStatus
GetValue(
13
const
plDocumentObject
* pObject,
const
plAbstractProperty
* pProp,
plVariant
& out_value,
plVariant
index =
plVariant
())
override
;
14
virtual
plStatus
SetValue(
15
const
plDocumentObject
* pObject,
const
plAbstractProperty
* pProp,
const
plVariant
& newValue,
plVariant
index =
plVariant
())
override
;
16
17
virtual
plStatus
InsertValue(
18
const
plDocumentObject
* pObject,
const
plAbstractProperty
* pProp,
const
plVariant
& newValue,
plVariant
index =
plVariant
())
override
;
19
virtual
plStatus
RemoveValue(
const
plDocumentObject
* pObject,
const
plAbstractProperty
* pProp,
plVariant
index =
plVariant
())
override
;
20
virtual
plStatus
MoveValue(
21
const
plDocumentObject
* pObject,
const
plAbstractProperty
* pProp,
const
plVariant
& oldIndex,
const
plVariant
& newIndex)
override
;
22
23
virtual
plStatus
AddObject(
const
plDocumentObject
* pParent,
const
plAbstractProperty
* pParentProp,
const
plVariant
& index,
const
plRTTI
* pType,
24
plUuid
& inout_objectGuid)
override
;
25
virtual
plStatus
RemoveObject(
const
plDocumentObject
* pObject)
override
;
26
virtual
plStatus
MoveObject(
27
const
plDocumentObject
* pObject,
const
plDocumentObject
* pNewParent,
const
plAbstractProperty
* pParentProp,
const
plVariant
& index)
override
;
28
29
private
:
30
bool
IsTemporary(
const
plDocumentObject
* pObject)
const
;
31
bool
IsTemporary(
const
plDocumentObject
* pParent,
const
plAbstractProperty
* pParentProp)
const
;
32
using
OnAddTrack
=
plDelegate
<void(
const
plUuid
&)>;
33
plUuid
FindOrAddTrack(
34
const
plDocumentObject
* pObject,
const
plAbstractProperty
* pProp,
plVariant
index,
plPropertyAnimTarget::Enum
target,
OnAddTrack
onAddTrack);
35
36
plStatus
SetCurveCp(
const
plDocumentObject
* pObject,
const
plAbstractProperty
* pProp,
plVariant
index,
plPropertyAnimTarget::Enum
target,
37
double
fOldValue,
double
fNewValue);
38
plStatus
SetOrInsertCurveCp(
const
plUuid
& track,
double
fValue);
39
40
plStatus
SetColorCurveCp(
const
plDocumentObject
* pObject,
const
plAbstractProperty
* pProp,
plVariant
index,
const
plColorGammaUB
& oldValue,
41
const
plColorGammaUB
& newValue);
42
plStatus
SetOrInsertColorCurveCp(
const
plUuid
& track,
const
plColorGammaUB
& value);
43
44
plStatus
SetAlphaCurveCp(
const
plDocumentObject
* pObject,
const
plAbstractProperty
* pProp,
plVariant
index, plUInt8 oldValue, plUInt8 newValue);
45
plStatus
SetOrInsertAlphaCurveCp(
const
plUuid
& track, plUInt8 value);
46
47
plStatus
SetIntensityCurveCp(
const
plDocumentObject
* pObject,
const
plAbstractProperty
* pProp,
plVariant
index,
float
oldValue,
float
newValue);
48
plStatus
SetOrInsertIntensityCurveCp(
const
plUuid
& track,
float
value);
49
50
void
SeparateColor(
const
plColor
& color,
plColorGammaUB
& gamma, plUInt8& alpha,
float
& intensity);
51
52
plUniquePtr<plObjectAccessorBase>
m_pObjAccessor;
53
plPropertyAnimAssetDocument
* m_pDocument =
nullptr
;
54
plPropertyAnimObjectManager
* m_pObjectManager =
nullptr
;
55
};
plAbstractProperty
This is the base interface for all properties in the reflection system. It provides enough informatio...
Definition
AbstractProperty.h:150
plColorGammaUB
A 8bit per channel unsigned normalized (values interpreted as 0-1) color storage format that represen...
Definition
Color8UNorm.h:99
plColor
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition
Color.h:44
plCommandHistory
Stores the undo / redo stacks of transactions done on a document.
Definition
CommandHistory.h:52
plDocumentObject
Definition
DocumentObjectBase.h:11
plObjectCommandAccessor
Definition
ObjectCommandAccessor.h:9
plPropertyAnimAssetDocument
Definition
PropertyAnimAsset.h:62
plPropertyAnimObjectAccessor
Definition
PropertyAnimObjectAccessor.h:8
plPropertyAnimObjectManager
Definition
PropertyAnimObjectManager.h:6
plRTTI
This class holds information about reflected types. Each instance represents one type that is known t...
Definition
RTTI.h:30
plUniquePtr
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition
UniquePtr.h:10
plUuid
This data type is the abstraction for 128-bit Uuid (also known as GUID) instances.
Definition
Uuid.h:11
plVariant
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition
Variant.h:44
plDelegate
A generic delegate class which supports static functions and member functions.
Definition
Delegate.h:76
plPropertyAnimTarget::Enum
Enum
Definition
PropertyAnimResource.h:16
plStatus
An plResult with an additional message for the reason of failure.
Definition
Status.h:12
Code
EditorPlugins
Assets
EditorPluginAssets
PropertyAnimAsset
PropertyAnimObjectAccessor.h
Generated by
1.11.0