private int CalcSize(ArticleNode d, ArticleType type, bool subactions, int index)
        {
            int size = 0;

            switch (type)
            {
            case ArticleType.Static:
            case ArticleType.Entry:
                if (!subactions)
                {
                    //if (d._actions != null)
                    //    foreach (MoveDefActionNode a in d._actions)
                    //        if (a.Children.Count > 0)
                    //            size += GetSize(a, ref lookupCount);
                }
                else
                {
                    //if (d._subActions != null)
                    //    foreach (MoveDefSubActionGroupNode grp in d.subActions.Children)
                    //        if (grp.Children[index].Children.Count > 0 || (grp.Children[index] as MoveDefActionNode)._actionRefs.Count > 0 || (grp.Children[index] as MoveDefActionNode)._build)
                    //            size += GetSize((grp.Children[index] as MoveDefActionNode), ref lookupCount);
                }
                break;
            }

            return(size);
        }
Example #2
0
        public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            ArticleNode article = context.Instance as ArticleNode;

            if (article != null && article._info != null && article._info._model != null)
            {
                return(new StandardValuesCollection(article._info._model.BoneCache.Select(n => n.ToString()).ToList()));
            }
            return(null);
        }
        public ArticleInfo(ArticleNode article, MDL0Node model, bool running)
        {
            _article = article;
            _model   = model;
            _running = running;

            _chr0List = new Dictionary <int, CHR0Node>();
            _srt0List = new Dictionary <int, SRT0Node>();
            _shp0List = new Dictionary <int, SHP0Node>();
            _vis0List = new Dictionary <int, VIS0Node>();
            _pat0List = new Dictionary <int, PAT0Node>();
            _clr0List = new Dictionary <int, CLR0Node>();

            _article._info = this;
        }
Example #4
0
 public Script(ArticleNode article)
 {
     _forceBuild = false;
     _scriptor   = new Scriptor(this);
 }