Menu
Lumberyard
C++ API Reference (Version 1.10)

AZ::Edit::Attributes Namespace Reference

Variables

static const AZ::Crc32 AddableByUser
 Specifies whether a user can manually add this element to a game in Lumberyard Editor. More...
 
static const AZ::Crc32 AppearsInAddComponentMenu
 Specifies whether the element appears in the component menu in Lumberyard Editor. More...
 
static const AZ::Crc32 AutoExpand
 Specifies whether the properties of a class or group should be automatically expanded in Lumberyard Editor. More...
 
static const AZ::Crc32 ButtonText
 Specifies the text for a button element. More...
 
static const AZ::Crc32 Category
 Specifies a category for ClassElements. More...
 
static const AZ::Crc32 Visibility
 Specifies visibility settings for an element. More...
 
static const AZ::Crc32 ContainerCanBeModified
 Specifies that Lumberyard Editor will have controls for adding and removing elements of the container. More...
 
static const AZ::Crc32 StringList
 Provides strings for a combo box. More...
 
static const AZ::Crc32 ValueText
 Provides text to display on the right-hand side value area in Lumberyard Editor. More...
 
static const AZ::Crc32 EnumValues
 Specifies names to present in the UI (for example, in a drop-down menu) and the values that the names correspond to. More...
 
static const AZ::Crc32 AddNotify
 Specifies a function to execute when something is added to a container. More...
 
static const AZ::Crc32 ChangeNotify
 Specifies how a property is refreshed in Lumberyard Editor when something changes, and gives you a place to put callbacks that respond to a value changing. More...
 
static const AZ::Crc32 NameLabelOverride
 Specifies text to override the element's current name. More...
 
static const AZ::Crc32 DescriptionTextOverride
 Specifies text to override the element's current description. More...
 
static const AZ::Crc32 PrimaryAssetType
 Associates a given component type with a given asset type. More...
 
static const AZ::Crc32 Icon
 Specifies an icon to represent the element in Lumberyard Editor. More...
 
static const AZ::Crc32 ViewportIcon
 Specifies a viewport icon to represent the element in Lumberyard Editor. More...
 
static const AZ::Crc32 HideIcon
 If true, suppresses any icon from being displayed for this class. More...
 
static const AZ::Crc32 PreferNoViewportIcon
 Explicitly specifies that the element should not display a viewport icon. More...
 
static const AZ::Crc32 Min
 Specifies a minimum value for the element. More...
 
static const AZ::Crc32 Max
 Specifies a maximum value for the element. More...
 
static const AZ::Crc32 ReadOnly
 Specifies whether the element is read only. More...
 
static const AZ::Crc32 Step
 Specifies a step value, such as the increments by which a slider increases a value. More...
 
static const AZ::Crc32 Suffix
 Appends a suffix to the value of the element. More...
 
static const AZ::Crc32 SoftMin
 Specifies a soft minimum for a slider range. More...
 
static const AZ::Crc32 SoftMax
 Specifies a soft maximum for a slider range. More...
 
static const AZ::Crc32 Decimals
 Specifies a decimal precision. More...
 
static const AZ::Crc32 LabelForX
 Specifies an X-axis label for a multi-dimensional vector. More...
 
static const AZ::Crc32 LabelForY
 Specifies a Y-axis label for a multi-dimensional vector. More...
 
static const AZ::Crc32 LabelForZ
 Specifies a Z-axis label for a multi-dimensional vector. More...
 
static const AZ::Crc32 LabelForW
 Specifies a W-axis label for a multi-dimensional vector. More...
 
static const AZ::Crc32 StyleForX
 Specifies an X-axis label style for a multi-dimensional vector. More...
 
static const AZ::Crc32 StyleForY
 Specifies a Y-axis label style for a multi-dimensional vector. More...
 
static const AZ::Crc32 StyleForZ
 Specifies a Z-axis label style for a multi-dimensional vector. More...
 
static const AZ::Crc32 StyleForW
 Specifies a W-axis label style for a multi-dimensional vector. More...
 
static const AZ::Crc32 RequiredService
 Put this on an entity ID (entity reference) to indicate that users can only choose entities with a component that provides this service. More...
 
static const AZ::Crc32 IncompatibleService
 Put this on an entity ID (entity reference) to indicate that users cannot choose entities that have a component that provides this service. More...
 
static const AZ::Crc32 ComboBoxEditable
 Allows users to manually type in values that are not presented in a combo box. More...
 
static const AZ::Crc32 SliceFlags
 Used by slice creation tools. More...
 

Variable Documentation

◆ AddableByUser

const AZ::Crc32 AZ::Edit::Attributes::AddableByUser
static

Specifies whether a user can manually add this element to a game in Lumberyard Editor.

A value of false hides the element from views where users create components.

Element type to use this with: AZ::Edit::ClassElements::EditorData, which you reflect using AZ::EditContext::ClassInfo::ClassElement().

Expected value type: bool

Default value: true

Example: The following example shows how to prevent users from manually adding the EditorSequenceComponent to their games.

editContext->Class<EditorSequenceComponent>("Sequence", "Plays cinematic animations")
->Attribute(AZ::Edit::Attributes::Category, "Cinematics")
->Attribute(AZ::Edit::Attributes::AddableByUser, false); // Sequence agents can only be added by TrackView.

◆ AddNotify

const AZ::Crc32 AZ::Edit::Attributes::AddNotify
static

Specifies a function to execute when something is added to a container.

This only executes for add events. For change events, use AZ::Edit::Attributes::ChangeNotify.

Element type to use this with: Any container type that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: A function with signature void fn().

Default value: None

Example: The following example shows how to set up the EditorSimpleAnimationComponent to call a function when an animation layer is added to an entity.

editContext->Class<EditorSimpleAnimationComponent>("Simple Animation", "Allows a mesh entity to do simple animations.")
->DataElement(0, &EditorSimpleAnimationComponent::m_defaultAnimationSettings, "Playback Settings", "A set of configured animation layers that can be played on this entity")
->Attribute(AZ::Edit::Attributes::AddNotify, &EditorSimpleAnimationComponent::OnLayersChanged);

◆ AppearsInAddComponentMenu

const AZ::Crc32 AZ::Edit::Attributes::AppearsInAddComponentMenu
static

Specifies whether the element appears in the component menu in Lumberyard Editor.

Expects the Crc32 of a string that corresponds to the category of the component. The existing categories are "Game" and "System".

Use "Game" for components that attach to game entities. Use "System" for components that attach to the system entity and are effectively singletons. (See System Components in the Lumberyard Developer Guide.)

Element type to use this with: AZ::Edit::ClassElements::EditorData, which you reflect using AZ::EditContext::ClassInfo::ClassElement().

Expected value type: Crc32 of a string that corresponds to the category of the component ("Game" or "System").

Default value: The component does not appear in the component menu.

Example: The following example shows how to add the EditorProjectorLightComponent to the component menu.

editContext->Class<EditorProjectorLightComponent>("Projector Light", "Attaches a projector light to an entity.")
->Attribute(AZ::Edit::Attributes::Category, "Rendering")
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game", 0x232b318c))
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/ProjectorLight.png");

◆ AutoExpand

const AZ::Crc32 AZ::Edit::Attributes::AutoExpand
static

Specifies whether the properties of a class or group should be automatically expanded in Lumberyard Editor.

Element type to use this with: AZ::Edit::ClassElements::EditorData or AZ::Edit::ClassElements::Group, which you reflect using AZ::EditContext::ClassInfo::ClassElement().

Expected value type: bool

Default value: false

Example: The following example shows how to add the EditorMannequinComponent to the component menu such that it is expanded when Lumberyard Editor is opened.

editContext->Class<EditorMannequinComponent>("Mannequin", "Allows an entity to animate using Mannequin")
->Attribute(AZ::Edit::Attributes::Category, "Animation")
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/Mannequin")

◆ ButtonText

const AZ::Crc32 AZ::Edit::Attributes::ButtonText
static

Specifies the text for a button element.

Element type to use this with: AZ::Edit::UIHandlers::Button, which you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::string

Default value: None

Example: The following example shows how to add text to a button that generates a cubemap.

editContext->Class<EditorLightComponent>("Light", "Attaches lighting to an entity.")
->DataElement(AZ::Edit::UIHandlers::Button, &EditorLightComponent::m_cubemapRegen, "Cubemap", "Generates the associated cubemap")
->Attribute(AZ::Edit::Attributes::ButtonText, "Generate");

◆ Category

const AZ::Crc32 AZ::Edit::Attributes::Category
static

Specifies a category for ClassElements.

Element type to use this with: AZ::Edit::ClassElements::EditorData, which you reflect using AZ::EditContext::ClassInfo::ClassElement().

Expected value type: AZStd::string

Default value: "Miscellaneous"

Example: The following example shows how to assign a BehaviorTreeComponent to the AI category.

editContext->Class<BehaviorTreeComponent>("Behavior Tree", "Associates a behavior tree with an entity.")
->Attribute(AZ::Edit::Attributes::Category, "AI")
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/BehaviorTree.png");

◆ ChangeNotify

const AZ::Crc32 AZ::Edit::Attributes::ChangeNotify
static

Specifies how a property is refreshed in Lumberyard Editor when something changes, and gives you a place to put callbacks that respond to a value changing.

For example, you could have two related variables in a class, and have a callback that updates one variable when the other variable changes.

Element type to use this with: Any type that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: If you are using this to specify how a property is refreshed, the expected value type is u32 or Crc32 (or a function that returns one of these) that corresponds to an AZ::Edit::PropertyRefreshLevels value.

If you are using this to put in a callback, the expected value type is a function with one of the following signatures: u32 fn(), Crc32 fn(), or void fn(). If the function returns a value, then that value corresponds to an AZ::Edit::PropertyRefreshLevels value.

Default value: AZ::Edit::PropertyRefreshLevels::None

Example: The following example shows how to set up the EditorLookAtComponent to call a function when the target entity changes.

editContext->Class<EditorLookAtComponent>("Look At", "Forces an entity to always look at a given target.")
->DataElement(AZ::Edit::UIHandlers::Default, &EditorLookAtComponent::m_targetId, "Target", "The entity to look at.")
->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorLookAtComponent::OnTargetChanged);

◆ ComboBoxEditable

const AZ::Crc32 AZ::Edit::Attributes::ComboBoxEditable
static

Allows users to manually type in values that are not presented in a combo box.

Element type to use this with: AZ::Edit::UIHandlers::ComboBox, which you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: bool

Default value: false

◆ ContainerCanBeModified

const AZ::Crc32 AZ::Edit::Attributes::ContainerCanBeModified
static

Specifies that Lumberyard Editor will have controls for adding and removing elements of the container.

For use with data elements that are containers (vectors, lists, smart pointers, and so on).

Element type to use this with: Any container type that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: bool

Default value: true

◆ Decimals

const AZ::Crc32 AZ::Edit::Attributes::Decimals
static

Specifies a decimal precision.

Element type to use this with: Any numeric type that you reflect using AZ::EditContext::ClassInfo::DataElement() that uses a slider or spinbox.

Expected value type: int

Default value: 0

◆ DescriptionTextOverride

const AZ::Crc32 AZ::Edit::Attributes::DescriptionTextOverride
static

Specifies text to override the element's current description.

For example, this can be a function that gets a description entered by the user.

Element type to use this with: Any type that you reflect using AZ::EditContext::ClassInfo::ClassElement() or AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::string

Default value: The default description

Example: The following example shows how to set up the EditorLightComponent to allow users to rename the light description.

editContext->Class<EditorLightComponent>("Light", "Attach lighting to an entity.")
->Attribute(AZ::Edit::Attributes::DescriptionLabelOverride, &EditorLightComponent::GetLightDescription)

◆ EnumValues

const AZ::Crc32 AZ::Edit::Attributes::EnumValues
static

Specifies names to present in the UI (for example, in a drop-down menu) and the values that the names correspond to.

If the value type is AZStd::vector<AZStd::pair<AZ::EntityId, AZStd::string>>, this attribute will associate the given entity ID values with a string when the UI presents a combo box.

Element type to use this with: AZ::Edit::UIHandlers::ComboBox, which you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::vector<AZ::Edit::EnumConstant<ValueType>> or AZStd::vector<AZStd::pair<AZ::EntityId, AZStd::string>>

Default value: None

◆ HideIcon

const AZ::Crc32 AZ::Edit::Attributes::HideIcon
static

If true, suppresses any icon from being displayed for this class.

Element type to use this with: AZ::Edit::ClassElements::EditorData, which you reflect using AZ::EditContext::ClassInfo::ClassElement(), of a class that has an icon.

Expected value type: bool

Default value: false

Example: The following example shows how to prevent an icon from being displayed for the EditorVisibilityComponent.

editContext->Class<EditorVisibilityComponent>("Visibility", "Edit-time entity visibility")
->Attribute(AZ::Edit::Attributes::HideIcon, true);

◆ Icon

const AZ::Crc32 AZ::Edit::Attributes::Icon
static

Specifies an icon to represent the element in Lumberyard Editor.

Works only with certain classes, AZ::Component being the primary one. The value is a path to the icon.

Element type to use this with: AZ::Edit::ClassElements::EditorData, which you reflect using AZ::EditContext::ClassInfo::ClassElement(), of a class that has an icon.

Expected value type: AZStd::string

Default value: None

Example: The following example shows how to specify an icon for the RagdollComponent.

editContext->Class<RagdollComponent>("Ragdoll", "Drives a character through physics instead of animation.")
->Attribute(AZ::Edit::Attributes::Category, "Physics")
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/Ragdoll.png")
->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game", 0x232b318c));

◆ IncompatibleService

const AZ::Crc32 AZ::Edit::Attributes::IncompatibleService
static

Put this on an entity ID (entity reference) to indicate that users cannot choose entities that have a component that provides this service.

Element type to use this with: An AZ::EntityId that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: Crc32 of a service provided by a component.

◆ LabelForW

const AZ::Crc32 AZ::Edit::Attributes::LabelForW
static

Specifies a W-axis label for a multi-dimensional vector.

Element type to use this with: Any multi-dimensional vector that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::string

Default value: None

◆ LabelForX

const AZ::Crc32 AZ::Edit::Attributes::LabelForX
static

Specifies an X-axis label for a multi-dimensional vector.

Element type to use this with: Any multi-dimensional vector that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::string

Default value: None

◆ LabelForY

const AZ::Crc32 AZ::Edit::Attributes::LabelForY
static

Specifies a Y-axis label for a multi-dimensional vector.

Element type to use this with: Any multi-dimensional vector that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::string

Default value: None

◆ LabelForZ

const AZ::Crc32 AZ::Edit::Attributes::LabelForZ
static

Specifies a Z-axis label for a multi-dimensional vector.

Element type to use this with: Any multi-dimensional vector that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::string

Default value: None

◆ Max

const AZ::Crc32 AZ::Edit::Attributes::Max
static

Specifies a maximum value for the element.

Element type to use this with: Any numeric type that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: The same type as the DataElement.

Default value: None

Example: The following example shows how to set minimum and maximum values for the lens flare FOV angle of the LensFlareConfiguration class.

editContext->Class<LensFlareConfiguration>("Configuration", "Lens Flare configuration")
->DataElement(0, &LensFlareConfiguration::m_lensFlareFrustumAngle, "FOV", "The lens flare FOV angle")
->Attribute(AZ::Edit::Attributes::Min, 0.f)
->Attribute(AZ::Edit::Attributes::Step, 1.f)
->Attribute(AZ::Edit::Attributes::Max, 360.f)
->Attribute(AZ::Edit::Attributes::Suffix, " degrees");

◆ Min

const AZ::Crc32 AZ::Edit::Attributes::Min
static

Specifies a minimum value for the element.

Element type to use this with: Any numeric type that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: The same type as the DataElement.

Default value: None

Example: The following example shows how to set minimum and maximum values for the particle count scale of the ParticleEmitterSettings class.

editContext->Class<ParticleEmitterSettings>("ParticleSettings", "")
->DataElement(0, &ParticleEmitterSettings::m_countScale, "Count scale", "Multiple for particle count")
->Attribute(AZ::Edit::Attributes::Min, 0.f)
->Attribute(AZ::Edit::Attributes::Max, ParticleEmitterSettings::MaxCountScale)
->Attribute(AZ::Edit::Attributes::Step, 0.1f);

◆ NameLabelOverride

const AZ::Crc32 AZ::Edit::Attributes::NameLabelOverride
static

Specifies text to override the element's current name.

For example, this can be a function that gets a name entered by the user.

Element type to use this with: Any type that you reflect using AZ::EditContext::ClassInfo::ClassElement() or AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::string

Default value: The default name

Example: The following example shows how to set up the EditorLightComponent to allow users to rename the light type.

editContext->Class<EditorLightComponent>("Light", "Attach lighting to an entity.")
->Attribute(AZ::Edit::Attributes::NameLabelOverride, &EditorLightComponent::GetLightTypeText)

◆ PreferNoViewportIcon

const AZ::Crc32 AZ::Edit::Attributes::PreferNoViewportIcon
static

Explicitly specifies that the element should not display a viewport icon.

Element type to use this with: AZ::Edit::ClassElements::EditorData, which you reflect using AZ::EditContext::ClassInfo::ClassElement(), of a class that has a viewport icon.

Expected value type: bool

Default value: false

Example: The following example shows how to specify that the EditorSkinnedMeshComponent should not display a viewport icon.

editContext->Class<EditorSkinnedMeshComponent>("Skinned Mesh", "Attaches skinned geometry to the entity.")
->Attribute(AZ::Edit::Attributes::Category, "Rendering")
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/SkinnedMesh.png")

◆ PrimaryAssetType

const AZ::Crc32 AZ::Edit::Attributes::PrimaryAssetType
static

Associates a given component type with a given asset type.

Only works with components. An example use case is if a user drags a file of this asset type from the Asset Browser to the main window of Lumberyard Editor, then the editor creates an entity with a component of this asset type using the file. For example, dragging a Lua file results in an entity with a Lua script component on it.

Element type to use this with: AZ::Edit::ClassElements::EditorData, which you reflect using AZ::EditContext::ClassInfo::ClassElement(), of a component class.

Expected value type: The UUID of the type of asset that the element represents

Default value: None

Example: The following example shows how to associate the EditorDecalComponent with the asset type LmbrCentral::MaterialAsset.

editContext->Class<EditorDecalComponent>("Decal", "Decal placement configuration.")
->Attribute(AZ::Edit::Attributes::Category, "Rendering")
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/Decal")
->Attribute(AZ::Edit::Attributes::PrimaryAssetType, AZ::AzTypeInfo<LmbrCentral::MaterialAsset>::Uuid());

◆ ReadOnly

const AZ::Crc32 AZ::Edit::Attributes::ReadOnly
static

Specifies whether the element is read only.

Element type to use this with: Any type that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: bool

Default value: false

Example: The following example shows how to bind the ReadOnly attribute of the EditorLightComponent to a function that returns a boolean value.

editContext->Class<EditorLightComponent>("Light", "Attaches lighting to an entity.")
->DataElement(0, &EditorLightComponent::m_cubemapAsset, "Cubemap asset", "Cubemap file path")
->Attribute(AZ::Edit::Attributes::ReadOnly,&EditorLightComponent::CanGenerateCubemap);

◆ RequiredService

const AZ::Crc32 AZ::Edit::Attributes::RequiredService
static

Put this on an entity ID (entity reference) to indicate that users can only choose entities with a component that provides this service.

Element type to use this with: An AZ::EntityId that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: Crc32 of a service provided by a component.

Default value: None

Example: The following example shows how to limit the constraint target to entities that provide the physics service.

editContext->Class<ConstraintConfiguration>("Configuration", "Constraint configuration")
->DataElement(0, &ConstraintConfiguration::m_targetEntity, "Constraint target", "An entity to constrain to.")
->Attribute(AZ::Edit::Attributes::RequiredService, AZ_CRC("PhysicsService"));

◆ SliceFlags

const AZ::Crc32 AZ::Edit::Attributes::SliceFlags
static

Used by slice creation tools.

For available settings, see AZ::Edit::SliceFlags.

Element type to use this with: AZ::Edit::ClassElements::EditorData, which you reflect using AZ::EditContext::ClassInfo::ClassElement(), or a non-group that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: u32

Default value: 0

Example: The following example shows how the EditorLockComponent specifies a slice flag.

editContext->Class<EditorLockComponent>("Lock", "Edit-time entity lock state")
->Attribute(AZ::Edit::Attributes::HideIcon, true);

◆ SoftMax

const AZ::Crc32 AZ::Edit::Attributes::SoftMax
static

Specifies a soft maximum for a slider range.

When you set this property, the sliders' range will be limited by this soft value. However, the user can still go above this number using the spin box.

Element type to use this with: AZ::Edit::UIHandlers::Slider, which you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: The same type as the DataElement.

Default value: None

◆ SoftMin

const AZ::Crc32 AZ::Edit::Attributes::SoftMin
static

Specifies a soft minimum for a slider range.

When you set this property, the sliders' range will be limited by this soft value. However, the user can still go below this number using the spin box.

Element type to use this with: AZ::Edit::UIHandlers::Slider, which you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: The same type as the DataElement.

Default value: None

◆ Step

const AZ::Crc32 AZ::Edit::Attributes::Step
static

Specifies a step value, such as the increments by which a slider increases a value.

Element type to use this with: Any numeric type that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: The same type as the DataElement.

Default value: None

Example: The following example shows how to set the step value with which users can change the water density of the RigidPhysicsConfiguration class.

editContext->Class<RigidPhysicsConfiguration>("Rigid Body Physics Configuration", "")
->DataElement(0, &RigidPhysicsConfiguration::m_buoyancyDensity, "Water density", "Water density strength.")
->Attribute(AZ::Edit::Attributes::Min, 0.f)
->Attribute(AZ::Edit::Attributes::Step, 0.1f);

◆ StringList

const AZ::Crc32 AZ::Edit::Attributes::StringList
static

Provides strings for a combo box.

Element type to use this with: AZ::Edit::UIHandlers::ComboBox, which you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::vector<AZStd::string>

Default value: None

Example: The following example shows how to get strings for a combo box by binding the string list to a function.

editContext->Class<EditorLensFlareComponent>("Lens Flare", "Attaches a lens flare to an entity.")
->DataElement(AZ::Edit::UIHandlers::ComboBox, &EditorLensFlareComponent::m_selectedLensFlareName, "Lens flare", "The selected lens flare in this library.")
->Attribute(AZ::Edit::Attributes::StringList, &EditorLensFlareComponent::GetLensFlarePaths)
->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorLensFlareComponent::OnLensFlareSelected);

◆ StyleForW

const AZ::Crc32 AZ::Edit::Attributes::StyleForW
static

Specifies a W-axis label style for a multi-dimensional vector.

Element type to use this with: Any multi-dimensional vector that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::string that contains valid Qt Style Sheet (qss) code

Default value: None

◆ StyleForX

const AZ::Crc32 AZ::Edit::Attributes::StyleForX
static

Specifies an X-axis label style for a multi-dimensional vector.

