private static void TrimForPlanning_(BaseNode n) { if (n is ReferencedBehavior) { ReferencedBehavior refBeh = n as ReferencedBehavior; if (!refBeh.IsPlanningExpand()) { refBeh.ReferenceFilename = null; } } foreach (BaseNode child in n.Children) { TrimForPlanning_(child); } }
private static void ExpandRefBehavior(Node node) { if (node is ReferencedBehavior) { ReferencedBehavior refBeh = node as ReferencedBehavior; bool bPlanningExpand = refBeh.IsPlanningExpand(); if (bPlanningExpand) { refBeh.ReferenceFilename = refBeh.ReferenceFilename; } } else { foreach (BaseNode n in node.Children) { Node nn = n as Node; ExpandRefBehavior(nn); } } }