.obsidian
.vs
00-MOC
01-Diary
02-Note
03-UnrealEngine
Animation
Editor
Gameplay
AI
Animation
Code
Debug
GAS
Gameplay
Http
Lyra
Mass
Online
Other
PuerTS
UObject
UnrealSpecifiers
Flags
Meta
Actor
AnimationGraph
Asset
Blueprint
Component
Config
Container
Debug
DetailsPanel
Development
Enum
GAS
Material
Niagara
Numeric
Object
Path
Pin
RigVM
Abstract
Aggregate
CustomWidget
DetailsOnly
ExpandByDefault
ExpandByDefault.md
Untitled.png
Icon
Input
Keywords
MenuDescSuffix
NodeColor
RigVMTypeAllowed
TemplateName
Visible
Constant.md
Deprecated.md
Hidden.md
Output.md
Varying.md
Scene
Script
Sequencer
Serialization
SparseDataType
String
Struct
TypePicker
UHT
Widget
Meta.md
Specifier
UnrealSpecifiers.md
Ue4 c++ UProperty反射 PostEditChangeProperty.md
Ue4Object生命周期.jpg
大钊提供的一种获取UE Private函数的方法.md
LevelScene
Math
Mobile
Physical
Plugins
Rendering
Sequence
UI
VirtualProduction
VisualEffect
卡通渲染相关资料
性能优化
流程管理与部署
.keep
03-UnrealEngine.md
04-ComputerGraphics
05-SDHGame
06-DCC
07-Other
08-Assets
09-Templates
.gitattributes
.gitignore
.gitmodules
LICENSE
47 lines
1.0 KiB
Markdown
47 lines
1.0 KiB
Markdown
|
# ExpandByDefault
|
|||
|
|
|||
|
- **功能描述:** 把FRigUnit里的属性引脚默认展开。
|
|||
|
- **使用位置:** UPROPERTY
|
|||
|
- **引擎模块:** RigVMStruct
|
|||
|
- **元数据类型:** bool
|
|||
|
- **常用程度:** ★★★
|
|||
|
|
|||
|
把FRigUnit里的属性引脚默认展开。
|
|||
|
|
|||
|
## 测试代码:
|
|||
|
|
|||
|
```cpp
|
|||
|
USTRUCT(meta = (DisplayName = "MyRig"))
|
|||
|
struct INSIDER_API FRigUnit_MyRig : public FRigUnit
|
|||
|
{
|
|||
|
UPROPERTY(meta = (Input))
|
|||
|
FMyCommonStruct MyStruct_Normal;
|
|||
|
|
|||
|
UPROPERTY(meta = (Input, ExpandByDefault))
|
|||
|
FMyCommonStruct MyStruct_ExpandByDefault;
|
|||
|
|
|||
|
UPROPERTY(meta = (Output))
|
|||
|
float MyFloat_Output = 123.f;
|
|||
|
}
|
|||
|
```
|
|||
|
|
|||
|
## 测试效果:
|
|||
|
|
|||
|
可见MyStruct_ExpandByDefault默认状态下就把该结构展开。
|
|||
|
|
|||
|

|
|||
|
|
|||
|
## 原理:
|
|||
|
|
|||
|
识别该Meta然后设定该引脚的bIsExpanded状态。
|
|||
|
|
|||
|
```cpp
|
|||
|
FRigVMPinInfo::FRigVMPinInfo(FProperty* InProperty, ERigVMPinDirection InDirection, int32 InParentIndex, const uint8* InDefaultValueMemory)
|
|||
|
{
|
|||
|
if (InProperty->HasMetaData(FRigVMStruct::ExpandPinByDefaultMetaName))
|
|||
|
{
|
|||
|
bIsExpanded = true;
|
|||
|
}
|
|||
|
}
|
|||
|
```
|