mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-20 04:34:48 +00:00
make mat editor list and set soundassets
This commit is contained in:
parent
adbd6d0711
commit
c2fdb733fa
|
|
@ -95,11 +95,15 @@ function MaterialEditorGui::open(%this)
|
|||
|
||||
%sounds = "<None>" TAB "<Soft>" TAB "<Hard>" TAB "<Metal>" TAB "<Snow>"; // Default sounds
|
||||
|
||||
// Get custom sound datablocks
|
||||
foreach (%db in DataBlockSet)
|
||||
%assetQuery = new AssetQuery();
|
||||
AssetDatabase.findAssetType(%assetQuery, "SoundAsset");
|
||||
|
||||
%count = %assetQuery.getCount();
|
||||
// Get custom sound assets
|
||||
for(%i=0; %i < %count; %i++)
|
||||
{
|
||||
if (%db.isMemberOfClass("SFXTrack"))
|
||||
%sounds = %sounds TAB %db.getName();
|
||||
%assetId = %assetQuery.getAsset(%i);
|
||||
%sounds = %sounds TAB %assetId;
|
||||
}
|
||||
|
||||
%count = getFieldCount(%sounds);
|
||||
|
|
@ -1504,7 +1508,7 @@ function MaterialEditorGui::updateBehaviorSound(%this, %type, %sound)
|
|||
}
|
||||
|
||||
%this.updateActiveMaterial(%type @ "SoundId", %defaultId);
|
||||
%this.updateActiveMaterial("custom" @ %type @ "Sound", %customName);
|
||||
%this.updateActiveMaterial("custom" @ %type @ "SoundAsset", %customName);
|
||||
}
|
||||
|
||||
function MaterialEditorGui::updateSoundPopup(%this, %type, %defaultId, %customName)
|
||||
|
|
|
|||
Loading…
Reference in a new issue