Navigation
API > API/Plugins > API/Plugins/ControlRig > API/Plugins/ControlRig/Rigs > API/Plugins/ControlRig/Rigs/URigHierarchy > API/Plugins/ControlRig/Rigs/URigHierarchy/SwitchToParent
References
| Module | ControlRig |
| Header | /Engine/Plugins/Animation/ControlRig/Source/ControlRig/Public/Rigs/RigHierarchy.h |
| Include | #include "Rigs/RigHierarchy.h" |
| Source | /Engine/Plugins/Animation/ControlRig/Source/ControlRig/Private/Rigs/RigHierarchy.cpp |
bool SwitchToParent
&40;
FRigBaseElement &42; InChild,
FRigBaseElement &42; InParent,
bool bInitial,
bool bAffectChildren,
const TElementDependencyMap & InDependencyMap,
FString &42; OutFailureReason
&41;
Remarks
Switches a multi parent element to a single parent. This sets the new parent's weight to 1.0 and disables weights for all other potential parents. Returns true if changing the weight was successful
Parameters
| Name | Description |
|---|---|
| InChild | The multi parented element |
| InParent | The parent to look up the weight for |
| bInitial | If true the initial weights will be used |
| bAffectChildren | If set to false children will not move (maintain global). |
| InDependencyMap | An additional map of dependencies to respect |
| OutFailureReason | An optional pointer to retrieve the reason for failure |