# Reset value variable set by console command / Read default scalability settings from C++

**URL:** <https://forums.unrealengine.com/t/reset-value-variable-set-by-console-command-read-default-scalability-settings-from-c/354931>\
**Category:** Platform & Builds\
**Tags:** Console, console-commands, console-command, Scalability, unreal-engine, question\
**Created:** [April 21, 2016, 10:03am UTC](https://forums.unrealengine.com/t/reset-value-variable-set-by-console-command-read-default-scalability-settings-from-c/354931 "2016-04-21T10:03:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_be2c4424](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_be2c4424](https://forums.unrealengine.com/u/anonymous_user_be2c4424)\
**Post date:** [April 21, 2016, 10:03am UTC](https://forums.unrealengine.com/t/reset-value-variable-set-by-console-command-read-default-scalability-settings-from-c/354931/1 "2016-04-21T10:03:27Z")

</div>

Hello to everyone,

I’m working on a settings menu where I change the post process quality using a button. I also have some checkboxes to enable / disable some graphics settings on top the scalability settings. So you can set, for example, the post process quality to 3 and it applies the scalability quality 3, but you can maybe want to disable motion blur on top of that.

The problem I found is that if I change one specific value, let’s say motion blur (r.MotionBlurQuality), it works fine but when I change again the scalability settings the motion blur value doesn’t change. Reading the [documentation here](https://docs.unrealengine.com/latest/INT/Programming/Development/Tools/ConsoleManager/index.html#priority) it seems that the console value is the last one applied. I’m changing the values from C++ using APlayerController-\>ConsoleCommand.

Is there any way to reset the value set by the console? If is not possible, how can I read all the values for each scalability setting from C++ and apply them manually?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_be2c4424](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_be2c4424](https://forums.unrealengine.com/u/anonymous_user_be2c4424)\
**Post date:** [April 22, 2016, 9:26am UTC](https://forums.unrealengine.com/t/reset-value-variable-set-by-console-command-read-default-scalability-settings-from-c/354931/2 "2016-04-22T09:26:17Z")

</div>

Ok, I found a way to change it. This is how the order is applied to the console settings:

> ECVF\_SetByConstructor = 0x00000000,
> 
> ECVF\_SetByScalability = 0x01000000,
> 
> ECVF\_SetByGameSetting = 0x02000000,
> 
> ECVF\_SetByProjectSetting = 0x03000000,
> 
> ECVF\_SetByDeviceProfile = 0x04000000,
> 
> ECVF\_SetBySystemSettingsIni = 0x05000000,
> 
> ECVF\_SetByConsoleVariablesIni = 0x06000000,
> 
> ECVF\_SetByCommandline = 0x07000000,
> 
> ECVF\_SetByCode = 0x08000000,
> 
> ECVF\_SetByConsole = 0x09000000,

What I was doing was using UWorld::Exec / APlayerController-\>ConsoleCommand, and they both use flag SetByConsole, so when I changed the Scalability settings it used the flag SetByScalability, so the specific settings I changed manually were not updated because of the priority.

What I ended doing was setting the value manually using the flag SetByGameSetting. Here the example for MotionBlur:

// That sets specifically the motion blur  
static auto CVar = IConsoleManager::Get().FindConsoleVariable(“r.MotionBlurQuality”);  
CVar-\>Set(value, ECVF\_SetByGameSetting);

If instead of r.MotionBlurQuality you use sg.PostProcessQuality you change all the settings (including motion blur).

I hope this could help to someone.
