Peter Bay Bastian
7 年前
当前提交
3790252c
共有 14 个文件被更改,包括 56 次插入 和 215 次删除
-
5MaterialGraphProject/Assets/NewNodes/Editor/Keep/BlendModeNode.cs
-
2MaterialGraphProject/Assets/NewNodes/Editor/Keep/ConstantsNode.cs
-
39MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/SubGraph/SubGraphOutputNode.cs
-
11MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Controls/DefaultControl.cs
-
36MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/MaterialGraphPresenter.cs
-
2MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs
-
12MaterialGraphProject/Assets/NewNodes/Editor/ConstantsNodePresenter.cs.meta
-
12MaterialGraphProject/Assets/NewNodes/Editor/BlendModeNodePresenter.cs.meta
-
12MaterialGraphProject/Assets/NewNodes/Editor/ToggleNodePresenter.cs.meta
-
43MaterialGraphProject/Assets/NewNodes/Editor/BlendModeNodePresenter.cs
-
49MaterialGraphProject/Assets/NewNodes/Editor/ConstantsNodePresenter.cs
-
45MaterialGraphProject/Assets/NewNodes/Editor/ToggleNodePresenter.cs
-
3MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/Nodes.meta
|
|||
fileFormatVersion: 2 |
|||
guid: 68be9386ef4794d49967bf453668964e |
|||
timeCreated: 1495448531 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: cebc29fc489af774fbf2b756ba815122 |
|||
timeCreated: 1495456482 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 55391b421fcbe4e60bf16325132025ff |
|||
timeCreated: 1495456482 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using UnityEditor.Experimental.UIElements.GraphView; |
|||
using UnityEngine.MaterialGraph; |
|||
|
|||
namespace UnityEditor.MaterialGraph.Drawing |
|||
{ |
|||
[Serializable] |
|||
class BlendModeNodeControlPresenter : GraphControlPresenter |
|||
{ |
|||
public override void OnGUIHandler() |
|||
{ |
|||
base.OnGUIHandler(); |
|||
|
|||
var cNode = node as BlendModeNode; |
|||
if (cNode == null) |
|||
return; |
|||
|
|||
cNode.blendMode = (BlendModesEnum)EditorGUILayout.EnumPopup("", cNode.blendMode); |
|||
} |
|||
|
|||
/* public override float GetHeight() |
|||
{ |
|||
return EditorGUIUtility.singleLineHeight + 2 * EditorGUIUtility.standardVerticalSpacing; |
|||
} |
|||
*/ |
|||
public override float GetHeight() |
|||
{ |
|||
return EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing + EditorGUIUtility.standardVerticalSpacing; |
|||
} |
|||
} |
|||
|
|||
[Serializable] |
|||
public class BlendModeNodePresenter : MaterialNodePresenter |
|||
{ |
|||
protected override IEnumerable<GraphControlPresenter> GetControlData() |
|||
{ |
|||
var instance = CreateInstance<BlendModeNodeControlPresenter>(); |
|||
instance.Initialize(node); |
|||
return new List<GraphControlPresenter> { instance }; |
|||
} |
|||
} |
|||
} |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using UnityEngine.MaterialGraph; |
|||
using UnityEditor.Experimental.UIElements.GraphView; |
|||
|
|||
namespace UnityEditor.MaterialGraph.Drawing |
|||
{ |
|||
[Serializable] |
|||
class ConstantsContolPresenter : GraphControlPresenter |
|||
{ |
|||
private string[] m_ConstantTypeNames; |
|||
private string[] constantTypeNames |
|||
{ |
|||
get |
|||
{ |
|||
if (m_ConstantTypeNames == null) |
|||
m_ConstantTypeNames = Enum.GetNames(typeof(ConstantType)); |
|||
return m_ConstantTypeNames; |
|||
} |
|||
} |
|||
|
|||
public override void OnGUIHandler() |
|||
{ |
|||
base.OnGUIHandler(); |
|||
|
|||
var cNode = node as UnityEngine.MaterialGraph.ConstantsNode; |
|||
if (cNode == null) |
|||
return; |
|||
|
|||
cNode.constant = (ConstantType)EditorGUILayout.Popup((int)cNode.constant, constantTypeNames, EditorStyles.popup); |
|||
} |
|||
|
|||
public override float GetHeight() |
|||
{ |
|||
return EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing; |
|||
} |
|||
} |
|||
|
|||
[Serializable] |
|||
public class ConstantsNodePresenter : MaterialNodePresenter |
|||
{ |
|||
protected override IEnumerable<GraphControlPresenter> GetControlData() |
|||
{ |
|||
var instance = CreateInstance<ConstantsContolPresenter>(); |
|||
instance.Initialize(node); |
|||
return new List<GraphControlPresenter> { instance }; |
|||
} |
|||
} |
|||
} |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using UnityEditor.Experimental.UIElements.GraphView; |
|||
using UnityEngine; |
|||
using UnityEngine.MaterialGraph; |
|||
|
|||
namespace UnityEditor.MaterialGraph.Drawing |
|||
{ |
|||
/* [Serializable] |
|||
class ToggleNodeControlPresenter : GraphControlPresenter |
|||
{ |
|||
public override void OnGUIHandler() |
|||
{ |
|||
base.OnGUIHandler(); |
|||
|
|||
var cNode = node as ToggleNode; |
|||
if (cNode == null) |
|||
return; |
|||
|
|||
cNode.value = EditorGUILayout.Toggle(cNode.value); |
|||
cNode.exposedState = (PropertyNode.ExposedState)EditorGUILayout.EnumPopup(new GUIContent("Exposed"), cNode.exposedState); |
|||
} |
|||
|
|||
/* public override float GetHeight() |
|||
{ |
|||
return EditorGUIUtility.singleLineHeight + 2 * EditorGUIUtility.standardVerticalSpacing; |
|||
} |
|||
* |
|||
public override float GetHeight() |
|||
{ |
|||
return 2 * (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing) + EditorGUIUtility.standardVerticalSpacing; |
|||
} |
|||
} |
|||
|
|||
[Serializable] |
|||
public class ToggleNodePresenter : MaterialNodePresenter |
|||
{ |
|||
protected override IEnumerable<GraphControlPresenter> GetControlData() |
|||
{ |
|||
var instance = CreateInstance<ToggleNodeControlPresenter>(); |
|||
instance.Initialize(node); |
|||
return new List<GraphControlPresenter> { instance }; |
|||
} |
|||
}*/ |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 7e4695133ddd49cf97b1629ca5537e5b |
|||
timeCreated: 1502981029 |
撰写
预览
正在加载...
取消
保存
Reference in new issue