| 41 | |
| 42 | #if WITH_EDITOR |
| 43 | FFlowPin FFlowPinType::CreateFlowPinFromProperty(const FProperty& Property, void const* InContainer) const |
| 44 | { |
| 45 | FFlowPin NewFlowPin; |
| 46 | |
| 47 | if (const FFlowDataPinValue* DataPinValue = FlowStructUtils::CastStructValue<FFlowDataPinValue>(&Property, InContainer)) |
| 48 | { |
| 49 | // Create the pin from a FFlowDataPinValue property wrapper |
| 50 | NewFlowPin = CreateFlowPinFromValueWrapper(Property.GetFName(), *DataPinValue); |
| 51 | } |
| 52 | else |
| 53 | { |
| 54 | // Create the pin from a native property |
| 55 | NewFlowPin.PinName = Property.GetFName(); |
| 56 | NewFlowPin.SetPinTypeName(GetPinTypeName()); |
| 57 | |
| 58 | FLOW_ASSERT_ENUM_MAX(EFlowDataMultiType, 2); |
| 59 | if (CastField<FArrayProperty>(&Property)) |
| 60 | { |
| 61 | NewFlowPin.ContainerType = EPinContainerType::Array; |
| 62 | } |
| 63 | |
| 64 | UObject* SubCategoryObject = GetPinSubCategoryObjectFromProperty(&Property, InContainer, DataPinValue); |
| 65 | NewFlowPin.SetPinSubCategoryObject(SubCategoryObject); |
| 66 | } |
| 67 | |
| 68 | // Common property settings for both versions |
| 69 | NewFlowPin.PinFriendlyName = Property.GetDisplayNameText(); |
| 70 | NewFlowPin.PinToolTip = Property.GetToolTipText().ToString(); |
| 71 | |
| 72 | return NewFlowPin; |
| 73 | } |
| 74 | |
| 75 | FFlowPin FFlowPinType::CreateFlowPinFromValueWrapper(const FName& PinName, const FFlowDataPinValue& Wrapper) const |
| 76 | { |
no test coverage detected