Concert.AlwaysSuspendBroadcastUndoRedo
Concert.AlwaysSuspendBroadcastUndoRedo
#Overview
name: Concert.AlwaysSuspendBroadcastUndoRedo
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Always suspend the undo/redo broadcast message. Can help with transactions that steal user focus.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of Concert.AlwaysSuspendBroadcastUndoRedo is to control the behavior of undo/redo broadcast messages in the Concert system, which is part of Unreal Engine’s collaborative editing framework.
This setting variable is utilized by the Concert system, specifically within the ConcertSyncClient module. It’s part of the collaborative editing features in Unreal Engine, allowing multiple users to work on the same project simultaneously.
The value of this variable is set as a console variable, which means it can be changed at runtime. It’s initialized with a default value of 0, indicating that by default, the undo/redo broadcast is not always suspended.
The associated variable CVarAlwaysSuspendBroadcastUndoRedo directly interacts with this setting. They share the same value and purpose.
Developers must be aware that when this variable is set to a value greater than 0, it will always suspend the undo/redo broadcast message. This can be helpful in situations where transactions might steal user focus, potentially improving the user experience in collaborative editing scenarios.
Best practices when using this variable include:
- Use it judiciously, as suspending undo/redo broadcasts may affect the synchronization between collaborators.
- Consider enabling it temporarily when working on complex transactions that might cause focus issues.
- Be aware of its impact on the overall collaborative editing experience and communicate its use with team members.
Regarding the associated variable CVarAlwaysSuspendBroadcastUndoRedo:
This is the actual console variable that controls the behavior. It’s defined as a TAutoConsoleVariable
It’s used in the PreUndo function to determine whether to suspend the broadcast of undo/redo operations. If the value is greater than 0, or if the user is editing and the transacted object is not in the current selection, it will set GEditor->bSuspendBroadcastPostUndoRedo to true.
Developers should be aware that this variable can significantly impact the behavior of the undo/redo system in collaborative scenarios. It’s important to test thoroughly when modifying its value to ensure it doesn’t disrupt the expected workflow of the team.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/ConcertClientTransactionBridge.cpp:38
Scope (from outer to inner):
file
namespace ConcertClientTransactionBridgeUtil
Source code excerpt:
static TAutoConsoleVariable<int32> CVarIgnoreTransactionIncludeFilter(TEXT("Concert.IgnoreTransactionFilters"), 0, TEXT("Ignore Transaction Object Allow List Filtering"));
static TAutoConsoleVariable<int32> CVarAlwaysSuspendBroadcastUndoRedo(TEXT("Concert.AlwaysSuspendBroadcastUndoRedo"), 0,
TEXT("Always suspend the undo/redo broadcast message. Can help with transactions that steal user focus."));
bool RunTransactionFilters(const TArray<FTransactionClassFilter>& InFilters, UObject* InObject)
{
bool bMatchFilter = false;
for (const FTransactionClassFilter& TransactionFilter : InFilters)
#Associated Variable and Callsites
This variable is associated with another variable named CVarAlwaysSuspendBroadcastUndoRedo
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/ConcertClientTransactionBridge.cpp:38
Scope (from outer to inner):
file
namespace ConcertClientTransactionBridgeUtil
Source code excerpt:
static TAutoConsoleVariable<int32> CVarIgnoreTransactionIncludeFilter(TEXT("Concert.IgnoreTransactionFilters"), 0, TEXT("Ignore Transaction Object Allow List Filtering"));
static TAutoConsoleVariable<int32> CVarAlwaysSuspendBroadcastUndoRedo(TEXT("Concert.AlwaysSuspendBroadcastUndoRedo"), 0,
TEXT("Always suspend the undo/redo broadcast message. Can help with transactions that steal user focus."));
bool RunTransactionFilters(const TArray<FTransactionClassFilter>& InFilters, UObject* InObject)
{
bool bMatchFilter = false;
for (const FTransactionClassFilter& TransactionFilter : InFilters)
#Loc: <Workspace>/Engine/Plugins/Developer/Concert/ConcertSync/ConcertSyncClient/Source/ConcertSyncClient/Private/ConcertClientTransactionBridge.cpp:232
Scope (from outer to inner):
file
namespace ConcertClientTransactionBridgeUtil
function void PreUndo
Source code excerpt:
if (TransBuffer)
{
if (CVarAlwaysSuspendBroadcastUndoRedo.GetValueOnAnyThread() > 0 || (ConcertSyncClientUtil::IsUserEditing() && !IsTransactedObjectInSelection()))
{
GEditor->bIgnoreSelectionChange = true;
GEditor->bSuspendBroadcastPostUndoRedo = true;
}
TransBuffer->OnBeforeRedoUndo().Broadcast(TransactionContext);