public static OCICharMale Add(string _path) { ChaControl chara = Singleton <Character> .Instance.CreateChara((byte)0, Singleton <Scene> .Instance.commonSpace, -1, (ChaFileControl)null); chara.chaFile.LoadCharaFile(_path, byte.MaxValue, true, true); chara.fileStatus.neckLookPtn = 3; OICharInfo _info = new OICharInfo(chara.chaFile, Studio.Studio.GetNewIndex()); return(AddObjectMale.Add(chara, _info, (ObjectCtrlInfo)null, (TreeNodeObject)null, true, Studio.Studio.optionSystem.initialPosition)); }
public static OCICharMale Load( OICharInfo _info, ObjectCtrlInfo _parent, TreeNodeObject _parentNode) { OCICharMale ociCharMale = AddObjectMale.Add(Singleton <Character> .Instance.CreateChara((byte)0, Singleton <Scene> .Instance.commonSpace, -1, _info.charFile), _info, _parent, _parentNode, false, -1); foreach (KeyValuePair <int, List <ObjectInfo> > keyValuePair in _info.child) { KeyValuePair <int, List <ObjectInfo> > v = keyValuePair; AddObjectAssist.LoadChild(v.Value, (ObjectCtrlInfo)ociCharMale, ociCharMale.dicAccessoryPoint.First <KeyValuePair <TreeNodeObject, int> >((Func <KeyValuePair <TreeNodeObject, int>, bool>)(x => x.Value == v.Key)).Key); } return(ociCharMale); }
public void AddMale(string _path) { OCICharMale ociCharMale = AddObjectMale.Add(_path); Singleton <UndoRedoManager> .Instance.Clear(); if (Studio.Studio.optionSystem.autoHide) { this.rootButtonCtrl.OnClick(-1); } if (!Studio.Studio.optionSystem.autoSelect || ociCharMale == null) { return; } this.m_TreeNodeCtrl.SelectSingle(ociCharMale.treeNodeObject, true); }
public static void LoadChild( ObjectInfo _child, ObjectCtrlInfo _parent = null, TreeNodeObject _parentNode = null) { switch (_child.kind) { case 0: OICharInfo _info = _child as OICharInfo; if (_info.sex == 1) { AddObjectFemale.Load(_info, _parent, _parentNode); break; } AddObjectMale.Load(_info, _parent, _parentNode); break; case 1: AddObjectItem.Load(_child as OIItemInfo, _parent, _parentNode); break; case 2: AddObjectLight.Load(_child as OILightInfo, _parent, _parentNode); break; case 3: AddObjectFolder.Load(_child as OIFolderInfo, _parent, _parentNode); break; case 4: AddObjectRoute.Load(_child as OIRouteInfo, _parent, _parentNode); break; case 5: AddObjectCamera.Load(_child as OICameraInfo, _parent, _parentNode); break; } }