3#include <Foundation/Configuration/Singleton.h>
4#include <VisualScriptPlugin/Runtime/VisualScript.h>
18 const plRTTI* m_pDataType =
nullptr;
20 using DeductTypeFunc = plVisualScriptDataType::Enum (*)(
const plVisualScriptPin& pin);
21 DeductTypeFunc m_DeductTypeFunc =
nullptr;
24 bool m_bRequired =
false;
25 bool m_bSplitExecution =
false;
26 bool m_bReplaceWithArray =
false;
28 PL_ALWAYS_INLINE
bool IsExecutionPin()
const {
return m_ScriptDataType == plVisualScriptDataType::Invalid; }
29 PL_ALWAYS_INLINE
bool IsDataPin()
const {
return m_ScriptDataType != plVisualScriptDataType::Invalid; }
31 static plColor GetColorForScriptDataType(plVisualScriptDataType::Enum dataType);
40 const plRTTI* m_pTargetType =
nullptr;
44 DeductTypeFunc m_DeductTypeFunc =
nullptr;
47 bool m_bImplicitExecution =
true;
48 bool m_bHasDynamicPins =
false;
53 void AddInputDataPin(
plStringView sName,
const plRTTI* pDataType, plVisualScriptDataType::Enum scriptDataType,
bool bRequired,
const plHashedString& sDynamicPinProperty =
plHashedString(), PinDesc::DeductTypeFunc deductTypeFunc =
nullptr,
bool bReplaceWithArray =
false);
56 PL_ALWAYS_INLINE
bool NeedsTypeDeduction()
const {
return m_DeductTypeFunc !=
nullptr; }
62 const plRTTI* GetNodeBaseType()
const {
return m_pBaseType; }
63 const plRTTI* GetVariableSetterType()
const {
return m_pSetVariableType; }
64 const plRTTI* GetVariableGetterType()
const {
return m_pGetVariableType; }
65 const NodeDesc* GetNodeDescForType(
const plRTTI* pRtti)
const {
return m_TypeToNodeDescs.GetValue(pRtti); }
69 const plRTTI* m_pType =
nullptr;
72 plUInt32 m_uiPropertyValuesStart;
73 plUInt32 m_uiPropertyValuesCount;
79 static constexpr const char* s_szTypeNamePrefix =
"VisualScriptNode_";
84 void UpdateNodeTypes();
85 void UpdateNodeType(
const plRTTI* pRtti,
bool bForceExpose =
false);
92 void AddInputDataPin_Any(
plReflectedTypeDescriptor& ref_typeDesc, NodeDesc& ref_nodeDesc,
plStringView sName,
bool bRequired,
bool bAddVariantProperty =
false, PinDesc::DeductTypeFunc deductTypeFunc =
nullptr);
95 void AddOutputDataPin(NodeDesc& ref_nodeDesc,
plStringView sName);
97 void CreateBuiltinTypes();
98 void CreateGetOwnerNodeType(
const plRTTI* pRtti);
100 void CreateCoroutineNodeType(
const plRTTI* pRtti);
101 void CreateMessageNodeTypes(
const plRTTI* pRtti);
102 void CreateEnumNodeTypes(
const plRTTI* pRtti);
109 const plRTTI* m_pBaseType =
nullptr;
110 const plRTTI* m_pSetPropertyType =
nullptr;
111 const plRTTI* m_pGetPropertyType =
nullptr;
112 const plRTTI* m_pSetVariableType =
nullptr;
113 const plRTTI* m_pGetVariableType =
nullptr;
114 bool m_bBuiltinTypesCreated =
false;
The base class for a property that represents a function.
Definition AbstractProperty.h:535
This is the base interface for all properties in the reflection system. It provides enough informatio...
Definition AbstractProperty.h:150
This class encapsulates an array and it's size. It is recommended to use this class instead of plain ...
Definition ArrayPtr.h:37
A 8bit per channel unsigned normalized (values interpreted as 0-1) color storage format that represen...
Definition Color8UNorm.h:99
plColor represents an RGBA color in linear color space. Values are stored as float,...
Definition Color.h:44
Definition DocumentObjectBase.h:11
Definition DynamicArray.h:81
This class is optimized to take nearly no memory (sizeof(void*)) and to allow very fast checks whethe...
Definition HashedString.h:25
This class holds information about reflected types. Each instance represents one type that is known t...
Definition RTTI.h:30
Attribute to mark a function up to be exposed to the scripting system. Arguments specify the names of...
Definition PropertyAttributes.h:1006
Definition SmallArray.h:219
static constexpr plUInt32 GetStringElementCount(const T *pString)
Returns the number of elements of type T that the string contains, until it hits an element that is z...
Definition StringUtils_inl.h:45
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Definition VisualScriptNodeRegistry.h:10
Definition VisualScriptGraph.h:7
A custom enum implementation that allows to define the underlying storage type to control its memory ...
Definition Enum.h:37
Definition DocumentNodeManager.h:105
Definition PhantomRttiManager.h:10
Stores the description of a reflected type in a serializable form. Used by plPhantomRttiManager to ad...
Definition ReflectedType.h:95
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
Definition VisualScriptNodeRegistry.h:68
Definition VisualScriptNodeRegistry.h:36
Definition VisualScriptNodeRegistry.h:15