コード例 #1
0
        public void CreateVIS0()
        {
            if (!(_targetModel is MDL0Node))
            {
                return;
            }

            BRRESNode     group = null;
            BRESEntryNode n     = null;

            if ((n = TargetAnimation as BRESEntryNode) != null &&
                (group = n.Parent.Parent as BRRESNode) != null)
            {
                _vis0 = group.CreateResource <VIS0Node>(SelectedCHR0.Name);
                foreach (string s in VIS0Indices.Keys)
                {
                    VIS0EntryNode node = null;
                    if ((node = (VIS0EntryNode)_vis0.FindChild(s, true)) == null && ((MDL0BoneNode)((ResourceNode)_targetModel).FindChildByType(s, true, ResourceType.MDL0Bone)).BoneIndex != 0 && s != "EyeYellowM")
                    {
                        node      = _vis0.CreateEntry();
                        node.Name = s;
                        node.MakeConstant(true);
                    }
                }
            }
        }
コード例 #2
0
ファイル: BRRESNodes.cs プロジェクト: 0000duck/brawltools
        public bool GetSCN0(AnimType focusType)
        {
            BRESEntryNode focusFile = GetAnimation(focusType);

            if (focusFile == null)
            {
                _scn0 = null;
                return(false);
            }
            if (TargetModel != null && (_scn0 = (SCN0Node)TargetModel.RootNode.FindChildByType(focusFile.Name, true, ResourceType.SCN0)) != null)
            {
                return(true);
            }
            if (_externalAnimationsNode != null && (_scn0 = (SCN0Node)_externalAnimationsNode.FindChildByType(focusFile.Name, true, ResourceType.SCN0)) != null)
            {
                return(true);
            }
            return(false);
        }