initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace UnityEditor.ShaderGraph.Drawing
|
||||
{
|
||||
class BlackboardCategoryViewModel : ISGViewModel
|
||||
{
|
||||
public VisualElement parentView { get; set; }
|
||||
internal string name { get; set; }
|
||||
internal string associatedCategoryGuid { get; set; }
|
||||
internal bool isExpanded { get; set; }
|
||||
internal Action<IGraphDataAction> requestModelChangeAction { get; set; }
|
||||
|
||||
// Wipes all data in this view-model
|
||||
public void ResetViewModelData()
|
||||
{
|
||||
name = String.Empty;
|
||||
associatedCategoryGuid = String.Empty;
|
||||
isExpanded = false;
|
||||
requestModelChangeAction = null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e46a56ca9b0244c08697df31c1a4e9e4
|
||||
timeCreated: 1612206694
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Experimental.GraphView;
|
||||
|
||||
namespace UnityEditor.ShaderGraph.Drawing
|
||||
{
|
||||
class BlackboardViewModel : ISGViewModel
|
||||
{
|
||||
public GraphData model { get; set; }
|
||||
public VisualElement parentView { get; set; }
|
||||
public string title { get; set; }
|
||||
public string subtitle { get; set; }
|
||||
public Dictionary<string, IGraphDataAction> propertyNameToAddActionMap { get; set; }
|
||||
public Dictionary<string, IGraphDataAction> defaultKeywordNameToAddActionMap { get; set; }
|
||||
public Dictionary<string, IGraphDataAction> builtInKeywordNameToAddActionMap { get; set; }
|
||||
public Tuple<string, IGraphDataAction> defaultDropdownNameToAdd { get; set; }
|
||||
|
||||
public IGraphDataAction addCategoryAction { get; set; }
|
||||
public Action<IGraphDataAction> requestModelChangeAction { get; set; }
|
||||
public List<CategoryData> categoryInfoList { get; set; }
|
||||
|
||||
// Can't add disbled keywords, so don't need an add action
|
||||
public List<string> disabledKeywordNameList { get; set; }
|
||||
public List<string> disabledDropdownNameList { get; set; }
|
||||
|
||||
public BlackboardViewModel()
|
||||
{
|
||||
propertyNameToAddActionMap = new Dictionary<string, IGraphDataAction>();
|
||||
defaultKeywordNameToAddActionMap = new Dictionary<string, IGraphDataAction>();
|
||||
builtInKeywordNameToAddActionMap = new Dictionary<string, IGraphDataAction>();
|
||||
defaultDropdownNameToAdd = null;
|
||||
categoryInfoList = new List<CategoryData>();
|
||||
disabledKeywordNameList = new List<string>();
|
||||
disabledDropdownNameList = new List<string>();
|
||||
}
|
||||
|
||||
public void ResetViewModelData()
|
||||
{
|
||||
subtitle = String.Empty;
|
||||
propertyNameToAddActionMap.Clear();
|
||||
defaultKeywordNameToAddActionMap.Clear();
|
||||
builtInKeywordNameToAddActionMap.Clear();
|
||||
defaultDropdownNameToAdd = null;
|
||||
categoryInfoList.Clear();
|
||||
disabledKeywordNameList.Clear();
|
||||
disabledDropdownNameList.Clear();
|
||||
requestModelChangeAction = null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f879ff3347f445a2bbadebebbc166b8e
|
||||
timeCreated: 1608253973
|
|
@ -0,0 +1,15 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace UnityEditor.ShaderGraph.Drawing
|
||||
{
|
||||
class InspectorViewModel : ISGViewModel
|
||||
{
|
||||
public VisualElement parentView { get; set; }
|
||||
|
||||
public void ResetViewModelData()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1e7fbadba5784a16a78ceb473f4975b1
|
||||
timeCreated: 1611190537
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using UnityEditor.ShaderGraph.Internal;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace UnityEditor.ShaderGraph.Drawing
|
||||
{
|
||||
class ShaderInputViewModel : ISGViewModel
|
||||
{
|
||||
public ShaderInput model { get; set; }
|
||||
|
||||
public VisualElement parentView { get; set; }
|
||||
|
||||
internal bool isSubGraph { get; set; }
|
||||
internal bool isInputExposed { get; set; }
|
||||
|
||||
internal string inputName { get; set; }
|
||||
|
||||
internal string inputTypeName { get; set; }
|
||||
|
||||
internal Action<IGraphDataAction> requestModelChangeAction { get; set; }
|
||||
|
||||
public void ResetViewModelData()
|
||||
{
|
||||
isSubGraph = false;
|
||||
isInputExposed = false;
|
||||
inputName = String.Empty;
|
||||
inputTypeName = String.Empty;
|
||||
requestModelChangeAction = null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4de8f5d9ab4e43a4bfd041576666307d
|
||||
timeCreated: 1611183411
|
Loading…
Add table
Add a link
Reference in a new issue