mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-05 13:30:34 +00:00
Cleanup of some log errors and spam with assets
This commit is contained in:
parent
80eb4ab2ba
commit
2ce48d0e6f
3 changed files with 5 additions and 78 deletions
|
|
@ -256,7 +256,7 @@ function AssetBrowser::selectAsset( %this, %asset )
|
|||
%this.changeAsset();
|
||||
}
|
||||
|
||||
Inspector.refresh();
|
||||
EWInspectorWindow.refresh();
|
||||
|
||||
AssetBrowser.hideDialog();
|
||||
}
|
||||
|
|
@ -2242,79 +2242,6 @@ function EWorldEditor::onControlDropped( %this, %payload, %position )
|
|||
eval(%buildCommand);
|
||||
}
|
||||
|
||||
/*if(%assetType $= "ImageAsset")
|
||||
{
|
||||
echo("WorldEditor::onControlDropped - dropped an ImageAsset onto the editor window. Todo: Implement dropping image/material into scene");
|
||||
}
|
||||
else if(%assetType $= "ShapeAsset")
|
||||
{
|
||||
echo("DROPPED A SHAPE ON THE EDITOR WINDOW!");
|
||||
|
||||
/*%staticShapeObjDef = AssetDatabase.acquireAsset("Core_GameObjects:StaticShapeObject");
|
||||
|
||||
%newEntity = %staticShapeObjDef.createObject();
|
||||
|
||||
%newEntity.position = %pos;
|
||||
%newEntity-->MeshComponent.MeshAsset = %module @ ":" @ %asset;
|
||||
|
||||
%newEntity.dirtyGameObject = true; //because if we're specifically setting the mesh asset, it's dirty*/
|
||||
|
||||
/*%newEntity = new TSStatic()
|
||||
{
|
||||
position = %pos;
|
||||
shapeAsset = %module @ ":" @ %asset;
|
||||
};
|
||||
|
||||
getScene(0).add(%newEntity);
|
||||
|
||||
EWorldEditor.clearSelection();
|
||||
EWorldEditor.selectObject(%newEntity);
|
||||
}
|
||||
else if(%assetType $= "MaterialAsset")
|
||||
{
|
||||
echo("WorldEditor::onControlDropped - dropped an MaterialAsset onto the editor window. Todo: Implement dropping image/material into scene");
|
||||
}
|
||||
else if(%assetType $= "GameObjectAsset")
|
||||
{
|
||||
echo("WorldEditor::onControlDropped - dropped an GameObjectAsset onto the editor window.");
|
||||
|
||||
%goAssetDef = AssetDatabase.acquireAsset(%module @ ":" @%asset);
|
||||
|
||||
AssetBrowser.dragAndDropGameObjectAsset(%goAssetDef, EWorldEditor);
|
||||
}
|
||||
else if(%assetType $= "ComponentAsset")
|
||||
{
|
||||
%newEntity = new Entity()
|
||||
{
|
||||
position = %pos;
|
||||
};
|
||||
|
||||
%assetDef = AssetDatabase.acquireAsset(%module @ ":" @ %asset);
|
||||
|
||||
if(%assetDef.componentClass $= "Component")
|
||||
eval("$tmpVar = new " @ %assetDef.componentClass @ "() { class = " @ %assetDef.componentName @ "; }; %newEntity.add($tmpVar);");
|
||||
else
|
||||
eval("$tmpVar = new " @ %assetDef.componentClass @ "() {}; %newEntity.add($tmpVar);");
|
||||
|
||||
getScene(0).add(%newEntity);
|
||||
|
||||
EWorldEditor.clearSelection();
|
||||
EWorldEditor.selectObject(%newEntity);
|
||||
}
|
||||
else if(%assetType $= "ScriptAsset") //do we want to do it this way?
|
||||
{
|
||||
%newEntity = new Entity()
|
||||
{
|
||||
position = %pos;
|
||||
class = %asset;
|
||||
};
|
||||
|
||||
getScene(0).add(%newEntity);
|
||||
|
||||
EWorldEditor.clearSelection();
|
||||
EWorldEditor.selectObject(%newEntity);
|
||||
}*/
|
||||
|
||||
EWorldEditor.isDirty = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -458,7 +458,7 @@ function AssetBrowser::buildMaterialAssetPreview(%this, %assetDef, %previewData)
|
|||
else if(%assetDef.materialDefinitionName.diffuseMapAsset[0] !$= "")
|
||||
{
|
||||
%imgAsset = AssetDatabase.acquireAsset(%assetDef.materialDefinitionName.diffuseMapAsset[0]);
|
||||
%previewData.previewImage = %imgAsset.getImageFilename();
|
||||
%previewData.previewImage = %imgAsset.getImagePath();
|
||||
}
|
||||
else
|
||||
%previewData.previewImage = "tools/assetBrowser/art/materialIcon";
|
||||
|
|
@ -510,7 +510,6 @@ function GuiInspectorTypeMaterialAssetPtr::onControlDropped( %this, %payload, %p
|
|||
|
||||
if(%assetType $= "MaterialAsset")
|
||||
{
|
||||
echo("DROPPED A MATERIAL ON A MATERIAL ASSET COMPONENT FIELD!");
|
||||
//%assetDef = AssetDatabase.acquireAsset(%module @ ":" @ %assetName);
|
||||
|
||||
%this.setMaterialAsset(%module @ ":" @ %assetName);
|
||||
|
|
|
|||
|
|
@ -239,7 +239,8 @@ function directoryHandler::expandTreeToAddress(%this, %address)
|
|||
{
|
||||
//break down the address
|
||||
%folderCount = getTokenCount(%address, "/");
|
||||
%this.treeCtrl.expandItem(0);
|
||||
%rootId = AssetBrowser-->filterTree.findItemByName("Content");
|
||||
%this.treeCtrl.expandItem(%rootId);
|
||||
|
||||
if(startsWith(%address, "Data/") || startsWith(%address, "Tools/") || startsWith(%address, "Core/"))
|
||||
{
|
||||
|
|
@ -258,7 +259,7 @@ function directoryHandler::expandTreeToAddress(%this, %address)
|
|||
%this.treeCtrl.expandItem(%curItem);
|
||||
}
|
||||
|
||||
%this.treeCtrl.expandItem(0);
|
||||
%this.treeCtrl.expandItem(%rootId);
|
||||
}
|
||||
|
||||
function directoryHandler::createFolder(%this, %folderPath)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue