@rextimmy fix for GuiWindowCtrl so they snap correctly again

Added asset loose files for editor and bake level files on level asset
Correct return of ConsoleGetType on TypeShapeAssetPtr
Adds shape asset support to TSStatic, now will support either raw shape file or ShapeAsset
Adds onInspect function behavior, so when object is inspected, it can do special editor behavior
Adds callback for when editTSCtrl is resized
Added editor setting to force the world editor sidebar(scene tree and inspector windows) to resize to fit to the right side of the screen automatically instead of float
If assimp loader encounters error, it's output into the console log
Makes root Data item in folder hierarchy tree in Asset Browser able to support right mouse popup menu action
Material and Shape assets now correctly base on current browsed folder
Material asset generation now more properly fills out common maps, as well as handles skipped dependencies better
More theme corrections
Updated TestGrid images asset defs to have proper loose file handling
This commit is contained in:
Areloch 2019-11-18 03:30:04 -06:00
parent 7ff451ec89
commit 7b5e1c3c58
35 changed files with 619 additions and 295 deletions

View file

@ -94,6 +94,9 @@ LevelAsset::LevelAsset() : AssetBase(), mIsSubLevel(false)
mGamemodeName = StringTable->EmptyString();
mMainLevelAsset = StringTable->EmptyString();
mEditorFile = StringTable->EmptyString();
mBakedSceneFile = StringTable->EmptyString();
}
//-----------------------------------------------------------------------------
@ -128,6 +131,11 @@ void LevelAsset::initPersistFields()
addProtectedField("NavmeshFile", TypeAssetLooseFilePath, Offset(mNavmeshFile, LevelAsset),
&setLevelFile, &getLevelFile, "Path to the navmesh file.");
addProtectedField("EditorFile", TypeAssetLooseFilePath, Offset(mEditorFile, LevelAsset),
&setEditorFile, &getEditorFile, "Path to the level file with objects that were removed as part of the baking process. Loaded when the editor is loaded for ease of editing.");
addProtectedField("BakedSceneFile", TypeAssetLooseFilePath, Offset(mBakedSceneFile, LevelAsset),
&setBakedSceneFile, &getBakedSceneFile, "Path to the level file with the objects generated as part of the baking process");
addField("isSubScene", TypeBool, Offset(mIsSubLevel, LevelAsset), "Is this a sublevel to another Scene");
addField("gameModeName", TypeString, Offset(mGamemodeName, LevelAsset), "Name of the Game Mode to be used with this level");
}
@ -189,3 +197,41 @@ void LevelAsset::setImageFile(const char* pImageFile)
// Refresh the asset.
refreshAsset();
}
void LevelAsset::setEditorFile(const char* pEditorFile)
{
// Sanity!
AssertFatal(pEditorFile != NULL, "Cannot use a NULL level file.");
// Fetch image file.
pEditorFile = StringTable->insert(pEditorFile);
// Ignore no change,
if (pEditorFile == mEditorFile)
return;
// Update.
mEditorFile = getOwned() ? expandAssetFilePath(pEditorFile) : StringTable->insert(pEditorFile);
// Refresh the asset.
refreshAsset();
}
void LevelAsset::setBakedSceneFile(const char* pBakedSceneFile)
{
// Sanity!
AssertFatal(pBakedSceneFile != NULL, "Cannot use a NULL level file.");
// Fetch image file.
pBakedSceneFile = StringTable->insert(pBakedSceneFile);
// Ignore no change,
if (pBakedSceneFile == mBakedSceneFile)
return;
// Update.
mBakedSceneFile = getOwned() ? expandAssetFilePath(pBakedSceneFile) : StringTable->insert(pBakedSceneFile);
// Refresh the asset.
refreshAsset();
}

View file

@ -52,6 +52,9 @@ class LevelAsset : public AssetBase
StringTableEntry mNavmeshFile;
StringTableEntry mPreviewImage;
StringTableEntry mEditorFile;
StringTableEntry mBakedSceneFile;
bool mIsSubLevel;
StringTableEntry mMainLevelAsset;
@ -81,6 +84,11 @@ public:
void setImageFile(const char* pImageFile);
inline StringTableEntry getImageFile(void) const { return mPreviewImage; };
void setEditorFile(const char* pEditorFile);
inline StringTableEntry getEditorFile(void) const { return mEditorFile; };
void setBakedSceneFile(const char* pBakedSceneFile);
inline StringTableEntry getBakedSceneFile(void) const { return mBakedSceneFile; };
SimObjectId load();
protected:
@ -89,6 +97,12 @@ protected:
static bool setPreviewImageFile(void *obj, const char *index, const char *data) { static_cast<LevelAsset*>(obj)->setImageFile(data); return false; }
static const char* getPreviewImageFile(void* obj, const char* data) { return static_cast<LevelAsset*>(obj)->getImageFile(); }
static bool setEditorFile(void* obj, const char* index, const char* data) { static_cast<LevelAsset*>(obj)->setEditorFile(data); return false; }
static const char* getEditorFile(void* obj, const char* data) { return static_cast<LevelAsset*>(obj)->getEditorFile(); }
static bool setBakedSceneFile(void* obj, const char* index, const char* data) { static_cast<LevelAsset*>(obj)->setBakedSceneFile(data); return false; }
static const char* getBakedSceneFile(void* obj, const char* data) { return static_cast<LevelAsset*>(obj)->getBakedSceneFile(); }
virtual void initializeAsset(void);
virtual void onAssetRefresh(void) {}
};

View file

@ -56,7 +56,8 @@ ConsoleType(assetIdString, TypeShapeAssetPtr, String, ASSET_ID_FIELD_PREFIX)
ConsoleGetType(TypeShapeAssetPtr)
{
// Fetch asset Id.
return *((StringTableEntry*)dptr);
//return *((StringTableEntry*)dptr);
return (*((AssetPtr<ShapeAsset>*)dptr)).getAssetId();
}
//-----------------------------------------------------------------------------

View file

@ -55,6 +55,8 @@
#include "console/engineAPI.h"
#include "T3D/accumulationVolume.h"
#include "gui/editor/inspector/group.h"
using namespace Torque;
extern bool gEditingMission;
@ -140,6 +142,9 @@ TSStatic::TSStatic()
#ifdef TORQUE_AFX_ENABLED
afxZodiacData::convertGradientRangeFromDegrees(mGradientRange, mGradientRangeUser);
#endif
mShapeAsset = StringTable->EmptyString();
mShapeAssetId = StringTable->EmptyString();
}
TSStatic::~TSStatic()
@ -162,6 +167,10 @@ void TSStatic::initPersistFields()
{
addGroup("Media");
addProtectedField("shapeAsset", TypeShapeAssetPtr, Offset(mShapeAsset, TSStatic),
&TSStatic::_setShapeAsset, &defaultProtectedGetFn,
"The source shape asset.");
addField("shapeName", TypeShapeFilename, Offset( mShapeName, TSStatic ),
"%Path and filename of the model file (.DTS, .DAE) to use for this TSStatic." );
@ -250,6 +259,15 @@ void TSStatic::initPersistFields()
Parent::initPersistFields();
}
bool TSStatic::_setShapeAsset(void* obj, const char* index, const char* data)
{
TSStatic* ts = static_cast<TSStatic*>(obj);// ->setFile(FileName(data));
ts->setShapeAsset(StringTable->insert(data));
return false;
}
bool TSStatic::_setFieldSkin( void *object, const char *index, const char *data )
{
TSStatic *ts = static_cast<TSStatic*>( object );
@ -344,6 +362,14 @@ bool TSStatic::onAdd()
return true;
}
bool TSStatic::setShapeAsset(const StringTableEntry shapeAssetId)
{
mShapeAssetId = shapeAssetId;
_createShape();
return true;
}
bool TSStatic::_createShape()
{
// Cleanup before we create.
@ -356,15 +382,37 @@ bool TSStatic::_createShape()
mAmbientThread = NULL;
mShape = NULL;
if (!mShapeName || mShapeName[0] == '\0')
if (mShapeAssetId != StringTable->EmptyString())
{
Con::errorf( "TSStatic::_createShape() - No shape name!" );
return false;
mShapeAsset = mShapeAssetId;
if (mShapeAsset.isNull())
{
Con::errorf("[TSStatic] Failed to load shape asset.");
return false;
}
mShape = mShapeAsset->getShapeResource();
if(!mShape)
{
Con::errorf("TSStatic::_createShape() - Shape Asset had no valid shape!");
return false;
}
}
else
{
if (!mShapeName || mShapeName[0] == '\0')
{
Con::errorf("TSStatic::_createShape() - No shape name!");
return false;
}
mShapeHash = _StringTable::hashString(mShapeName);
mShape = ResourceManager::get().load(mShapeName);
}
mShapeHash = _StringTable::hashString(mShapeName);
mShape = ResourceManager::get().load(mShapeName);
if ( bool(mShape) == false )
{
Con::errorf( "TSStatic::_createShape() - Unable to load shape: %s", mShapeName );
@ -831,7 +879,9 @@ U32 TSStatic::packUpdate(NetConnection *con, U32 mask, BitStream *stream)
if (stream->writeFlag(mask & AdvancedStaticOptionsMask))
{
stream->writeString(mShapeAssetId);
stream->writeString(mShapeName);
stream->write((U32)mDecalType);
stream->writeFlag(mAllowPlayerStep);
@ -923,6 +973,10 @@ void TSStatic::unpackUpdate(NetConnection *con, BitStream *stream)
if (stream->readFlag()) // AdvancedStaticOptionsMask
{
char buffer[256];
stream->readString(buffer);
mShapeAssetId = StringTable->insert(buffer);
mShapeName = stream->readSTString();
stream->read((U32*)&mDecalType);
@ -1409,6 +1463,62 @@ U32 TSStatic::getNumDetails()
//They each function a little differently; but achieve the same purpose of gathering
//target names/counts without polluting simObject.
void TSStatic::onInspect(GuiInspector* inspector)
{
//Put the GameObject group before everything that'd be gameobject-effecting, for orginazational purposes
GuiInspectorGroup* tsStaticInspGroup = new GuiInspectorGroup("Shape", inspector);
tsStaticInspGroup->registerObject();
inspector->addInspectorGroup(tsStaticInspGroup);
inspector->addObject(tsStaticInspGroup);
//Do this on both the server and client
/*S32 materialCount = mShapeAsset->getShape()->materialList->getMaterialNameList().size(); //mMeshAsset->getMaterialCount();
if (isServerObject())
{
//we need to update the editor
for (U32 i = 0; i < mFields.size(); i++)
{
//find any with the materialslot title and clear them out
if (FindMatch::isMatch("MaterialSlot*", mFields[i].mFieldName, false))
{
setDataField(mFields[i].mFieldName, NULL, "");
mFields.erase(i);
continue;
}
}
//next, get a listing of our materials in the shape, and build our field list for them
char matFieldName[128];
if (materialCount > 0)
mComponentGroup = StringTable->insert("Materials");
for (U32 i = 0; i < materialCount; i++)
{
StringTableEntry materialname = StringTable->insert(mMeshAsset->getShape()->materialList->getMaterialName(i).c_str());
//Iterate through our assetList to find the compliant entry in our matList
for (U32 m = 0; m < mMeshAsset->getMaterialCount(); m++)
{
AssetPtr<MaterialAsset> matAsset = mMeshAsset->getMaterialAsset(m);
if (matAsset->getMaterialDefinitionName() == materialname)
{
dSprintf(matFieldName, 128, "MaterialSlot%d", i);
addComponentField(matFieldName, "A material used in the shape file", "Material", matAsset->getAssetId(), "");
break;
}
}
}
if (materialCount > 0)
mComponentGroup = "";
}*/
}
DefineEngineMethod( TSStatic, getTargetName, const char*, ( S32 index ),(0),
"Get the name of the indexed shape material.\n"
"@param index index of the material to get (valid range is 0 - getTargetCount()-1).\n"

View file

@ -48,6 +48,13 @@
#include "scene/reflector.h"
#endif
#ifndef _ASSET_PTR_H_
#include "assets/assetPtr.h"
#endif
#ifndef SHAPEASSET_H
#include "T3D/assets/ShapeAsset.h"
#endif
class TSShapeInstance;
class TSThread;
class TSStatic;
@ -140,7 +147,9 @@ protected:
bool buildPolyList(PolyListContext context, AbstractPolyList* polyList, const Box3F &box, const SphereF& sphere);
bool buildExportPolyList(ColladaUtils::ExportData* exportData, const Box3F &box, const SphereF &);
void buildConvex(const Box3F& box, Convex* convex);
bool setShapeAsset(const StringTableEntry shapeAssetId);
bool _createShape();
void _updatePhysics();
@ -173,6 +182,9 @@ protected:
Vector<S32> mLOSDetails;
TSShapeInstance *mShapeInstance;
AssetPtr<ShapeAsset> mShapeAsset;
StringTableEntry mShapeAssetId;
NetStringHandle mSkinNameHandle;
String mAppliedSkinName;
@ -210,6 +222,7 @@ public:
DECLARE_CONOBJECT(TSStatic);
static void initPersistFields();
static bool _setShapeAsset(void* obj, const char* index, const char* data);
static bool _setFieldSkin( void *object, const char* index, const char* data );
static const char *_getFieldSkin( void *object, const char *data );
@ -246,6 +259,8 @@ public:
const Vector<S32>& getLOSDetails() const { return mLOSDetails; }
virtual void onInspect(GuiInspector*);
private:
virtual void onStaticModified(const char* slotName, const char*newValue = NULL);
protected:

View file

@ -45,7 +45,7 @@ class Stream;
class LightManager;
class SimFieldDictionary;
class SimPersistID;
class GuiInspector;
/// Base class for objects involved in the simulation.
///
@ -647,6 +647,9 @@ class SimObject: public ConsoleObject, public TamlCallbacks
/// Called when the editor is deactivated.
virtual void onEditorDisable(){};
/// Called when the object is inspected via a GuiInspector control
virtual void onInspect(GuiInspector*) {};
/// @}
/// Find a named sub-object of this object.

View file

@ -31,7 +31,7 @@
#include "gfx/gfxDevice.h"
#include "gfx/gfxDrawUtil.h"
#include "gui/containers/guiRolloutCtrl.h"
#include "gui/editor/guiMenuBar.h"
IMPLEMENT_CONOBJECT( GuiWindowCtrl );
@ -855,6 +855,18 @@ void GuiWindowCtrl::onMouseDragged(const GuiEvent &event)
snapZone.point.y -= SnapDistance;
snapZone.extent.x += SnapDistance + SnapDistance;
snapZone.extent.y += SnapDistance + SnapDistance;
//check if we need to offset because of the menubar
U32 menuBarHeight = 0;
GuiCanvas* guiCanvas = getRoot();
if (guiCanvas)
{
GuiMenuBar* menuBar = dynamic_cast<GuiMenuBar*>(guiCanvas->getMenuBar());
if (menuBar)
{
menuBarHeight = menuBar->getHeight();
}
}
// Build valid snap and window vectors to compare against
Vector< GuiWindowCtrl* > windowList;
@ -864,11 +876,15 @@ void GuiWindowCtrl::onMouseDragged(const GuiEvent &event)
{
// Make sure the window is both horizontally and vertically
// within the snap zone for this window.
if( !snapZone.overlaps( windowList[i]->getGlobalBounds() ) )
RectI windowBounds = windowList[i]->getGlobalBounds();
//offset position by menubar height
windowBounds.point.y -= menuBarHeight;
if( !snapZone.overlaps(windowBounds) )
continue;
// Build edges for snap detection
EdgeRectI snapRect( windowList[i]->getGlobalBounds(), mResizeMargin );
EdgeRectI snapRect(windowBounds, mResizeMargin );
if( snapRect.right.position.x <= edges.left.position.x + SnapDistance &&
snapRect.right.position.x >= edges.left.position.x - SnapDistance )

View file

@ -589,6 +589,8 @@ void GuiInspector::refresh()
mGroups.push_back(general);
addObject(general);
mTargets.first()->onInspect(this);
//Entity inspector group
if (mTargets.first()->getClassRep()->isSubclassOf("Entity"))
{
@ -669,7 +671,7 @@ void GuiInspector::refresh()
#endif
// The group ended up having no fields. Remove it.
newGroup->deleteObject();
newGroup->deleteObject();
}
else
{

View file

@ -106,6 +106,11 @@ public:
/// @note Only valid in single-object mode.
void setName( StringTableEntry newName );
void addInspectorGroup(GuiInspectorGroup* group)
{
mGroups.push_back(group);
}
/// Deletes all GuiInspectorGroups
void clearGroups();
@ -163,4 +168,4 @@ protected:
void refresh();
};
#endif
#endif

View file

@ -284,6 +284,18 @@ void EditTSCtrl::consoleInit()
//------------------------------------------------------------------------------
bool EditTSCtrl::resize(const Point2I& newPosition, const Point2I& newExtent)
{
if (!Parent::resize(newPosition, newExtent))
return false;
// Notify the scripts
if (isMethod("onResize"))
Con::executef(this, "onResize", newPosition, newExtent);
return true;
}
//------------------------------------------------------------------------------
void EditTSCtrl::make3DMouseEvent(Gui3DMouseEvent & gui3DMouseEvent, const GuiEvent & event)
{
(GuiEvent&)(gui3DMouseEvent) = event;

View file

@ -191,6 +191,8 @@ class EditTSCtrl : public GuiTSCtrl
virtual bool isMiddleMouseDown() {return mMiddleMouseDown;}
virtual bool resize(const Point2I& newPosition, const Point2I& newExtent);
S32 getDisplayType() const {return mDisplayType;}
virtual void setDisplayType(S32 type);

View file

@ -302,7 +302,10 @@ bool AssimpShapeLoader::fillGuiTreeView(const char* sourceShapePath, GuiTreeView
& ~aiProcess_RemoveRedundantMaterials & ~aiProcess_GenSmoothNormals);
if (!shapeScene)
{
Con::printf("AssimpShapeLoader::fillGuiTreeView - Assimp Error: %s", importer.GetErrorString());
return false;
}
mScene = shapeScene;
// Initialize tree

View file

@ -1,59 +1,60 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<AssetImportSettings>
<Group name="TestConfig">
<Group name="Animations">
<Setting name="SeparateAnimations">1</Setting>
<Setting name="ImportAnimations">1</Setting>
</Group>
<Group name="Materials">
<Setting name="IgnoreMaterials">ColorEffect*,</Setting>
<Setting name="UseExistingMaterials">1</Setting>
<Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
<Setting name="CreateComposites">1</Setting>
<Setting name="ImportMaterials">1</Setting>
<Group name="Images">
<Setting name="GenerateMaterialOnImport">1</Setting>
<Setting name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
<Setting name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
<Setting name="IsHDR">0</Setting>
<Setting name="Scaling">1.0</Setting>
<Setting name="PopulateMaterialMaps">1</Setting>
<Setting name="Compressed">1</Setting>
<Setting name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
<Setting name="TextureFilteringMode">Bilinear</Setting>
<Setting name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_baseColor,_a,</Setting>
<Setting name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
<Setting name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
<Setting name="CompositeTypeSuffixes">_COMP,_COMPOSITE</Setting>
<Setting name="ImageType">N/A</Setting>
<Setting name="UseMips">1</Setting>
</Group>
<Group name="Meshes">
<Setting name="AdjustFloor">0</Setting>
<Setting name="CollapseSubmeshes">0</Setting>
<Setting name="IgnoreNodeScale">0</Setting>
<Setting name="UpAxisOverride">Z_AXIS</Setting>
<Setting name="ScaleOverride">1</Setting>
<Setting name="AdjustFloor">0</Setting>
<Setting name="LODType">TrailingNumber</Setting>
<Setting name="AdjustCenter">0</Setting>
<Setting name="IgnoreNodeScale">0</Setting>
<Setting name="DoUpAxisOverride">0</Setting>
</Group>
<Group name="Images">
<Setting name="Scaling">1.0</Setting>
<Setting name="UseMips">1</Setting>
<Setting name="TextureFilteringMode">Bilinear</Setting>
<Setting name="IsHDR">0</Setting>
<Setting name="MetalnessTypeSuffixes">_METAL,_MET,_METALNESS,_METALLIC</Setting>
<Setting name="NormalTypeSuffixes">_NORMAL,_NORM</Setting>
<Setting name="AOTypeSuffixes">_AO,_AMBIENT,_AMBIENTOCCLUSION</Setting>
<Setting name="ImageType">N/A</Setting>
<Setting name="Compressed">1</Setting>
<Setting name="RoughnessTypeSuffixes">_ROUGH,_ROUGHNESS</Setting>
<Setting name="SmoothnessTypeSuffixes">_SMOOTH,_SMOOTHNESS</Setting>
<Setting name="DiffuseTypeSuffixes">_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_baseColor,_a,</Setting>
<Setting name="PopulateMaterialMaps">1</Setting>
<Setting name="GenerateMaterialOnImport">1</Setting>
<Setting name="CompositeTypeSuffixes">_COMP,_COMPOSITE</Setting>
</Group>
<Group name="Collision">
<Setting name="GenerateLOSCollisions">1</Setting>
<Setting name="CollisionMeshPrefix">Col</Setting>
<Setting name="GenCollisionType">CollisionMesh</Setting>
<Setting name="GenerateCollisions">1</Setting>
<Setting name="LOSCollisionMeshPrefix">LOS</Setting>
<Setting name="GenLOSCollisionType">CollisionMesh</Setting>
</Group>
<Group name="Sounds">
<Setting name="PitchAdjust">1.0</Setting>
<Setting name="VolumeAdjust">1.0</Setting>
<Setting name="Compressed">0</Setting>
<Setting name="CollapseSubmeshes">0</Setting>
<Setting name="ScaleOverride">1</Setting>
<Setting name="AdjustCenter">0</Setting>
</Group>
<Group name="General">
<Setting name="DuplicatAutoResolution">AutoPrune</Setting>
</Group>
<Group name="Collision">
<Setting name="GenCollisionType">CollisionMesh</Setting>
<Setting name="CollisionMeshPrefix">Col</Setting>
<Setting name="GenLOSCollisionType">CollisionMesh</Setting>
<Setting name="GenerateLOSCollisions">1</Setting>
<Setting name="LOSCollisionMeshPrefix">LOS</Setting>
<Setting name="GenerateCollisions">1</Setting>
</Group>
<Group name="Materials">
<Setting name="IgnoreMaterials">ColorEffect*,</Setting>
<Setting name="ImportMaterials">1</Setting>
<Setting name="CreateComposites">1</Setting>
<Setting name="UseDiffuseSuffixOnOriginImage">1</Setting>
<Setting name="UseExistingMaterials">1</Setting>
<Setting name="AlwaysPresentImageMaps">1</Setting>
</Group>
<Group name="Sounds">
<Setting name="PitchAdjust">1.0</Setting>
<Setting name="Compressed">0</Setting>
<Setting name="VolumeAdjust">1.0</Setting>
</Group>
<Group name="Animations">
<Setting name="ImportAnimations">1</Setting>
<Setting name="SeparateAnimations">1</Setting>
</Group>
</Group>
</AssetImportSettings>

View file

@ -1109,6 +1109,7 @@ function AssetListPanelInputs::onRightMouseDown(%this)
function AssetBrowserFilterTree::onRightMouseDown(%this, %itemId)
{
%count = %this.getSelectedItemsCount();
if( %this.getSelectedItemsCount() > 0 && %itemId != 1)
{
//AddNewAssetPopup.showPopup(Canvas);
@ -1127,6 +1128,10 @@ function AssetBrowserFilterTree::onRightMouseDown(%this, %itemId)
EditFolderPopup.showPopup(Canvas);
}
}
else if(%itemId == 1)
{
AddNewModulePopup.showPopup(Canvas);
}
}
//
@ -1743,14 +1748,20 @@ function EWorldEditor::onControlDropped( %this, %payload, %position )
{
echo("DROPPED A SHAPE ON THE EDITOR WINDOW!");
%staticShapeObjDef = AssetDatabase.acquireAsset("Core_GameObjects:StaticShapeObject");
/*%staticShapeObjDef = AssetDatabase.acquireAsset("Core_GameObjects:StaticShapeObject");
%newEntity = %staticShapeObjDef.createObject();
%newEntity.position = %pos;
%newEntity-->MeshComponent.MeshAsset = %module @ ":" @ %asset;
%newEntity.dirtyGameObject = true; //because if we're specifically setting the mesh asset, it's dirty
%newEntity.dirtyGameObject = true; //because if we're specifically setting the mesh asset, it's dirty*/
%newEntity = new TSStatic()
{
position = %pos;
shapeAsset = %module @ ":" @ %asset;
};
getScene(0).add(%newEntity);

View file

@ -289,7 +289,7 @@ function AssetBrowser::addImportingAsset( %this, %assetType, %filePath, %parentA
};
//little bit of interception here
if(%assetItem.assetType $= "Model")
/*if(%assetItem.assetType $= "Model")
{
%fileExt = fileExt(%assetItem.filePath);
%shapeInfo = new GuiTreeViewCtrl();
@ -328,7 +328,7 @@ function AssetBrowser::addImportingAsset( %this, %assetType, %filePath, %parentA
%assetItem.delete();
return 0;
}
}
}*/
if(%assetType $= "Material")
{

View file

@ -118,6 +118,7 @@ function AssetBrowser::importImageAsset(%this, %assetItem)
%assetId = %moduleName@":"@%assetName;
%assetPath = AssetBrowser.currentAddress @ "/";
%assetFullPath = %assetPath @ "/" @ fileName(%filePath);
%newAsset = new ImageAsset()

View file

@ -5,8 +5,10 @@ function AssetBrowser::createMaterialAsset(%this)
%moduleName = AssetBrowser.newAssetSettings.moduleName;
%modulePath = "data/" @ %moduleName;
%tamlpath = %modulePath @ "/materials/" @ %assetName @ ".asset.taml";
%sgfPath = %modulePath @ "/materials/" @ %assetName @ ".sgf";
%assetPath = AssetBrowser.currentAddress @ "/";
%tamlpath = %assetPath @ %assetName @ ".asset.taml";
%sgfPath = %assetPath @ %assetName @ ".sgf";
%asset = new MaterialAsset()
{
@ -225,7 +227,7 @@ function AssetBrowser::prepareImportMaterialAsset(%this, %assetItem)
%assetItem.AOImageAsset.skip = true;
%assetItem.metalnessImageAsset.skip = true;
%compositeAssetPath = "data/" @ %assetItem.moduleName @ "/images";
%compositeAssetPath = AssetBrowser.currentAddress @ "/";
%saveAsPath = %compositeAssetPath @ "/" @ %assetItem.assetName @ "_composite.png";
%compositeAsset = AssetBrowser.addImportingAsset("Image", "", %assetItem, %assetItem.assetName @ "_composite");
%compositeAsset.generatedAsset = true;
@ -303,6 +305,12 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem)
{
%dependencyAssetItem = ImportAssetTree.getItemObject(%childId);
if(%dependencyAssetItem.skip)
{
%childId = ImportAssetTree.getNextSibling(%childId);
continue;
}
%depAssetType = %dependencyAssetItem.assetType;
if(%depAssetType $= "Image")
{
@ -351,44 +359,45 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem)
if(%assetItem.diffuseImageAsset !$= "")
{
%diffuseAssetPath = "data/" @ %moduleName @ "/Images/" @ fileName(%assetItem.diffuseImageAsset.filePath);
%diffuseAssetPath = %assetPath @ fileName(%assetItem.diffuseImageAsset.filePath);
%file.writeline(" DiffuseMap[0] = \"" @ %diffuseAssetPath @"\";");
%file.writeline(" DiffuseMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.diffuseImageAsset.assetName @"\";");
}
if(%assetItem.normalImageAsset)
{
%normalAssetPath = "data/" @ %moduleName @ "/Images/" @ fileName(%assetItem.normalImageAsset.filePath);
%normalAssetPath = %assetPath @ fileName(%assetItem.normalImageAsset.filePath);
%file.writeline(" NormalMap[0] = \"" @ %normalAssetPath @"\";");
%file.writeline(" NormalMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.normalImageAsset.assetName @"\";");
}
/*if(%assetItem.specularImageAsset)
{
%file.writeline(" SpecularMap[0] = \"" @ %assetItem.specularImageAsset.filePath @"\";");
%file.writeline(" SpecularMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.specularImageAsset.assetName @"\";");
}*/
if(%assetItem.roughnessImageAsset && %assetItem.roughnessImageAsset.skip == false)
{
%file.writeline(" RoughMap[0] = \"" @ %assetItem.roughnessImageAsset.filePath @"\";");
%roughAssetPath = %assetPath @ fileName(%assetItem.roughnessImageAsset.filePath);
%file.writeline(" RoughMap[0] = \"" @ %roughAssetPath @"\";");
%file.writeline(" RoughMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.roughnessImageAsset.assetName @"\";");
}
if(%assetItem.smoothnessImageAsset && %assetItem.smoothnessImageAsset.skip == false)
{
%file.writeline(" SmoothnessMap[0] = \"" @ %assetItem.smoothnessImageAsset.filePath @"\";");
%smoothnessAssetPath = %assetPath @ fileName(%assetItem.smoothnessImageAsset.filePath);
%file.writeline(" SmoothnessMap[0] = \"" @ %smoothnessAssetPath @"\";");
%file.writeline(" SmoothnessMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.smoothnessImageAsset.assetName @"\";");
}
if(%assetItem.metalnessImageAsset && %assetItem.metalnessImageAsset.skip == false)
{
%file.writeline(" MetalMap[0] = \"" @ %assetItem.metalnessImageAsset.filePath @"\";");
%metalAssetPath = %assetPath @ fileName(%assetItem.metalnessImageAsset.filePath);
%file.writeline(" MetalMap[0] = \"" @ %metalAssetPath @"\";");
%file.writeline(" MetalMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.metalnessImageAsset.assetName @"\";");
}
if(%assetItem.AOImageAsset && %assetItem.AOImageAsset.skip == false)
{
%file.writeline(" AOMap[0] = \"" @ %assetItem.AOImageAsset.filePath @"\";");
%AOAssetPath = %assetPath @ fileName(%assetItem.AOImageAsset.filePath);
%file.writeline(" AOMap[0] = \"" @ %AOAssetPath @"\";");
%file.writeline(" AOMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.AOImageAsset.assetName @"\";");
}
if(%assetItem.compositeImageAsset)
{
%file.writeline(" CompositeMap[0] = \"" @ %assetItem.compositeImageAsset.filePath @"\";");
%file.writeline(" CompositeMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.compositeImageAsset.assetName @"\";");
%compAssetPath = %assetPath @ fileName(%assetItem.compositeImageAsset.filePath);
%file.writeline(" PBRConfigMap[0] = \"" @ %compAssetPath @"\";");
%file.writeline(" PBRConfigMapAsset[0] = \"" @ %moduleName @ ":" @ %assetItem.compositeImageAsset.assetName @"\";");
}
%file.writeline("};");
%file.writeline("//--- OBJECT WRITE END ---");

View file

@ -174,7 +174,7 @@ function AssetBrowser::importShapeAsset(%this, %assetItem)
%assetImportSuccessful = false;
%assetId = %moduleName@":"@%assetName;
%assetPath = "data/" @ %moduleName @ "/Shapes";
%assetPath = AssetBrowser.currentAddress @ "/";
%assetFullPath = %assetPath @ "/" @ fileName(%filePath);
%newAsset = new ShapeAsset()

View file

@ -15,7 +15,6 @@ function AssetBrowser::buildPopupMenus(%this)
AddNewModulePopup.enableItem(1, false);
}
if( !isObject( EditAssetPopup ) )
{
new PopupMenu( EditAssetPopup )

View file

@ -324,7 +324,7 @@ function ESettingsWindow::getNavEditorSettings(%this)
SettingsInspector.startGroup("Colors");
SettingsInspector.addSettingsField("WorldEditor/newLevelFile", "Hover Spline", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/torsionPath", "Select Spline", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/forceLoadDAE", "Select Spline", "colorI", "");
SettingsInspector.endGroup();
}
@ -348,10 +348,15 @@ function ESettingsWindow::getSceneEditorSettings(%this)
SettingsInspector.endGroup();
SettingsInspector.startGroup("Misc");
//SettingsInspector.addSettingsField("WorldEditor/forceLoadDAE", "Force Load DAE", "bool", "");
SettingsInspector.addSettingsField("WorldEditor/forceLoadDAE", "Force Load DAE", "bool", "");
SettingsInspector.addSettingsField("WorldEditor/Tools/dropAtScreenCenterScalar", "Screen Center Scalar", "float", "");
SettingsInspector.addSettingsField("WorldEditor/Tools/dropAtScreenCenterMax", "Screen Center Max", "float", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Layout");
SettingsInspector.addSettingsField("WorldEditor/forceSidebarToSide", "Force Sidebar Window(s) to side", "bool", "1");
SettingsInspector.endGroup();
}
function ESettingsWindow::getShapeEditorSettings(%this)

View file

@ -235,8 +235,12 @@ new GuiControlProfile (ToolsGuiAutoSizeTextProfile)
if( !isObject( ToolsGuiMLTextProfile ) )
new GuiControlProfile( ToolsGuiMLTextProfile )
{
fontColorLink = "100 100 100";
fontColorLinkHL = "255 255 255";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorSEL = EditorSettings.value("Theme/fieldTextSELColor");
fontColorLink = EditorSettings.value("Theme/fieldTextColor");
fontColorLinkHL = EditorSettings.value("Theme/fieldTextHLColor");
autoSizeWidth = true;
autoSizeHeight = true;
border = false;
@ -744,6 +748,8 @@ singleton GuiControlProfile( GuiInspectorTextEditProfile )
opaque = true;
fillColor = EditorSettings.value("Theme/fieldBGColor");
fillColorHL = EditorSettings.value("Theme/fieldBGHLColor");
fillColorSEL = EditorSettings.value("Theme/fieldBGSELColor");
fillColorNA = EditorSettings.value("Theme/fieldBGSELColor");
// No Border (Rendered by field control)
border = false;
@ -756,7 +762,7 @@ singleton GuiControlProfile( GuiInspectorTextEditProfile )
fontSize = 14;
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorSEL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorSEL = EditorSettings.value("Theme/fieldBGSELColor");
fontColorHL = EditorSettings.value("Theme/fieldTextSELColor");
fontColorNA = EditorSettings.value("Theme/fieldTextSELColor");
category = "Editor";
@ -798,6 +804,7 @@ singleton GuiControlProfile( GuiInspectorFieldProfile)
opaque = true;
fillColor = EditorSettings.value("Theme/fieldBGColor");
fillColorHL = EditorSettings.value("Theme/fieldBGHLColor");
fillColorSEL = EditorSettings.value("Theme/fieldBGSELColor");
fillColorNA = EditorSettings.value("Theme/fieldBGSELColor");
// border color
@ -1203,6 +1210,7 @@ singleton GuiControlProfile (IconDropdownProfile)
{
border = -2;
category = "Editor";
bitmap = "./icon-dropdownbar";
category = "Editor";
//bitmap = "./icon-dropdownbar";
fillColor = "0 0 0";
};

View file

@ -2775,6 +2775,7 @@
HorizSizing = "width";
new GuiTextCtrl() {
profile = "ToolsGuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "9 4";
@ -2783,6 +2784,7 @@
};
new GuiTextCtrl() {
profile = "ToolsGuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "9 26";
@ -3201,6 +3203,7 @@
Extent = "135 20";
new GuiTextCtrl(){ // u
profile = "ToolsGuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "11 1";
@ -3243,6 +3246,7 @@
Extent = "135 20";
new GuiTextCtrl(){ // v
profile = "ToolsGuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "11 1";
@ -3317,6 +3321,7 @@
Extent = "187 20";
new GuiTextCtrl(){ // Speed
profile = "ToolsGuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "11 0";
@ -3418,6 +3423,7 @@
Extent = "135 20";
new GuiTextCtrl(){ // u
profile = "ToolsGuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "11 1";
@ -3458,6 +3464,7 @@
Extent = "135 20";
new GuiTextCtrl(){ // v
profile = "ToolsGuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "11 1";
@ -3538,6 +3545,7 @@
Extent = "187 20";
new GuiTextCtrl(){ // Speed
profile = "ToolsGuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "11 0";

View file

@ -408,6 +408,7 @@
Margin = "0 0 3 3";
new GuiTextCtrl(){
profile = "ToolsGuiTextProfile";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";

View file

@ -1,61 +1,192 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<EditorSettings>
<Group name="MeshRoadEditor">
<Group name="Theme">
<Setting name="tooltipDividerColor">72 70 68 255</Setting>
<Setting name="fieldTextHLColor">234 232 230 255</Setting>
<Setting name="windowBackgroundColor">32 31 30 255</Setting>
<Setting name="tooltipBGColor">43 43 43 255</Setting>
<Setting name="tabsColor">37 36 35 255</Setting>
<Setting name="tooltipTextColor">255 255 255 255</Setting>
<Setting name="dividerMidColor">50 49 48 255</Setting>
<Setting name="tabsHLColor">50 49 48 255</Setting>
<Setting name="dividerDarkColor">17 16 15 255</Setting>
<Setting name="fieldTextNAColor">77 77 77 255</Setting>
<Setting name="fieldBGHLColor">72 70 68 255</Setting>
<Setting name="fieldBGSELColor">100 98 96 255</Setting>
<Setting name="fieldTextColor">178 175 172 255</Setting>
<Setting name="headerTextColor">236 234 232 255</Setting>
<Setting name="fieldBGColor">59 58 57 255</Setting>
<Setting name="headerColor">50 49 48 255</Setting>
<Setting name="dividerLightColor">96 94 92 255</Setting>
<Setting name="tabsSELColor">59 58 57 255</Setting>
<Setting name="fieldTextSELColor">255 255 255 255</Setting>
</Group>
<Group name="ShapeEditor">
<Setting name="AdvancedWndVisible">1</Setting>
<Setting name="SunAngleZ">135</Setting>
<Setting name="backgroundColor">0 0 0 100</Setting>
<Setting name="showNodes">1</Setting>
<Setting name="renderMounts">1</Setting>
<Setting name="showBounds">0</Setting>
<Setting name="SunAmbientColor">180 180 180 255</Setting>
<Setting name="ShowGrid">1</Setting>
<Setting name="highlightMaterial">1</Setting>
<Setting name="SunDiffuseColor">255 255 255 255</Setting>
<Setting name="gridSize">0.1</Setting>
<Setting name="gridDimension">40 40</Setting>
<Setting name="showObjBox">1</Setting>
<Setting name="RenderCollision">0</Setting>
<Setting name="SunAngleX">45</Setting>
</Group>
<Group name="WorldEditor">
<Setting name="EditorLayoutMode">Modern</Setting>
<Setting name="dropType">screenCenter</Setting>
<Setting name="orthoShowGrid">1</Setting>
<Setting name="displayType">6</Setting>
<Setting name="currentEditor">WorldEditorInspectorPlugin</Setting>
<Setting name="forceLoadDAE">0</Setting>
<Setting name="torsionPath">AssetWork_Debug.exe</Setting>
<Setting name="orthoFOV">50</Setting>
<Setting name="undoLimit">40</Setting>
<Group name="ObjectIcons">
<Setting name="fadeIcons">1</Setting>
<Setting name="fadeIconsStartDist">8</Setting>
<Setting name="fadeIconsEndDist">20</Setting>
<Setting name="fadeIconsEndAlpha">0</Setting>
<Setting name="fadeIconsStartAlpha">255</Setting>
</Group>
<Group name="Render">
<Setting name="showMousePopupInfo">1</Setting>
<Setting name="renderObjHandle">1</Setting>
<Setting name="renderSelectionBox">1</Setting>
<Setting name="renderPopupBackground">1</Setting>
<Setting name="renderObjText">1</Setting>
</Group>
<Group name="Theme">
<Setting name="windowTitleBGColor">50 50 50 255</Setting>
<Setting name="windowTitleBGNAColor">180 180 180 255</Setting>
<Setting name="windowTitleFontHLColor">255 255 255 255</Setting>
<Setting name="windowTitleFontColor">215 215 215 255</Setting>
<Setting name="windowTitleBGHLColor">48 48 48 255</Setting>
</Group>
<Group name="Grid">
<Setting name="gridSize">1</Setting>
<Setting name="gridSnap">1</Setting>
<Setting name="gridColor">102 102 102 100</Setting>
<Setting name="gridOriginColor">255 255 255 100</Setting>
<Setting name="gridMinorColor">51 51 51 100</Setting>
</Group>
<Group name="Docs">
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
</Group>
<Group name="Color">
<Setting name="objectTextColor">255 255 255 255</Setting>
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
<Setting name="objSelectColor">255 0 0 255</Setting>
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
<Setting name="selectionBoxColor">255 255 0 255</Setting>
<Setting name="objMouseOverColor">0 255 0 255</Setting>
<Setting name="dragRectColor">255 255 0 255</Setting>
</Group>
<Group name="Tools">
<Setting name="snapSoft">0</Setting>
<Setting name="snapGround">0</Setting>
<Setting name="TerrainSnapOffsetZ">0</Setting>
<Setting name="snapSoftSize">2</Setting>
<Setting name="boundingBoxCollision">0</Setting>
<Setting name="dropAtScreenCenterMax">100</Setting>
<Setting name="dropAtScreenCenterScalar">1</Setting>
<Setting name="objectsUseBoxCenter">1</Setting>
<Setting name="OffsetZValue">0.01</Setting>
</Group>
<Group name="Images">
<Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
<Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
<Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
</Group>
<Group name="Layout">
<Setting name="LayoutMode">Classic</Setting>
</Group>
</Group>
<Group name="AxisGizmo">
<Setting name="rotationSnap">15</Setting>
<Setting name="snapRotations">0</Setting>
<Setting name="mouseScaleScalar">0.8</Setting>
<Setting name="mouseRotateScalar">0.8</Setting>
<Setting name="renderWhenUsed">0</Setting>
<Setting name="axisGizmoMaxScreenLen">100</Setting>
<Setting name="renderInfoText">1</Setting>
<Group name="Grid">
<Setting name="snapToGrid">1</Setting>
<Setting name="renderPlane">0</Setting>
<Setting name="gridColor">255 255 255 20</Setting>
<Setting name="gridSize">1 1 1</Setting>
<Setting name="planeDim">500</Setting>
<Setting name="renderPlaneHashes">0</Setting>
</Group>
</Group>
<Group name="RiverEditor">
<Setting name="HoverSplineColor">255 0 0 255</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
<Setting name="sideMaterialName">DefaultRoadMaterialOther</Setting>
<Setting name="DefaultWidth">10</Setting>
<Setting name="topMaterialName">DefaultRoadMaterialTop</Setting>
<Setting name="DefaultDepth">5</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
<Setting name="HoverNodeColor">255 255 255 255</Setting>
<Setting name="DefaultNormal">0 0 1</Setting>
</Group>
<Group name="TerrainEditor">
<Setting name="currentAction">lowerHeight</Setting>
<Group name="ActionValues">
<Setting name="softSelectRadius">50</Setting>
<Setting name="softSelectDefaultFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
<Setting name="setHeightVal">100</Setting>
<Setting name="scaleVal">1</Setting>
<Setting name="softSelectFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
<Setting name="SlopeMaxAngle">90</Setting>
<Setting name="SlopeMinAngle">0</Setting>
<Setting name="smoothFactor">0.1</Setting>
<Setting name="noiseFactor">1</Setting>
<Setting name="adjustHeightVal">10</Setting>
</Group>
<Group name="Brush">
<Setting name="brushSize">40 40</Setting>
<Setting name="maxBrushSize">40 40</Setting>
<Setting name="brushSoftness">1</Setting>
<Setting name="brushPressure">1</Setting>
<Setting name="brushSize">40 40</Setting>
<Setting name="brushType">ellipse</Setting>
</Group>
<Group name="ActionValues">
<Setting name="softSelectRadius">50</Setting>
<Setting name="adjustHeightVal">10</Setting>
<Setting name="SlopeMaxAngle">90</Setting>
<Setting name="noiseFactor">1</Setting>
<Setting name="SlopeMinAngle">0</Setting>
<Setting name="smoothFactor">0.1</Setting>
<Setting name="setHeightVal">100</Setting>
<Setting name="softSelectFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
<Setting name="softSelectDefaultFilter">1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000</Setting>
<Setting name="scaleVal">1</Setting>
</Group>
</Group>
<Group name="Theme">
<Setting name="dividerDarkColor">17 16 15 255</Setting>
<Setting name="fieldTextHLColor">234 232 230 255</Setting>
<Setting name="fieldTextColor">178 175 172 255</Setting>
<Setting name="fieldTextSELColor">255 255 255 255</Setting>
<Setting name="fieldBGHLColor">72 70 68 255</Setting>
<Setting name="dividerMidColor">50 49 48 255</Setting>
<Setting name="tooltipBGColor">43 43 43 255</Setting>
<Setting name="windowBackgroundColor">32 31 30 255</Setting>
<Setting name="fieldBGColor">59 58 57 255</Setting>
<Setting name="fieldBGSELColor">100 98 96 255</Setting>
<Setting name="tabsColor">37 36 35 255</Setting>
<Setting name="tabsHLColor">50 49 48 255</Setting>
<Setting name="headerColor">50 49 48 255</Setting>
<Setting name="fieldTextNAColor">77 77 77 255</Setting>
<Setting name="tooltipTextColor">255 255 255 255</Setting>
<Setting name="headerTextColor">236 234 232 255</Setting>
<Setting name="tooltipDividerColor">72 70 68 255</Setting>
<Setting name="tabsSELColor">59 58 57 255</Setting>
<Setting name="dividerLightColor">96 94 92 255</Setting>
<Group name="AssetCreation">
<Setting name="PostFXAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="TerrainAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="AutoImport">1</Setting>
<Setting name="TerrainMatAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="CppAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;SpecialAssetTag&gt;/</Setting>
<Setting name="GUIAssetSubdirectoryFormat">&lt;AssetType&gt;/OtherFolder/</Setting>
<Setting name="StatemachineAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="CubemapAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="LevelAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;AssetName&gt;/</Setting>
<Setting name="ScriptAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;SpecialAssetTag&gt;/</Setting>
<Setting name="AssetImporDefaultConfig">TestConfig</Setting>
</Group>
<Group name="GuiEditor">
<Setting name="lastPath">tools/worldEditor/gui</Setting>
<Setting name="lastPath">tools/gui/messageBoxes</Setting>
<Setting name="previewResolution">1024 768</Setting>
<Group name="Library">
<Setting name="viewType">Categorized</Setting>
<Group name="EngineDevelopment">
<Setting name="toggleIntoEditor">0</Setting>
<Setting name="showEditorGuis">0</Setting>
<Setting name="showEditorProfiles">0</Setting>
</Group>
<Group name="Help">
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
</Group>
<Group name="Rendering">
<Setting name="drawGuides">1</Setting>
<Setting name="drawBorderLines">1</Setting>
</Group>
<Group name="Snapping">
<Setting name="snapToCanvas">1</Setting>
@ -67,188 +198,57 @@
<Setting name="snapToEdges">1</Setting>
<Setting name="snapToGuides">1</Setting>
</Group>
<Group name="Rendering">
<Setting name="drawGuides">1</Setting>
<Setting name="drawBorderLines">1</Setting>
</Group>
<Group name="Help">
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Group name="Library">
<Setting name="viewType">Categorized</Setting>
</Group>
<Group name="Selection">
<Setting name="fullBox">0</Setting>
</Group>
<Group name="EngineDevelopment">
<Setting name="showEditorProfiles">0</Setting>
<Setting name="toggleIntoEditor">0</Setting>
<Setting name="showEditorGuis">0</Setting>
</Group>
</Group>
<Group name="ShapeEditor">
<Setting name="SunAngleZ">135</Setting>
<Setting name="gridDimension">40 40</Setting>
<Setting name="gridSize">0.1</Setting>
<Setting name="showObjBox">1</Setting>
<Setting name="AdvancedWndVisible">1</Setting>
<Setting name="showNodes">1</Setting>
<Setting name="ShowGrid">1</Setting>
<Setting name="SunDiffuseColor">255 255 255 255</Setting>
<Setting name="SunAngleX">45</Setting>
<Setting name="highlightMaterial">1</Setting>
<Setting name="backgroundColor">0 0 0 100</Setting>
<Setting name="renderMounts">1</Setting>
<Setting name="RenderCollision">0</Setting>
<Setting name="showBounds">0</Setting>
<Setting name="SunAmbientColor">180 180 180 255</Setting>
</Group>
<Group name="WorldEditor">
<Setting name="forceLoadDAE">0</Setting>
<Setting name="torsionPath">AssetWork_Debug.exe</Setting>
<Setting name="orthoFOV">50</Setting>
<Setting name="undoLimit">40</Setting>
<Setting name="EditorLayoutMode">Modern</Setting>
<Setting name="dropType">screenCenter</Setting>
<Setting name="orthoShowGrid">1</Setting>
<Setting name="displayType">6</Setting>
<Setting name="currentEditor">TerrainPainterPlugin</Setting>
<Group name="Images">
<Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
<Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
<Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
</Group>
<Group name="Docs">
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
</Group>
<Group name="Theme">
<Setting name="windowTitleFontColor">215 215 215 255</Setting>
<Setting name="windowTitleFontHLColor">255 255 255 255</Setting>
<Setting name="windowTitleBGColor">50 50 50 255</Setting>
<Setting name="windowTitleBGHLColor">48 48 48 255</Setting>
<Setting name="windowTitleBGNAColor">180 180 180 255</Setting>
</Group>
<Group name="Grid">
<Setting name="gridColor">102 102 102 100</Setting>
<Setting name="gridOriginColor">255 255 255 100</Setting>
<Setting name="gridMinorColor">51 51 51 100</Setting>
<Setting name="gridSize">1</Setting>
<Setting name="gridSnap">1</Setting>
</Group>
<Group name="ObjectIcons">
<Setting name="fadeIcons">1</Setting>
<Setting name="fadeIconsStartDist">8</Setting>
<Setting name="fadeIconsEndDist">20</Setting>
<Setting name="fadeIconsEndAlpha">0</Setting>
<Setting name="fadeIconsStartAlpha">255</Setting>
</Group>
<Group name="Tools">
<Setting name="dropAtScreenCenterScalar">1</Setting>
<Setting name="TerrainSnapOffsetZ">0</Setting>
<Setting name="OffsetZValue">0.01</Setting>
<Setting name="objectsUseBoxCenter">1</Setting>
<Setting name="boundingBoxCollision">0</Setting>
<Setting name="dropAtScreenCenterMax">100</Setting>
<Setting name="snapGround">0</Setting>
<Setting name="snapSoft">0</Setting>
<Setting name="snapSoftSize">2</Setting>
</Group>
<Group name="Render">
<Setting name="renderObjText">1</Setting>
<Setting name="renderPopupBackground">1</Setting>
<Setting name="showMousePopupInfo">1</Setting>
<Setting name="renderSelectionBox">1</Setting>
<Setting name="renderObjHandle">1</Setting>
</Group>
<Group name="Color">
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
<Setting name="objSelectColor">255 0 0 255</Setting>
<Setting name="objMouseOverColor">0 255 0 255</Setting>
<Setting name="dragRectColor">255 255 0 255</Setting>
<Setting name="objectTextColor">255 255 255 255</Setting>
<Setting name="selectionBoxColor">255 255 0 255</Setting>
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
</Group>
<Group name="Layout">
<Setting name="LayoutMode">Classic</Setting>
</Group>
</Group>
<Group name="AssetCreation">
<Setting name="CubemapAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="LevelAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;AssetName&gt;/</Setting>
<Setting name="AssetImporDefaultConfig">TestConfig</Setting>
<Setting name="PostFXAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="CppAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;SpecialAssetTag&gt;/</Setting>
<Setting name="StatemachineAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="TerrainMatAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="ScriptAssetSubdirectoryFormat">&lt;AssetType&gt;/&lt;SpecialAssetTag&gt;/</Setting>
<Setting name="AutoImport">1</Setting>
<Setting name="TerrainAssetSubdirectoryFormat">&lt;AssetType&gt;/</Setting>
<Setting name="GUIAssetSubdirectoryFormat">&lt;AssetType&gt;/OtherFolder/</Setting>
</Group>
<Group name="LevelInformation">
<Setting name="levelsDirectory">data/FPSGameplay/levels</Setting>
<Group name="levels">
<Group name="BlankRoom.mis">
<Setting name="cameraSpeed">25</Setting>
</Group>
<Group name="PbrMatTest.mis">
<Setting name="cameraSpeed">5</Setting>
</Group>
</Group>
<Group name="MeshRoadEditor">
<Setting name="DefaultWidth">10</Setting>
<Setting name="topMaterialName">DefaultRoadMaterialTop</Setting>
<Setting name="sideMaterialName">DefaultRoadMaterialOther</Setting>
<Setting name="DefaultNormal">0 0 1</Setting>
<Setting name="HoverSplineColor">255 0 0 255</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
</Group>
<Group name="Assets">
<Setting name="AutoImport">1</Setting>
<Setting name="AssetImporDefaultConfig">TestConfig</Setting>
<Setting name="AutoImport">0</Setting>
<Group name="Browser">
<Setting name="previewTileSize">small</Setting>
</Group>
</Group>
<Group name="NavEditor">
<Setting name="backgroundBuild">1</Setting>
<Setting name="spawnDatablock">DefaultPlayerData</Setting>
<Setting name="SpawnClass">AIPlayer</Setting>
</Group>
<Group name="RiverEditor">
<Setting name="DefaultNormal">0 0 1</Setting>
<Setting name="HoverSplineColor">255 0 0 255</Setting>
<Setting name="DefaultWidth">10</Setting>
<Setting name="DefaultDepth">5</Setting>
<Setting name="HoverNodeColor">255 255 255 255</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
</Group>
<Group name="AxisGizmo">
<Setting name="rotationSnap">15</Setting>
<Setting name="mouseRotateScalar">0.8</Setting>
<Setting name="snapRotations">0</Setting>
<Setting name="mouseScaleScalar">0.8</Setting>
<Setting name="renderInfoText">1</Setting>
<Setting name="renderWhenUsed">0</Setting>
<Setting name="axisGizmoMaxScreenLen">100</Setting>
<Group name="Grid">
<Setting name="gridSize">1 1 1</Setting>
<Setting name="planeDim">500</Setting>
<Setting name="gridColor">255 255 255 20</Setting>
<Setting name="renderPlane">0</Setting>
<Setting name="snapToGrid">1</Setting>
<Setting name="renderPlaneHashes">0</Setting>
<Group name="LevelInformation">
<Setting name="levelsDirectory">data/FPSGameplay/levels</Setting>
<Group name="levels">
<Group name="PbrMatTest.mis">
<Setting name="cameraSpeed">5</Setting>
</Group>
<Group name="BlankRoom.mis">
<Setting name="cameraSpeed">25</Setting>
</Group>
</Group>
</Group>
<Group name="AssetBrowser">
<Setting name="previewSize">Small</Setting>
</Group>
<Group name="RoadEditor">
<Setting name="materialName">DefaultDecalRoadMaterial</Setting>
<Setting name="DefaultWidth">10</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
<Setting name="HoverNodeColor">255 255 255 255</Setting>
</Group>
<Group name="ConvexEditor">
<Setting name="materialName">Grid_512_Orange</Setting>
</Group>
<Group name="RoadEditor">
<Setting name="materialName">DefaultDecalRoadMaterial</Setting>
<Setting name="HoverNodeColor">255 255 255 255</Setting>
<Setting name="DefaultWidth">10</Setting>
<Setting name="SelectedSplineColor">0 255 0 255</Setting>
</Group>
<Group name="NavEditor">
<Setting name="SpawnClass">AIPlayer</Setting>
<Setting name="backgroundBuild">1</Setting>
<Setting name="spawnDatablock">DefaultPlayerData</Setting>
</Group>
<Group name="DatablockEditor">
<Setting name="libraryTab">1</Setting>
</Group>
<Group name="AssetBrowser">
<Setting name="previewSize">Small</Setting>
</Group>
</EditorSettings>

View file

@ -34,8 +34,15 @@ singleton GuiControlProfile(GuiShapeEdScrollProfile : GuiEditorScrollProfile)
singleton GuiControlProfile(GuiShapeEdTextListProfile : ToolsGuiTextListProfile)
{
// Customise the not-active font used for the header row
fontColorNA = "75 75 75";
fontColor = EditorSettings.value("Theme/fieldTextColor");
fontColorHL = EditorSettings.value("Theme/fieldTextHLColor");
fontColorSEL = EditorSettings.value("Theme/fieldTextSELColor");
fontColorNA = EditorSettings.value("Theme/fieldTextNAColor");
fillColor = EditorSettings.value("Theme/fieldBGColor");
fillColorHL = EditorSettings.value("Theme/fieldBGHLColor");
fillColorSEL = EditorSettings.value("Theme/fieldBGSELColor");
category = "Editor";
};

View file

@ -431,6 +431,7 @@
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
text = "Col Meshes";
position = "7 120";
extent = "56 16";
@ -446,6 +447,7 @@
Variable = "ShapeEdShapeView.colMeshes";
};
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
text = "Col Polys";
position = "108 120";
extent = "43 16";
@ -1417,6 +1419,7 @@
canSaveDynamicFields = "0";
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
text = "Fit Type";
position = "5 5";
extent = "41 16";
@ -1434,6 +1437,7 @@
internalName = "colType";
};
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
text = "Fit Target";
position = "5 25";
extent = "45 16";

View file

@ -59,6 +59,7 @@
hovertime = "1000";
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
HorizSizing = "left";
VertSizing = "top";
position = "740 19";

View file

@ -197,6 +197,7 @@
isContainer = true;
new GuiTextCtrl() { // Header
Profile = "ToolsGuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "5 1";
@ -204,6 +205,7 @@
text = "Sequence Properties";
};
new GuiTextCtrl() { // Name
Profile = "ToolsGuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "16 22";
@ -402,6 +404,7 @@
// Triggers
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "5 0";
@ -698,6 +701,7 @@
isContainer = true;
new GuiTextCtrl() {
Profile = "ToolsGuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "5 1";
@ -1059,6 +1063,7 @@
isContainer = "1";
new GuiTextCtrl() { // Header
Profile = "ToolsGuiTextProfile";
text = "Detail/Object Properties";
position = "4 1";
extent = "112 16";
@ -1321,6 +1326,7 @@
isContainer = true;
new GuiTextCtrl() { // Header
Profile = "ToolsGuiTextProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "5 1";

View file

@ -853,7 +853,7 @@
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "ToolsGuiTransparentProfile";
Profile = "ToolsGuiSolidDefaultProfile";
HorizSizing = "width";
VertSizing = "height";
Position = "5 5";

View file

@ -347,6 +347,7 @@
};
};
new GuiCheckBoxCtrl() {
profile = "ToolsGuiCheckBoxProfile";
text = "Snap to object bounding box";
groupNum = "1";
useMouseEvents = "0";
@ -775,6 +776,7 @@
};
};
new GuiCheckBoxCtrl() {
profile = "ToolsGuiCheckBoxProfile";
text = "Grid Snapping";
groupNum = "1";
useMouseEvents = "0";
@ -794,6 +796,7 @@
canSaveDynamicFields = "0";
};
new GuiCheckBoxCtrl() {
profile = "ToolsGuiCheckBoxProfile";
text = "Use Group Center";
groupNum = "1";
useMouseEvents = "0";

View file

@ -20,7 +20,7 @@
isContainer = "1";
Profile = "ToolsGuiWindowProfile";
Position = getWord($pref::Video::mode, 0) - 330 SPC
getWord(EditorGuiToolbar.extent, 1) + getWord(EWTreeWindow.extent, 1) + 40;
getWord(EditorGuiToolbar.extent, 1) + getWord(EWTreeWindow.extent, 1) + 40;
Extent = "300 250";
MinExtent = "200 150";
HorizSizing = "windowRelative";

View file

@ -58,6 +58,12 @@ function EditorGui::init(%this)
%this.add( EWTreeWindow );
EWTreeWindow-->EditorTree.selectPage( 0 );
EWTreeWindow.setVisible( false );
if(EditorSettings.value( "WorldEditor/forceSidebarToSide" ) == 1)
{
EWTreeWindow.position = %this.extent.x - EWTreeWindow.Extent.x SPC EditorGuiToolbar.extent.y;
EWTreeWindow.extent = EWTreeWindow.extent.x SPC %this.extent.y - EditorGuiToolbar.extent.y - EditorGuiStatusBar.extent.y - 25;
}
}
}
@ -70,6 +76,12 @@ function EditorGui::init(%this)
{
%this.add( EWInspectorWindow );
EWInspectorWindow.setVisible( false );
if(EditorSettings.value( "WorldEditor/forceSidebarToSide" ) == 1)
{
EWInspectorWindow.position = EWTreeWindow.position.x SPC EWTreeWindow.extent.y;
EWInspectorWindow.extent = EWTreeWindow.extent.x SPC EWTreeWindow.extent.y;
}
}
}
@ -1425,6 +1437,24 @@ function EWorldEditorAlignPopup::onSelect(%this, %id, %text)
//-----------------------------------------------------------------------------
function EWorldEditor::onResize(%this, %newPosition, %newExtent)
{
//if(EditorSettings.value( "WorldEditor/forceSidebarToSide" ) == 1)
//{
%treePos = %this.extent.x - (%this.extent.x * 0.2) SPC EditorGuiToolbar.extent.y;
%treeExt = %this.extent.x * 0.2 SPC (%this.extent.y * 0.5) - EditorGuiToolbar.extent.y - EditorGuiStatusBar.extent.y - 25;
EWTreeWindow.resize(%treePos.x, %treePos.y, %treeExt.x, %treeExt.y);
//}
//if(EditorSettings.value( "WorldEditor/forceSidebarToSide" ) == 1)
//{
%inspPos = EWTreeWindow.position.x SPC EWTreeWindow.position.y + EWTreeWindow.extent.y;
%inspExt = EWTreeWindow.extent.x SPC %this.extent.y - EWTreeWindow.extent.y - (EditorGuiStatusBar.extent.y * 2);
EWInspectorWindow.resize(%inspPos.x, %inspPos.y, %inspExt.x, %inspExt.y);
//}
}
//-----------------------------------------------------------------------------

View file

@ -85,6 +85,7 @@ addDef(ASSIMP_BUILD_NO_MDL_IMPORTER)
addDef(ASSIMP_BUILD_NO_MMD_IMPORTER)
addDef(ASSIMP_BUILD_NO_NDO_IMPORTER)
addDef(ASSIMP_BUILD_NO_NFF_IMPORTER)
#addDef(ASSIMP_BUILD_NO_OBJ_IMPORTER)
addDef(ASSIMP_BUILD_NO_OFF_IMPORTER)
addDef(ASSIMP_BUILD_NO_OGRE_IMPORTER)
addDef(ASSIMP_BUILD_NO_OPENGEX_IMPORTER)