コード例 #1
0
ファイル: SequenceEditor.cs プロジェクト: Dybuk/ME3Explorer
 public void GenerateGraph(int n)
 {
     graphEditor.nodeLayer.RemoveAllChildren();
     graphEditor.edgeLayer.RemoveAllChildren();
     Sequence seq = new Sequence(pcc, n);
     StartPosEvents = 0;
     StartPosActions = 0;
     StartPosVars = 0;
     Objects = new List<SObj>();
     if (CurrentObjects != null)
     {
         for (int i = 0; i < CurrentObjects.Count(); i++)
         {
             LoadObjectsAlt(CurrentObjects[i]);
         }
         CreateConnections();
     }
     foreach (SObj o in Objects)
     {
         o.refreshView = RefreshView;
         o.MouseDown += new PInputEventHandler(node_MouseDown);
     }
 }
コード例 #2
0
ファイル: SequenceEditor.cs プロジェクト: Dybuk/ME3Explorer
 public void GetObjects(int n)
 {
     CurrentObjects = new List<int>();
     listBox1.Items.Clear();
     Sequence seq = new Sequence(pcc, n);
     if (seq.SequenceObjects != null)
         for (int i = 0; i < seq.SequenceObjects.Count(); i++)
         {
             int m = seq.SequenceObjects[i] - 1;
             CurrentObjects.Add(m);
             listBox1.Items.Add("#" + m.ToString() + " :" + pcc.Exports[m].ObjectName + " class: " + pcc.Exports[m].ClassName);
         }
 }
コード例 #3
0
ファイル: SequenceEditor.cs プロジェクト: Dybuk/ME3Explorer
 public TreeNode FindSequences(PCCObject pcc, int index, bool wantFullName = false, bool refSeq = false)
 {
     string objectName = "";
     if (refSeq)
     {
         List<SaltPropertyReader.Property> p = SaltPropertyReader.getPropList(pcc, pcc.Exports[index].Data);
         for (int i = 0; i < p.Count(); i++)
             if (p[i].Name == "ObjName")
             {
                 objectName = p[i].Value.StringValue;
                 break;
             }
     }
     else
     {
         objectName = pcc.Exports[index].ObjectName;
     }
     TreeNode ret = new TreeNode("#" + index.ToString() + ": " + (wantFullName ? pcc.Exports[index].GetFullPath : objectName));
     ret.Name = index.ToString();
     Sequence seq = new Sequence(pcc, index);
     if (seq.SequenceObjects != null)
         for (int i = 0; i < seq.SequenceObjects.Count(); i++)
             if (pcc.Exports[seq.SequenceObjects[i] - 1].ClassName == "Sequence" || pcc.Exports[seq.SequenceObjects[i] - 1].ClassName.StartsWith("PrefabSequence"))
             {
                 TreeNode t = FindSequences(pcc, seq.SequenceObjects[i] - 1, wantFullName);
                 ret.Nodes.Add(t);
             }
             else if (pcc.Exports[seq.SequenceObjects[i] - 1].ClassName == "SequenceReference")
             {
                 var props = SaltPropertyReader.getPropList(pcc, pcc.Exports[seq.SequenceObjects[i] - 1].Data);
                 var propSequenceReference = props.FirstOrDefault(p => p.Name.Equals("oSequenceReference"));
                 if (propSequenceReference != null)
                 {
                     int n = propSequenceReference.Value.IntValue;
                     if (propSequenceReference.Value.IntValue < 0)
                     {
                         n += 1;
                         TreeNode t = new TreeNode("#" + n.ToString() + ": " + pcc.Imports[-n].Name + "(Import)");
                         t.Name = n.ToString();
                         ret.Nodes.Add(t);
                     }
                     else
                     {
                         TreeNode t = FindSequences(pcc, propSequenceReference.Value.IntValue - 1, wantFullName, true);
                         ret.Nodes.Add(t);
                     }
                 }
             }
     return ret;
 }