1090 {
1092 {
1094 }
1095 else
1096 {
1098 }
1099
1100 CfgParamArray presetParam;
1102 for (int i = 0; i < camera_params.Count(); i++)
1103 {
1104 presetParam = CfgParamArray.Cast(camera_params.Get(i));
1105 if (!presetParam)
1106 continue;
1107
1108 CfgParamString paramCName = CfgParamString.Cast(presetParam.GetValueByName(
"Name",
CFG_TYPE_STRING));
1109 CfgParamFloat paramFocusDistance = CfgParamFloat.Cast(presetParam.GetValueByName(
"FocusDistance",
CFG_TYPE_FLOAT));
1110 CfgParamFloat paramFocusLength = CfgParamFloat.Cast(presetParam.GetValueByName(
"FocusLength",
CFG_TYPE_FLOAT));
1111 CfgParamFloat paramFocusLengthNear = CfgParamFloat.Cast(presetParam.GetValueByName(
"FocusLengthNear",
CFG_TYPE_FLOAT));
1112 CfgParamFloat paramBlur = CfgParamFloat.Cast(presetParam.GetValueByName(
"Blur",
CFG_TYPE_FLOAT));
1113 CfgParamFloat paramFocusDepthOffset = CfgParamFloat.Cast(presetParam.GetValueByName(
"FocusDepthOffset",
CFG_TYPE_FLOAT));
1114
1115 ScriptConsoleCameraDOFPreset preset = new ScriptConsoleCameraDOFPreset();
1116 preset.
Name = paramCName.GetValue();
1120 preset.
Blur = paramBlur.GetValue();
1123 }
1124 }
const int CFG_TYPE_STRING
ref array< ref ScriptConsoleCameraDOFPreset > m_CameraPresets
const string CAMERA_PRESETS_LIST
array< ref CfgParam > GetArray(string key)