mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
Removes the Library tabs from the World and GUI editors to avoid confusion. Adjusts the creation namespace from ECreatorWindow to a dummy object ObjectCreator to handle invoking for creation
This commit is contained in:
parent
82b33b757a
commit
a30e9c6242
17 changed files with 83 additions and 480 deletions
|
|
@ -35,6 +35,9 @@ function AssetBrowser::initialize(%this)
|
|||
if(!isObject(AssetPreviewArray))
|
||||
new ArrayObject(AssetPreviewArray);
|
||||
|
||||
if(!isObject(ObjectCreator))
|
||||
new ScriptObject(ObjectCreator);
|
||||
|
||||
if(!isObject(%this.dirHandler))
|
||||
{
|
||||
%this.dirHandler = makedirectoryHandler(AssetBrowser-->filterTree, "cache,shaderCache", "");
|
||||
|
|
@ -2301,7 +2304,7 @@ function EWorldEditor::onControlDropped( %this, %payload, %position )
|
|||
|
||||
%assetType = %payload.assetType;
|
||||
|
||||
%pos = EWCreatorWindow.getCreateObjectPosition(); //LocalClientConnection.camera.position;
|
||||
%pos = ObjectCreator.getCreateObjectPosition(); //LocalClientConnection.camera.position;
|
||||
%module = %payload.moduleName;
|
||||
%asset = %payload.assetName;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ function AssetBrowser::onCreatorEditorDropped(%this, %assetDef, %position)
|
|||
%camPos = LocalClientConnection.camera.getPosition();
|
||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||
|
||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
||||
%pos = ObjectCreator.getCreateObjectPosition();
|
||||
|
||||
if(%rayResult != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ function spawnDatablockObject(%datablock)
|
|||
%cmd = %class @ "::create(" @ %name @ ");";
|
||||
|
||||
%shapePath = ( %datablock.shapeAsset !$= "" ) ? %datablock.shapeFile : %datablock.shapeName;
|
||||
%createCmd = "EWCreatorWindow.createObject( \"" @ %cmd @ "\" );";
|
||||
%createCmd = "ObjectCreator.createObject( \"" @ %cmd @ "\" );";
|
||||
return eval(%createCmd);//eval("showImportDialog( \"" @ %shapePath @ "\", \"" @ %createCmd @ "\" );");
|
||||
}
|
||||
|
||||
|
|
@ -171,7 +171,7 @@ function AssetBrowser::onDatablockEditorDropped(%this, %assetDef, %position)
|
|||
%camPos = LocalClientConnection.camera.getPosition();
|
||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||
|
||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
||||
%pos = ObjectCreator.getCreateObjectPosition();
|
||||
|
||||
if(%rayResult != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ function AssetBrowser::dragAndDropGameObjectAsset(%this, %assetDef, %dropTarget)
|
|||
|
||||
getScene(0).add(%gameObject);
|
||||
|
||||
%pos = EWCreatorWindow.getCreateObjectPosition(); //LocalClientConnection.camera.position;
|
||||
%pos = ObjectCreator.getCreateObjectPosition(); //LocalClientConnection.camera.position;
|
||||
|
||||
%gameObject.position = %pos;
|
||||
|
||||
|
|
@ -131,7 +131,7 @@ function AssetBrowser::onGameObjectAssetEditorDropped(%this, %assetDef, %positio
|
|||
%camPos = LocalClientConnection.camera.getPosition();
|
||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||
|
||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
||||
%pos = ObjectCreator.getCreateObjectPosition();
|
||||
|
||||
if(%rayResult != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ function AssetBrowser::onPrefabEditorDropped(%this, %assetDef, %position)
|
|||
%camPos = LocalClientConnection.camera.getPosition();
|
||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||
|
||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
||||
%pos = ObjectCreator.getCreateObjectPosition();
|
||||
|
||||
if(%rayResult != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ function AssetBrowser::onSoundAssetEditorDropped(%this, %assetDef, %position)
|
|||
%camPos = LocalClientConnection.camera.getPosition();
|
||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||
|
||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
||||
%pos = ObjectCreator.getCreateObjectPosition();
|
||||
|
||||
if(%rayResult != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ function AssetBrowser::addCreatorClass(%this, %class, %name, %buildfunc)
|
|||
else
|
||||
%cmd = "ObjectBuilderGui." @ %method @ "();";
|
||||
|
||||
%buildfunc = "ObjectBuilderGui.newObjectCallback = \"AssetBrowser.onFinishCreateObject\"; EWCreatorWindow.createObject( \"" @ %cmd @ "\" );";
|
||||
%buildfunc = "ObjectBuilderGui.newObjectCallback = \"AssetBrowser.onFinishCreateObject\"; ObjectCreator.createObject( \"" @ %cmd @ "\" );";
|
||||
}
|
||||
|
||||
%args = new ScriptObject();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue