mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 15:14:35 +00:00
Fixes issue of not being able to create GameModes or blank MaterialAssets from the Asset Browser
This commit is contained in:
parent
46bcd183f7
commit
d35a305149
5 changed files with 124 additions and 21 deletions
|
|
@ -255,8 +255,10 @@ function CreateNewAsset()
|
|||
|
||||
Canvas.popDialog(AssetBrowser_newAsset);
|
||||
|
||||
%assetTypeGroup = AssetBrowser::getAssetTypeGroup(%assetType);
|
||||
|
||||
//Load it
|
||||
if(!AssetDatabase.isDeclaredAsset(%moduleName @ ":" @ %assetName))
|
||||
if(%assetTypeGroup $= "Asset" && !AssetDatabase.isDeclaredAsset(%moduleName @ ":" @ %assetName))
|
||||
{
|
||||
%moduleDef = ModuleDatabase.findModule(%moduleName,1);
|
||||
AssetDatabase.addDeclaredAsset(%moduleDef, %assetFilePath);
|
||||
|
|
@ -270,18 +272,7 @@ function CreateNewAsset()
|
|||
%callbackCommand = "" @ AssetBrowser_newAsset.callbackFunc @ "(\"" @ %moduleName @ ":" @ %assetName @ "\");";
|
||||
eval(%callbackCommand);
|
||||
}
|
||||
|
||||
//Update the selection to immediately jump to the new asset
|
||||
/*AssetBrowser-->filterTree.clearSelection();
|
||||
%ModuleItem = AssetBrowser-->filterTree.findItemByName(%moduleName);
|
||||
%assetTypeId = AssetBrowser-->filterTree.findChildItemByName(%ModuleItem, %assetType);
|
||||
|
||||
AssetBrowser-->filterTree.selectItem(%assetTypeId);
|
||||
|
||||
%selectedItem = AssetBrowser-->filterTree.getSelectedItem();
|
||||
AssetBrowser-->filterTree.scrollVisibleByObjectId(%selectedItem);
|
||||
|
||||
AssetBrowser-->filterTree.buildVisibleTree(); */
|
||||
|
||||
AssetBrowser.refresh();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue