5#include <Foundation/Basics.h>
6#include <Foundation/Math/ColorScheme.h>
7#include <Foundation/Reflection/Reflection.h>
42 : m_sCategory(szCategory)
46 const char* GetCategory()
const {
return m_sCategory; }
67 const char* GetString()
const;
69 plInt32 m_Phase = Phase::Beta;
87 const char* GetTitle()
const {
return m_sTitle; }
104 const char* GetIcon()
const {
return m_sIcon; }
121 const plColor& GetColor()
const {
return m_Color; }
141 : m_sSuffix(szSuffix)
145 const char* GetSuffix()
const {
return m_sSuffix; }
163 const char* GetText()
const {
return m_sText; }
207 const plVariant& GetValue()
const {
return m_Value; }
227 const plVariant& GetMinValue()
const {
return m_MinValue; }
228 const plVariant& GetMaxValue()
const {
return m_MaxValue; }
243 plGroupAttribute(
const char* szGroup,
const char* szIconName,
float fOrder = -1.0f);
245 const char* GetGroup()
const {
return m_sGroup; }
246 const char* GetIconName()
const {
return m_sIconName; }
247 float GetOrder()
const {
return m_fOrder; }
252 float m_fOrder = -1.0f;
288 : m_sTagFilter(szTagFilter)
292 const char* GetTagFilter()
const {
return m_sTagFilter; }
318 : m_sParametersSource(szParametersSource)
322 const char* GetParametersSource()
const {
return m_sParametersSource; }
347 const char* szClassType,
const char* szClassProperty =
nullptr)
348 : m_sClassSource(szClassSource)
349 , m_sClassType(szClassType)
350 , m_sClassProperty(szClassProperty)
354 const char* GetClassSource()
const {
return m_sClassSource; }
355 const char* GetClassType()
const {
return m_sClassType; }
356 const char* GetClassProperty()
const {
return m_sClassProperty; }
375 m_bCanDelete = bCanDelete;
376 m_bCanMove = bCanMove;
379 bool CanAdd()
const {
return m_bCanAdd; }
380 bool CanDelete()
const {
return m_bCanDelete; }
381 bool CanMove()
const {
return m_bCanMove; }
384 bool m_bCanAdd =
false;
385 bool m_bCanDelete =
false;
386 bool m_bCanMove =
false;
412 using StorageType = plUInt8;
425 StorageType Thumbnail : 1;
426 StorageType Transform : 1;
427 StorageType Package : 1;
444 static constexpr plStringView Meshes =
"*.obj;*.fbx;*.gltf;*.glb"_plsv;
445 static constexpr plStringView MeshesWithAnimations =
"*.fbx;*.gltf;*.glb"_plsv;
446 static constexpr plStringView ImagesLdrOnly =
"*.dds;*.tga;*.png;*.jpg;*.jpeg"_plsv;
447 static constexpr plStringView ImagesHdrOnly =
"*.hdr;*.exr"_plsv;
448 static constexpr plStringView ImagesLdrAndHdr =
"*.dds;*.tga;*.png;*.jpg;*.jpeg;*.hdr;*.exr"_plsv;
449 static constexpr plStringView CubemapsLdrAndHdr =
"*.dds;*.hdr"_plsv;
453 : m_sDialogTitle(sDialogTitle)
454 , m_sTypeFilter(sTypeFilter)
455 , m_sCustomAction(sCustomAction)
456 , m_DependencyFlags(depencyFlags)
460 plStringView GetDialogTitle()
const {
return m_sDialogTitle; }
461 plStringView GetTypeFilter()
const {
return m_sTypeFilter; }
462 plStringView GetCustomAction()
const {
return m_sCustomAction; }
483 : m_sDialogTitle(sDialogTitle)
484 , m_sTypeFilter(sTypeFilter)
488 plStringView GetDialogTitle()
const {
return m_sDialogTitle; }
489 plStringView GetTypeFilter()
const {
return m_sTypeFilter; }
507 : m_DependencyFlags(depencyFlags)
509 SetTypeFilter(szTypeFilter);
513 : m_DependencyFlags(depencyFlags)
515 SetTypeFilter(szTypeFilter);
516 m_sRequiredTag = szRequiredTag;
519 void SetTypeFilter(
const char* szTypeFilter)
522 m_sTypeFilter = sTemp;
525 const char* GetTypeFilter()
const {
return m_sTypeFilter; }
528 const char* GetRequiredTag()
const {
return m_sRequiredTag; }
546 : m_sDynamicEnumName(szDynamicEnumName)
550 const char* GetDynamicEnumName()
const {
return m_sDynamicEnumName; }
566 : m_sDynamicEnumName(szDynamicEnumName)
570 const char* GetDynamicEnumName()
const {
return m_sDynamicEnumName; }
584 : m_sDynamicBitflagsName(sDynamicName)
588 plStringView GetDynamicBitflagsName()
const {
return m_sDynamicBitflagsName; }
601 plManipulatorAttribute(
const char* szProperty1,
const char* szProperty2 =
nullptr,
const char* szProperty3 =
nullptr,
602 const char* szProperty4 =
nullptr,
const char* szProperty5 =
nullptr,
const char* szProperty6 =
nullptr);
650 plBoxManipulatorAttribute(
const char* szSizeProperty,
float fSizeScale,
bool bRecenterParent,
const char* szOffsetProperty =
nullptr,
const char* szRotationProperty =
nullptr);
652 bool m_bRecenterParent =
false;
653 float m_fSizeScale = 1.0f;
669 const char* szNegXProp,
const char* szPosXProp,
const char* szNegYProp,
const char* szPosYProp,
const char* szNegZProp,
const char* szPosZProp);
672 bool HasSixAxis()
const {
return !m_sProperty4.IsEmpty(); }
723 plTransformManipulatorAttribute(
const char* szTranslateProperty,
const char* szRotateProperty =
nullptr,
const char* szScaleProperty =
nullptr,
const char* szOffsetTranslation =
nullptr,
const char* szOffsetRotation =
nullptr);
728 const plUntrackedString& GetGetOffsetTranslationProperty()
const {
return m_sProperty4; }
729 const plUntrackedString& GetGetOffsetRotationProperty()
const {
return m_sProperty5; }
749 using StorageType = plUInt8;
766 StorageType PosX : 1;
767 StorageType NegX : 1;
768 StorageType PosY : 1;
769 StorageType NegY : 1;
770 StorageType PosZ : 1;
771 StorageType NegZ : 1;
784 plVisualizerAttribute(
const char* szProperty1,
const char* szProperty2 =
nullptr,
const char* szProperty3 =
nullptr,
785 const char* szProperty4 =
nullptr,
const char* szProperty5 =
nullptr);
810 float m_fSizeScale = 1.0f;
929 plCameraVisualizerAttribute(
const char* szModeProperty,
const char* szFovProperty,
const char* szOrthoDimProperty,
const char* szNearPlaneProperty,
const char* szFarPlaneProperty);
941template <
typename Type>
944 for (
const auto* pAttr : m_Attributes)
946 if (pAttr->GetDynamicRTTI()->IsDerivedFrom<Type>())
947 return static_cast<const Type*
>(pAttr);
955template <
typename Type>
958 for (
const auto* pAttr : m_Attributes)
960 if (pAttr->GetDynamicRTTI()->IsDerivedFrom<Type>())
961 return static_cast<const Type*
>(pAttr);
977 const plUInt32& GetMaxSize()
const {
return m_uiMaxSize; }
980 plUInt32 m_uiMaxSize = 0;
1009 enum ArgType : plUInt8
1017 ArgType argType3 = In,
const char* szArg3 =
nullptr, ArgType argType4 = In,
const char* szArg4 =
nullptr, ArgType argType5 = In,
1018 const char* szArg5 =
nullptr, ArgType argType6 = In,
const char* szArg6 =
nullptr);
1020 plUInt32 GetArgumentCount()
const {
return m_ArgNames.GetCount(); }
1021 const char* GetArgumentName(plUInt32 uiIndex)
const {
return m_ArgNames[uiIndex]; }
1023 ArgType GetArgumentType(plUInt32 uiIndex)
const {
return static_cast<ArgType
>(m_ArgTypes[uiIndex]); }
1039 plUInt32 GetArgumentIndex()
const {
return m_uiArgIndex; }
1043 plUInt32 m_uiArgIndex = 0;
1077 : m_sOpTypeName(szOpTypeName)
1113 m_sImageGenerator = szImageGenerator;
const Type * GetAttributeByType() const
Returns the first attribute that derives from the given type, or nullptr if nothing is found.
Definition PropertyAttributes.h:956
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
A property attribute that indicates that the string property is actually an asset reference.
Definition PropertyAttributes.h:501
Definition PropertyAttributes.h:735
Definition PropertyAttributes.h:645
Definition PropertyAttributes.h:798
Definition PropertyAttributes.h:922
Definition PropertyAttributes.h:630
Definition PropertyAttributes.h:837
Used to categorize types (e.g. add component menu)
Definition PropertyAttributes.h:36
A property attribute that allows to define min and max values for the UI. Min or max may be set to an...
Definition PropertyAttributes.h:216
Used to colorize types.
Definition PropertyAttributes.h:112
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
static PL_ALWAYS_INLINE plColor LightUI(Enum schemeColor)
Get a scheme color with predefined brightness and saturation to look good as highlight color in PL to...
Definition ColorScheme.h:66
Definition PropertyAttributes.h:702
Definition PropertyAttributes.h:689
Definition PropertyAttributes.h:896
Sets the allowed actions on a container.
Definition PropertyAttributes.h:367
Definition PropertyAttributes.h:854
Sets the default value of the property.
Definition PropertyAttributes.h:171
Definition PropertyAttributes.h:876
Can be used on integer properties to display them as bitflags. The valid bitflags and their names may...
Definition PropertyAttributes.h:578
Add this attribute to an embedded class or container property to make it retrieve its default values ...
Definition PropertyAttributes.h:341
Can be used on integer properties to display them as enums. The valid enum values and their names may...
Definition PropertyAttributes.h:540
Used to mark an array or (unsigned)int property as source for dynamic pin generation on nodes.
Definition PropertyAttributes.h:1049
Can be used on string properties to display them as enums. The valid enum values and their names may ...
Definition PropertyAttributes.h:560
Attribute for types that should not be exposed to the scripting framework.
Definition PropertyAttributes.h:1000
A property attribute that indicates that the alpha channel of an plColorGammaUB or plColor should be ...
Definition PropertyAttributes.h:129
Add this attribute to a variant map property to make it map to the exposed parameters of an asset....
Definition PropertyAttributes.h:312
Indicates that the string property should allow to browse for an file (or programs) outside the proje...
Definition PropertyAttributes.h:477
A property attribute that indicates that the string property should display a file browsing button.
Definition PropertyAttributes.h:439
Wrapper Attribute to add an attribute to a function argument.
Definition PropertyAttributes.h:1032
A property attribute that indicates that the string property is actually a game object reference.
Definition PropertyAttributes.h:1088
Used to categorize properties into groups.
Definition PropertyAttributes.h:237
A property attribute that indicates that the property is not to be shown in the UI.
Definition PropertyAttributes.h:23
A hybrid array uses in-place storage to handle the first few elements without any allocation....
Definition HybridArray.h:12
Definition PropertyAttributes.h:94
Displays the value range as an image, allowing users to pick a value like on a slider.
Definition PropertyAttributes.h:1106
A property attribute that indicates that this feature is still in development and should not be shown...
Definition PropertyAttributes.h:54
Used to mark that a component provides functionality that is executed with a long operation in the ed...
Definition PropertyAttributes.h:1071
Definition PropertyAttributes.h:597
A property attribute that specifies the max size of an array. If it is reached, no further elemets ar...
Definition PropertyAttributes.h:970
Used to show a text instead of the minimum value of a property.
Definition PropertyAttributes.h:153
This attribute indicates that a widget should not use temporary transactions when changing the value.
Definition PropertyAttributes.h:300
If this attribute is set, the UI is encouraged to prevent the user from creating duplicates of the sa...
Definition PropertyAttributes.h:989
Base class of all attributes can be used to decorate a RTTI property.
Definition PropertyAttributes.h:11
PL_ALWAYS_INLINE const plRTTI * GetParentType() const
Returns the type that is the base class of this type. May be nullptr if this type has no base class.
Definition RTTI.h:54
const Type * GetAttributeByType() const
Returns the first attribute that derives from the given type, or nullptr if nothing is found.
Definition PropertyAttributes.h:942
A property attribute that indicates that the property may not be modified through the UI.
Definition PropertyAttributes.h:17
All classes that should be dynamically reflectable, need to be derived from this base class.
Definition DynamicRTTI.h:86
Attribute to mark a function up to be exposed to the scripting system. Arguments specify the names of...
Definition PropertyAttributes.h:1006
Definition PropertyAttributes.h:615
Definition PropertyAttributes.h:818
plStringBuilder is a class that is meant for creating and modifying strings.
Definition StringBuilder.h:35
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Used for any property shown as a line edit (int, float, vector etc).
Definition PropertyAttributes.h:135
A property attribute that indicates that the property is not to be serialized and whatever it points ...
Definition PropertyAttributes.h:30
Used for dynamic titles of visual script nodes. E.g. "Set Bool Property '{Name}'" will allow the titl...
Definition PropertyAttributes.h:77
plVariant is a class that can store different types of variables, which is useful in situations where...
Definition Variant.h:44
static plVec3Template< float > MakeZero()
Definition Vec3.h:38
Definition PropertyAttributes.h:780
The plBitflags class allows you to work with type-safe bitflags.
Definition Bitflags.h:82
Definition PropertyAttributes.h:424
Defines how a reference set by plFileBrowserAttribute and plAssetBrowserAttribute is treated.
Definition PropertyAttributes.h:411
Enum
Definition PropertyAttributes.h:415
@ Transform
This reference is a dependency to transforming this asset. The input model of a mesh for example.
Definition PropertyAttributes.h:418
@ None
The reference is not needed for anything in production. An example of this is editor references that ...
Definition PropertyAttributes.h:416
@ Thumbnail
This reference is a dependency to generating a thumbnail. The material references of a mesh for examp...
Definition PropertyAttributes.h:417
@ Package
This reference needs to be packaged as it is used at runtime by this asset. All sounds or debris gene...
Definition PropertyAttributes.h:419
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
Definition PropertyAttributes.h:765
Definition PropertyAttributes.h:748