Interface ILayerProperty
Represents a property on a layer. Properties are saved in storage and can optionally be modified from the UI.
Note: You cannot initialize layer properties yourself. If properly placed and annotated, the Artemis core will initialize these for you.
Namespace: Artemis.Core
Assembly: Artemis.Core.dll
Syntax
public interface ILayerProperty : IStorageModel, IDisposable
Properties
BaseDataBinding
Gets the data binding of this property
Declaration
IDataBinding BaseDataBinding { get; }
Property Value
Type | Description |
---|---|
IDataBinding |
DataBindingsSupported
Gets a boolean indicating whether data bindings are supported on this type of property
Declaration
bool DataBindingsSupported { get; }
Property Value
Type | Description |
---|---|
bool |
HasDataBinding
Gets a boolean indicating whether the layer has any data binding properties
Declaration
bool HasDataBinding { get; }
Property Value
Type | Description |
---|---|
bool |
IsHidden
Gets or sets whether the property is hidden in the UI
Declaration
bool IsHidden { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsLoadedFromStorage
Indicates whether the BaseValue was loaded from storage, useful to check whether a default value must be applied
Declaration
bool IsLoadedFromStorage { get; }
Property Value
Type | Description |
---|---|
bool |
LayerPropertyGroup
The parent group of this layer property, set after construction
Declaration
LayerPropertyGroup LayerPropertyGroup { get; }
Property Value
Type | Description |
---|---|
LayerPropertyGroup |
Path
Gets the unique path of the property on the render element
Declaration
string Path { get; }
Property Value
Type | Description |
---|---|
string |
ProfileElement
Gets the profile element (such as layer or folder) this property is applied to
Declaration
RenderProfileElement ProfileElement { get; }
Property Value
Type | Description |
---|---|
RenderProfileElement |
PropertyDescription
Gets the description attribute applied to this property
Declaration
PropertyDescriptionAttribute PropertyDescription { get; }
Property Value
Type | Description |
---|---|
PropertyDescriptionAttribute |
PropertyType
Gets the type of the property
Declaration
Type PropertyType { get; }
Property Value
Type | Description |
---|---|
Type |
UntypedKeyframes
Gets a read-only list of all the keyframes on this layer property
Declaration
ReadOnlyCollection<ILayerPropertyKeyframe> UntypedKeyframes { get; }
Property Value
Type | Description |
---|---|
ReadOnlyCollection<ILayerPropertyKeyframe> |
Methods
AddUntypedKeyframe(ILayerPropertyKeyframe)
Adds a keyframe to the layer property without knowing it's type.
Declaration
void AddUntypedKeyframe(ILayerPropertyKeyframe keyframe)
Parameters
Type | Name | Description |
---|---|---|
ILayerPropertyKeyframe | keyframe |
ApplyDefaultValue()
Overrides the property value with the default value
Declaration
void ApplyDefaultValue()
CreateKeyframeFromEntity(KeyframeEntity)
Attempts to create a keyframe for this property from the provided entity
Declaration
ILayerPropertyKeyframe? CreateKeyframeFromEntity(KeyframeEntity keyframeEntity)
Parameters
Type | Name | Description |
---|---|---|
KeyframeEntity | keyframeEntity | The entity representing the keyframe to create |
Returns
Type | Description |
---|---|
ILayerPropertyKeyframe | If succeeded the resulting keyframe, otherwise null |
Initialize(RenderProfileElement, LayerPropertyGroup, PropertyEntity, bool, PropertyDescriptionAttribute)
Initializes the layer property
Note: This isn't done in the constructor to keep it parameterless which is easier for implementations of LayerProperty<T>
Declaration
void Initialize(RenderProfileElement profileElement, LayerPropertyGroup group, PropertyEntity entity, bool fromStorage, PropertyDescriptionAttribute description)
Parameters
Type | Name | Description |
---|---|---|
RenderProfileElement | profileElement | |
LayerPropertyGroup | group | |
PropertyEntity | entity | |
bool | fromStorage | |
PropertyDescriptionAttribute | description |
RemoveUntypedKeyframe(ILayerPropertyKeyframe)
Removes a keyframe from the layer property without knowing it's type.
Declaration
void RemoveUntypedKeyframe(ILayerPropertyKeyframe keyframe)
Parameters
Type | Name | Description |
---|---|---|
ILayerPropertyKeyframe | keyframe |
Update(Timeline)
Updates the layer properties internal state
Declaration
void Update(Timeline timeline)
Parameters
Type | Name | Description |
---|---|---|
Timeline | timeline | The timeline to apply to the property |
UpdateDataBinding()
Updates just the data binding instead of the entire layer
Declaration
void UpdateDataBinding()
Events
CurrentValueSet
Occurs when the current value of the layer property was updated by some form of input
Declaration
event EventHandler<LayerPropertyEventArgs>? CurrentValueSet
Event Type
Type | Description |
---|---|
EventHandler<LayerPropertyEventArgs> |
Disposed
Occurs when the layer property is disposed
Declaration
event EventHandler Disposed
Event Type
Type | Description |
---|---|
EventHandler |
KeyframeAdded
Occurs when a new keyframe was added to the layer property
Declaration
event EventHandler<LayerPropertyKeyframeEventArgs>? KeyframeAdded
Event Type
Type | Description |
---|---|
EventHandler<LayerPropertyKeyframeEventArgs> |
KeyframeRemoved
Occurs when a keyframe was removed from the layer property
Declaration
event EventHandler<LayerPropertyKeyframeEventArgs>? KeyframeRemoved
Event Type
Type | Description |
---|---|
EventHandler<LayerPropertyKeyframeEventArgs> |
KeyframesToggled
Occurs when keyframes are enabled/disabled
Declaration
event EventHandler<LayerPropertyEventArgs>? KeyframesToggled
Event Type
Type | Description |
---|---|
EventHandler<LayerPropertyEventArgs> |
Updated
Occurs once every frame when the layer property is updated
Declaration
event EventHandler<LayerPropertyEventArgs>? Updated
Event Type
Type | Description |
---|---|
EventHandler<LayerPropertyEventArgs> |
VisibilityChanged
Occurs when the visibility value of the layer property was updated
Declaration
event EventHandler<LayerPropertyEventArgs>? VisibilityChanged
Event Type
Type | Description |
---|---|
EventHandler<LayerPropertyEventArgs> |