public bool AppendPropModelItem(PropModelItem pPropModelItem, out string pErrorText) { // string puppetName = pBodyModelItem.PuppetName; PropModelSumProp prop = null; if (Props != null) { prop = SearchProp(pPropModelItem.Name); } else { Props = new List <PropModelSumProp>(); } if (prop == null) { prop = new PropModelSumProp(pPropModelItem.Name, Archiver); Props.Add(prop); } return(prop.AppendData(pPropModelItem, out pErrorText)); }
public bool AppendData(PropModelItem pPropModelItem, out string pErrorText) { pErrorText = null; MultiPart = (pPropModelItem.Parts != null) && (pPropModelItem.Parts.Count > 1); if ((pPropModelItem.Templates != null) && (pPropModelItem.Templates.Count > 1)) { Variants = new List <string>(); foreach (Template item in pPropModelItem.Templates) { string variantName = item.Name.Remove(0, _rootPathLength); int dotIndex = variantName.LastIndexOf('.'); variantName = variantName.Remove(dotIndex); Variants.Add(variantName); } } if (!InsertAnimations(pPropModelItem.Animations, out pErrorText)) { return(false); } return(ReadPropDescription(out pErrorText)); }