コード例 #1
0
        public LAAnimPoseStreamControl(LAAnimPoseStreamControlConstructionParams csParam)
            : base(csParam)
        {
            InitConstruction();
            FileName = csParam.FileName;
            //WidthScale = csParam.WidthScale;
            //AnimationFilePath = csParam.AnimationFilePath;

            //DefaultState = csParam.DefaultState;
            NodeName = csParam.NodeName;
            //Width = TimeLength.GetWidthByTime(Duration, WidthScale) + ExtraWidth;
            OnAdded = csParam.OnAdded;
            BindingTemplateClassInstanceProperties();


            IsOnlyReturnValue = true;
            InitializeLinkControl(csParam);

            var clip = EngineNS.Bricks.Animation.AnimNode.AnimationClip.CreateSync(FileName);

            if (clip != null)
            {
                OnAdded?.Invoke(EngineNS.RName.GetRName(clip.GetElementProperty(EngineNS.Bricks.Animation.AnimNode.ElementPropertyType.EPT_Skeleton)));
            }
        }
コード例 #2
0
        void InitializeLinkControl(LAAnimPoseStreamControlConstructionParams csParam)
        {
            mCtrlValueLinkHandle           = ValueLinkHandle;
            mCtrlValueLinkHandle.MultiLink = false;

            AddLinkPinInfo("AnimPoseOutHandle", mCtrlValueLinkHandle, null);
            TitleImage = TryFindResource("AnimationNode_AnimationClip_64x") as ImageSource;
        }