コード例 #1
0
 public FinalTransitionResultControl(FinalTransitionResultConstructionParams csParam) : base(csParam)
 {
     InitConstruction();
     NodeName          = csParam.NodeName;
     IsOnlyReturnValue = true;
     AddLinkPinInfo("FinalTransitionResultInHandle", mCtrlValueInputHandle, null);
 }
コード例 #2
0
        async System.Threading.Tasks.Task InitializeLinkedNodesContainer()
        {
            var param  = CSParam as AnimStateTransitionControlConstructionParams;
            var assist = this.HostNodesContainer.HostControl;

            if (mLinkedNodesContainer == null)
            {
                var data = new SubNodesContainerData()
                {
                    ID    = Id,
                    Title = HostNodesContainer.TitleString + "/" + param.NodeName + ":" + this.Id.ToString(),
                };
                mLinkedNodesContainer = await assist.GetSubNodesContainer(data);

                if (!data.IsCreated)
                {
                    return;
                }
            }
            // 读取graph
            var tempFile      = assist.GetGraphFileName(assist.LinkedCategoryItemName);
            var linkXndHolder = await EngineNS.IO.XndHolder.LoadXND(tempFile, EngineNS.Thread.Async.EAsyncTarget.AsyncEditor);

            bool bLoaded = false;

            if (linkXndHolder != null)
            {
                var linkNode = linkXndHolder.Node.FindNode("SubLinks");
                var idStr    = Id.ToString();
                foreach (var node in linkNode.GetNodes())
                {
                    if (node.GetName() == idStr)
                    {
                        await mLinkedNodesContainer.Load(node);

                        bLoaded = true;
                        break;
                    }
                }
            }
            if (bLoaded)
            {
            }
            else
            {
                var csParam = new FinalTransitionResultConstructionParams()
                {
                    CSType             = param.CSType,
                    NodeName           = "Result",
                    HostNodesContainer = mLinkedNodesContainer,
                    ConstructParam     = "",
                };
                var node = mLinkedNodesContainer.AddOrigionNode(typeof(FinalTransitionResultControl), csParam, 300, 0) as FinalTransitionResultControl;
                node.IsDeleteable = false;
            }
        }