Time Rewizer  v.1.1
Created by: Mark Oostveen
MarkOostveen.TimeRewizer.Editor.Baking.AnimationEditorWindowNodeHierarchy Class Reference
+ Inheritance diagram for MarkOostveen.TimeRewizer.Editor.Baking.AnimationEditorWindowNodeHierarchy:
+ Collaboration diagram for MarkOostveen.TimeRewizer.Editor.Baking.AnimationEditorWindowNodeHierarchy:

Package Functions

void Initialize (AnimationEditorWindow parent)
 
void Update ()
 

Properties

bool Initialized [get, set]
 

Member Function Documentation

◆ Initialize()

void MarkOostveen.TimeRewizer.Editor.Baking.AnimationEditorWindowNodeHierarchy.Initialize ( AnimationEditorWindow  parent)
package
20  {
21  m_ScrolPosition = Vector2.zero;
22  m_Parent = parent;
23  m_Changes = false;
24  m_NodeInpector = new AnimationEditorWindowNodeProperties();
25  Initialized = true;
26  }

◆ Update()

void MarkOostveen.TimeRewizer.Editor.Baking.AnimationEditorWindowNodeHierarchy.Update ( )
package
29  {
30  GUILayout.Label("Snapshot Hierarchy");
31 
32  if (GUILayout.Button("Save"))
33  {
34  m_Parent.m_AttachedScript.SaveChanges();
35  m_Changes = false;
36  }
37 
38  if (GUILayout.Button("Add Snapshot"))
39  {
40  int selected =
42 
43  if (selected == 9999999)
44  {
45  m_Parent.m_AttachedScript.AddNode(0);
46  }
47  else
48  {
49  m_Parent.m_AttachedScript.AddNode(selected);
50  }
51 
52  m_Changes = true;
53  }
54 
55  m_ScrolPosition = GUILayout.BeginScrollView(m_ScrolPosition);
56  for (int i = 0; i < m_Parent.m_AttachedScript.Snapshots.Count; i++)
57  {
58  GUILayout.BeginHorizontal();
59 
61  {
62  GUILayout.Label(">");
63  }
64  else
65  {
66  GUILayout.Label(" ");
67  }
68 
69  GUILayout.Label(i.ToString());
70  if (GUILayout.Button("Select"))
71  {
73  m_NodeInpector.Initialize(m_Parent.m_AttachedScript.m_SelectedSnapshot);
74  m_Changes = true;
75  m_Selected = i;
76  GUI.FocusControl("");
77  }
78 
79  if (GUILayout.Button("Remove"))
80  {
82  m_Parent.m_AttachedScript.Snapshots.IndexOf(m_Parent.m_AttachedScript.Snapshots[i]));
83 
84  m_Changes = true;
85  }
86 
87  GUILayout.EndHorizontal();
88 
89  if (m_Selected == i)
90  {
91  m_NodeInpector.Update();
92  }
93  }
94 
95  GUILayout.EndScrollView();
96 
97  if (GUILayout.Button("Clear"))
98  {
99  m_Parent.m_AttachedScript.Clear();
100  m_Changes = true;
101  }
102 
103  if (m_Changes)
104  {
105  GUIContent content = new GUIContent("Warning: Possible hierarchy Changes NOT saved!");
106  GUILayout.Label(content, new GUIStyle() { fontStyle = FontStyle.Bold, fontSize = 10, wordWrap = true });
107  }
108  }
+ Here is the call graph for this function:

Property Documentation

◆ Initialized

bool MarkOostveen.TimeRewizer.Editor.Baking.AnimationEditorWindowNodeHierarchy.Initialized
getset
17 { get; set; }