In UE51 noticed that if you have changed property value from python or c++ there are several problems (from BP it works fine though):
-
property is still uneditable for user untill they trigger checkbox twice
-
if I go to “Show Only Modified Properties” unreal doesn’t recognize those properties as actually modified (not the that “Exposure Compensation” is omitted). Note that on the screenshot above there is also no reset prop arrow, I guess for the same reason.
Any ways to avoid those problems?
Python code:
world = unreal.EditorLevelLibrary.get_editor_world()
level_actors = unreal.GameplayStatics.get_all_actors_of_class(world, unreal.PostProcessVolume)
ppv = level_actors[0] # type: unreal.PostProcessVolume
ppv.unbound = True
ppv_settings = ppv.get_editor_property("settings") # type: unreal.PostProcessSettings
ppv_settings.set_editor_property("override_auto_exposure_bias", True) # make sure value is overriden
ppv_settings.set_editor_property("auto_exposure_bias", -3.0)
C++ code:
found_actor = find_actor(APostProcessVolume::StaticClass());
APostProcessVolume* PPV = Cast<APostProcessVolume>(found_actor);
PPV->bUnbound = true;
PPV->Settings.AutoExposureBias = -3.f;
// enable the default param override
PPV->Settings.bOverride_AutoExposureBias = true;