private void loadConfig(ConfigNode node) { if (Global.Debug3) Utils.Log("loadConfig start"); _ok = false; _transformNames = null; _transforms = null; kspTextureInfo = null; if (_gui != null) Destroy(_gui); _gui = null; _boundingBox = null; _transformsOption = TransformOption.USE_ALL; if (_baseTexture != null) _baseTexture.cleanUp(); _baseTexture = null; if (_imageModifiers != null) _imageModifiers.cleanUp(); _imageModifiers = null; if (node.HasNode("ASP_BOUNDINGBOX")) { if (_boundingBox == null) _boundingBox = new BoundingBox(); ConfigNode n = node.GetNode("ASP_BOUNDINGBOX"); _boundingBox.load(n); } if (node.HasValue("transformsOption")) _transformsOption = (TransformOption)ConfigNode.ParseEnum(typeof(TransformOption), node.GetValue("transformsOption")); if (node.HasNode("ASP_BASETEXTURE")) { ConfigNode n = node.GetNode("ASP_BASETEXTURE"); _baseTexture = IM.BaseTexture.CreateBaseTexture(n); _baseTexture.load(n); } if (node.HasNode("ASP_IMAGEMODIFIERS")) { _imageModifiers = new ImageModifiers(); ConfigNode n = node.GetNode("ASP_IMAGEMODIFIERS"); _imageModifiers.load(n); } if (label != string.Empty) Events["editTextureEvent"].guiName = label; }