浏览代码

Clean edit reflection probe's edit modes usage

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

8
com.unity.render-pipelines.high-definition/HDRP/Editor/Lighting/Reflection/HDProbeUI.Drawers.cs


protected const EditMode.SceneViewEditMode EditCenter = EditMode.SceneViewEditMode.GridMove;
//Note: EditMode.SceneViewEditMode.ReflectionProbeOrigin is still used
//by legacy reflection probe and have its own mecanism that we don't want
internal static bool IsProbeEditMode(EditMode.SceneViewEditMode editMode)
{
return editMode == EditBaseShape
|| editMode == EditInfluenceShape
|| editMode == EditInfluenceNormalShape
|| editMode == EditCenter;
}
static Dictionary<ToolBar, EditMode.SceneViewEditMode> s_Toolbar_Mode = null;
protected static Dictionary<ToolBar, EditMode.SceneViewEditMode> toolbar_Mode

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


public bool sceneViewEditing
{
get { return IsReflectionProbeEditMode(EditMode.editMode) && EditMode.IsOwner(this); }
get { return HDProbeUI.IsProbeEditMode(EditMode.editMode) && EditMode.IsOwner(this); }
}
protected override void OnEnable()

HDAdditionalReflectionData probe = (HDAdditionalReflectionData)m_AdditionalDataSerializedObject.targetObject;
probe.influenceVolume.Init(probe);
}
public static bool IsReflectionProbeEditMode(EditMode.SceneViewEditMode editMode)
{
return editMode == EditMode.SceneViewEditMode.ReflectionProbeBox
|| editMode == EditMode.SceneViewEditMode.Collider
|| editMode == EditMode.SceneViewEditMode.GridBox
|| editMode == EditMode.SceneViewEditMode.GridMove;
}
}
}

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


public bool sceneViewEditing
{
get { return HDReflectionProbeEditor.IsReflectionProbeEditMode(EditMode.editMode) && EditMode.IsOwner(owner); }
get { return HDProbeUI.IsProbeEditMode(EditMode.editMode) && EditMode.IsOwner(owner); }
}
public override void Update()

正在加载...
取消
保存