bAllowTranslateRotateZWidget
bAllowTranslateRotateZWidget
#Overview
name: bAllowTranslateRotateZWidget
The value of this variable can be defined or overridden in .ini config files. 1
.ini config file referencing this setting variable.
It is referenced in 6
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bAllowTranslateRotateZWidget is to control the availability of the combined translate/rotate widget in the Unreal Engine 5 level editor viewport. This setting is primarily used in the editor’s user interface and manipulation tools.
This setting variable is relied upon by the Level Editor subsystem and the Editor Viewport module. It affects the functionality of the widget modes available to users when manipulating objects in the level editor.
The value of this variable is set in the LevelEditorViewportSettings class, which is likely configurable through the editor’s settings menu. It is defined as a UPROPERTY with the ‘config’ specifier, indicating that it can be saved and loaded from configuration files.
This variable interacts with the widget mode system, particularly affecting the UE::Widget::WM_TranslateRotateZ mode. When this setting is false, the code skips over the TranslateRotateZ mode when cycling through widget modes.
Developers must be aware that changing this setting will directly impact the available tools for object manipulation in the level editor. If disabled, users won’t have access to the combined translate/rotate widget, which could affect their workflow.
Best practices when using this variable include:
- Considering the target user base and their familiarity with 3D manipulation tools when deciding whether to enable or disable this feature.
- Ensuring that disabling this option doesn’t negatively impact existing workflows or level designs.
- Providing clear documentation or user guidance if this setting is changed from its default value, as it may affect user expectations.
- Testing the editor’s functionality thoroughly after changing this setting to ensure all widget modes behave as expected.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/BaseEditorPerProjectUserSettings.ini:327, section: [/Script/UnrealEd.LevelEditorViewportSettings]
- INI Section:
/Script/UnrealEd.LevelEditorViewportSettings
- Raw value:
False
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/LevelEditor/Private/LevelEditorActions.cpp:3163
Scope (from outer to inner):
file
function bool FLevelEditorActionCallbacks::IsTranslateRotateModeVisible
Source code excerpt:
bool FLevelEditorActionCallbacks::IsTranslateRotateModeVisible()
{
return GetDefault<ULevelEditorViewportSettings>()->bAllowTranslateRotateZWidget;
}
void FLevelEditorActionCallbacks::SetCoordinateSystem( ECoordSystem CoordinateSystem )
{
GLevelEditorModeTools().SetCoordSystem( CoordinateSystem );
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Classes/Settings/LevelEditorViewportSettings.h:303
Scope (from outer to inner):
file
class class ULevelEditorViewportSettings : public UObject
Source code excerpt:
/** Allow translate/rotate widget */
UPROPERTY(EditAnywhere, config, Category=LookAndFeel, meta=( DisplayName = "Enable Combined Translate/Rotate Widget" ))
uint32 bAllowTranslateRotateZWidget:1;
/** Allow arcball rotation with rotate widget */
UPROPERTY(EditAnywhere, config, Category = LookAndFeel, meta = (DisplayName = "Enable Arcball Rotate"))
uint32 bAllowArcballRotate : 1;
/** Allow screen rotation with rotate widget */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorModeManager.cpp:1787
Scope (from outer to inner):
file
function void FEditorModeTools::CycleWidgetMode
Source code excerpt:
{
Wk++;
if ((Wk == UE::Widget::WM_TranslateRotateZ) && (!GetDefault<ULevelEditorViewportSettings>()->bAllowTranslateRotateZWidget))
{
Wk++;
}
// Roll back to the start if we go past UE::Widget::WM_Scale
if( Wk >= UE::Widget::WM_Max)
{
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/SEditorViewport.cpp:712
Scope (from outer to inner):
file
function bool SEditorViewport::IsTranslateRotateModeVisible
Source code excerpt:
bool SEditorViewport::IsTranslateRotateModeVisible() const
{
return GetDefault<ULevelEditorViewportSettings>()->bAllowTranslateRotateZWidget;
}
bool SEditorViewport::Is2DModeVisible() const
{
return GetDefault<ULevelEditor2DSettings>()->bEnable2DWidget;
}
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/SEditorViewport.cpp:741
Scope (from outer to inner):
file
function void SEditorViewport::OnCycleWidgetMode
Source code excerpt:
++WidgetModeAsInt;
if ((WidgetModeAsInt == UE::Widget::WM_TranslateRotateZ) && (!GetDefault<ULevelEditorViewportSettings>()->bAllowTranslateRotateZWidget))
{
++WidgetModeAsInt;
}
if ((WidgetModeAsInt == UE::Widget::WM_2D) && (!GetDefault<ULevelEditor2DSettings>()->bEnable2DWidget))
{
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Settings/SettingsClasses.cpp:972
Scope (from outer to inner):
file
function void ULevelEditorViewportSettings::PostEditChangeProperty
Source code excerpt:
: NAME_None;
if (Name == GET_MEMBER_NAME_CHECKED(ULevelEditorViewportSettings, bAllowTranslateRotateZWidget))
{
if (bAllowTranslateRotateZWidget)
{
GLevelEditorModeTools().SetWidgetMode(UE::Widget::WM_TranslateRotateZ);
}
else if (GLevelEditorModeTools().GetWidgetMode() == UE::Widget::WM_TranslateRotateZ)
{
GLevelEditorModeTools().SetWidgetMode(UE::Widget::WM_Translate);