ControlRig.Sequencer.ClickSelectThroughGizmo
ControlRig.Sequencer.ClickSelectThroughGizmo
#Overview
name: ControlRig.Sequencer.ClickSelectThroughGizmo
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
When false you can\'t click through a gizmo and change selection if you will select the gizmo when in Animation Mode, default to false.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of ControlRig.Sequencer.ClickSelectThroughGizmo is to control the behavior of selection in the Control Rig animation system when clicking through gizmos in Animation Mode.
This setting variable is primarily used by the Control Rig plugin, which is part of Unreal Engine’s animation system. Specifically, it’s utilized in the Control Rig Editor module.
The value of this variable is set as a console variable (CVar) in the ControlRigEditMode.cpp file. It’s initialized to false by default.
The associated variable CVarClickSelectThroughGizmo directly interacts with ControlRig.Sequencer.ClickSelectThroughGizmo. They share the same value and purpose.
Developers must be aware that this variable affects the selection behavior in the Control Rig editor. When set to false (the default), users cannot click through a gizmo to change the selection if the gizmo would be selected in Animation Mode. When set to true, clicking through gizmos is allowed.
Best practices when using this variable include:
- Consider the user experience in your specific project. If precise gizmo manipulation is crucial, leaving it as false might be preferable.
- If you enable it, ensure that your team is aware of the changed selection behavior to avoid confusion.
- Document any project-specific settings or changes to this variable for your team.
Regarding the associated variable CVarClickSelectThroughGizmo:
This is the actual C++ variable that controls the behavior described above. It’s defined as a TAutoConsoleVariable
The CVarClickSelectThroughGizmo variable is used in the FControlRigEditMode::HandleClick function to determine whether to allow click-through selection.
When working with CVarClickSelectThroughGizmo, developers should:
- Be aware that changes to this variable will immediately affect the editor’s behavior.
- Consider exposing this option in your project’s settings if you want to allow artists or designers to toggle this behavior.
- Be cautious when modifying this variable’s value programmatically, as it could lead to unexpected behavior in the Control Rig editor.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Animation/ControlRig/Source/ControlRigEditor/Private/EditMode/ControlRigEditMode.cpp:80
Scope: file
Source code excerpt:
#include UE_INLINE_GENERATED_CPP_BY_NAME(ControlRigEditMode)
TAutoConsoleVariable<bool> CVarClickSelectThroughGizmo(TEXT("ControlRig.Sequencer.ClickSelectThroughGizmo"), false, TEXT("When false you can't click through a gizmo and change selection if you will select the gizmo when in Animation Mode, default to false."));
void UControlRigEditModeDelegateHelper::OnPoseInitialized()
{
if (EditMode)
{
EditMode->OnPoseInitialized();
#Associated Variable and Callsites
This variable is associated with another variable named CVarClickSelectThroughGizmo
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Animation/ControlRig/Source/ControlRigEditor/Private/EditMode/ControlRigEditMode.cpp:80
Scope: file
Source code excerpt:
#include UE_INLINE_GENERATED_CPP_BY_NAME(ControlRigEditMode)
TAutoConsoleVariable<bool> CVarClickSelectThroughGizmo(TEXT("ControlRig.Sequencer.ClickSelectThroughGizmo"), false, TEXT("When false you can't click through a gizmo and change selection if you will select the gizmo when in Animation Mode, default to false."));
void UControlRigEditModeDelegateHelper::OnPoseInitialized()
{
if (EditMode)
{
EditMode->OnPoseInitialized();
#Loc: <Workspace>/Engine/Plugins/Animation/ControlRig/Source/ControlRigEditor/Private/EditMode/ControlRigEditMode.cpp:1367
Scope (from outer to inner):
file
function bool FControlRigEditMode::HandleClick
Source code excerpt:
bool FControlRigEditMode::HandleClick(FEditorViewportClient* InViewportClient, HHitProxy *HitProxy, const FViewportClick &Click)
{
const bool bClickSelectThroughGizmo = CVarClickSelectThroughGizmo.GetValueOnGameThread();
//if Control is down we act like we are selecting an axis so don't do this check
//if doing control else we can't do control selection anymore, see FMouseDeltaTracker::DetermineCurrentAxis(
if (Click.IsControlDown() == false && bClickSelectThroughGizmo == false)
{
const EAxisList::Type CurrentAxis = InViewportClient->GetCurrentWidgetAxis();
//if we are hitting a widget, besides arcball then bail saying we are handling it