mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-09 20:08:57 +03:00
Turned on snapping by default + fixed opening scene from filebrowser
This commit is contained in:
@@ -51,7 +51,7 @@ namespace Nuake
|
||||
|
||||
ImGuizmo::OPERATION CurrentOperation = ImGuizmo::TRANSLATE;
|
||||
ImGuizmo::MODE CurrentMode = ImGuizmo::WORLD;
|
||||
bool UseSnapping = false;
|
||||
bool UseSnapping = true;
|
||||
Vector3 CurrentSnapping = { 0.0f, 0.0f, 0.0f };
|
||||
Ref<Material> m_SelectedMaterial;
|
||||
Ref<Directory> m_CurrentDirectory;
|
||||
|
||||
@@ -536,13 +536,13 @@ namespace Nuake
|
||||
{
|
||||
Ref<Scene> scene = Scene::New();
|
||||
const std::string projectPath = file->GetAbsolutePath();
|
||||
if (!scene->Deserialize(FileSystem::ReadFile(projectPath, true)))
|
||||
if (!scene->Deserialize(json::parse(FileSystem::ReadFile(projectPath, true))))
|
||||
{
|
||||
Logger::Log("Failed loading scene: " + projectPath,"editor", CRITICAL);
|
||||
ImGui::PopFont();
|
||||
return;
|
||||
}
|
||||
|
||||
FileSystem::SetRootDirectory(projectPath + "/");
|
||||
scene->Path = FileSystem::AbsoluteToRelative(projectPath);
|
||||
Engine::LoadScene(scene);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user