mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
* Fixes handling for Image, Material and Shape Assets' inspector fields so they properly work with non-object targeted inspectors, such as the PostFXEditor
* Updated PostFXEditor scripts to handle refreshing properly when certainl field types(assetId fields) are changed * Adjusted display handling of slider values on guiGameSettingsCtrl to show 0.x decimal format instead of 0.xxxxx * Fixed pad length of item names in guiTreeView for items that are marked to avoid console spam * Fixed local offseting for popupMenus so scaled/offset window position doesn't cause the popup menu to offset from mouse click position(courtesy OTHG_Mars) * Fix issue with terrain where, due to default value save validation, the global scope for the terrain collision list would be whiped when saving, causing players to fall through terrain. Moved to per-terrain convexLists * Fixed issue with the core camera model mesh and updated references so camera bookmarks display properly * Fixed console spam during asset browser initialization where it would try and expand the directory tree even though the dir tree isn't populated yet * Fixed handling of Open File Location RMB menu action to properly deal with script and datablock types * Removed unusuable "Create ___" asset type prompts from the RMB menus for the AB to avoid confusion * Improved slider offset positioning for various popup sliders on editor toolbars * Anchored the visibility popup menu to the button for more consistent formatting and better feel * Shifted various visibility toggles from 'in place' on the menu buttons to functions, allowing it to also properly mark the menu entries as checked or not, improving usability
This commit is contained in:
parent
6a0cd22e7a
commit
ded99cd8cb
|
|
@ -470,9 +470,6 @@ void GuiInspectorTypeImageAssetPtr::consoleInit()
|
|||
|
||||
GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl()
|
||||
{
|
||||
if (mInspector->getInspectObject() == nullptr)
|
||||
return nullptr;
|
||||
|
||||
// Create base filename edit controls
|
||||
GuiControl* retCtrl = Parent::constructEditControl();
|
||||
if (retCtrl == NULL)
|
||||
|
|
@ -480,16 +477,28 @@ GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl()
|
|||
|
||||
retCtrl->getRenderTooltipDelegate().bind(this, &GuiInspectorTypeImageAssetPtr::renderTooltip);
|
||||
|
||||
// Change filespec
|
||||
char szBuffer[512];
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ImageAsset\", \"AssetBrowser.changeAsset\", %s, %s);",
|
||||
mInspector->getIdString(), mCaption);
|
||||
mBrowseButton->setField("Command", szBuffer);
|
||||
if (mInspector->getInspectObject() != nullptr)
|
||||
{
|
||||
// Change filespec
|
||||
char szBuffer[512];
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ImageAsset\", \"AssetBrowser.changeAsset\", %s, %s);",
|
||||
mInspector->getIdString(), mCaption);
|
||||
mBrowseButton->setField("Command", szBuffer);
|
||||
|
||||
setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
|
||||
setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
|
||||
}
|
||||
else
|
||||
{
|
||||
//if we don't have a target object, we'll be manipulating the desination value directly
|
||||
char szBuffer[512];
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ImageAsset\", \"AssetBrowser.changeAsset\", %s, %s);",
|
||||
mInspector->getIdString(), mVariableName);
|
||||
mBrowseButton->setField("Command", szBuffer);
|
||||
}
|
||||
|
||||
// Create "Open in ShapeEditor" button
|
||||
mImageEdButton = new GuiBitmapButtonCtrl();
|
||||
mImageEdButton = NULL;
|
||||
// Create "Open in ImageEditor" button
|
||||
/*mImageEdButton = new GuiBitmapButtonCtrl();
|
||||
|
||||
char bitmapName[512] = "ToolsModule:GameTSCtrl_image";
|
||||
mImageEdButton->setBitmap(StringTable->insert(bitmapName));
|
||||
|
|
@ -498,10 +507,10 @@ GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl()
|
|||
mImageEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile");
|
||||
mImageEdButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile");
|
||||
mImageEdButton->setDataField(StringTable->insert("hovertime"), NULL, "1000");
|
||||
mImageEdButton->setDataField(StringTable->insert("tooltip"), NULL, "Open this file in the Shape Editor");
|
||||
mImageEdButton->setDataField(StringTable->insert("tooltip"), NULL, "Open this file in the Image Editor");
|
||||
|
||||
mImageEdButton->registerObject();
|
||||
addObject(mImageEdButton);
|
||||
addObject(mImageEdButton);*/
|
||||
|
||||
return retCtrl;
|
||||
}
|
||||
|
|
@ -517,18 +526,21 @@ bool GuiInspectorTypeImageAssetPtr::updateRects()
|
|||
mEditCtrlRect.set(fieldExtent.x - dividerPos + dividerMargin, 1, dividerPos - dividerMargin - 34, fieldExtent.y);
|
||||
|
||||
bool resized = mEdit->resize(mEditCtrlRect.point, mEditCtrlRect.extent);
|
||||
if (mBrowseButton != NULL)
|
||||
{
|
||||
mBrowseRect.set(fieldExtent.x - 32, 2, 14, fieldExtent.y - 4);
|
||||
resized |= mBrowseButton->resize(mBrowseRect.point, mBrowseRect.extent);
|
||||
}
|
||||
|
||||
if (mImageEdButton != NULL)
|
||||
{
|
||||
RectI shapeEdRect(fieldExtent.x - 16, 2, 14, fieldExtent.y - 4);
|
||||
resized |= mImageEdButton->resize(shapeEdRect.point, shapeEdRect.extent);
|
||||
}
|
||||
|
||||
if (mBrowseButton != NULL)
|
||||
{
|
||||
if(mImageEdButton != NULL)
|
||||
mBrowseRect.set(fieldExtent.x - 32, 2, 14, fieldExtent.y - 4);
|
||||
else
|
||||
mBrowseRect.set(fieldExtent.x - 16, 2, 14, fieldExtent.y - 4);
|
||||
resized |= mBrowseButton->resize(mBrowseRect.point, mBrowseRect.extent);
|
||||
}
|
||||
|
||||
return resized;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -479,11 +479,22 @@ GuiControl* GuiInspectorTypeMaterialAssetPtr::constructEditControl()
|
|||
|
||||
// Change filespec
|
||||
char szBuffer[512];
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"MaterialAsset\", \"AssetBrowser.changeAsset\", %s, %s);",
|
||||
mInspector->getIdString(), mCaption);
|
||||
mBrowseButton->setField("Command", szBuffer);
|
||||
|
||||
setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
|
||||
if (mInspector->getInspectObject() != nullptr)
|
||||
{
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"MaterialAsset\", \"AssetBrowser.changeAsset\", %s, %s);",
|
||||
mInspector->getIdString(), mCaption);
|
||||
mBrowseButton->setField("Command", szBuffer);
|
||||
|
||||
setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
|
||||
}
|
||||
else
|
||||
{
|
||||
//if we don't have a target object, we'll be manipulating the desination value directly
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"MaterialAsset\", \"AssetBrowser.changeAsset\", %s, %s);",
|
||||
mInspector->getIdString(), mVariableName);
|
||||
mBrowseButton->setField("Command", szBuffer);
|
||||
}
|
||||
|
||||
// Create "Open in Editor" button
|
||||
mEditButton = new GuiBitmapButtonCtrl();
|
||||
|
|
|
|||
|
|
@ -749,11 +749,21 @@ GuiControl* GuiInspectorTypeShapeAssetPtr::constructEditControl()
|
|||
|
||||
// Change filespec
|
||||
char szBuffer[512];
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ShapeAsset\", \"AssetBrowser.changeAsset\", %s, %s);",
|
||||
mInspector->getIdString(), mCaption);
|
||||
mBrowseButton->setField("Command", szBuffer);
|
||||
if (mInspector->getInspectObject() != nullptr)
|
||||
{
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ShapeAsset\", \"AssetBrowser.changeAsset\", %s, %s);",
|
||||
mInspector->getIdString(), mCaption);
|
||||
mBrowseButton->setField("Command", szBuffer);
|
||||
|
||||
setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
|
||||
setDataField(StringTable->insert("targetObject"), NULL, mInspector->getInspectObject()->getIdString());
|
||||
}
|
||||
else
|
||||
{
|
||||
//if we don't have a target object, we'll be manipulating the desination value directly
|
||||
dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ShapeAsset\", \"AssetBrowser.changeAsset\", %s, %s);",
|
||||
mInspector->getIdString(), mVariableName);
|
||||
mBrowseButton->setField("Command", szBuffer);
|
||||
}
|
||||
|
||||
// Create "Open in ShapeEditor" button
|
||||
mShapeEdButton = new GuiBitmapButtonCtrl();
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ void GuiGameSettingsCtrl::onRenderSliderOption(Point2I currentOffset)
|
|||
GFont* font = mProfile->mFont;
|
||||
|
||||
char stringVal[32];
|
||||
dSprintf(stringVal, 32, "%f", mValue);
|
||||
dSprintf(stringVal, 32, "%.1f", mValue);
|
||||
|
||||
S32 stringWidth = font->getStrWidth(stringVal);
|
||||
Point2I textOffset(sliderRect.point.x + sliderRect.extent.x, 0);
|
||||
|
|
|
|||
|
|
@ -1982,7 +1982,7 @@ bool GuiTreeViewCtrl::_hitTest(const Point2I & pnt, Item* & item, BitSet32 & fla
|
|||
min += mProfile->mTextOffset.x;
|
||||
|
||||
FrameAllocatorMarker txtAlloc;
|
||||
U32 bufLen = item->getDisplayTextLength() + 1;
|
||||
U32 bufLen = item->getDisplayTextLength() + 2;
|
||||
char *buf = (char*)txtAlloc.alloc(bufLen);
|
||||
item->getDisplayText(bufLen, buf);
|
||||
|
||||
|
|
|
|||
|
|
@ -428,7 +428,7 @@ void PopupMenu::showPopup(GuiCanvas *owner, S32 x /* = -1 */, S32 y /* = -1 */)
|
|||
Point2I pos = Point2I::Zero;
|
||||
|
||||
if (x == -1 && y == -1)
|
||||
pos = owner->getCursorPos();
|
||||
pos = owner->getCursorPosLocal();
|
||||
else
|
||||
pos = Point2I(x, y);
|
||||
|
||||
|
|
|
|||
|
|
@ -34,9 +34,6 @@ static const U32 MaxExtent = 256;
|
|||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Convex sTerrainConvexList;
|
||||
|
||||
// Number of vertices followed by point index
|
||||
S32 sVertexList[5][5] = {
|
||||
{ 3, 1,2,3 }, // 135 B
|
||||
|
|
@ -350,7 +347,7 @@ void TerrainBlock::buildConvex(const Box3F& box,Convex* convex)
|
|||
{
|
||||
PROFILE_SCOPE( TerrainBlock_buildConvex );
|
||||
|
||||
sTerrainConvexList.collectGarbage();
|
||||
mTerrainConvexList.collectGarbage();
|
||||
|
||||
// First check to see if the query misses the
|
||||
// terrain elevation range.
|
||||
|
|
@ -415,7 +412,7 @@ void TerrainBlock::buildConvex(const Box3F& box,Convex* convex)
|
|||
|
||||
// Create a new convex.
|
||||
TerrainConvex* cp = new TerrainConvex;
|
||||
sTerrainConvexList.registerObject(cp);
|
||||
mTerrainConvexList.registerObject(cp);
|
||||
convex->addToWorkingList(cp);
|
||||
cp->halfA = true;
|
||||
cp->square = 0;
|
||||
|
|
@ -448,7 +445,7 @@ void TerrainBlock::buildConvex(const Box3F& box,Convex* convex)
|
|||
cp->normal[1].normalize();
|
||||
if (mDot(vp[3] - vp[1],cp->normal[0]) > 0) {
|
||||
TerrainConvex* nc = new TerrainConvex(*cp);
|
||||
sTerrainConvexList.registerObject(nc);
|
||||
mTerrainConvexList.registerObject(nc);
|
||||
convex->addToWorkingList(nc);
|
||||
nc->halfA = false;
|
||||
nc->square = cp;
|
||||
|
|
@ -463,7 +460,7 @@ void TerrainBlock::buildConvex(const Box3F& box,Convex* convex)
|
|||
cp->normal[1].normalize();
|
||||
if (mDot(vp[2] - vp[0],cp->normal[0]) > 0) {
|
||||
TerrainConvex* nc = new TerrainConvex(*cp);
|
||||
sTerrainConvexList.registerObject(nc);
|
||||
mTerrainConvexList.registerObject(nc);
|
||||
convex->addToWorkingList(nc);
|
||||
nc->halfA = false;
|
||||
nc->square = cp;
|
||||
|
|
|
|||
|
|
@ -220,13 +220,10 @@ TerrainBlock::TerrainBlock()
|
|||
mTerrainAssetId = StringTable->EmptyString();
|
||||
}
|
||||
|
||||
|
||||
extern Convex sTerrainConvexList;
|
||||
|
||||
TerrainBlock::~TerrainBlock()
|
||||
{
|
||||
// Kill collision
|
||||
sTerrainConvexList.nukeList();
|
||||
mTerrainConvexList.nukeList();
|
||||
|
||||
SAFE_DELETE(mLightMap);
|
||||
mLightMapTex = NULL;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,10 @@
|
|||
#endif
|
||||
#ifndef TERRAINASSET_H
|
||||
#include "T3D/assets/TerrainAsset.h"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef _CONVEX_H_
|
||||
#include "collision/convex.h"
|
||||
#endif
|
||||
|
||||
class GBitmap;
|
||||
class TerrainBlock;
|
||||
|
|
@ -217,6 +220,9 @@ protected:
|
|||
/// True if the zoning needs to be recalculated for the terrain.
|
||||
bool mZoningDirty;
|
||||
|
||||
/// Holds the generated convex list stuff for this terrain
|
||||
Convex mTerrainConvexList;
|
||||
|
||||
String _getBaseTexCacheFileName() const;
|
||||
|
||||
void _rebuildQuadtree();
|
||||
|
|
|
|||
|
|
@ -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…
Reference in a new issue