mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
Merge pull request #860 from Areloch/MiscFixes20220825
Misc Fixes for 2022/08/25
This commit is contained in:
commit
63d8c5a699
29 changed files with 276 additions and 127 deletions
|
|
@ -139,7 +139,7 @@ datablock MissionMarkerData(SpawnSphereMarker)
|
|||
datablock MissionMarkerData(CameraBookmarkMarker)
|
||||
{
|
||||
category = "Misc";
|
||||
shapeAsset = "Core_GameObjects:Camera";
|
||||
shapeAsset = "Core_GameObjects:camera_shape";
|
||||
};
|
||||
|
||||
datablock CameraData(Observer)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
materialDefinitionName="CameraMat"
|
||||
VersionId="1">
|
||||
<Material
|
||||
mapTo="CameraMat"
|
||||
Name="CameraMat"
|
||||
doubleSided="1"
|
||||
translucent="1"
|
||||
|
|
|
|||
Binary file not shown.
BIN
Templates/BaseGame/game/core/gameObjects/shapes/camera.fbx
Normal file
BIN
Templates/BaseGame/game/core/gameObjects/shapes/camera.fbx
Normal file
Binary file not shown.
|
|
@ -0,0 +1,5 @@
|
|||
<ShapeAsset
|
||||
AssetName="camera_shape"
|
||||
fileName="@assetFile=camera.fbx"
|
||||
constuctorFileName="@assetFile=camera_shape.tscript"
|
||||
materialSlot0="@asset=Core_GameObjects:CameraMat"/>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
singleton TSShapeConstructor(cameradts2)
|
||||
{
|
||||
baseShapeAsset = "Core_GameObjects:Camera_shape";
|
||||
singleDetailSize = "0";
|
||||
flipUVCoords = "0";
|
||||
JoinIdenticalVerts = "0";
|
||||
reverseWindingOrder = "0";
|
||||
removeRedundantMats = "0";
|
||||
animFPS = "2";
|
||||
};
|
||||
|
|
@ -608,8 +608,11 @@ function AssetBrowser::doRefresh(%this)
|
|||
//Forces a clean collapse of the tree for any not-really-exposed items
|
||||
%dataItem = AssetBrowser-->filterTree.findItemByName("data");
|
||||
|
||||
AssetBrowser-->filterTree.expandItem(%dataItem, false);
|
||||
AssetBrowser-->filterTree.expandItem(%dataItem);
|
||||
if(%dataItem != 0)
|
||||
{
|
||||
AssetBrowser-->filterTree.expandItem(%dataItem, false);
|
||||
AssetBrowser-->filterTree.expandItem(%dataItem);
|
||||
}
|
||||
|
||||
%this.dirty = false;
|
||||
}
|
||||
|
|
@ -985,14 +988,21 @@ function AssetBrowser::changeAsset(%this)
|
|||
%targetObject = %this.fieldTargetObject;
|
||||
%inspectorObject = "";
|
||||
|
||||
if(%this.fieldTargetObject.isInNamespaceHierarchy("GuiInspector"))
|
||||
if(isObject(%this.fieldTargetObject) && %this.fieldTargetObject.isInNamespaceHierarchy("GuiInspector"))
|
||||
{
|
||||
%inspectorObject = %this.fieldTargetObject;
|
||||
%targetObject = %inspectorObject.getInspectObject();
|
||||
|
||||
%inspectorObject.setObjectField(%this.fieldTargetName, %this.selectedAsset);
|
||||
if(%inspectorObject.getNumInspectObjects() != 0)
|
||||
{
|
||||
%targetObject = %inspectorObject.getInspectObject();
|
||||
%inspectorObject.setObjectField(%this.fieldTargetName, %this.selectedAsset);
|
||||
}
|
||||
else if(startsWith(%this.fieldTargetName, "$"))
|
||||
{
|
||||
//we're targeting a variable directly, so deal with that then
|
||||
%cmd = %this.fieldTargetName @ "=\"" @ %this.selectedAsset @ "\";";
|
||||
}
|
||||
}
|
||||
else
|
||||
else if(isObject(%this.fieldTargetObject))
|
||||
{
|
||||
//alright, we've selectd an asset for a field, so time to set it!
|
||||
if(%this.fieldTargetName $= "")
|
||||
|
|
@ -1000,11 +1010,23 @@ function AssetBrowser::changeAsset(%this)
|
|||
else
|
||||
%cmd = %targetObject @ "." @ %this.fieldTargetName @ "=\"" @ %this.selectedAsset @ "\";";
|
||||
//echo("Changing asset via the " @ %cmd @ " command");
|
||||
eval(%cmd);
|
||||
}
|
||||
else if(startsWith(%this.fieldTargetName, "$"))
|
||||
{
|
||||
//we're targeting a variable directly, so deal with that then
|
||||
%cmd = %this.fieldTargetName @ "=\"" @ %this.selectedAsset @ "\";";
|
||||
}
|
||||
|
||||
eval(%cmd);
|
||||
|
||||
//Force update our object with the field change
|
||||
%targetObject.inspectPostApply();
|
||||
if(isObject(%targetObject))
|
||||
{
|
||||
if(%this.fieldTargetObject.isInNamespaceHierarchy("GuiInspector"))
|
||||
%this.fieldTargetObject.refresh();
|
||||
else
|
||||
%targetObject.inspectPostApply();
|
||||
}
|
||||
|
||||
//Flag us as dirty for editing purposes
|
||||
EWorldEditor.setSceneAsDirty();
|
||||
|
|
|
|||
|
|
@ -499,7 +499,30 @@ function AssetBrowser::openFileLocation(%this)
|
|||
%filePath = "";
|
||||
if(EditAssetPopup.assetId !$= "")
|
||||
{
|
||||
%filePath = AssetDatabase.getAssetPath(EditAssetPopup.assetId);
|
||||
if(AssetDatabase.isDeclaredAsset(EditAssetPopup.assetId))
|
||||
{
|
||||
%filePath = AssetDatabase.getAssetPath(EditAssetPopup.assetId);
|
||||
}
|
||||
else
|
||||
{
|
||||
//probably a file path
|
||||
%pathSplit = strpos(EditAssetPopup.assetId, ":");
|
||||
if(%pathSplit != -1)
|
||||
{
|
||||
%path = getSubStr(EditAssetPopup.assetId, 0, %pathSplit);
|
||||
%file = getSubStr(EditAssetPopup.assetId, %pathSplit + 1);
|
||||
|
||||
//datablocks pack the originator file in the parent path as-is, so check that
|
||||
if(fileExt(%path) !$= "")
|
||||
{
|
||||
%filePath = %path;
|
||||
}
|
||||
else
|
||||
{
|
||||
%filePath = %path @ "/" @ %file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(EditLevelAssetPopup.assetId !$= "")
|
||||
{
|
||||
|
|
@ -510,16 +533,20 @@ function AssetBrowser::openFileLocation(%this)
|
|||
%filePath = AssetDatabase.getAssetPath(EditAssetPopup.assetId);
|
||||
}
|
||||
|
||||
if(%filePath !$= "")
|
||||
if(isFile(%filePath) || isDirectory(%filePath))
|
||||
{
|
||||
%fullPath = makeFullPath(%filePath);
|
||||
if(fileExt(%fullPath) $= ".tscript")
|
||||
%fullPath = filePath(%fullPath);
|
||||
|
||||
if($platform $= "windows")
|
||||
{
|
||||
%cmd = "cd \"" @ makeFullPath(%filePath) @ "\" && start .";
|
||||
%cmd = "cd \"" @ %fullPath @ "\" && start .";
|
||||
systemCommand(%cmd);
|
||||
}
|
||||
else
|
||||
{
|
||||
%cmd = "open \"" @ makeFullPath(%filePath) @ "\"";
|
||||
%cmd = "open \"" @ %fullPath @ "\"";
|
||||
systemCommand(%cmd);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -137,18 +137,9 @@ function AssetBrowser::buildPopupMenus(%this)
|
|||
item[ 3 ] = "-";
|
||||
item[ 4 ] = "Create Terrain Data" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"TerrainAsset\", AssetBrowser.selectedModule);";
|
||||
item[ 5 ] = "-";
|
||||
item[ 6 ] = "Create Shape" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"Shape\", AssetBrowser.selectedModule);";
|
||||
item[ 7 ] = "Create Shape Animation" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ShapeAnimationAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewShapeAnimationAsset(\"NewShapeAnimation\", AssetBrowser.selectedModule);";
|
||||
item[ 8 ] = "-";
|
||||
item[ 9 ] = "Create GUI" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"GUIAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewGUIAsset(\"NewGUI\", AssetBrowser.selectedModule);";
|
||||
item[ 10 ] = "-";
|
||||
item[ 11 ] = "Create Post Effect" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"PostEffectAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewPostEffectAsset(\"NewPostEffect\", AssetBrowser.selectedModule);";
|
||||
item[ 12 ] = "-";
|
||||
item[ 13 ] = "Create Sound" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"SoundAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewSoundAsset(\"NewSound\", AssetBrowser.selectedModule);";
|
||||
item[ 14 ] = "-";
|
||||
item[ 15 ] = "Create Particle Effect" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ParticleEffectAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewParticleEffectAsset(\"NewParticleEffect\", AssetBrowser.selectedModule);";
|
||||
item[ 16 ] = "-";
|
||||
item[ 17 ] = "Create Cubemap" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"CubemapAsset\", AssetBrowser.selectedModule);";
|
||||
item[ 6 ] = "Create GUI" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"GUIAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewGUIAsset(\"NewGUI\", AssetBrowser.selectedModule);";
|
||||
item[ 7 ] = "-";
|
||||
item[ 8 ] = "Create Post Effect" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"PostEffectAsset\", AssetBrowser.selectedModule);";//"AssetBrowser.createNewPostEffectAsset(\"NewPostEffect\", AssetBrowser.selectedModule);";
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -232,13 +223,6 @@ function AssetBrowser::buildPopupMenus(%this)
|
|||
};
|
||||
}
|
||||
|
||||
//Some assets are not yet ready/implemented, so disable their creation here
|
||||
AddNewArtAssetPopup.enableItem(6, false); //shape
|
||||
AddNewArtAssetPopup.enableItem(7, false); //shape animation
|
||||
AddNewArtAssetPopup.enableItem(13, false); //sound asset
|
||||
AddNewArtAssetPopup.enableItem(15, false); //particle effect
|
||||
AddNewArtAssetPopup.enableItem(17, false); //cubemap
|
||||
|
||||
if( !isObject( EditFolderPopup ) )
|
||||
{
|
||||
new PopupMenu( EditFolderPopup )
|
||||
|
|
|
|||
|
|
@ -362,8 +362,8 @@ new GuiMouseEventCtrl(ForestBrushSizeSliderCtrlContainer,EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(ForestBrushSizeTextEditContainer.position) + firstWord(ForestEditToolbar.position)+11 SPC
|
||||
(getWord(ForestBrushSizeTextEditContainer, 1)) + 25;
|
||||
position = ForestBrushSizeTextEditContainer.position.x + ForestEditToolbar.position.x + 50 SPC
|
||||
ForestBrushSizeTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -392,8 +392,8 @@ new GuiMouseEventCtrl(ForestBrushPressureSliderCtrlContainer,EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(ForestBrushPressureTextEditContainer.position) + firstWord(ForestEditToolbar.position) SPC
|
||||
(getWord(ForestBrushPressureTextEditContainer, 1)) + 25;
|
||||
position = ForestBrushPressureTextEditContainer.position.x + ForestEditToolbar.position.x + 50 SPC
|
||||
ForestBrushPressureTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -422,8 +422,8 @@ new GuiMouseEventCtrl(ForestBrushHardnessSliderCtrlContainer,EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(ForestBrushHardnessTextEditContainer.position) + firstWord(ForestEditToolbar.position) SPC
|
||||
(getWord(TForestBrushHardnessTextEditContainer, 1)) + 25;
|
||||
position = ForestBrushPressureTextEditContainer.position.x + ForestEditToolbar.position.x + 50 SPC
|
||||
ForestBrushPressureTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
|
|||
|
|
@ -42,9 +42,14 @@ function PostFXEditor::editDefaultPostFXSettings( %this )
|
|||
PostFXEditorActionButton.command = "PostFXManager::savePresetHandler($PostFXManager::defaultPreset);";
|
||||
}
|
||||
|
||||
function PostEffectEditorInspector::refresh(%this)
|
||||
{
|
||||
PostFXEditor.refresh();
|
||||
}
|
||||
|
||||
function PostFXEditor::refresh(%this)
|
||||
{
|
||||
%selectedItem = PostEffectEditorList.getSelectedRow();
|
||||
PostEffectEditorList.clear();
|
||||
|
||||
%count = PostFXManager.Count();
|
||||
|
|
@ -55,6 +60,8 @@ function PostFXEditor::refresh(%this)
|
|||
if(%postEffect.isEnabled())
|
||||
PostEffectEditorList.addRow( %i, %postEffect.getName() );
|
||||
}
|
||||
|
||||
PostEffectEditorList.setSelectedRow(%selectedItem);
|
||||
}
|
||||
|
||||
function PostFXEditor::apply(%this)
|
||||
|
|
|
|||
|
|
@ -302,8 +302,8 @@ new GuiMouseEventCtrl(MeshRoadDefaultWidthSliderCtrlContainer, EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(MeshRoadDefaultWidthTextEditContainer.position) + firstWord(MeshRoadEditorToolbar.position) + 10 SPC
|
||||
(getWord(MeshRoadDefaultWidthTextEditContainer, 1)) + 25;
|
||||
position = MeshRoadDefaultWidthTextEditContainer.position.x + MeshRoadEditorToolbar.position.x + 50 SPC
|
||||
MeshRoadDefaultWidthTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -331,8 +331,8 @@ new GuiMouseEventCtrl(MeshRoadDefaultDepthSliderCtrlContainer, EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(MeshRoadDefaultDepthTextEditContainer.position) + firstWord(MeshRoadEditorToolbar.position) + 10 SPC
|
||||
(getWord(MeshRoadDefaultDepthTextEditContainer, 1)) + 25;
|
||||
position = MeshRoadDefaultDepthTextEditContainer.position.x + MeshRoadEditorToolbar.position.x + 50 SPC
|
||||
MeshRoadDefaultDepthTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
|
|||
|
|
@ -280,8 +280,8 @@ new GuiMouseEventCtrl(RiverDefaultWidthSliderCtrlContainer, EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(RiverDefaultWidthTextEditContainer.position) + firstWord(RiverEditorToolbar.position) + 10 SPC
|
||||
(getWord(RiverDefaultWidthTextEditContainer, 1)) + 25;
|
||||
position = RiverDefaultWidthTextEditContainer.position.x + RiverEditorToolbar.position.x + 50 SPC
|
||||
RiverDefaultWidthTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -309,8 +309,8 @@ new GuiMouseEventCtrl(RiverDefaultDepthSliderCtrlContainer, EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(RiverDefaultDepthTextEditContainer.position) + firstWord(RiverEditorToolbar.position) + 10 SPC
|
||||
(getWord(RiverDefaultDepthTextEditContainer, 1)) + 25;
|
||||
position = RiverDefaultDepthTextEditContainer.position.x + RiverEditorToolbar.position.x + 50 SPC
|
||||
RiverDefaultDepthTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
|
|||
|
|
@ -259,8 +259,8 @@ new GuiMouseEventCtrl(RoadDefaultWidthSliderCtrlContainer, EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(RoadDefaultWidthTextEditContainer.position) + firstWord(RoadEditorToolbar.position) + 10 SPC
|
||||
(getWord(RoadDefaultWidthTextEditContainer, 1)) + 25;
|
||||
position = RoadDefaultWidthTextEditContainer.position.x + RoadEditorToolbar.position.x + 50 SPC
|
||||
RoadDefaultWidthTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
|
|||
|
|
@ -510,8 +510,8 @@ new GuiMouseEventCtrl(TerrainBrushSizeSliderCtrlContainer,EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(TerrainBrushSizeTextEditContainer.position) + firstWord(EWTerrainEditToolbar.position)+11 SPC
|
||||
(getWord(TerrainBrushSizeTextEditContainer, 1)) + 25;
|
||||
position = TerrainBrushSizeTextEditContainer.position.x + EWTerrainEditToolbar.position.x + 50 SPC
|
||||
TerrainBrushSizeTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -540,8 +540,8 @@ new GuiMouseEventCtrl(TerrainBrushPressureSliderCtrlContainer,EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(TerrainBrushPressureTextEditContainer.position) + firstWord(EWTerrainEditToolbar.position) SPC
|
||||
(getWord(TerrainBrushPressureTextEditContainer, 1)) + 25;
|
||||
position = TerrainBrushPressureTextEditContainer.position.x + EWTerrainEditToolbar.position.x + 50 SPC
|
||||
TerrainBrushPressureTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -570,8 +570,8 @@ new GuiMouseEventCtrl(TerrainBrushSoftnessSliderCtrlContainer,EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(TerrainBrushSoftnessTextEditContainer.position) + firstWord(EWTerrainEditToolbar.position) SPC
|
||||
(getWord(TerrainBrushSoftnessTextEditContainer, 1)) + 25;
|
||||
position = TerrainBrushSoftnessTextEditContainer.position.x + EWTerrainEditToolbar.position.x + 50 SPC
|
||||
TerrainBrushSoftnessTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -600,8 +600,8 @@ new GuiMouseEventCtrl(TerrainSetHeightSliderCtrlContainer,EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(TerrainSetHeightTextEditContainer.position) + firstWord(EWTerrainEditToolbar.position) SPC
|
||||
(getWord(TerrainSetHeightTextEditContainer, 1)) + 25;
|
||||
position = TerrainSetHeightTextEditContainer.position.x + EWTerrainEditToolbar.position.x SPC
|
||||
TerrainSetHeightTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ $guiContent = new GuiControl(EWTerrainPainterToolbar,EditorGuiGroup) {
|
|||
Profile = "ToolsGuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "222 5";
|
||||
Position = "245 5";
|
||||
Extent = "256 50";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -382,7 +382,7 @@ $guiContent = new GuiControl(EWTerrainPainterToolbar,EditorGuiGroup) {
|
|||
Profile = "ToolsGuiTransparentProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "480 5";
|
||||
position = "490 5";
|
||||
Extent = "120 50";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -524,8 +524,8 @@ new GuiMouseEventCtrl(PaintBrushSizeSliderCtrlContainer,EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(PaintBrushSizeTextEditContainer.position) + firstWord(EWTerrainPainterToolbar.position)+11 SPC
|
||||
(getWord(PaintBrushSizeTextEditContainer, 1)) + 25;
|
||||
position = PaintBrushSizeTextEditContainer.position.x + EWTerrainPainterToolbar.position.x + 50 SPC
|
||||
PaintBrushSizeTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -554,8 +554,8 @@ new GuiMouseEventCtrl(PaintBrushSlopeMinContainer,EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(PaintBrushSlopeControl.position) + firstWord(EWTerrainPainterToolbar.position)+firstWord(PaintBrushSlopeControl->SlopeMinAngle.position) - 40 SPC
|
||||
(getWord(PaintBrushSlopeControl, 1)) + 25;
|
||||
position = PaintBrushSlopeControl.position.x + EWTerrainPainterToolbar.position.x + PaintBrushSlopeControl->SlopeMinAngle.position.x - 40 SPC
|
||||
PaintBrushSlopeControl.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -589,8 +589,8 @@ new GuiMouseEventCtrl(PaintBrushSlopeMaxContainer,EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(PaintBrushSlopeControl.position) + firstWord(EWTerrainPainterToolbar.position)+firstWord(PaintBrushSlopeControl->SlopeMaxAngle.position) - 40 SPC
|
||||
(getWord(PaintBrushSlopeControl, 1)) + 25;
|
||||
position = PaintBrushSlopeControl.position.x + EWTerrainPainterToolbar.position.x + PaintBrushSlopeControl->SlopeMaxAngle.position.x - 40 SPC
|
||||
PaintBrushSlopeControl.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -629,8 +629,8 @@ new GuiMouseEventCtrl(PaintBrushPressureSliderCtrlContainer,EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(PaintBrushPressureTextEditContainer.position) + firstWord(EWTerrainPainterToolbar.position) SPC
|
||||
(getWord(PaintBrushPressureTextEditContainer, 1)) + 25;
|
||||
position = PaintBrushPressureTextEditContainer.position.x + EWTerrainPainterToolbar.position.x + 50 SPC
|
||||
PaintBrushPressureTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -659,8 +659,8 @@ new GuiMouseEventCtrl(PaintBrushSoftnessSliderCtrlContainer,EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(PaintBrushSoftnessTextEditContainer.position) + firstWord(EWTerrainPainterToolbar.position) SPC
|
||||
(getWord(PaintBrushSoftnessTextEditContainer, 1)) + 25;
|
||||
position = PaintBrushSoftnessTextEditContainer.position.x + EWTerrainPainterToolbar.position.x + 50 SPC
|
||||
PaintBrushSoftnessTextEditContainer.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
|
|||
|
|
@ -684,8 +684,8 @@ new GuiMouseEventCtrl(softSnapSizeSliderCtrlContainer, EditorGuiGroup) {
|
|||
Profile = "ToolsGuiSliderBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = firstWord(EWorldEditorToolbar-->softSnapSizeTextEdit.getGlobalPosition()) - 12 SPC
|
||||
(getWord(EWorldEditorToolbar-->softSnapSizeTextEdit.getGlobalPosition(), 1)) + 18;
|
||||
position = EWorldEditorToolbar.position.x + EWorldEditorToolbar-->softSnapSizeTextEditContainer.position.x + 50 SPC
|
||||
EWorldEditorToolbar-->softSnapSizeTextEdit.position.y + 50;
|
||||
Extent = "112 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
|
|||
|
|
@ -734,7 +734,7 @@ function EditorGui::addCameraBookmarkByGui( %this )
|
|||
// look for a NewCamera name to grab
|
||||
for(%i = 0; ; %i++){
|
||||
%name = "NewCamera_" @ %i;
|
||||
if( !CameraBookmarks.findObjectByInternalName(%name) ){
|
||||
if( !isObject(CameraBookmarks) || !CameraBookmarks.findObjectByInternalName(%name) ){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1340,7 +1340,9 @@ function CameraTypesDropdownToggle()
|
|||
|
||||
function VisibilityDropdownToggle()
|
||||
{
|
||||
EditorVisibilityOptions.showPopup(Canvas);
|
||||
%pos = visibilityToggleBtn.getGlobalPosition();
|
||||
%pos.y += visibilityToggleBtn.extent.y;
|
||||
EditorVisibilityOptions.showPopup(Canvas, %pos.x, %pos.y);
|
||||
}
|
||||
|
||||
function CameraTypesDropdownDecoy::onMouseLeave()
|
||||
|
|
|
|||
|
|
@ -436,3 +436,55 @@ function toggleVolumeViz(%vizName)
|
|||
EVisibilityVolumeOptions.checkItem(7, $SFXSpace::isRenderable);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
function togglePlayerCollisionViz()
|
||||
{
|
||||
$Player::renderCollision = !$Player::renderCollision;
|
||||
EVisibilityDebugRenderOptions.checkItem(0, $Player::renderCollision);
|
||||
}
|
||||
|
||||
function toggleTerrainDebugViz()
|
||||
{
|
||||
$TerrainBlock::debugRender = !$TerrainBlock::debugRender;
|
||||
EVisibilityDebugRenderOptions.checkItem(1, $TerrainBlock::debugRender);
|
||||
}
|
||||
|
||||
function toggleDecalsDebugViz()
|
||||
{
|
||||
$Decals::debugRender = !$Decals::debugRender;
|
||||
EVisibilityDebugRenderOptions.checkItem(2, $Decals::debugRender);
|
||||
}
|
||||
|
||||
function toggleBoundingBoxesViz()
|
||||
{
|
||||
$Scene::renderBoundingBoxes = !$Scene::renderBoundingBoxes;
|
||||
EVisibilityDebugRenderOptions.checkItem(3, $Scene::renderBoundingBoxes);
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
function toggleWireframeViz()
|
||||
{
|
||||
$gfx::wireframe = !$gfx::wireframe;
|
||||
EditorVisibilityOptions.checkItem(3, $gfx::wireframe);
|
||||
}
|
||||
|
||||
function toggleFrustumLockViz()
|
||||
{
|
||||
$Scene::lockCull = !$Scene::lockCull;
|
||||
EditorVisibilityOptions.checkItem(4, $Scene::lockCull);
|
||||
}
|
||||
|
||||
function toggleZoneCulling()
|
||||
{
|
||||
$Scene::disableZoneCulling = !$Scene::disableZoneCulling;
|
||||
EditorVisibilityOptions.checkItem(7, $Scene::disableZoneCulling);
|
||||
}
|
||||
|
||||
function toggleTerrainCulling()
|
||||
{
|
||||
$Scene::disableTerrainOcclusion = !$Scene::disableTerrainOcclusion;
|
||||
EditorVisibilityOptions.checkItem(8, $Scene::disableTerrainOcclusion);
|
||||
}
|
||||
|
|
@ -98,15 +98,17 @@ function setupEditorVisibilityMenu()
|
|||
superClass = "MenuBuilder";
|
||||
class = "EditorWorldMenu";
|
||||
|
||||
item[ 0 ] = "Show Player Collision" TAB "" TAB "$Player::renderCollision = !$Player::renderCollision;";
|
||||
item[ 1 ] = "Show Terrain Debug" TAB "" TAB "$TerrainBlock::debugRender = !$TerrainBlock::debugRender;";
|
||||
item[ 2 ] = "Show Decals Debug" TAB "" TAB "$Decals::debugRender = !$Decals::debugRender;";
|
||||
item[ 3 ] = "Show Bounding Boxes" TAB "" TAB "$Scene::renderBoundingBoxes = !$Scene::renderBoundingBoxes;";
|
||||
item[ 0 ] = "Show Player Collision" TAB "" TAB "togglePlayerCollisionViz();";
|
||||
item[ 1 ] = "Show Terrain Debug" TAB "" TAB "toggleTerrainDebugViz();";
|
||||
item[ 2 ] = "Show Decals Debug" TAB "" TAB "toggleDecalsDebugViz();";
|
||||
item[ 3 ] = "Show Bounding Boxes" TAB "" TAB "toggleBoundingBoxesViz();";
|
||||
item[ 4 ] = "Show Physics World" TAB "" TAB "togglePhysicsDebugViz();";
|
||||
item[ 5 ] = "Show Texel Density" TAB "" TAB "toggleTexelDensityViz();";
|
||||
};
|
||||
|
||||
%debugRenderpopup.enableItem(4, false);
|
||||
if(!physicsPluginPresent())
|
||||
%debugRenderpopup.enableItem(4, false);
|
||||
|
||||
%debugRenderpopup.enableItem(5, false);
|
||||
|
||||
//
|
||||
|
|
@ -231,12 +233,12 @@ function setupEditorVisibilityMenu()
|
|||
item[ 0 ] = "Volumes Visibility" TAB EVisibilityVolumeOptions;
|
||||
item[ 1 ] = "Debug Rendering" TAB EVisibilityDebugRenderOptions;
|
||||
item[ 2 ] = "-" TAB "" TAB "";
|
||||
item[ 3 ] = "Wireframe" TAB "" TAB "$gfx::wireframe = !$gfx::wireframe;";
|
||||
item[ 4 ] = "Frustum Lock" TAB "" TAB "$Scene::lockCull = !$Scene::lockCull;";
|
||||
item[ 3 ] = "Wireframe" TAB "" TAB "toggleWireframeViz();";
|
||||
item[ 4 ] = "Frustum Lock" TAB "" TAB "toggleFrustumLockViz();";
|
||||
item[ 5 ] = "Colorblindness" TAB EVisibilityColorblindnessOptions;
|
||||
item[ 6 ] = "-" TAB "" TAB "";
|
||||
item[ 7 ] = "Disable Zone Culling" TAB "" TAB "$Scene::disableZoneCulling = !$Scene::disableZoneCulling;";
|
||||
item[ 8 ] = "Disable Terrain Culling" TAB "" TAB "$Scene::disableTerrainOcclusion = !$Scene::disableTerrainOcclusion;";
|
||||
item[ 7 ] = "Disable Zone Culling" TAB "" TAB "toggleZoneCulling();";
|
||||
item[ 8 ] = "Disable Terrain Culling" TAB "" TAB "toggleTerrainCulling();";
|
||||
item[ 9 ] = "-" TAB "" TAB "";
|
||||
item[ 10 ] = "Lighting Modes" TAB EVisibilityLightingModesOptions;
|
||||
item[ 11 ] = "Lights" TAB EVisibilityLightsOptions;
|
||||
|
|
@ -383,14 +385,17 @@ function EVisibility::addClassOptions( %this )
|
|||
}
|
||||
}
|
||||
|
||||
function togglePhysicsDebugViz( %enable )
|
||||
function togglePhysicsDebugViz( )
|
||||
{
|
||||
$PhysicsWorld::render = %enable;
|
||||
$PhysicsWorld::render = !$PhysicsWorld::render;
|
||||
|
||||
if(physicsPluginPresent())
|
||||
{
|
||||
physicsDebugDraw(%enable);
|
||||
physicsDebugDraw($PhysicsWorld::render);
|
||||
}
|
||||
|
||||
EVisibilityDebugRenderOptions.checkItem(4, $PhysicsWorld::render);
|
||||
|
||||
}
|
||||
|
||||
function disableVisualizers()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue