Merge pull request #2202 from Areloch/ScriptObject_PopupFixes

Removes the GameObject folder insert for the scripted object creator grid
This commit is contained in:
Areloch 2018-02-14 01:28:56 -06:00 committed by GitHub
commit 6e6b43b63d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 117 additions and 303 deletions

View file

@ -34,7 +34,6 @@ EditorSettings.setDefaultValue( "orthoFOV", "50" );
EditorSettings.setDefaultValue( "orthoShowGrid", "1" );
EditorSettings.setDefaultValue( "currentEditor", "WorldEditorInspectorPlugin" );
EditorSettings.setDefaultValue( "newLevelFile", "tools/levels/BlankRoom.mis" );
EditorSettings.setDefaultValue( "newGameObjectDir", "scripts/server/gameObjects" );
if( isFile( "C:/Program Files/Torsion/Torsion.exe" ) )
EditorSettings.setDefaultValue( "torsionPath", "C:/Program Files/Torsion/Torsion.exe" );
@ -128,7 +127,7 @@ EditorSettings.setDefaultValue( "renderInfoText", "1" );
EditorSettings.beginGroup( "Grid" );
EditorSettings.setDefaultValue( "gridColor", "255 255 255 20" );
EditorSettings.setDefaultValue( "gridSize", "10 10 10" );
EditorSettings.setDefaultValue( "gridSize", "1 1 1" );
EditorSettings.setDefaultValue( "snapToGrid", "0" ); //<-- Not currently used
EditorSettings.setDefaultValue( "renderPlane", "0" );
EditorSettings.setDefaultValue( "renderPlaneHashes", "0" );

View file

@ -304,36 +304,6 @@ function EWCreatorWindow::navigate( %this, %address )
%this.addShapeIcon( %obj );
}
}
//Add a separate folder for Game Objects
if(isClass("Entity"))
{
if(%address $= "")
{
%this.addFolderIcon("GameObjects");
}
else
{
//find all GameObjectAssets
%assetQuery = new AssetQuery();
if(!AssetDatabase.findAssetType(%assetQuery, "GameObjectAsset"))
return 0; //if we didn't find ANY, just exit
%count = %assetQuery.getCount();
for(%i=0; %i < %count; %i++)
{
%assetId = %assetQuery.getAsset(%i);
%gameObjectAsset = AssetDatabase.acquireAsset(%assetId);
if(isFile(%gameObjectAsset.TAMLFilePath))
{
%this.addGameObjectIcon( %gameObjectAsset.gameObjectName );
}
}
}
}
}
if ( %this.tab $= "Meshes" )
@ -768,22 +738,6 @@ function EWCreatorWindow::addPrefabIcon( %this, %fullPath )
%this.contentCtrl.addGuiControl( %ctrl );
}
function EWCreatorWindow::addGameObjectIcon( %this, %gameObjectName )
{
%ctrl = %this.createIcon();
%ctrl.altCommand = "spawnGameObject( \"" @ %gameObjectName @ "\", true );";
%ctrl.iconBitmap = EditorIconRegistry::findIconByClassName( "Prefab" );
%ctrl.text = %gameObjectName;
%ctrl.class = "CreatorGameObjectIconBtn";
%ctrl.tooltip = "Spawn the " @ %gameObjectName @ " GameObject";
%ctrl.buttonType = "radioButton";
%ctrl.groupNum = "-1";
%this.contentCtrl.addGuiControl( %ctrl );
}
function CreatorPopupMenu::onSelect( %this, %id, %text )
{
%split = strreplace( %text, "/", " " );