mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-25 06:15:36 +00:00
Implements hook-look-up logic for shape assets to ShapeBaseData including autoimport handling
Also fixes issues with editing/spawning DBs via the asset browser
This commit is contained in:
parent
add299e1b8
commit
ead26ec18a
3 changed files with 44 additions and 6 deletions
|
|
@ -50,7 +50,7 @@ function AssetBrowser::buildDatablockPreview(%this, %assetDef, %previewData)
|
|||
//%previewData.assetFriendlyName = %assetDef.assetName;
|
||||
%previewData.assetDesc = %assetDef;
|
||||
%previewData.tooltip = %assetDef;
|
||||
%previewData.doubleClickCommand = "AssetBrowser.schedule(10, \"spawnDatablockObject\",\""@ %assetDef @"\");";//browseTo %assetDef.dirPath / %assetDef.assetName
|
||||
%previewData.doubleClickCommand = "DatablockEditorPlugin.openDatablock(" @ %assetDef @ ");";
|
||||
}
|
||||
|
||||
function spawnDatablockObject(%datablock)
|
||||
|
|
@ -60,8 +60,8 @@ function spawnDatablockObject(%datablock)
|
|||
%cmd = %class @ "::create(" @ %name @ ");";
|
||||
|
||||
%shapePath = ( %datablock.shapeFile !$= "" ) ? %datablock.shapeFile : %datablock.shapeName;
|
||||
%createCmd = "EWCreatorWindow.createObject( \\\"" @ %cmd @ "\\\" );";
|
||||
return eval("showImportDialog( \"" @ %shapePath @ "\", \"" @ %createCmd @ "\" );");
|
||||
%createCmd = "EWCreatorWindow.createObject( \"" @ %cmd @ "\" );";
|
||||
return eval(%createCmd);
|
||||
}
|
||||
|
||||
function AssetBrowser::renameDatablock(%this, %folderPath, %newFolderName)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue