浏览代码

Small clean up in HDReflectionProbe

/main
Remi Slysz 6 年前
当前提交
43d98473
共有 2 个文件被更改,包括 8 次插入10 次删除
  1. 8
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.Handles.cs
  2. 10
      com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeUI.Drawers.cs

8
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeEditor.Handles.cs


sp.blendDistancePositive.vector3Value = probeBlendDistancePositive;
sp.blendDistanceNegative.vector3Value = probeBlendDistanceNegative;
if(sp.editorAdvancedModeEnabled.boolValue)
//save advanced/simplified saved data
if (sp.editorAdvancedModeEnabled.boolValue)
//save advanced/simplified saved data
sp.editorAdvancedModeBlendDistancePositive.vector3Value = probeBlendDistancePositive;
sp.editorAdvancedModeBlendDistanceNegative.vector3Value = probeBlendDistanceNegative;
}

sp.blendNormalDistancePositive.vector3Value = probeBlendDistancePositive;
sp.blendNormalDistanceNegative.vector3Value = probeBlendDistanceNegative;
if(sp.editorAdvancedModeEnabled.boolValue)
//save advanced/simplified saved data
if (sp.editorAdvancedModeEnabled.boolValue)
//save advanced/simplified saved data
sp.editorAdvancedModeBlendNormalDistancePositive.vector3Value = probeBlendDistancePositive;
sp.editorAdvancedModeBlendNormalDistanceNegative.vector3Value = probeBlendDistanceNegative;
}

10
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDReflectionProbeUI.Drawers.cs


p,
false,
maxBlendDistance,
CoreEditorUtils.GetContent("Blend Distance|Area around the probe where it is blended with other probes. Only used in deferred probes."),
advanced
CoreEditorUtils.GetContent("Blend Distance|Area around the probe where it is blended with other probes. Only used in deferred probes.")
);
if (GUILayout.Button(toolbar_Contents[1], GUILayout.ExpandHeight(true), GUILayout.Width(28f), GUILayout.MinHeight(22f), GUILayout.MaxHeight((advanced ? 3 : 1) * (EditorGUIUtility.singleLineHeight + 3))))
{

p,
true,
maxBlendDistance,
CoreEditorUtils.GetContent("Blend Normal Distance|Area around the probe where the normals influence the probe. Only used in deferred probes."),
advanced
CoreEditorUtils.GetContent("Blend Normal Distance|Area around the probe where the normals influence the probe. Only used in deferred probes.")
);
if (GUILayout.Button(toolbar_Contents[2], GUILayout.ExpandHeight(true), GUILayout.Width(28f), GUILayout.MinHeight(22f), GUILayout.MaxHeight((advanced ? 3 : 1) * (EditorGUIUtility.singleLineHeight + 3))))
{

}
}
static void Drawer_AdvancedBlendDistance(SerializedHDReflectionProbe p, bool isNormal, Vector3 maxBlendDistance, GUIContent content, bool advanced)
static void Drawer_AdvancedBlendDistance(SerializedHDReflectionProbe p, bool isNormal, Vector3 maxBlendDistance, GUIContent content)
{
SerializedProperty blendDistancePositive = isNormal ? p.blendNormalDistancePositive : p.blendDistancePositive;
SerializedProperty blendDistanceNegative = isNormal ? p.blendNormalDistanceNegative : p.blendDistanceNegative;

EditorGUILayout.BeginVertical();
if (advanced)
if (p.editorAdvancedModeEnabled.boolValue)
{
EditorGUI.BeginChangeCheck();
Debug.Log(editorAdvancedModeBlendDistancePositive.vector3Value + " " + editorAdvancedModeBlendDistanceNegative.vector3Value);

正在加载...
取消
保存