Browse Source

Refined Project Technique and Shader loading process.

JohnnyWahib 9 years ago
parent
commit
8ca00e070e

+ 0 - 15
Script/AtomicEditor/ui/frames/MainFrame.ts

@@ -68,19 +68,6 @@ class MainFrame extends ScriptWidget {
         this.subscribeToEvent("ProjectLoaded", (data) => {
             this.showWelcomeFrame(false);
             this.enableProjectMenus();
-
-        this.resourcePath = ToolCore.toolSystem.project.getResourcePath();
-        this.resourceCache = Atomic.getResourceCache();
-
-        //Check if a 'Techniques' folder exists within a project, if so, add it to ResourceCache Directory
-        if (Atomic.fileSystem.dirExists(this.resourcePath + "Techniques")){
-            this.resourceCache.addResourceDir(this.resourcePath + "Techniques");
-        }
-        //Check if a 'Shaders' folder exists within a project, if so, add it to ResourceCache Directory
-        if (Atomic.fileSystem.dirExists(this.resourcePath + "Shaders")) {
-            this.resourceCache.addResourceDir(this.resourcePath + "Shaders");
-        }
-
         });
 
         this.subscribeToEvent(EditorEvents.ProjectUnloadedNotification, (data) => {
@@ -201,8 +188,6 @@ class MainFrame extends ScriptWidget {
     inspectorlayout: Atomic.UILayout;
     mainToolbar: MainToolbar;
     menu: MainFrameMenu;
-    resourceCache: Atomic.ResourceCache;
-    resourcePath: String;
 
 }
 

+ 1 - 1
Script/AtomicEditor/ui/frames/inspector/MaterialInspector.ts

@@ -206,7 +206,7 @@ class MaterialInspector extends ScriptWidget {
         var technique = <Atomic.Technique>cache.getResource("Technique", techniqueReverseLookup[techniqueName]);
 
         if (technique == null)
-            technique = <Atomic.Technique>cache.getResource("Technique", techniqueName + ".xml");
+            technique = <Atomic.Technique>cache.getResource("Technique", "Techniques/" + techniqueName + ".xml");
 
         this.material.setTechnique(0, technique);
     }