public bool LoadDecalMesh(DMesh dm, string path_to_file) { dm.Init(this); try { string file_data = System.IO.File.ReadAllText(path_to_file); JObject root = JObject.Parse(file_data); dm.Deserialize(root); dm.UpdateGLTextures(tm_decal); this.m_filepath_current_decal = path_to_file; this.Text = "Overload DMesh Editor - " + path_to_file; AddOutputText(string.Format("Loaded dmesh: {0}", path_to_file)); AddRecentFile(path_to_file); dm.dirty = false; if (!dm.WasConverted()) { m_dmesh.ConvertTrisToPolysRaw(); dm.dirty = true; } UpdateOptionLabels(); return(true); } catch (Exception ex) { Utility.DebugLog("Failed to load decal mesh: " + ex.Message); return(false); } }
public bool LoadDecalMesh(DMesh dm, string path_to_file) { try { string file_data = System.IO.File.ReadAllText(path_to_file); JObject root = JObject.Parse(file_data); dm.Deserialize(root); return(true); } catch (Exception ex) { Utility.DebugLog("Failed to load decal mesh: " + ex.Message); return(false); } }