[nostalgia/gfx/studio] Make editors use Project::loadObj for their primary assets
This commit is contained in:
@@ -72,7 +72,7 @@ PaletteEditorImGui::PaletteEditorImGui(studio::Context &sctx, ox::StringParam pa
|
||||
Editor(sctx, std::move(path)),
|
||||
m_sctx(sctx),
|
||||
m_tctx(sctx.tctx),
|
||||
m_pal(*keel::readObj<Palette>(keelCtx(m_tctx), itemPath()).unwrapThrow()) {
|
||||
m_pal(m_sctx.project->loadObj<Palette>(itemPath()).unwrapThrow()) {
|
||||
undoStack()->changeTriggered.connect(this, &PaletteEditorImGui::handleCommand);
|
||||
m_pageRenameDlg.inputSubmitted.connect(this, &PaletteEditorImGui::renamePage);
|
||||
}
|
||||
|
@@ -49,7 +49,7 @@ TileSheetEditorModel::TileSheetEditorModel(
|
||||
m_sctx{sctx},
|
||||
m_tctx{m_sctx.tctx},
|
||||
m_path{std::move(path)},
|
||||
m_img{*readObj<TileSheet>(keelCtx(m_tctx), m_path).unwrapThrow()},
|
||||
m_img{m_sctx.project->loadObj<TileSheet>(m_path).unwrapThrow()},
|
||||
// ignore failure to load palette
|
||||
m_pal{readObj<Palette>(keelCtx(m_tctx), m_img.defaultPalette).value},
|
||||
m_undoStack{undoStack} {
|
||||
|
Reference in New Issue
Block a user