Element type to use this with: Any multi-dimensional vector that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::string that contains valid Qt Style Sheet (qss) code

Default value: None

◆ StyleForY

const AZ::Crc32 AZ::Edit::Attributes::StyleForY
static

Specifies a Y-axis label style for a multi-dimensional vector.

Element type to use this with: Any multi-dimensional vector that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::string that contains valid Qt Style Sheet (qss) code

Default value: None

◆ StyleForZ

const AZ::Crc32 AZ::Edit::Attributes::StyleForZ
static

Specifies a Z-axis label style for a multi-dimensional vector.

Element type to use this with: Any multi-dimensional vector that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::string that contains valid Qt Style Sheet (qss) code

Default value: None

◆ Suffix

const AZ::Crc32 AZ::Edit::Attributes::Suffix
static

Appends a suffix to the value of the element.

Element type to use this with: Any numeric type that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::string

Default value: None

Example: The following example shows how to append degrees when displaying the flare FOV angle of the LensFlareConfiguration class.

editContext->Class<LensFlareConfiguration>("Configuration", "Lens Flare configuration")
->DataElement(0, &LensFlareConfiguration::m_lensFlareFrustumAngle, "FOV", "The lens flare FOV angle")
->Attribute(AZ::Edit::Attributes::ChangeNotify, &LensFlareConfiguration::PropertyChanged)
->Attribute(AZ::Edit::Attributes::Min, 0.f)
->Attribute(AZ::Edit::Attributes::Step, 1.f)
->Attribute(AZ::Edit::Attributes::Max, 360.f)
->Attribute(AZ::Edit::Attributes::Suffix, " degrees");

◆ ValueText

const AZ::Crc32 AZ::Edit::Attributes::ValueText
static

Provides text to display on the right-hand side value area in Lumberyard Editor.

This will only work for elements that have no UI handler (for example, a group).

Element type to use this with: Elements that have no UI handler. Examples are AZ::Edit::ClassElements::Group, which you reflect using AZ::EditContext::ClassInfo::ClassElement(), or a container that you reflect using AZ::EditContext::ClassInfo::DataElement().

Expected value type: AZStd::string

Default value: None

◆ ViewportIcon

const AZ::Crc32 AZ::Edit::Attributes::ViewportIcon
static

Specifies a viewport icon to represent the element in Lumberyard Editor.

The value is a path to the icon.

Element type to use this with: AZ::Edit::ClassElements::EditorData, which you reflect using AZ::EditContext::ClassInfo::ClassElement(), of a class that has a viewport icon.

Expected value type: AZStd::string

Default value: None

Example: The following example shows how to specify a viewport icon for the EditorSphereShapeComponent.

editContext->Class<EditorSphereShapeComponent>("Sphere Shape", "Provides a spherical shape")
->Attribute(AZ::Edit::Attributes::Category, "Shape")
->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/Sphere_Shape.png")
->Attribute(AZ::Edit::Attributes::ViewportIcon, "Editor/Icons/Components/Viewport/Sphere_Shape.png")

◆ Visibility

const AZ::Crc32 AZ::Edit::Attributes::Visibility
static

Specifies visibility settings for an element.

Element type to use this with: Any element that you reflect using AZ::EditContext::ClassInfo::DataElement() or AZ::EditContext::ClassInfo::ClassElement().

Expected value type: bool or a AZ::Edit::PropertyVisibility type

Default value: true or AZ::Edit::PropertyVisibility::Show

Example: The following example binds the Visibility setting of a PlayerDynamics class to a bool member variable.

editContext->Class<PlayerDynamics>("Player Dynamics", "Player movement dynamics")
->DataElement(AZ::Edit::UIHandlers::Default, &PlayerDynamics::m_maxRecordedCollisions, "Number of collisions", "Max number of collisions to record per frame")
->Attribute(AZ::Edit::Attributes::Visibility, &PlayerDynamics::m_recordCollisions)
->Attribute(AZ::Edit::Attributes::Min, 0);