Navigation
API > API/Plugins > API/Plugins/IKRig
This is the base class for creating your own solver type that integrates into the IK Rig framework/editor.
| Name | FIKRigSolverBase |
| Type | struct |
| Header File | /Engine/Plugins/Animation/IKRig/Source/IKRig/Public/Rig/Solvers/IKRigSolverBase.h |
| Include Path | #include "Rig/Solvers/IKRigSolverBase.h" |
Syntax
USTRUCT (BlueprintType )
struct FIKRigSolverBase
Derived Classes
FIKRigSolverBase derived class hierarchy
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FIKRigSolverBase() |
Rig/Solvers/IKRigSolverBase.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsEnabled | bool | All solvers can be enabled/disabled in the UI or API | Rig/Solvers/IKRigSolverBase.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddGoal
(
const UIKRigEffectorGoal& InNewGoal |
GOALS (required) override to support ADDING a new goal to custom solver | Rig/Solvers/IKRigSolverBase.h | |
virtual void AddSettingsToBone
(
const FName& InBoneName |
(required if UsesCustomBoneSettings()) override to support ADDING settings to a particular bone | Rig/Solvers/IKRigSolverBase.h | |
virtual void DrawBoneSettings
(
const FName& InBoneName, |
TODO: This will be supported in a future version of Unreal (optional) override to do custom debug drawing in the editor viewport | Rig/Solvers/IKRigSolverBase.h | |
virtual FIKRigBoneSettingsBase * GetBoneSettings
(
const FName& InBoneName |
(required if UsesCustomBoneSettings()) override to support supplying per-bone settings to outside systems for editing/UI NOTE: This must be overriden on solvers that use bone setting and return nullptr if no settings for the given bone | Rig/Solvers/IKRigSolverBase.h | |
virtual const UScriptStruct * GetBoneSettingsType() |
(required if UsesCustomBoneSettings()) returns the type used for the bone settings in this solver | Rig/Solvers/IKRigSolverBase.h | |
virtual void GetBonesWithSettings
(
TSet< FName >& OutBonesWithSettings |
(required if UsesCustomBoneSettings()) override to support telling outside systems which bones this solver has settings for. | Rig/Solvers/IKRigSolverBase.h | |
virtual FName GetEndBone() |
(required if UsesEndBone()) override to support getting end bone of the solver | Rig/Solvers/IKRigSolverBase.h | |
virtual FIKRigGoalSettingsBase * GetGoalSettings
(
const FName& InGoalName |
(required if UsesCustomGoalSettings()) override to support supplying goals settings specific to this solver to outside systems for editing/UI returns a pointer to the settings stored for the given bone (null if bone does not have settings) | Rig/Solvers/IKRigSolverBase.h | |
virtual const UScriptStruct * GetGoalSettingsType() |
(required if UsesCustomGoalSettings()) returns the type used for the goal settings in this solver | Rig/Solvers/IKRigSolverBase.h | |
virtual void GetGoalsWithSettings
(
TSet< FName >& OutGoalsWithSettings |
(required if UsesCustomGoalSettings()) override to support telling outside systems which goals this solver has settings for. | Rig/Solvers/IKRigSolverBase.h | |
virtual FText GetNiceName() |
GENERAL UI (required) override to give your solver a nice name to display in the UI | Rig/Solvers/IKRigSolverBase.h | |
virtual void GetRequiredBones
(
TSet< FName >& OutRequiredBones |
(required) override to add any bones which this solver requires (helps validate skeleton compatibility) | Rig/Solvers/IKRigSolverBase.h | |
virtual void GetRequiredGoals
(
TSet< FName >& OutRequiredGoals |
(required) override to add any goals that have been added to this solver | Rig/Solvers/IKRigSolverBase.h | |
virtual UIKRigSolverControllerBase * GetSolverController
(
UObject* Outer |
SCRIPTING API (optional, but recommended) provide a scripting object to edit your custom solver type in the editor via BP/Python | Rig/Solvers/IKRigSolverBase.h | |
virtual FIKRigSolverSettingsBase * GetSolverSettings() |
SOLVER SETTINGS (required) override this to support custom settings for your solver type | Rig/Solvers/IKRigSolverBase.h | |
virtual const UScriptStruct * GetSolverSettingsType() |
(required) override this and return the type your solver uses to store its settings | Rig/Solvers/IKRigSolverBase.h | |
virtual FName GetStartBone() |
(required if UsesStartBone()) if solver requires a start bone, then override this to return it. | Rig/Solvers/IKRigSolverBase.h | |
virtual bool GetWarningMessage
(
FText& OutWarningMessage |
(optional, but recommended) override to provide warning to user during setup of any missing components. return false if no warnings. | Rig/Solvers/IKRigSolverBase.h | |
virtual bool HasSettingsOnBone
(
const FName& InBoneName |
(required if UsesCustomBoneSettings()) override to inform outside systems if the given bone has custom settings on it | Rig/Solvers/IKRigSolverBase.h | |
virtual void Initialize
(
const FIKRigSkeleton& InIKRigSkeleton |
RUNTIME (required) override to setup internal data based on ref pose | Rig/Solvers/IKRigSolverBase.h | |
virtual bool IsBoneAffectedBySolver
(
const FName& InBoneName, |
(optional, but recommended) return true if the supplied Bone is affected by this solver - this provides UI feedback for user | Rig/Solvers/IKRigSolverBase.h | |
bool IsEnabled() |
Get if this solver is enabled | Rig/Solvers/IKRigSolverBase.h | |
| (required) override to support CHANGING BONE for an existing goal | Rig/Solvers/IKRigSolverBase.h | ||
virtual void OnGoalRemoved
(
const FName& InGoalName |
(required) override to support REMOVING a goal from custom solver | Rig/Solvers/IKRigSolverBase.h | |
| (required) override to support RENAMING an existing goal | Rig/Solvers/IKRigSolverBase.h | ||
virtual void RemoveSettingsOnBone
(
const FName& InBoneName |
(required if UsesCustomBoneSettings()) override to support REMOVING settings on a particular bone | Rig/Solvers/IKRigSolverBase.h | |
virtual void SetBoneSettings
(
const FName& InBoneName, |
(optional) override if you need custom logic when per-bone settings are applied from outside systems | Rig/Solvers/IKRigSolverBase.h | |
void SetEnabled
(
const bool bEnabled |
Turn solver on/off (will be skipped during execution if disabled) | Rig/Solvers/IKRigSolverBase.h | |
virtual void SetEndBone
(
const FName& InEndBoneName |
(required if UsesEndBone()) override to support setting end bone for the solver | Rig/Solvers/IKRigSolverBase.h | |
virtual void SetGoalSettings
(
const FName& InGoalName, |
(optional) override if you need custom logic when setting goal settings from outside systems. | Rig/Solvers/IKRigSolverBase.h | |
virtual void SetSolverSettings
(
const FIKRigSolverSettingsBase* InSettings |
(optional) override to add custom logic if needed when outside systems set solver settings. | Rig/Solvers/IKRigSolverBase.h | |
virtual void SetStartBone
(
const FName& InRootBoneName |
(required if UsesStartBone()) override to support SETTING ROOT BONE for the solver | Rig/Solvers/IKRigSolverBase.h | |
virtual void Solve
(
FIKRigSkeleton& InIKRigSkeleton, |
(required) override Solve() to evaluate new output pose (InOutGlobalTransform) | Rig/Solvers/IKRigSolverBase.h | |
virtual void UpdateSettingsFromAsset
(
const FIKRigSolverBase& InAssetSolver |
(optional) override to add custom logic when updating settings from the source asset at runtime NOTE: you can safely cast this to your own solver type and copy any relevant settings at runtime This is necessary because at runtime, the IKRigProcessor creates a copy of your solver struct and the copy must be notified of changes made to the editor instance so that users can see their edits update in PIE. | Rig/Solvers/IKRigSolverBase.h | |
virtual bool UsesCustomBoneSettings() |
BONE SETTINGS (optional) implement if your solver supports per-bone settings override and return true to tell systems if this solver supports per-bone settings | Rig/Solvers/IKRigSolverBase.h | |
virtual bool UsesCustomGoalSettings() |
GOAL SETTINGS (optional) override and return true to tell systems if this solver supports custom per-goal settings | Rig/Solvers/IKRigSolverBase.h | |
virtual bool UsesEndBone() |
END BONE (optional) implement if your solver requires an end bone override and return true if this solver requires an end bone to be specified | Rig/Solvers/IKRigSolverBase.h | |
virtual bool UsesStartBone() |
START BONE (optional) determines if your solver requires a start bone to be specified (most do) override and return true if your solver requires the user to specify a start bone | Rig/Solvers/IKRigSolverBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UIKRigSolverControllerBase * CreateControllerIfNeeded
(
UObject* Outer, |
Helper function for solvers to instantiate their own controller | Rig/Solvers/IKRigSolverBase.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void CopyAllEditableProperties
(
const UScriptStruct* SettingsType, |
Generic function to set all types of solver settings | Rig/Solvers/IKRigSolverBase.h |