浏览代码

Added warning in UI when proxy and influence shapes are differents

/main
Frédéric Vauchelles 7 年前
当前提交
20908a44
共有 2 个文件被更改,包括 25 次插入0 次删除
  1. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Reflection/HDReflectionProbeUI.Drawers.cs
  2. 14
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeUI.Drawers.cs

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Reflection/HDReflectionProbeUI.Drawers.cs


EditorGUI.showMixedValue = false;
if (EditorGUI.EndChangeCheck())
s.SetShapeTarget(p.influenceShape.intValue);
if (p.proxyVolumeComponent.objectReferenceValue != null)
{
var proxy = (ReflectionProxyVolumeComponent)p.proxyVolumeComponent.objectReferenceValue;
if ((int)proxy.proxyVolume.shapeType != p.influenceShape.enumValueIndex)
EditorGUILayout.HelpBox(
"Proxy volume and influence volume have different shape types, this is not supported.",
MessageType.Error,
true
);
}
}
static void Drawer_IntensityMultiplier(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor owner)

14
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/Lighting/Reflection/PlanarReflectionProbeUI.Drawers.cs


(s, d, o) => d.influenceVolume,
InfluenceVolumeUI.SectionFoldoutShape
),
CED.Action(Drawer_DifferentShapeError),
SectionFoldoutInfluenceSettings,
SectionFoldoutCaptureSettings,
CED.Select(

{
// EditorGUILayout.PropertyField(d.captureMirrorPlaneLocalPosition, _.GetContent("Plane Position"));
// EditorGUILayout.PropertyField(d.captureMirrorPlaneLocalNormal, _.GetContent("Plane Normal"));
}
static void Drawer_DifferentShapeError(PlanarReflectionProbeUI s, SerializedPlanarReflectionProbe d, Editor o)
{
var proxy = d.proxyVolumeReference.objectReferenceValue as ReflectionProxyVolumeComponent;
if (proxy != null && (int)proxy.proxyVolume.shapeType != d.influenceVolume.shapeType.enumValueIndex)
{
EditorGUILayout.HelpBox(
"Proxy volume and influence volume have different shape types, this is not supported.",
MessageType.Error,
true
);
}
}
static void Drawer_SectionCaptureSettings(PlanarReflectionProbeUI s, SerializedPlanarReflectionProbe d, Editor o)

正在加载...
取消
保存