Skip to content

Commit

Permalink
solved last folder delete issues
Browse files Browse the repository at this point in the history
  • Loading branch information
AitorSimona committed Jun 16, 2020
1 parent 173e917 commit c63a64a
Show file tree
Hide file tree
Showing 15 changed files with 10 additions and 94 deletions.
7 changes: 0 additions & 7 deletions CENTRAL 3D/Game/Assets/New Folder 3.meta

This file was deleted.

7 changes: 0 additions & 7 deletions CENTRAL 3D/Game/Assets/New Folder 4.meta

This file was deleted.

7 changes: 0 additions & 7 deletions CENTRAL 3D/Game/Assets/New Folder 5.meta

This file was deleted.

2 changes: 1 addition & 1 deletion CENTRAL 3D/Game/Assets/Shaders/LinePoint.glsl.meta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"DATE": 1592338820,
"DATE": 1592344668,
"ResourceData": {
"FORMAT": 36385
},
Expand Down
2 changes: 1 addition & 1 deletion CENTRAL 3D/Game/Assets/Shaders/OutlineShader.glsl.meta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"DATE": 1592338820,
"DATE": 1592344668,
"ResourceData": {
"FORMAT": 36385
},
Expand Down
2 changes: 1 addition & 1 deletion CENTRAL 3D/Game/Assets/Shaders/Standard.glsl.meta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"DATE": 1592338820,
"DATE": 1592344668,
"ResourceData": {
"FORMAT": 36385
},
Expand Down
2 changes: 1 addition & 1 deletion CENTRAL 3D/Game/Assets/Shaders/ZDrawer.glsl.meta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"DATE": 1592338820,
"DATE": 1592344668,
"ResourceData": {
"FORMAT": 36385
},
Expand Down
7 changes: 0 additions & 7 deletions CENTRAL 3D/Game/Assets/TestFolder.meta

This file was deleted.

7 changes: 0 additions & 7 deletions CENTRAL 3D/Game/Assets/TestFolder/.meta

This file was deleted.

33 changes: 0 additions & 33 deletions CENTRAL 3D/Game/Assets/TestFolder/TestShader.glsl

This file was deleted.

7 changes: 0 additions & 7 deletions CENTRAL 3D/Game/Assets/TestFolder/TestShader.glsl.meta

This file was deleted.

7 changes: 0 additions & 7 deletions CENTRAL 3D/Game/Assets/TestFolder/sceeeene.scene.meta

This file was deleted.

7 changes: 0 additions & 7 deletions CENTRAL 3D/Game/Assets/TestFolder/testmat2.mat.meta

This file was deleted.

6 changes: 5 additions & 1 deletion CENTRAL 3D/Source/PanelProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,18 @@ void PanelProject::CreateResourceHandlingPopup()
//EngineApp->resources->AddResourceToFolder(new_folder);

// --- Create meta ---
std::string meta_path = new_folder->GetResourceFile();
meta_path.pop_back();
ImporterMeta* IMeta = App->resources->GetImporter<ImporterMeta>();
ResourceMeta* meta = (ResourceMeta*)App->resources->CreateResourceGivenUID(Resource::ResourceType::META, new_folder->GetResourceFile(), new_folder->GetUID());
ResourceMeta* meta = (ResourceMeta*)App->resources->CreateResourceGivenUID(Resource::ResourceType::META, meta_path, new_folder->GetUID());

if (meta)
IMeta->Save(meta);

IFolder->Save((ResourceFolder*)new_folder);

App->resources->AddResourceToFolder(new_folder);

ImGui::CloseCurrentPopup();
}

Expand Down
1 change: 1 addition & 0 deletions CENTRAL 3D/Source/ResourceShader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ void ResourceShader::OnDelete()

FreeMemory();
App->fs->Remove(resource_file.c_str());
App->fs->Remove(original_file.c_str());

App->resources->RemoveResourceFromFolder(this);
App->resources->ONResourceDestroyed(this);
Expand Down

0 comments on commit c63a64a

Please sign in to comment.