mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-16 00:54:54 +00:00
Fixes and cleans up various issues and error spam for core and tools folders
Also: Fixes error spam about CreatorIconArray Fixes error spam about duplicate uses of various materials Converts a number of materials to be packed into the mat assets for cleanliness and preventing unwanted duplicate exec's Removed some extraneous misconvert '.asset.taml' files Fixes 'cannot compile shader' error when trying to use the viz modes Fixed a some instances of guiControlProfiles not being actually defined Fixed some instances of guiControlProfiles being duplicated
This commit is contained in:
parent
0fad36787f
commit
2c999008f1
87 changed files with 373 additions and 1245 deletions
|
|
@ -1,6 +0,0 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
scriptFile="@assetFile=WorldEditorTreeWindow.ed.gui"
|
||||
GUIFile="@assetFile=WorldEditorTreeWindow.ed.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -2,6 +2,6 @@
|
|||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="AL_ShadowVizOverlayCtrl"
|
||||
scriptFile="@assetFile=shadowViz.gui"
|
||||
scriptFile="@assetFile=shadowViz.tscript"
|
||||
GUIFile="@assetFile=shadowViz.gui"
|
||||
VersionId="1" />
|
||||
|
|
|
|||
|
|
@ -68,10 +68,7 @@ function initializeWorldEditor()
|
|||
exec("./scripts/cameraCommands.ed." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/probeBake.ed." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/visibility/visibilityLayer.ed." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/visibility/lightViz." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/visibility/shadowViz." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/visibility/probeViz." @ $TorqueScriptFileExtension);
|
||||
exec("./scripts/visibility/miscViz." @ $TorqueScriptFileExtension);
|
||||
|
||||
exec("tools/gui/postFxEditor." @ $TorqueScriptFileExtension );
|
||||
exec("tools/gui/renderTargetVisualizer.ed." @ $TorqueScriptFileExtension);
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ function EditorGui::init(%this)
|
|||
ETerrainEditor.init();
|
||||
|
||||
//Creator.init();
|
||||
ObjectCreator.init();
|
||||
//ObjectCreator.init();
|
||||
ObjectBuilderGui.init();
|
||||
|
||||
%this.setMenuDefaultState();
|
||||
|
|
|
|||
|
|
@ -20,104 +20,8 @@
|
|||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
function ObjectCreator::init( %this )
|
||||
{
|
||||
// Just so we can recall this method for testing changes
|
||||
// without restarting.
|
||||
if ( isObject( %this.array ) )
|
||||
%this.array.delete();
|
||||
|
||||
%this.array = new ArrayObject();
|
||||
%this.array.caseSensitive = true;
|
||||
%this.setListView( true );
|
||||
|
||||
%this.beginGroup( "Environment" );
|
||||
|
||||
// Removed Prefab as there doesn't really seem to be a point in creating a blank one
|
||||
//%this.registerMissionObject( "Prefab", "Prefab" );
|
||||
%this.registerMissionObject( "SkyBox", "Sky Box" );
|
||||
%this.registerMissionObject( "SkySphere", "Sky Sphere" );
|
||||
%this.registerMissionObject( "CloudLayer", "Cloud Layer" );
|
||||
%this.registerMissionObject( "BasicClouds", "Basic Clouds" );
|
||||
%this.registerMissionObject( "ScatterSky", "Scatter Sky" );
|
||||
%this.registerMissionObject( "Sun", "Basic Sun" );
|
||||
%this.registerMissionObject( "Lightning" );
|
||||
%this.registerMissionObject( "WaterBlock", "Water Block" );
|
||||
%this.registerMissionObject( "SFXEmitter", "Sound Emitter" );
|
||||
%this.registerMissionObject( "Precipitation" );
|
||||
%this.registerMissionObject( "ParticleEmitterNode", "Particle Emitter" );
|
||||
%this.registerMissionObject( "VolumetricFog", "Volumetric Fog" );
|
||||
%this.registerMissionObject( "RibbonNode", "Ribbon" );
|
||||
|
||||
// Legacy features. Users should use Ground Cover and the Forest Editor.
|
||||
//%this.registerMissionObject( "fxShapeReplicator", "Shape Replicator" );
|
||||
//%this.registerMissionObject( "fxFoliageReplicator", "Foliage Replicator" );
|
||||
|
||||
%this.registerMissionObject( "PointLight", "Point Light" );
|
||||
%this.registerMissionObject( "SpotLight", "Spot Light" );
|
||||
|
||||
%this.registerMissionObject( "BoxEnvironmentProbe", "Box Environment Probe" );
|
||||
%this.registerMissionObject( "SphereEnvironmentProbe", "Sphere Environment Probe" );
|
||||
%this.registerMissionObject( "Skylight", "Skylight" );
|
||||
|
||||
%this.registerMissionObject( "GroundCover", "Ground Cover" );
|
||||
%this.registerMissionObject( "TerrainBlock", "Terrain Block" );
|
||||
%this.registerMissionObject( "GroundPlane", "Ground Plane" );
|
||||
%this.registerMissionObject( "WaterPlane", "Water Plane" );
|
||||
%this.registerMissionObject( "PxCloth", "Cloth" );
|
||||
%this.registerMissionObject( "ForestWindEmitter", "Wind Emitter" );
|
||||
|
||||
%this.registerMissionObject( "DustEmitter", "Dust Emitter" );
|
||||
%this.registerMissionObject( "DustSimulation", "Dust Simulation" );
|
||||
%this.registerMissionObject( "DustEffecter", "Dust Effecter" );
|
||||
|
||||
%this.endGroup();
|
||||
|
||||
%this.beginGroup( "Level" );
|
||||
|
||||
%this.registerMissionObject( "MissionArea", "Mission Area" );
|
||||
%this.registerMissionObject( "Path" );
|
||||
%this.registerMissionObject( "Marker", "Path Node" );
|
||||
%this.registerMissionObject( "Trigger" );
|
||||
%this.registerMissionObject( "PhysicalZone", "Physical Zone" );
|
||||
%this.registerMissionObject( "Camera" );
|
||||
%this.registerMissionObject( "LevelInfo", "Level Info" );
|
||||
%this.registerMissionObject( "TimeOfDay", "Time of Day" );
|
||||
%this.registerMissionObject( "Zone", "Zone" );
|
||||
%this.registerMissionObject( "Portal", "Zone Portal" );
|
||||
%this.registerMissionObject( "SpawnSphere", "Player Spawn Sphere", "PlayerDropPoint" );
|
||||
%this.registerMissionObject( "SpawnSphere", "Observer Spawn Sphere", "ObserverDropPoint" );
|
||||
%this.registerMissionObject( "SpawnSphere", "General Spawn Sphere", "GeneralDropPoint" );
|
||||
%this.registerMissionObject( "SFXSpace", "Sound Space" );
|
||||
%this.registerMissionObject( "OcclusionVolume", "Occlusion Volume" );
|
||||
%this.registerMissionObject( "AccumulationVolume", "Accumulation Volume" );
|
||||
%this.registerMissionObject("NavMesh", "Navigation mesh");
|
||||
%this.registerMissionObject("NavPath", "Path");
|
||||
%this.registerMissionObject( "Entity", "Entity" );
|
||||
%this.registerMissionObject( "NotesObject", "Note" );
|
||||
|
||||
%this.endGroup();
|
||||
|
||||
%this.beginGroup( "System" );
|
||||
|
||||
%this.registerMissionObject( "SimGroup" );
|
||||
|
||||
%this.endGroup();
|
||||
|
||||
%this.beginGroup( "ExampleObjects" );
|
||||
|
||||
%this.registerMissionObject( "RenderObjectExample" );
|
||||
%this.registerMissionObject( "RenderMeshExample" );
|
||||
%this.registerMissionObject( "RenderShapeExample" );
|
||||
|
||||
%this.endGroup();
|
||||
}
|
||||
|
||||
function ObjectCreator::onWake( %this )
|
||||
{
|
||||
CreatorTabBook.selectPage( 0 );
|
||||
CreatorTabBook.onTabSelected( "Scripted" );
|
||||
}
|
||||
|
||||
function ObjectCreator::beginGroup( %this, %group )
|
||||
|
|
@ -159,8 +63,6 @@ function ObjectCreator::registerMissionObject( %this, %class, %name, %buildfunc,
|
|||
%args.val[0] = %class;
|
||||
%args.val[1] = %name;
|
||||
%args.val[2] = %buildfunc;
|
||||
|
||||
%this.array.push_back( %group, %args );
|
||||
}
|
||||
|
||||
function ObjectCreator::getNewObjectGroup( %this )
|
||||
|
|
@ -271,330 +173,6 @@ function ObjectCreator::onObjectCreated( %this, %objId )
|
|||
EWorldEditor.dropSelection( true );
|
||||
}
|
||||
|
||||
function CreatorTabBook::onTabSelected( %this, %text, %idx )
|
||||
{
|
||||
if ( %this.isAwake() )
|
||||
{
|
||||
ObjectCreator.tab = %text;
|
||||
ObjectCreator.navigate( "" );
|
||||
}
|
||||
}
|
||||
|
||||
function ObjectCreator::navigate( %this, %address )
|
||||
{
|
||||
CreatorIconArray.frozen = true;
|
||||
CreatorIconArray.clear();
|
||||
CreatorPopupMenu.clear();
|
||||
|
||||
if ( %this.tab $= "Scripted" )
|
||||
{
|
||||
%category = getWord( %address, 1 );
|
||||
%dataGroup = "DataBlockGroup";
|
||||
|
||||
for ( %i = 0; %i < %dataGroup.getCount(); %i++ )
|
||||
{
|
||||
%obj = %dataGroup.getObject(%i);
|
||||
// echo ("Obj: " @ %obj.getName() @ " - " @ %obj.category );
|
||||
|
||||
if ( %obj.category $= "" && %obj.category == 0 )
|
||||
continue;
|
||||
|
||||
// Add category to popup menu if not there already
|
||||
if ( CreatorPopupMenu.findText( %obj.category ) == -1 )
|
||||
CreatorPopupMenu.add( %obj.category );
|
||||
|
||||
if ( %address $= "" )
|
||||
{
|
||||
%ctrl = %this.findIconCtrl( %obj.category );
|
||||
if ( %ctrl == -1 )
|
||||
{
|
||||
%this.addFolderIcon( %obj.category );
|
||||
}
|
||||
}
|
||||
else if ( %address $= %obj.category )
|
||||
{
|
||||
%ctrl = %this.findIconCtrl( %obj.getName() );
|
||||
if ( %ctrl == -1 )
|
||||
%this.addShapeIcon( %obj );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( %this.tab $= "Meshes" )
|
||||
{
|
||||
%fullPath = findFirstFileMultiExpr( getFormatExtensions() );
|
||||
|
||||
while ( %fullPath !$= "" )
|
||||
{
|
||||
if (strstr(%fullPath, "cached.dts") != -1)
|
||||
{
|
||||
%fullPath = findNextFileMultiExpr( getFormatExtensions() );
|
||||
continue;
|
||||
}
|
||||
|
||||
%fullPath = makeRelativePath( %fullPath, getMainDotCSDir() );
|
||||
%splitPath = strreplace( %fullPath, " ", "_" );
|
||||
%splitPath = strreplace( %splitPath, "/", " " );
|
||||
if( getWord(%splitPath, 0) $= "tools" )
|
||||
{
|
||||
%fullPath = findNextFileMultiExpr( getFormatExtensions() );
|
||||
continue;
|
||||
}
|
||||
|
||||
%dirCount = getWordCount( %splitPath ) - 1;
|
||||
|
||||
%pathFolders = getWords( %splitPath, 0, %dirCount - 1 );
|
||||
|
||||
// Add this file's path (parent folders) to the
|
||||
// popup menu if it isn't there yet.
|
||||
%temp = strreplace( %pathFolders, " ", "/" );
|
||||
%temp = strreplace( %temp, "_", " " );
|
||||
%r = CreatorPopupMenu.findText( %temp );
|
||||
if ( %r == -1 )
|
||||
{
|
||||
CreatorPopupMenu.add( %temp );
|
||||
}
|
||||
|
||||
// Is this file in the current folder?
|
||||
if ( stricmp( %pathFolders, %address ) == 0 )
|
||||
{
|
||||
%this.addStaticIcon( %fullPath );
|
||||
}
|
||||
// Then is this file in a subfolder we need to add
|
||||
// a folder icon for?
|
||||
else
|
||||
{
|
||||
%wordIdx = 0;
|
||||
%add = false;
|
||||
|
||||
if ( %address $= "" )
|
||||
{
|
||||
%add = true;
|
||||
%wordIdx = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( ; %wordIdx < %dirCount; %wordIdx++ )
|
||||
{
|
||||
%temp = getWords( %splitPath, 0, %wordIdx );
|
||||
if ( stricmp( %temp, %address ) == 0 )
|
||||
{
|
||||
%add = true;
|
||||
%wordIdx++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( %add == true )
|
||||
{
|
||||
%folder = getWord( %splitPath, %wordIdx );
|
||||
|
||||
%ctrl = %this.findIconCtrl( %folder );
|
||||
if ( %ctrl == -1 )
|
||||
%this.addFolderIcon( %folder );
|
||||
}
|
||||
}
|
||||
|
||||
%fullPath = findNextFileMultiExpr( getFormatExtensions() );
|
||||
}
|
||||
}
|
||||
|
||||
if ( %this.tab $= "Level" )
|
||||
{
|
||||
// Add groups to popup menu
|
||||
%array = %this.array;
|
||||
%array.sortk();
|
||||
|
||||
%count = %array.count();
|
||||
|
||||
if ( %count > 0 )
|
||||
{
|
||||
%lastGroup = "";
|
||||
|
||||
for ( %i = 0; %i < %count; %i++ )
|
||||
{
|
||||
%group = %array.getKey( %i );
|
||||
|
||||
if ( %group !$= %lastGroup )
|
||||
{
|
||||
CreatorPopupMenu.add( %group );
|
||||
|
||||
if ( %address $= "" )
|
||||
%this.addFolderIcon( %group );
|
||||
}
|
||||
|
||||
if ( %address $= %group )
|
||||
{
|
||||
%args = %array.getValue( %i );
|
||||
%class = %args.val[0];
|
||||
%name = %args.val[1];
|
||||
%func = %args.val[2];
|
||||
|
||||
%this.addMissionObjectIcon( %class, %name, %func );
|
||||
}
|
||||
|
||||
%lastGroup = %group;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( %this.tab $= "Prefabs" )
|
||||
{
|
||||
%expr = "*.prefab";
|
||||
%fullPath = findFirstFile( %expr );
|
||||
|
||||
while ( %fullPath !$= "" )
|
||||
{
|
||||
%fullPath = makeRelativePath( %fullPath, getMainDotCSDir() );
|
||||
%splitPath = strreplace( %fullPath, " ", "_" );
|
||||
%splitPath = strreplace( %splitPath, "/", " " );
|
||||
if( getWord(%splitPath, 0) $= "tools" )
|
||||
{
|
||||
%fullPath = findNextFile( %expr );
|
||||
continue;
|
||||
}
|
||||
|
||||
%dirCount = getWordCount( %splitPath ) - 1;
|
||||
|
||||
%pathFolders = getWords( %splitPath, 0, %dirCount - 1 );
|
||||
|
||||
// Add this file's path (parent folders) to the
|
||||
// popup menu if it isn't there yet.
|
||||
%temp = strreplace( %pathFolders, " ", "/" );
|
||||
%temp = strreplace( %temp, "_", " " );
|
||||
%r = CreatorPopupMenu.findText( %temp );
|
||||
if ( %r == -1 )
|
||||
{
|
||||
CreatorPopupMenu.add( %temp );
|
||||
}
|
||||
|
||||
// Is this file in the current folder?
|
||||
if ( (%dirCount == 0 && %address $= "") || stricmp( %pathFolders, %address ) == 0 )
|
||||
{
|
||||
%this.addPrefabIcon( %fullPath );
|
||||
}
|
||||
// Then is this file in a subfolder we need to add
|
||||
// a folder icon for?
|
||||
else
|
||||
{
|
||||
%wordIdx = 0;
|
||||
%add = false;
|
||||
|
||||
if ( %address $= "" )
|
||||
{
|
||||
%add = true;
|
||||
%wordIdx = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( ; %wordIdx < %dirCount; %wordIdx++ )
|
||||
{
|
||||
%temp = getWords( %splitPath, 0, %wordIdx );
|
||||
if ( stricmp( %temp, %address ) == 0 )
|
||||
{
|
||||
%add = true;
|
||||
%wordIdx++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( %add == true )
|
||||
{
|
||||
%folder = getWord( %splitPath, %wordIdx );
|
||||
|
||||
%ctrl = %this.findIconCtrl( %folder );
|
||||
if ( %ctrl == -1 )
|
||||
%this.addFolderIcon( %folder );
|
||||
}
|
||||
}
|
||||
|
||||
%fullPath = findNextFile( %expr );
|
||||
}
|
||||
}
|
||||
|
||||
CreatorIconArray.sort( "alphaIconCompare" );
|
||||
|
||||
for ( %i = 0; %i < CreatorIconArray.getCount(); %i++ )
|
||||
{
|
||||
CreatorIconArray.getObject(%i).autoSize = false;
|
||||
}
|
||||
|
||||
CreatorIconArray.frozen = false;
|
||||
CreatorIconArray.refresh();
|
||||
|
||||
// Recalculate the array for the parent guiScrollCtrl
|
||||
CreatorIconArray.getParent().computeSizes();
|
||||
|
||||
%this.address = %address;
|
||||
|
||||
CreatorPopupMenu.sort();
|
||||
|
||||
%str = strreplace( %address, " ", "/" );
|
||||
%r = CreatorPopupMenu.findText( %str );
|
||||
if ( %r != -1 )
|
||||
CreatorPopupMenu.setSelected( %r, false );
|
||||
else
|
||||
CreatorPopupMenu.setText( %str );
|
||||
CreatorPopupMenu.tooltip = %str;
|
||||
}
|
||||
|
||||
function ObjectCreator::navigateDown( %this, %folder )
|
||||
{
|
||||
if ( %this.address $= "" )
|
||||
%address = %folder;
|
||||
else
|
||||
%address = %this.address SPC %folder;
|
||||
|
||||
// Because this is called from an IconButton::onClick command
|
||||
// we have to wait a tick before actually calling navigate, else
|
||||
// we would delete the button out from under itself.
|
||||
%this.schedule( 1, "navigate", %address );
|
||||
}
|
||||
|
||||
function ObjectCreator::navigateUp( %this )
|
||||
{
|
||||
%count = getWordCount( %this.address );
|
||||
|
||||
if ( %count == 0 )
|
||||
return;
|
||||
|
||||
if ( %count == 1 )
|
||||
%address = "";
|
||||
else
|
||||
%address = getWords( %this.address, 0, %count - 2 );
|
||||
|
||||
%this.navigate( %address );
|
||||
}
|
||||
|
||||
function ObjectCreator::setListView( %this, %noupdate )
|
||||
{
|
||||
//CreatorIconArray.clear();
|
||||
//CreatorIconArray.setVisible( false );
|
||||
|
||||
CreatorIconArray.setVisible( true );
|
||||
%this.contentCtrl = CreatorIconArray;
|
||||
%this.isList = true;
|
||||
|
||||
if ( %noupdate == true )
|
||||
%this.navigate( %this.address );
|
||||
}
|
||||
|
||||
//function ObjectCreator::setIconView( %this )
|
||||
//{
|
||||
//echo( "setIconView" );
|
||||
//
|
||||
//CreatorIconStack.clear();
|
||||
//CreatorIconStack.setVisible( false );
|
||||
//
|
||||
//CreatorIconArray.setVisible( true );
|
||||
//%this.contentCtrl = CreatorIconArray;
|
||||
//%this.isList = false;
|
||||
//
|
||||
//%this.navigate( %this.address );
|
||||
//}
|
||||
|
||||
function ObjectCreator::findIconCtrl( %this, %name )
|
||||
{
|
||||
for ( %i = 0; %i < %this.contentCtrl.getCount(); %i++ )
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ TORQUE_UNIFORM_SAMPLER2D(backbufferTex, 4);
|
|||
TORQUE_UNIFORM_SAMPLER2D(glowBuffer, 5);
|
||||
|
||||
uniform float mode;
|
||||
uniform float3 eyePosWorld;
|
||||
uniform float4x4 cameraToWorld;
|
||||
|
||||
float4 main( PFXVertToPix IN ) : TORQUE_TARGET0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue