Table of Contents

Interface ILayerProperty

Namespace
Artemis.Core
Assembly
Artemis.Core.dll

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.

public interface ILayerProperty : IStorageModel, IDisposable, IPluginFeatureDependent
Inherited Members

Properties

BaseDataBinding

Gets the data binding of this property

IDataBinding BaseDataBinding { get; }

Property Value

IDataBinding

DataBindingsSupported

Gets a boolean indicating whether data bindings are supported on this type of property

bool DataBindingsSupported { get; }

Property Value

bool

HasDataBinding

Gets a boolean indicating whether the layer has any data binding properties

bool HasDataBinding { get; }

Property Value

bool

IsHidden

Gets or sets whether the property is hidden in the UI

bool IsHidden { get; set; }

Property Value

bool

IsLoadedFromStorage

Indicates whether the BaseValue was loaded from storage, useful to check whether a default value must be applied

bool IsLoadedFromStorage { get; }

Property Value

bool

LayerPropertyGroup

The parent group of this layer property, set after construction

LayerPropertyGroup LayerPropertyGroup { get; }

Property Value

LayerPropertyGroup

Path

Gets the unique path of the property on the render element

string Path { get; }

Property Value

string

ProfileElement

Gets the profile element (such as layer or folder) this property is applied to

RenderProfileElement ProfileElement { get; }

Property Value

RenderProfileElement

PropertyDescription

Gets the description attribute applied to this property

PropertyDescriptionAttribute PropertyDescription { get; }

Property Value

PropertyDescriptionAttribute

PropertyType

Gets the type of the property

Type PropertyType { get; }

Property Value

Type

UntypedKeyframes

Gets a read-only list of all the keyframes on this layer property

ReadOnlyCollection<ILayerPropertyKeyframe> UntypedKeyframes { get; }

Property Value

ReadOnlyCollection<ILayerPropertyKeyframe>

Methods

AddUntypedKeyframe(ILayerPropertyKeyframe)

Adds a keyframe to the layer property without knowing it's type.

Prefer AddKeyframe(LayerPropertyKeyframe<T>).

void AddUntypedKeyframe(ILayerPropertyKeyframe keyframe)

Parameters

keyframe ILayerPropertyKeyframe

ApplyDefaultValue()

Overrides the property value with the default value

void ApplyDefaultValue()

CreateKeyframeFromEntity(KeyframeEntity)

Attempts to create a keyframe for this property from the provided entity

ILayerPropertyKeyframe? CreateKeyframeFromEntity(KeyframeEntity keyframeEntity)

Parameters

keyframeEntity KeyframeEntity

The entity representing the keyframe to create

Returns

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>

void Initialize(RenderProfileElement profileElement, LayerPropertyGroup group, PropertyEntity entity, bool fromStorage, PropertyDescriptionAttribute description)

Parameters

profileElement RenderProfileElement
group LayerPropertyGroup
entity PropertyEntity
fromStorage bool
description PropertyDescriptionAttribute

RemoveUntypedKeyframe(ILayerPropertyKeyframe)

Removes a keyframe from the layer property without knowing it's type.

Prefer RemoveKeyframe(LayerPropertyKeyframe<T>).

void RemoveUntypedKeyframe(ILayerPropertyKeyframe keyframe)

Parameters

keyframe ILayerPropertyKeyframe

Update(Timeline)

Updates the layer properties internal state

void Update(Timeline timeline)

Parameters

timeline Timeline

The timeline to apply to the property

UpdateDataBinding()

Updates just the data binding instead of the entire layer

void UpdateDataBinding()

Events

CurrentValueSet

Occurs when the current value of the layer property was updated by some form of input

event EventHandler<LayerPropertyEventArgs>? CurrentValueSet

Event Type

EventHandler<LayerPropertyEventArgs>

Disposed

Occurs when the layer property is disposed

event EventHandler Disposed

Event Type

EventHandler

KeyframeAdded

Occurs when a new keyframe was added to the layer property

event EventHandler<LayerPropertyKeyframeEventArgs>? KeyframeAdded

Event Type

EventHandler<LayerPropertyKeyframeEventArgs>

KeyframeRemoved

Occurs when a keyframe was removed from the layer property

event EventHandler<LayerPropertyKeyframeEventArgs>? KeyframeRemoved

Event Type

EventHandler<LayerPropertyKeyframeEventArgs>

KeyframesToggled

Occurs when keyframes are enabled/disabled

event EventHandler<LayerPropertyEventArgs>? KeyframesToggled

Event Type

EventHandler<LayerPropertyEventArgs>

Updated

Occurs once every frame when the layer property is updated

event EventHandler<LayerPropertyEventArgs>? Updated

Event Type

EventHandler<LayerPropertyEventArgs>

VisibilityChanged

Occurs when the visibility value of the layer property was updated

event EventHandler<LayerPropertyEventArgs>? VisibilityChanged

Event Type

EventHandler<LayerPropertyEventArgs>