Navigation
API > API/Plugins > API/Plugins/ControlRig > API/Plugins/ControlRig/Rigs > API/Plugins/ControlRig/Rigs/URigHierarchyController > API/Plugins/ControlRig/Rigs/URigHierarchyController/SetParent
References
| Module | ControlRig |
| Header | /Engine/Plugins/Animation/ControlRig/Source/ControlRig/Public/Rigs/RigHierarchyController.h |
| Include | #include "Rigs/RigHierarchyController.h" |
| Source | /Engine/Plugins/Animation/ControlRig/Source/ControlRig/Private/Rigs/RigHierarchyController.cpp |
UFUNCTION&40;BlueprintCallable, Category&61;URigHierarchyController&41;
bool SetParent
&40;
FRigElementKey InChild,
FRigElementKey InParent,
bool bMaintainGlobalTransform,
bool bSetupUndo,
bool bPrintPythonCommand
&41;
Remarks
Sets a new parent to an element. For elements that allow more than one parent the parent list will be replaced. Returns true if successful.
Parameters
| Name | Description |
|---|---|
| InChild | The key of the element to set the parent for |
| InParent | The key of the new parent to set |
| bMaintainGlobalTransform | If set to true the child will stay in the same place spatially, otherwise it will maintain it's local transform (and potential move). |
| bSetupUndo | If set to true the stack will record the change for undo / redo |
| bPrintPythonCommand | If set to true a python command equivalent to this call will be printed out |