|
|
|
|
|
|
SectionPrimarySettings, |
|
|
|
SectionProxyVolumeSettings, |
|
|
|
SectionInfluenceVolumeSettings, |
|
|
|
SectionInfluenceProxyMismatch, |
|
|
|
SectionCaptureSettings, |
|
|
|
SectionAdditionalSettings, |
|
|
|
ButtonBake |
|
|
|
|
|
|
CED.space, |
|
|
|
CED.Action(Drawer_InfluenceSettings) |
|
|
|
); |
|
|
|
|
|
|
|
public static readonly CED.IDrawer SectionInfluenceProxyMismatch = CED.Action(Drawer_InfluenceProxyMissmatch); |
|
|
|
|
|
|
|
public static readonly CED.IDrawer SectionCaptureSettings = CED.FoldoutGroup( |
|
|
|
"Capture settings", |
|
|
|
|
|
|
{ |
|
|
|
EditorGUILayout.PropertyField(p.proxyVolumeComponent, _.GetContent("Proxy Volume")); |
|
|
|
|
|
|
|
if (p.proxyVolumeComponent.objectReferenceValue == null) |
|
|
|
{ |
|
|
|
EditorGUILayout.HelpBox( |
|
|
|
"When no Proxy setted, Influence shape will be used as Proxy shape too.", |
|
|
|
MessageType.Info, |
|
|
|
true |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
#region Influence Volume
|
|
|
|
static void Drawer_InfluenceProxyMissmatch(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor owner) |
|
|
|
{ |
|
|
|
if (p.proxyVolumeComponent.objectReferenceValue != null) |
|
|
|
{ |
|
|
|
var proxy = (ReflectionProxyVolumeComponent)p.proxyVolumeComponent.objectReferenceValue; |
|
|
|
|
|
|
true |
|
|
|
); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
EditorGUILayout.HelpBox( |
|
|
|
"When no Proxy setted, Influence shape will be used as Proxy shape too.", |
|
|
|
MessageType.Info, |
|
|
|
true |
|
|
|
); |
|
|
|
} |
|
|
|
#region Influence Volume
|
|
|
|
static void Drawer_InfluenceBoxSettings(HDReflectionProbeUI s, SerializedHDReflectionProbe p, Editor owner) |
|
|
|
{ |
|
|
|
var maxBlendDistance = HDReflectionProbeEditorUtility.CalculateBoxMaxBlendDistance(s, p, owner); |
|
|
|
|
|
|
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 |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
switch ((ShapeType)p.influenceShape.enumValueIndex) |
|
|
|
{ |
|
|
|