Browse Source

fix unspecified storage location mangle for new asset creation

AzaezelX 3 năm trước cách đây
mục cha
commit
fb75b21090

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.tscript

@@ -31,7 +31,7 @@ function AssetBrowser::createCpp(%this)
       
    %assetName = AssetBrowser.newAssetSettings.assetName;  
    
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";     
+   %assetPath = NewAssetTargetAddress.getText() @ "/";     
    
    //%tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %codePath = %assetPath @ %assetName @ ".cpp";

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cubemap.tscript

@@ -7,7 +7,7 @@ function AssetBrowser::createCubemapAsset(%this)
    %modulePath = "data/" @ %moduleName;
       
    %assetName = AssetBrowser.newAssetSettings.assetName;
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";  
+   %assetPath = NewAssetTargetAddress.getText() @ "/";  
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %shapeFilePath = %assetPath @ %assetName @ ".dae";

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.tscript

@@ -5,7 +5,7 @@ function AssetBrowser::createGUIAsset(%this)
       
    %assetName = AssetBrowser.newAssetSettings.assetName;
    
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
+   %assetPath = NewAssetTargetAddress.getText() @ "/";
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %guipath = %assetPath @ %assetName @ ".gui";

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.tscript

@@ -139,7 +139,7 @@ function AssetBrowser::importImageAsset(%this, %assetItem)
    %assetImportSuccessful = false;
    %assetId = %moduleName@":"@%assetName;
    
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
+   %assetPath = NewAssetTargetAddress.getText() @ "/";
    
    %assetFullPath = %assetPath @ "/" @ fileName(%filePath);
    

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.tscript

@@ -18,7 +18,7 @@ function AssetBrowser::createLevelAsset(%this)
    
    %assetName = AssetBrowser.newAssetSettings.assetName;
    
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
+   %assetPath = NewAssetTargetAddress.getText() @ "/";
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %levelPath = %assetPath @ %assetName @ ".mis";

+ 2 - 2
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.tscript

@@ -5,7 +5,7 @@ function AssetBrowser::createMaterialAsset(%this)
    %moduleName = AssetBrowser.newAssetSettings.moduleName;
    %modulePath = "data/" @ %moduleName;
    
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";   
+   %assetPath = NewAssetTargetAddress.getText() @ "/";   
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    
@@ -309,7 +309,7 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem)
    %assetImportSuccessful = false;
    %assetId = %moduleName@":"@%assetName;
    
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
+   %assetPath = NewAssetTargetAddress.getText() @ "/";
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %sgfPath = %assetPath @ %assetName @ ".sgf";
    %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension;

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/postFX.tscript

@@ -3,7 +3,7 @@ function AssetBrowser::createPostEffectAsset(%this)
    %moduleName = AssetBrowser.newAssetSettings.moduleName;
       
    %assetName = AssetBrowser.newAssetSettings.assetName;   
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
+   %assetPath = NewAssetTargetAddress.getText() @ "/";
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension;

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/prefab.tscript

@@ -5,7 +5,7 @@ function AssetBrowser::createPrefab(%this)
       
    %assetName = AssetBrowser.newAssetSettings.assetName;  
    
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";    
+   %assetPath = NewAssetTargetAddress.getText() @ "/";    
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %prefabFilePath = %assetPath @ %assetName @ ".prefab";

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.tscript

@@ -5,7 +5,7 @@ function AssetBrowser::createScriptAsset(%this)
       
    %assetName = AssetBrowser.newAssetSettings.assetName;  
    
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";    
+   %assetPath = NewAssetTargetAddress.getText() @ "/";    
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension;

+ 2 - 2
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.tscript

@@ -5,7 +5,7 @@ function AssetBrowser::createShapeAsset(%this)
       
    %assetName = AssetBrowser.newAssetSettings.assetName;
    
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
+   %assetPath = NewAssetTargetAddress.getText() @ "/";
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %shapeFilePath = %assetPath @ %assetName @ ".dae";
@@ -135,7 +135,7 @@ function AssetBrowser::importShapeAsset(%this, %assetItem)
    %assetImportSuccessful = false;
    %assetId = %moduleName@":"@%assetName;
    
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
+   %assetPath = NewAssetTargetAddress.getText() @ "/";
    %assetFullPath = %assetPath @ fileName(%filePath);
    
    %newAsset = new ShapeAsset()

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/stateMachine.tscript

@@ -2,7 +2,7 @@ function AssetBrowser::createStateMachineAsset(%this)
 {
    %assetName = AssetBrowser.newAssetSettings.assetName;
    %moduleName = AssetBrowser.selectedModule;
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";
+   %assetPath = NewAssetTargetAddress.getText() @ "/";
       
    %assetQuery = new AssetQuery();
    

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.tscript

@@ -18,7 +18,7 @@ function AssetBrowser::createTerrainAsset(%this)
    %assetName = AssetBrowser.newAssetSettings.assetName;      
    
    %assetType = AssetBrowser.newAssetSettings.assetType;
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";  
+   %assetPath = NewAssetTargetAddress.getText() @ "/";
    
    //Ensure anything we generate goes into the right directory
    $pref::Directories::Terrain = %assetPath;

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.tscript

@@ -6,7 +6,7 @@ function AssetBrowser::createTerrainMaterialAsset(%this)
    %assetName = AssetBrowser.newAssetSettings.assetName;      
    
    %assetType = AssetBrowser.newAssetSettings.assetType;
-   %assetPath = AssetBrowser.dirHandler.currentAddress @ "/";    
+   %assetPath = NewAssetTargetAddress.getText() @ "/";    
    
    %tamlpath = %assetPath @ %assetName @ ".asset.taml";
    %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension;