SET
SET
#Overview
name: SET
This variable is created as a Console Variable (cvar).
- type:
Exec
- help:
Sorry: Exec commands have no help
It is referenced in 9
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of SET is to modify properties or execute specific commands within the Unreal Engine editor and game environment. It serves as a versatile command used in various subsystems for setting values, modifying objects, or triggering specific actions.
SET is utilized in several Unreal Engine subsystems, plugins, and modules, including:
- UnrealEd: Used in brush manipulation, polygon editing, and actor property modification.
- CoreUObject: Employed for general object property setting.
- Engine: Used in the game engine for runtime property modifications.
The value of this variable is typically set through console commands or script execution. It’s often used in combination with other parameters to specify what is being set and its new value.
SET interacts with various other variables depending on the context. For example, in brush manipulation, it may interact with location, rotation, and scale variables.
Developers must be aware of the following when using SET:
- It can have different behaviors depending on the context (e.g., brush manipulation vs. object property setting).
- In shipping builds, SET commands may be restricted in networked games for security reasons.
- Using SET in the editor can modify default objects, potentially affecting object serialization.
Best practices when using SET include:
- Use it cautiously, especially in networked environments, to avoid potential security risks or inconsistencies.
- Be aware of the specific context and subsystem in which SET is being used to ensure proper functionality.
- In editor scripts, consider alternative methods for modifying properties to avoid unintended changes to default objects.
- Document any custom SET commands or usage to maintain code clarity and ease of maintenance.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorServer.cpp:615
Scope (from outer to inner):
file
function bool UEditorEngine::Exec_Brush
Source code excerpt:
return false;
}
else if( FParse::Command(&Str,TEXT("SET")) )
{
{
const FScopedTransaction Transaction( NSLOCTEXT("UnrealEd", "BrushSet", "Brush Set") );
FRotator Temp(0.0f, 0.0f, 0.0f);
FVector SnapLocation(0.0f, 0.0f, 0.0f);
FVector PrePivot(0.0f, 0.0f, 0.0f);
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorServer.cpp:4339
Scope (from outer to inner):
file
function bool UEditorEngine::Exec_Poly
Source code excerpt:
{
if (FParse::Command(&Str,TEXT("SET")))
{
FSelectCommand SelectCommand = FSelectCommand::CreateUObject(this, &UEditorEngine::polyMemorizeSet);
ExecuteCommandForAllLevelModels( InWorld, SelectCommand, NSLOCTEXT("UnrealEd", "MemorizeSelectionSet", "Memorize Selection Set") );
}
else if (FParse::Command(&Str,TEXT("RECALL")))
{
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/EditorServer.cpp:4410
Scope (from outer to inner):
file
function bool UEditorEngine::Exec_Poly
Source code excerpt:
return true;
}
else if( FParse::Command(&Str,TEXT("SET")) ) // POLY SET <variable>=<value>...
{
{
const FScopedTransaction Transaction( NSLOCTEXT("UnrealEd", "PolySetTexture", "Set Texture") );
FlagModifyAllSelectedSurfacesInLevels( InWorld );
uint64 Ptr;
if( !FParse::Value(Str,TEXT("TEXTURE="),Ptr) )
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/UnrealEdSrv.cpp:634
Scope (from outer to inner):
file
function bool UUnrealEdEngine::Exec
Source code excerpt:
const TCHAR* Str = Stream;
// disallow set commands in the editor as that modifies the default object, affecting object serialization
if (FParse::Command(&Str, TEXT("SET")) || FParse::Command(&Str, TEXT("SETNOPEC")))
{
Ar.Logf(TEXT("Set commands not allowed in the editor"));
return true;
}
//for thumbnail reclamation post save
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/UnrealEdSrv.cpp:2637
Scope: file
Source code excerpt:
return true;
}
else if( FParse::Command(&Str,TEXT("SET")) )
{
// @todo DB: deprecate the ACTOR SET exec.
RedrawLevelEditingViewports();
return true;
}
else if( FParse::Command(&Str,TEXT("BAKEPREPIVOT")) )
#Loc: <Workspace>/Engine/Source/Programs/Unsync/ThirdParty/md5-sse2.cpp:116
Scope: file
Source code excerpt:
}
#define SET(step, a, b, c, d, x, s, ac) { \
a += step(b, c, d) + x + T##ac; \
a = ROTL(a, s) + b; \
}
#define A 0x67452301
#define B 0xefcdab89
#Loc: <Workspace>/Engine/Source/Programs/Unsync/ThirdParty/md5-sse2.cpp:600
Scope (from outer to inner):
file
function static inline void md5_process
Source code excerpt:
d = ctx->state[3];
SET(F, a, b, c, d, W[ 0], S11, 1);
SET(F, d, a, b, c, W[ 1], S12, 2);
SET(F, c, d, a, b, W[ 2], S13, 3);
SET(F, b, c, d, a, W[ 3], S14, 4);
SET(F, a, b, c, d, W[ 4], S11, 5);
SET(F, d, a, b, c, W[ 5], S12, 6);
SET(F, c, d, a, b, W[ 6], S13, 7);
SET(F, b, c, d, a, W[ 7], S14, 8);
SET(F, a, b, c, d, W[ 8], S11, 9);
SET(F, d, a, b, c, W[ 9], S12, 10);
SET(F, c, d, a, b, W[10], S13, 11);
SET(F, b, c, d, a, W[11], S14, 12);
SET(F, a, b, c, d, W[12], S11, 13);
SET(F, d, a, b, c, W[13], S12, 14);
SET(F, c, d, a, b, W[14], S13, 15);
SET(F, b, c, d, a, W[15], S14, 16);
SET(G, a, b, c, d, W[ 1], S21, 17);
SET(G, d, a, b, c, W[ 6], S22, 18);
SET(G, c, d, a, b, W[11], S23, 19);
SET(G, b, c, d, a, W[ 0], S24, 20);
SET(G, a, b, c, d, W[ 5], S21, 21);
SET(G, d, a, b, c, W[10], S22, 22);
SET(G, c, d, a, b, W[15], S23, 23);
SET(G, b, c, d, a, W[ 4], S24, 24);
SET(G, a, b, c, d, W[ 9], S21, 25);
SET(G, d, a, b, c, W[14], S22, 26);
SET(G, c, d, a, b, W[ 3], S23, 27);
SET(G, b, c, d, a, W[ 8], S24, 28);
SET(G, a, b, c, d, W[13], S21, 29);
SET(G, d, a, b, c, W[ 2], S22, 30);
SET(G, c, d, a, b, W[ 7], S23, 31);
SET(G, b, c, d, a, W[12], S24, 32);
SET(H, a, b, c, d, W[ 5], S31, 33);
SET(H, d, a, b, c, W[ 8], S32, 34);
SET(H, c, d, a, b, W[11], S33, 35);
SET(H, b, c, d, a, W[14], S34, 36);
SET(H, a, b, c, d, W[ 1], S31, 37);
SET(H, d, a, b, c, W[ 4], S32, 38);
SET(H, c, d, a, b, W[ 7], S33, 39);
SET(H, b, c, d, a, W[10], S34, 40);
SET(H, a, b, c, d, W[13], S31, 41);
SET(H, d, a, b, c, W[ 0], S32, 42);
SET(H, c, d, a, b, W[ 3], S33, 43);
SET(H, b, c, d, a, W[ 6], S34, 44);
SET(H, a, b, c, d, W[ 9], S31, 45);
SET(H, d, a, b, c, W[12], S32, 46);
SET(H, c, d, a, b, W[15], S33, 47);
SET(H, b, c, d, a, W[ 2], S34, 48);
SET(I, a, b, c, d, W[ 0], S41, 49);
SET(I, d, a, b, c, W[ 7], S42, 50);
SET(I, c, d, a, b, W[14], S43, 51);
SET(I, b, c, d, a, W[ 5], S44, 52);
SET(I, a, b, c, d, W[12], S41, 53);
SET(I, d, a, b, c, W[ 3], S42, 54);
SET(I, c, d, a, b, W[10], S43, 55);
SET(I, b, c, d, a, W[ 1], S44, 56);
SET(I, a, b, c, d, W[ 8], S41, 57);
SET(I, d, a, b, c, W[15], S42, 58);
SET(I, c, d, a, b, W[ 6], S43, 59);
SET(I, b, c, d, a, W[13], S44, 60);
SET(I, a, b, c, d, W[ 4], S41, 61);
SET(I, d, a, b, c, W[11], S42, 62);
SET(I, c, d, a, b, W[ 2], S43, 63);
SET(I, b, c, d, a, W[ 9], S44, 64);
ctx->state[0] += a;
ctx->state[1] += b;
ctx->state[2] += c;
ctx->state[3] += d;
}
#Loc: <Workspace>/Engine/Source/Runtime/CoreUObject/Private/UObject/Obj.cpp:4471
Scope (from outer to inner):
file
function bool StaticExec
Source code excerpt:
return true;
}
else if( FParse::Command(&Str,TEXT("SET")) )
{
PerformSetCommand( Str, Ar, true );
return true;
}
else if( FParse::Command(&Str,TEXT("SETNOPEC")) )
{
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/GameEngine.cpp:1527
Scope (from outer to inner):
file
function bool UGameEngine::Exec
Source code excerpt:
#if UE_BUILD_SHIPPING
// disallow set of actor properties if network game
if ((FParse::Command( &Cmd, TEXT("SET")) || FParse::Command( &Cmd, TEXT("SETNOPEC"))))
{
FWorldContext &Context = GetWorldContextFromWorldChecked(InWorld);
if( Context.PendingNetGame != NULL || InWorld->GetNetMode() != NM_Standalone)
{
return true;
}