MCPcopy Create free account
hub / github.com/TheRealMJP/BakingLab / UpdateUI

Function UpdateUI

BakingLab/AppSettings.cpp:878–930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

876 }
877
878 void UpdateUI()
879 {
880 bool enableManualExposure = ExposureMode == ExposureModes::ManualSimple;
881 bool enableCameraExposure = ExposureMode == ExposureModes::Manual_SBS ||
882 ExposureMode == ExposureModes::Manual_SOS;
883 bool enableAutoExposure = ExposureMode == ExposureModes::Automatic;
884 bool enableSimpleSkyParams = SkyMode == SkyModes::Simple;
885 bool enableProceduralSkyParams = SkyMode == SkyModes::Procedural;
886 bool useHejlTM = ToneMappingMode == ToneMappingModes::Hejl2015;
887 bool useHableTM = ToneMappingMode == ToneMappingModes::Hable;
888 bool useSGSettings = SGCount() > 0;
889
890 ManualExposure.SetEditable(enableManualExposure);
891 ShutterSpeed.SetEditable(enableCameraExposure);
892 ISORating.SetEditable(enableCameraExposure);
893 KeyValue.SetEditable(enableAutoExposure);
894 AdaptationRate.SetEditable(enableAutoExposure);
895 SkyColor.SetEditable(enableSimpleSkyParams);
896 Turbidity.SetEditable(enableProceduralSkyParams);
897 GroundAlbedo.SetEditable(enableProceduralSkyParams);
898
899 WhitePoint_Hejl.SetVisible(useHejlTM);
900
901 WhitePoint_Hable.SetVisible(useHableTM);
902 ShoulderStrength.SetVisible(useHableTM);
903 LinearStrength.SetVisible(useHableTM);
904 LinearAngle.SetVisible(useHableTM);
905 ToeStrength.SetVisible(useHableTM);
906
907 bool enableSunDirection = SunDirType == SunDirectionTypes::UnitVector;
908 bool enableHorizCoord = SunDirType == SunDirectionTypes::HorizontalCoordSystem;
909
910 SunDirection.SetVisible(enableSunDirection);
911 SunAzimuth.SetVisible(enableHorizCoord);
912 SunElevation.SetVisible(enableHorizCoord);
913
914 SGDiffuseMode.SetEditable(useSGSettings);
915 SolveMode.SetEditable(useSGSettings);
916
917 if(AppSettings::HasSunDirChanged())
918 {
919 if(SunDirType == SunDirectionTypes::UnitVector)
920 {
921 UpdateHorizontalCoords();
922 }
923 else if(SunDirType == SunDirectionTypes::HorizontalCoordSystem)
924 {
925 UpdateUnitVector();
926 }
927 }
928
929 UpdateAreaLightUnits();
930 }
931}

Callers 1

UpdateMethod · 0.85

Calls 7

SGCountFunction · 0.85
HasSunDirChangedFunction · 0.85
UpdateHorizontalCoordsFunction · 0.85
UpdateUnitVectorFunction · 0.85
UpdateAreaLightUnitsFunction · 0.85
SetEditableMethod · 0.80
SetVisibleMethod · 0.80

Tested by

no test coverage detected