mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
Added refactor of Editor Settings window
Various fixes for asset handling. WIP of crash tracking
This commit is contained in:
parent
691d3f501e
commit
ff871f37e3
30 changed files with 662 additions and 273 deletions
|
|
@ -47,14 +47,14 @@
|
||||||
|
|
||||||
IMPLEMENT_CONOBJECT(GUIAsset);
|
IMPLEMENT_CONOBJECT(GUIAsset);
|
||||||
|
|
||||||
ConsoleType(GUIAssetPtr, TypeGUIAssetPtr, GUIAsset, ASSET_ID_FIELD_PREFIX)
|
ConsoleType(GUIAssetPtr, TypeGUIAssetPtr, String, ASSET_ID_FIELD_PREFIX)
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
ConsoleGetType(TypeGUIAssetPtr)
|
ConsoleGetType(TypeGUIAssetPtr)
|
||||||
{
|
{
|
||||||
// Fetch asset Id.
|
// Fetch asset Id.
|
||||||
return (*((AssetPtr<GUIAsset>*)dptr)).getAssetId();
|
return *((StringTableEntry*)dptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
@ -67,19 +67,11 @@ ConsoleSetType(TypeGUIAssetPtr)
|
||||||
// Yes, so fetch field value.
|
// Yes, so fetch field value.
|
||||||
const char* pFieldValue = argv[0];
|
const char* pFieldValue = argv[0];
|
||||||
|
|
||||||
// Fetch asset pointer.
|
// Fetch asset Id.
|
||||||
AssetPtr<GUIAsset>* pAssetPtr = dynamic_cast<AssetPtr<GUIAsset>*>((AssetPtrBase*)(dptr));
|
StringTableEntry* assetId = (StringTableEntry*)(dptr);
|
||||||
|
|
||||||
// Is the asset pointer the correct type?
|
// Update asset value.
|
||||||
if (pAssetPtr == NULL)
|
*assetId = StringTable->insert(pFieldValue);
|
||||||
{
|
|
||||||
// No, so fail.
|
|
||||||
//Con::warnf("(TypeGUIAssetPtr) - Failed to set asset Id '%d'.", pFieldValue);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set asset.
|
|
||||||
pAssetPtr->setAssetId(pFieldValue);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -268,4 +260,4 @@ bool GuiInspectorTypeGUIAssetPtr::updateRects()
|
||||||
}
|
}
|
||||||
|
|
||||||
return resized;
|
return resized;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -225,8 +225,6 @@ const char* GameObjectAsset::create()
|
||||||
//Entity* e = dynamic_cast<Entity*>(pSimObject);
|
//Entity* e = dynamic_cast<Entity*>(pSimObject);
|
||||||
//e->_setGameObject(getAssetId());
|
//e->_setGameObject(getAssetId());
|
||||||
|
|
||||||
StringTableEntry assetId = getAssetId();
|
|
||||||
|
|
||||||
pSimObject->setDataField(StringTable->insert("GameObject"), nullptr, getAssetId());
|
pSimObject->setDataField(StringTable->insert("GameObject"), nullptr, getAssetId());
|
||||||
|
|
||||||
return pSimObject->getIdString();
|
return pSimObject->getIdString();
|
||||||
|
|
|
||||||
|
|
@ -47,14 +47,14 @@
|
||||||
|
|
||||||
IMPLEMENT_CONOBJECT(ImageAsset);
|
IMPLEMENT_CONOBJECT(ImageAsset);
|
||||||
|
|
||||||
ConsoleType(ImageAssetPtr, TypeImageAssetPtr, ImageAsset, ASSET_ID_FIELD_PREFIX)
|
ConsoleType(ImageAssetPtr, TypeImageAssetPtr, String, ASSET_ID_FIELD_PREFIX)
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
ConsoleGetType(TypeImageAssetPtr)
|
ConsoleGetType(TypeImageAssetPtr)
|
||||||
{
|
{
|
||||||
// Fetch asset Id.
|
// Fetch asset Id.
|
||||||
return (*((AssetPtr<ImageAsset>*)dptr)).getAssetId();
|
return *((StringTableEntry*)dptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
@ -67,19 +67,11 @@ ConsoleSetType(TypeImageAssetPtr)
|
||||||
// Yes, so fetch field value.
|
// Yes, so fetch field value.
|
||||||
const char* pFieldValue = argv[0];
|
const char* pFieldValue = argv[0];
|
||||||
|
|
||||||
// Fetch asset pointer.
|
// Fetch asset Id.
|
||||||
AssetPtr<ImageAsset>* pAssetPtr = dynamic_cast<AssetPtr<ImageAsset>*>((AssetPtrBase*)(dptr));
|
StringTableEntry* assetId = (StringTableEntry*)(dptr);
|
||||||
|
|
||||||
// Is the asset pointer the correct type?
|
// Update asset value.
|
||||||
if (pAssetPtr == NULL)
|
*assetId = StringTable->insert(pFieldValue);
|
||||||
{
|
|
||||||
// No, so fail.
|
|
||||||
//Con::warnf("(TypeImageAssetPtr) - Failed to set asset Id '%d'.", pFieldValue);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set asset.
|
|
||||||
pAssetPtr->setAssetId(pFieldValue);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,14 +47,14 @@
|
||||||
|
|
||||||
IMPLEMENT_CONOBJECT(LevelAsset);
|
IMPLEMENT_CONOBJECT(LevelAsset);
|
||||||
|
|
||||||
ConsoleType(LevelAssetPtr, TypeLevelAssetPtr, LevelAsset, ASSET_ID_FIELD_PREFIX)
|
ConsoleType(LevelAssetPtr, TypeLevelAssetPtr, String, ASSET_ID_FIELD_PREFIX)
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
ConsoleGetType(TypeLevelAssetPtr)
|
ConsoleGetType(TypeLevelAssetPtr)
|
||||||
{
|
{
|
||||||
// Fetch asset Id.
|
// Fetch asset Id.
|
||||||
return (*((AssetPtr<LevelAsset>*)dptr)).getAssetId();
|
return *((StringTableEntry*)dptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
@ -67,19 +67,11 @@ ConsoleSetType(TypeLevelAssetPtr)
|
||||||
// Yes, so fetch field value.
|
// Yes, so fetch field value.
|
||||||
const char* pFieldValue = argv[0];
|
const char* pFieldValue = argv[0];
|
||||||
|
|
||||||
// Fetch asset pointer.
|
// Fetch asset Id.
|
||||||
AssetPtr<LevelAsset>* pAssetPtr = dynamic_cast<AssetPtr<LevelAsset>*>((AssetPtrBase*)(dptr));
|
StringTableEntry* assetId = (StringTableEntry*)(dptr);
|
||||||
|
|
||||||
// Is the asset pointer the correct type?
|
// Update asset value.
|
||||||
if (pAssetPtr == NULL)
|
*assetId = StringTable->insert(pFieldValue);
|
||||||
{
|
|
||||||
// No, so fail.
|
|
||||||
//Con::warnf("(TypeLevelAssetPtr) - Failed to set asset Id '%d'.", pFieldValue);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set asset.
|
|
||||||
pAssetPtr->setAssetId(pFieldValue);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -121,6 +113,9 @@ void LevelAsset::initPersistFields()
|
||||||
addField("LevelName", TypeString, Offset(mLevelName, LevelAsset), "Human-friendly name for the level.");
|
addField("LevelName", TypeString, Offset(mLevelName, LevelAsset), "Human-friendly name for the level.");
|
||||||
addProtectedField("PreviewImage", TypeAssetLooseFilePath, Offset(mPreviewImage, LevelAsset),
|
addProtectedField("PreviewImage", TypeAssetLooseFilePath, Offset(mPreviewImage, LevelAsset),
|
||||||
&setPreviewImageFile, &getPreviewImageFile, "Path to the image used for selection preview.");
|
&setPreviewImageFile, &getPreviewImageFile, "Path to the image used for selection preview.");
|
||||||
|
|
||||||
|
addField("isSubScene", TypeString, 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");
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,8 @@ class LevelAsset : public AssetBase
|
||||||
bool mIsSubLevel;
|
bool mIsSubLevel;
|
||||||
StringTableEntry mMainLevelAsset;
|
StringTableEntry mMainLevelAsset;
|
||||||
|
|
||||||
|
StringTableEntry mGamemodeName;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LevelAsset();
|
LevelAsset();
|
||||||
virtual ~LevelAsset();
|
virtual ~LevelAsset();
|
||||||
|
|
|
||||||
|
|
@ -531,7 +531,7 @@ void ReflectionProbe::updateProbeParams()
|
||||||
mProbeInfoIdx = ProbeRenderInst::all.size() - 1;
|
mProbeInfoIdx = ProbeRenderInst::all.size() - 1;
|
||||||
mProbeInfo->mIsEnabled = false;
|
mProbeInfo->mIsEnabled = false;
|
||||||
|
|
||||||
PROBEMGR->registerProbe(mProbeInfoIdx);
|
//PROBEMGR->registerProbe(mProbeInfoIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
mProbeInfo->mProbeShapeType = mProbeShapeType;
|
mProbeInfo->mProbeShapeType = mProbeShapeType;
|
||||||
|
|
@ -965,4 +965,4 @@ DefineEngineMethod(ReflectionProbe, Bake, void, (), ,
|
||||||
{
|
{
|
||||||
clientProbe->bake();
|
clientProbe->bake();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ String GFXTextureManager::smUnavailableTexturePath(Con::getVariable("$Core::UnAv
|
||||||
String GFXTextureManager::smWarningTexturePath(Con::getVariable("$Core::WarningTexturePath"));
|
String GFXTextureManager::smWarningTexturePath(Con::getVariable("$Core::WarningTexturePath"));
|
||||||
String GFXTextureManager::smDefaultIrradianceCubemapPath(Con::getVariable("$Core::DefaultIrradianceCubemap"));
|
String GFXTextureManager::smDefaultIrradianceCubemapPath(Con::getVariable("$Core::DefaultIrradianceCubemap"));
|
||||||
String GFXTextureManager::smDefaultPrefilterCubemapPath(Con::getVariable("$Core::DefaultPrefilterCubemap"));
|
String GFXTextureManager::smDefaultPrefilterCubemapPath(Con::getVariable("$Core::DefaultPrefilterCubemap"));
|
||||||
|
String GFXTextureManager::smBRDFTexturePath(Con::getVariable("$Core::BRDFTexture"));
|
||||||
|
|
||||||
GFXTextureManager::EventSignal GFXTextureManager::smEventSignal;
|
GFXTextureManager::EventSignal GFXTextureManager::smEventSignal;
|
||||||
|
|
||||||
|
|
@ -80,6 +81,10 @@ void GFXTextureManager::init()
|
||||||
Con::addVariable("$Core::DefaultPrefilterCubemap", TypeRealString, &smDefaultPrefilterCubemapPath,
|
Con::addVariable("$Core::DefaultPrefilterCubemap", TypeRealString, &smDefaultPrefilterCubemapPath,
|
||||||
"The file path of the texture used as the default specular cubemap for PBR.\n"
|
"The file path of the texture used as the default specular cubemap for PBR.\n"
|
||||||
"@ingroup GFX\n");
|
"@ingroup GFX\n");
|
||||||
|
|
||||||
|
Con::addVariable("$Core::BRDFTexture", TypeRealString, &smBRDFTexturePath,
|
||||||
|
"The file path of the texture used as the default irradiance cubemap for PBR.\n"
|
||||||
|
"@ingroup GFX\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
GFXTextureManager::GFXTextureManager()
|
GFXTextureManager::GFXTextureManager()
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,8 @@ public:
|
||||||
static const String& getDefaultIrradianceCubemapPath() { return smDefaultIrradianceCubemapPath; }
|
static const String& getDefaultIrradianceCubemapPath() { return smDefaultIrradianceCubemapPath; }
|
||||||
static const String& getDefaultPrefilterCubemapPath() { return smDefaultPrefilterCubemapPath; }
|
static const String& getDefaultPrefilterCubemapPath() { return smDefaultPrefilterCubemapPath; }
|
||||||
|
|
||||||
|
static const String& getBRDFTexturePath() { return smBRDFTexturePath; }
|
||||||
|
|
||||||
/// Update width and height based on available resources.
|
/// Update width and height based on available resources.
|
||||||
///
|
///
|
||||||
/// We provide a simple interface for managing texture memory usage. Specifically,
|
/// We provide a simple interface for managing texture memory usage. Specifically,
|
||||||
|
|
@ -215,6 +217,7 @@ protected:
|
||||||
|
|
||||||
static String smDefaultIrradianceCubemapPath;
|
static String smDefaultIrradianceCubemapPath;
|
||||||
static String smDefaultPrefilterCubemapPath;
|
static String smDefaultPrefilterCubemapPath;
|
||||||
|
static String smBRDFTexturePath;
|
||||||
|
|
||||||
GFXTextureObject *mListHead;
|
GFXTextureObject *mListHead;
|
||||||
GFXTextureObject *mListTail;
|
GFXTextureObject *mListTail;
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#include "gui/editor/guiInspector.h"
|
#include "gui/editor/guiInspector.h"
|
||||||
#include "core/util/safeDelete.h"
|
#include "core/util/safeDelete.h"
|
||||||
#include "gfx/gfxDrawUtil.h"
|
#include "gfx/gfxDrawUtil.h"
|
||||||
|
#include "util/settings.h"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// GuiInspectorVariableField
|
// GuiInspectorVariableField
|
||||||
|
|
@ -104,7 +105,17 @@ void GuiInspectorVariableField::setData( const char* data, bool callbacks )
|
||||||
{
|
{
|
||||||
if (mOwnerObject != nullptr)
|
if (mOwnerObject != nullptr)
|
||||||
{
|
{
|
||||||
mOwnerObject->setDataField(mVariableName, NULL, data);
|
//Special case: if our object is a Settings class, we'll assume that we're trying to get/set the fields via the Setting class's normal behavior
|
||||||
|
//otherwise, use fields as normal
|
||||||
|
Settings* setting = dynamic_cast<Settings*>(mOwnerObject);
|
||||||
|
if (setting)
|
||||||
|
{
|
||||||
|
setting->setValue(mVariableName, data);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mOwnerObject->setDataField(mVariableName, NULL, data);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -121,8 +132,16 @@ const char* GuiInspectorVariableField::getData( U32 inspectObjectIndex )
|
||||||
{
|
{
|
||||||
if ( !mCaption || mCaption[0] == 0 )
|
if ( !mCaption || mCaption[0] == 0 )
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
return Con::getVariable( mCaption );
|
Settings* setting = dynamic_cast<Settings*>(mOwnerObject);
|
||||||
|
if (setting)
|
||||||
|
{
|
||||||
|
return setting->value(mVariableName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Con::getVariable(mCaption);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiInspectorVariableField::setValue( const char* newValue )
|
void GuiInspectorVariableField::setValue( const char* newValue )
|
||||||
|
|
@ -138,4 +157,4 @@ void GuiInspectorVariableField::updateValue()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
setValue( getData() );
|
setValue( getData() );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,10 @@ void GuiVariableInspector::loadVars( String searchStr )
|
||||||
|
|
||||||
void GuiVariableInspector::update()
|
void GuiVariableInspector::update()
|
||||||
{
|
{
|
||||||
clearGroups();
|
for (U32 g = 0; g < mGroups.size(); g++)
|
||||||
|
{
|
||||||
|
mGroups[g]->clearFields();
|
||||||
|
}
|
||||||
|
|
||||||
for (U32 i = 0; i < mFields.size(); i++)
|
for (U32 i = 0; i < mFields.size(); i++)
|
||||||
{
|
{
|
||||||
|
|
@ -149,6 +152,8 @@ void GuiVariableInspector::addField(const char* name, const char* label, const c
|
||||||
fieldTypeMask = TypeF32;
|
fieldTypeMask = TypeF32;
|
||||||
else if (newField.mFieldTypeName == StringTable->insert("vector"))
|
else if (newField.mFieldTypeName == StringTable->insert("vector"))
|
||||||
fieldTypeMask = TypePoint3F;
|
fieldTypeMask = TypePoint3F;
|
||||||
|
else if (newField.mFieldTypeName == StringTable->insert("vector2"))
|
||||||
|
fieldTypeMask = TypePoint2F;
|
||||||
//else if (fieldType == StringTable->insert("material"))
|
//else if (fieldType == StringTable->insert("material"))
|
||||||
// fieldTypeMask = TypeMaterialName;
|
// fieldTypeMask = TypeMaterialName;
|
||||||
else if (newField.mFieldTypeName == StringTable->insert("image"))
|
else if (newField.mFieldTypeName == StringTable->insert("image"))
|
||||||
|
|
@ -264,4 +269,4 @@ DefineEngineMethod(GuiVariableInspector, setFieldEnabled, void, (const char* fie
|
||||||
DefineEngineMethod( GuiVariableInspector, loadVars, void, ( const char * searchString ), , "loadVars( searchString )" )
|
DefineEngineMethod( GuiVariableInspector, loadVars, void, ( const char * searchString ), , "loadVars( searchString )" )
|
||||||
{
|
{
|
||||||
object->loadVars( searchString );
|
object->loadVars( searchString );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,6 +117,7 @@ Material::Material()
|
||||||
mDiffuse[i].set( 1.0f, 1.0f, 1.0f, 1.0f );
|
mDiffuse[i].set( 1.0f, 1.0f, 1.0f, 1.0f );
|
||||||
mDiffuseMapSRGB[i] = true;
|
mDiffuseMapSRGB[i] = true;
|
||||||
mDiffuseMapAsset[i] = StringTable->EmptyString();
|
mDiffuseMapAsset[i] = StringTable->EmptyString();
|
||||||
|
mDiffuseMapAssetId[i] = StringTable->EmptyString();
|
||||||
|
|
||||||
mSmoothness[i] = 0.0f;
|
mSmoothness[i] = 0.0f;
|
||||||
mMetalness[i] = 0.0f;
|
mMetalness[i] = 0.0f;
|
||||||
|
|
@ -238,7 +239,7 @@ void Material::initPersistFields()
|
||||||
addField("diffuseMap", TypeImageFilename, Offset(mDiffuseMapFilename, Material), MAX_STAGES,
|
addField("diffuseMap", TypeImageFilename, Offset(mDiffuseMapFilename, Material), MAX_STAGES,
|
||||||
"The diffuse color texture map." );
|
"The diffuse color texture map." );
|
||||||
|
|
||||||
addField("diffuseMapAsset", TypeImageAssetPtr, Offset(mDiffuseMapAsset, Material), MAX_STAGES,
|
addField("diffuseMapAsset", TypeImageAssetPtr, Offset(mDiffuseMapAssetId, Material), MAX_STAGES,
|
||||||
"The diffuse color texture map." );
|
"The diffuse color texture map." );
|
||||||
|
|
||||||
addField("diffuseMapSRGB", TypeBool, Offset(mDiffuseMapSRGB, Material), MAX_STAGES,
|
addField("diffuseMapSRGB", TypeBool, Offset(mDiffuseMapSRGB, Material), MAX_STAGES,
|
||||||
|
|
@ -585,6 +586,15 @@ bool Material::onAdd()
|
||||||
if ( slash != String::NPos )
|
if ( slash != String::NPos )
|
||||||
mPath = scriptFile.substr( 0, slash + 1 );
|
mPath = scriptFile.substr( 0, slash + 1 );
|
||||||
|
|
||||||
|
//bind any assets we have
|
||||||
|
for (U32 i = 0; i < MAX_STAGES; i++)
|
||||||
|
{
|
||||||
|
if (mDiffuseMapAssetId[i] != StringTable->EmptyString())
|
||||||
|
{
|
||||||
|
mDiffuseMapAsset[0] = mDiffuseMapAssetId[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_mapMaterial();
|
_mapMaterial();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -409,7 +409,7 @@ void ProcessedMaterial::_setStageData()
|
||||||
mStages[i].setTex(MFT_DiffuseMap, _createTexture(GFXTextureManager::getMissingTexturePath().c_str(), &GFXStaticTextureSRGBProfile));
|
mStages[i].setTex(MFT_DiffuseMap, _createTexture(GFXTextureManager::getMissingTexturePath().c_str(), &GFXStaticTextureSRGBProfile));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!mMaterial->mDiffuseMapAsset[i].isNull())
|
else if (mMaterial->mDiffuseMapAsset[i] && !mMaterial->mDiffuseMapAsset[i].isNull())
|
||||||
{
|
{
|
||||||
mStages[i].setTex(MFT_DiffuseMap, mMaterial->mDiffuseMapAsset[i]->getImage());
|
mStages[i].setTex(MFT_DiffuseMap, mMaterial->mDiffuseMapAsset[i]->getImage());
|
||||||
if (!mStages[i].getTex(MFT_DiffuseMap))
|
if (!mStages[i].getTex(MFT_DiffuseMap))
|
||||||
|
|
|
||||||
|
|
@ -191,8 +191,8 @@ public:
|
||||||
inline void increaseLoadCount( void ) { ++mLoadCount; }
|
inline void increaseLoadCount( void ) { ++mLoadCount; }
|
||||||
inline void reduceLoadCount( void ) { --mLoadCount; }
|
inline void reduceLoadCount( void ) { --mLoadCount; }
|
||||||
inline S32 getLoadCount( void ) const { return mLoadCount; }
|
inline S32 getLoadCount( void ) const { return mLoadCount; }
|
||||||
inline void setLocked( const bool status ) { mLocked = status; }
|
inline void setModuleLocked( const bool status ) { mLocked = status; }
|
||||||
inline bool getLocked( void ) const { return mLocked; }
|
inline bool getModuleLocked( void ) const { return mLocked; }
|
||||||
inline ModuleManager* getModuleManager( void ) const { return mpModuleManager; }
|
inline ModuleManager* getModuleManager( void ) const { return mpModuleManager; }
|
||||||
bool save( void );
|
bool save( void );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2121,7 +2121,7 @@ bool ModuleManager::registerModule( const char* pModulePath, const char* pModule
|
||||||
pModuleDefinition->setSignature( formatBuffer );
|
pModuleDefinition->setSignature( formatBuffer );
|
||||||
|
|
||||||
// Locked the module definition.
|
// Locked the module definition.
|
||||||
pModuleDefinition->setLocked( true );
|
pModuleDefinition->setModuleLocked( true );
|
||||||
|
|
||||||
// Fetch modules definitions.
|
// Fetch modules definitions.
|
||||||
ModuleDefinitionEntry* pDefinitions = findModuleId( moduleId );
|
ModuleDefinitionEntry* pDefinitions = findModuleId( moduleId );
|
||||||
|
|
|
||||||
|
|
@ -1076,11 +1076,6 @@ void PostEffect::_setupConstants( const SceneRenderState *state )
|
||||||
setShaderConsts_callback();
|
setShaderConsts_callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mShaderName == String("PFX_ReflectionProbeArray") || getName() == StringTable->insert("reflectionProbeArrayPostFX"))
|
|
||||||
{
|
|
||||||
bool derp = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
EffectConstTable::Iterator iter = mEffectConsts.begin();
|
EffectConstTable::Iterator iter = mEffectConsts.begin();
|
||||||
for ( ; iter != mEffectConsts.end(); iter++ )
|
for ( ; iter != mEffectConsts.end(); iter++ )
|
||||||
iter->value->setToBuffer( mShaderConsts );
|
iter->value->setToBuffer( mShaderConsts );
|
||||||
|
|
@ -1607,6 +1602,22 @@ void PostEffect::setTexture( U32 index, const String &texFilePath )
|
||||||
mTextureType[index] = NormalTextureType;
|
mTextureType[index] = NormalTextureType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PostEffect::setTexture(U32 index, const GFXTexHandle& texHandle)
|
||||||
|
{
|
||||||
|
// Set the new texture name.
|
||||||
|
mTexFilename[index] = "";
|
||||||
|
mTextures[index].free();
|
||||||
|
|
||||||
|
// Skip empty stages or ones with variable or target names.
|
||||||
|
if (!texHandle.isValid())
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Try to load the texture.
|
||||||
|
mTextures[index] = texHandle;
|
||||||
|
|
||||||
|
mTextureType[index] = NormalTextureType;
|
||||||
|
}
|
||||||
|
|
||||||
void PostEffect::setCubemapTexture(U32 index, const GFXCubemapHandle &cubemapHandle)
|
void PostEffect::setCubemapTexture(U32 index, const GFXCubemapHandle &cubemapHandle)
|
||||||
{
|
{
|
||||||
// Set the new texture name.
|
// Set the new texture name.
|
||||||
|
|
@ -2048,4 +2059,4 @@ DefineEngineFunction( dumpRandomNormalMap, void, (),,
|
||||||
|
|
||||||
String path = Torque::FS::MakeUniquePath( "", "randNormTex", "png" );
|
String path = Torque::FS::MakeUniquePath( "", "randNormTex", "png" );
|
||||||
tex->dumpToDisk( "png", path );
|
tex->dumpToDisk( "png", path );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -416,6 +416,7 @@ public:
|
||||||
F32 getPriority() const { return mRenderPriority; }
|
F32 getPriority() const { return mRenderPriority; }
|
||||||
|
|
||||||
void setTexture( U32 index, const String &filePath );
|
void setTexture( U32 index, const String &filePath );
|
||||||
|
void setTexture(U32 index, const GFXTexHandle& texHandle);
|
||||||
void setCubemapTexture(U32 index, const GFXCubemapHandle &cubemapHandle);
|
void setCubemapTexture(U32 index, const GFXCubemapHandle &cubemapHandle);
|
||||||
void setCubemapArrayTexture(U32 index, const GFXCubemapArrayHandle &cubemapArrayHandle);
|
void setCubemapArrayTexture(U32 index, const GFXCubemapArrayHandle &cubemapArrayHandle);
|
||||||
|
|
||||||
|
|
@ -451,4 +452,4 @@ public:
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _POST_EFFECT_H_
|
#endif // _POST_EFFECT_H_
|
||||||
|
|
|
||||||
|
|
@ -267,6 +267,13 @@ bool RenderProbeMgr::onAdd()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*String brdfTexturePath = GFXTextureManager::getBRDFTexturePath();
|
||||||
|
if (!mBRDFTexture.set(brdfTexturePath, &GFXTexturePersistentSRGBProfile, "BRDFTexture"))
|
||||||
|
{
|
||||||
|
Con::errorf("RenderProbeMgr::onAdd: Failed to load BRDF Texture");
|
||||||
|
return false;
|
||||||
|
}*/
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -554,6 +561,7 @@ void RenderProbeMgr::_update4ProbeConsts(const SceneData &sgData,
|
||||||
ProbeShaderConstants *probeShaderConsts,
|
ProbeShaderConstants *probeShaderConsts,
|
||||||
GFXShaderConstBuffer *shaderConsts)
|
GFXShaderConstBuffer *shaderConsts)
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
PROFILE_SCOPE(ProbeManager_Update4ProbeConsts);
|
PROFILE_SCOPE(ProbeManager_Update4ProbeConsts);
|
||||||
|
|
||||||
// Skip over gathering lights if we don't have to!
|
// Skip over gathering lights if we don't have to!
|
||||||
|
|
@ -658,6 +666,9 @@ void RenderProbeMgr::_update4ProbeConsts(const SceneData &sgData,
|
||||||
shaderConsts->setSafe(probeShaderConsts->mProbeBoxMaxSC, probeBoxMaxArray);
|
shaderConsts->setSafe(probeShaderConsts->mProbeBoxMaxSC, probeBoxMaxArray);
|
||||||
shaderConsts->setSafe(probeShaderConsts->mProbeConfigDataSC, probeConfigArray);
|
shaderConsts->setSafe(probeShaderConsts->mProbeConfigDataSC, probeConfigArray);
|
||||||
|
|
||||||
|
//if (mBRDFTexture.isValid())
|
||||||
|
// GFX->setTexture(3, mBRDFTexture);
|
||||||
|
|
||||||
if(probeShaderConsts->mProbeSpecularCubemapSC->getSamplerRegister() != -1)
|
if(probeShaderConsts->mProbeSpecularCubemapSC->getSamplerRegister() != -1)
|
||||||
GFX->setCubeArrayTexture(probeShaderConsts->mProbeSpecularCubemapSC->getSamplerRegister(), mPrefilterArray);
|
GFX->setCubeArrayTexture(probeShaderConsts->mProbeSpecularCubemapSC->getSamplerRegister(), mPrefilterArray);
|
||||||
if(probeShaderConsts->mProbeIrradianceCubemapSC->getSamplerRegister() != -1)
|
if(probeShaderConsts->mProbeIrradianceCubemapSC->getSamplerRegister() != -1)
|
||||||
|
|
@ -743,6 +754,7 @@ void RenderProbeMgr::setProbeInfo(ProcessedMaterial *pmat,
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void RenderProbeMgr::render( SceneRenderState *state )
|
void RenderProbeMgr::render( SceneRenderState *state )
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
//PROFILE_SCOPE(RenderProbeMgr_render);
|
//PROFILE_SCOPE(RenderProbeMgr_render);
|
||||||
if (getProbeArrayEffect() == nullptr)
|
if (getProbeArrayEffect() == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
@ -793,6 +805,7 @@ void RenderProbeMgr::render( SceneRenderState *state )
|
||||||
mProbeArrayEffect->setShaderConst("$cubeMips", (float)mMipCount);
|
mProbeArrayEffect->setShaderConst("$cubeMips", (float)mMipCount);
|
||||||
if (mEffectiveProbeCount != 0)
|
if (mEffectiveProbeCount != 0)
|
||||||
{
|
{
|
||||||
|
//mProbeArrayEffect->setTexture(3, mBRDFTexture);
|
||||||
mProbeArrayEffect->setCubemapArrayTexture(4, mPrefilterArray);
|
mProbeArrayEffect->setCubemapArrayTexture(4, mPrefilterArray);
|
||||||
mProbeArrayEffect->setCubemapArrayTexture(5, mIrradianceArray);
|
mProbeArrayEffect->setCubemapArrayTexture(5, mIrradianceArray);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,4 @@ singleton PostEffect( reflectionProbeArrayPostFX )
|
||||||
texture[0] = "#deferred";
|
texture[0] = "#deferred";
|
||||||
texture[1] = "#color";
|
texture[1] = "#color";
|
||||||
texture[2] = "#matinfo";
|
texture[2] = "#matinfo";
|
||||||
texture[3] = "core/rendering/images/brdfTexture.dds";
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ function Core_Rendering::onCreate(%this)
|
||||||
$Core::CommonShaderPath = "core/rendering/shaders";
|
$Core::CommonShaderPath = "core/rendering/shaders";
|
||||||
$Core::DefaultIrradianceCubemap = "core/rendering/images/default_irradiance.dds";
|
$Core::DefaultIrradianceCubemap = "core/rendering/images/default_irradiance.dds";
|
||||||
$Core::DefaultPrefilterCubemap = "core/rendering/images/default_prefilter.dds";
|
$Core::DefaultPrefilterCubemap = "core/rendering/images/default_prefilter.dds";
|
||||||
|
$Core::BRDFTexture = "core/rendering/images/brdfTexture.dds";
|
||||||
|
|
||||||
exec("./scripts/renderManager.cs");
|
exec("./scripts/renderManager.cs");
|
||||||
exec("./scripts/gfxData/clouds.cs");
|
exec("./scripts/gfxData/clouds.cs");
|
||||||
|
|
|
||||||
|
|
@ -256,7 +256,7 @@ new Scene(PbrMatTestLevel) {
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
canSaveDynamicFields = "1";
|
canSaveDynamicFields = "1";
|
||||||
};
|
};
|
||||||
new StaticShapeObject() {
|
/*new StaticShapeObject() {
|
||||||
scale = "1 1 1";
|
scale = "1 1 1";
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
canSaveDynamicFields = "1";
|
canSaveDynamicFields = "1";
|
||||||
|
|
@ -298,6 +298,6 @@ new Scene(PbrMatTestLevel) {
|
||||||
Enabled = "1";
|
Enabled = "1";
|
||||||
internalName = "AnimationComponent";
|
internalName = "AnimationComponent";
|
||||||
};
|
};
|
||||||
};
|
};*/
|
||||||
};
|
};
|
||||||
//--- OBJECT WRITE END ---
|
//--- OBJECT WRITE END ---
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,9 @@ function ToolsModule::onCreate(%this)
|
||||||
// to find exactly which subsystems should be readied before kicking things off.
|
// to find exactly which subsystems should be readied before kicking things off.
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
new Settings(EditorSettings) { file = "tools/settings.xml"; };
|
||||||
|
EditorSettings.read();
|
||||||
|
|
||||||
ModuleDatabase.LoadExplicit( "MainEditor" );
|
ModuleDatabase.LoadExplicit( "MainEditor" );
|
||||||
ModuleDatabase.LoadExplicit( "Tools_ObjectViewer" );
|
ModuleDatabase.LoadExplicit( "Tools_ObjectViewer" );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,13 @@ function isImageFormat(%fileExt)
|
||||||
|
|
||||||
function isShapeFormat(%fileExt)
|
function isShapeFormat(%fileExt)
|
||||||
{
|
{
|
||||||
if( (%fileExt $= ".dae") || (%fileExt $= ".dts") || (%fileExt $= ".fbx") || (%fileExt $= ".obj") || (%fileExt $= ".blend"))
|
if( (%fileExt $= ".dae") ||
|
||||||
|
(%fileExt $= ".dts") ||
|
||||||
|
(%fileExt $= ".fbx") ||
|
||||||
|
(%fileExt $= ".gltf") ||
|
||||||
|
(%fileExt $= ".glb") ||
|
||||||
|
(%fileExt $= ".obj") ||
|
||||||
|
(%fileExt $= ".blend"))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -67,6 +73,9 @@ function findImageFile(%path, %materialName, %type)
|
||||||
|
|
||||||
function AssetBrowser::onBeginDropFiles( %this )
|
function AssetBrowser::onBeginDropFiles( %this )
|
||||||
{
|
{
|
||||||
|
if(!AssetBrowser.isAwake())
|
||||||
|
return;
|
||||||
|
|
||||||
error("% DragDrop - Beginning files dropping.");
|
error("% DragDrop - Beginning files dropping.");
|
||||||
%this.importAssetUnprocessedListArray.empty();
|
%this.importAssetUnprocessedListArray.empty();
|
||||||
%this.importAssetFinalListArray.empty();
|
%this.importAssetFinalListArray.empty();
|
||||||
|
|
@ -378,29 +387,26 @@ function AssetBrowser::addImportingAsset( %this, %assetType, %filePath, %parentA
|
||||||
if(%assetItem.assetType $= "Model")
|
if(%assetItem.assetType $= "Model")
|
||||||
{
|
{
|
||||||
%fileExt = fileExt(%assetItem.filePath);
|
%fileExt = fileExt(%assetItem.filePath);
|
||||||
|
%shapeInfo = new GuiTreeViewCtrl();
|
||||||
if(%fileExt $= ".dae")
|
if(%fileExt $= ".dae")
|
||||||
{
|
{
|
||||||
%shapeInfo = new GuiTreeViewCtrl();
|
|
||||||
enumColladaForImport(%assetItem.filePath, %shapeInfo, false);
|
enumColladaForImport(%assetItem.filePath, %shapeInfo, false);
|
||||||
}
|
}
|
||||||
else if(%fileExt $= ".dts")
|
else if(%fileExt $= ".dts")
|
||||||
{
|
{
|
||||||
%shapeInfo = new GuiTreeViewCtrl();
|
|
||||||
%shapeInfo.insertItem(0, "Shape", 1);
|
%shapeInfo.insertItem(0, "Shape", 1);
|
||||||
%shapeInfo.insertItem(0, "Animations", 0);
|
%shapeInfo.insertItem(0, "Animations", 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
%shapeInfo = GetShapeInfo(%assetItem.filePath);
|
%success = GetShapeInfo(%assetItem.filePath, %shapeInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
%assetItem.shapeInfo = %shapeInfo;
|
%assetItem.shapeInfo = %shapeInfo;
|
||||||
|
|
||||||
%shapeItem = %assetItem.shapeInfo.findItemByName("Shape");
|
%shapeCount = %assetItem.shapeInfo._meshCount;
|
||||||
%shapeCount = %assetItem.shapeInfo.getItemValue(%shapeItem);
|
|
||||||
|
|
||||||
%animItem = %assetItem.shapeInfo.findItemByName("Animations");
|
%animCount = %assetItem.shapeInfo._animCount;
|
||||||
%animCount = %assetItem.shapeInfo.getItemValue(%animItem);
|
|
||||||
|
|
||||||
//If the model has shapes AND animations, then it's a normal shape with embedded animations
|
//If the model has shapes AND animations, then it's a normal shape with embedded animations
|
||||||
//if it has shapes and no animations it's a regular static mesh
|
//if it has shapes and no animations it's a regular static mesh
|
||||||
|
|
@ -683,97 +689,7 @@ function ImportAssetWindow::processNewImportAssets(%this, %id)
|
||||||
|
|
||||||
if(%assetItem.assetType $= "Model")
|
if(%assetItem.assetType $= "Model")
|
||||||
{
|
{
|
||||||
%fileExt = fileExt(%assetItem.filePath);
|
AssetBrowser.prepareImportShapeAsset(%assetItem);
|
||||||
if(%fileExt $= ".dae")
|
|
||||||
{
|
|
||||||
%shapeInfo = new GuiTreeViewCtrl();
|
|
||||||
enumColladaForImport(%assetItem.filePath, %shapeInfo, false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
%shapeInfo = GetShapeInfo(%assetItem.filePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
%assetItem.shapeInfo = %shapeInfo;
|
|
||||||
|
|
||||||
%shapeItem = %assetItem.shapeInfo.findItemByName("Shape");
|
|
||||||
%shapeCount = %assetItem.shapeInfo.getItemValue(%shapeItem);
|
|
||||||
|
|
||||||
if(%assetConfigObj.ImportMesh == 1 && %shapeCount > 0)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
%animItem = %assetItem.shapeInfo.findItemByName("Animations");
|
|
||||||
%animCount = %assetItem.shapeInfo.getItemValue(%animItem);
|
|
||||||
|
|
||||||
if(%assetConfigObj.ImportAnimations == 1 && %animCount > 0)
|
|
||||||
{
|
|
||||||
%animationItem = %assetItem.shapeInfo.getChild(%animItem);
|
|
||||||
|
|
||||||
%animName = %assetItem.shapeInfo.getItemText(%animationItem);
|
|
||||||
//%animName = %assetItem.shapeInfo.getItemValue(%animationItem);
|
|
||||||
|
|
||||||
AssetBrowser.addImportingAsset("Animation", %animName, %assetItem);
|
|
||||||
|
|
||||||
%animationItem = %assetItem.shapeInfo.getNextSibling(%animationItem);
|
|
||||||
while(%animationItem != 0)
|
|
||||||
{
|
|
||||||
%animName = %assetItem.shapeInfo.getItemText(%animationItem);
|
|
||||||
//%animName = %assetItem.shapeInfo.getItemValue(%animationItem);
|
|
||||||
|
|
||||||
AssetBrowser.addImportingAsset("Animation", %animName, %assetItem);
|
|
||||||
|
|
||||||
%animationItem = %shapeInfo.getNextSibling(%animationItem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
%matItem = %assetItem.shapeInfo.findItemByName("Materials");
|
|
||||||
%matCount = %assetItem.shapeInfo.getItemValue(%matItem);
|
|
||||||
|
|
||||||
if(%assetConfigObj.importMaterials == 1 && %matCount > 0)
|
|
||||||
{
|
|
||||||
%materialItem = %assetItem.shapeInfo.getChild(%matItem);
|
|
||||||
|
|
||||||
%matName = %assetItem.shapeInfo.getItemText(%materialItem);
|
|
||||||
|
|
||||||
%filePath = %assetItem.shapeInfo.getItemValue(%materialItem);
|
|
||||||
if(%filePath !$= "")
|
|
||||||
{
|
|
||||||
AssetBrowser.addImportingAsset("Material", %filePath, %assetItem);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//we need to try and find our material, since the shapeInfo wasn't able to find it automatically
|
|
||||||
%filePath = findImageFile(filePath(%assetItem.filePath), %matName);
|
|
||||||
if(%filePath !$= "")
|
|
||||||
AssetBrowser.addImportingAsset("Material", %filePath, %assetItem);
|
|
||||||
else
|
|
||||||
AssetBrowser.addImportingAsset("Material", %matName, %assetItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
%materialItem = %assetItem.shapeInfo.getNextSibling(%materialItem);
|
|
||||||
while(%materialItem != 0)
|
|
||||||
{
|
|
||||||
%matName = %assetItem.shapeInfo.getItemText(%materialItem);
|
|
||||||
%filePath = %assetItem.shapeInfo.getItemValue(%materialItem);
|
|
||||||
if(%filePath !$= "")
|
|
||||||
{
|
|
||||||
AssetBrowser.addImportingAsset("Material", %filePath, %assetItem);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//we need to try and find our material, since the shapeInfo wasn't able to find it automatically
|
|
||||||
%filePath = findImageFile(filePath(%assetItem.filePath), %matName);
|
|
||||||
if(%filePath !$= "")
|
|
||||||
AssetBrowser.addImportingAsset("Material", %filePath, %assetItem);
|
|
||||||
else
|
|
||||||
AssetBrowser.addImportingAsset("Material", %matName, %assetItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
%materialItem = %shapeInfo.getNextSibling(%materialItem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if(%assetItem.assetType $= "Animation")
|
else if(%assetItem.assetType $= "Animation")
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -314,14 +314,14 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem)
|
||||||
%assetPath = "data/" @ %moduleName @ "/materials";
|
%assetPath = "data/" @ %moduleName @ "/materials";
|
||||||
%tamlpath = %assetPath @ "/" @ %assetName @ ".asset.taml";
|
%tamlpath = %assetPath @ "/" @ %assetName @ ".asset.taml";
|
||||||
%sgfPath = %assetPath @ "/" @ %assetName @ ".sgf";
|
%sgfPath = %assetPath @ "/" @ %assetName @ ".sgf";
|
||||||
%scriptPath = %assetName @ ".cs";
|
%scriptPath = %assetPath @ "/" @ %assetName @ ".cs";
|
||||||
|
|
||||||
%newAsset = new MaterialAsset()
|
%newAsset = new MaterialAsset()
|
||||||
{
|
{
|
||||||
assetName = %assetName;
|
assetName = %assetName;
|
||||||
versionId = 1;
|
versionId = 1;
|
||||||
shaderGraph = %sgfPath;
|
shaderGraph = %sgfPath;
|
||||||
scriptFile = %scriptPath;
|
scriptFile = %assetName @ ".cs";
|
||||||
originalFilePath = %filePath;
|
originalFilePath = %filePath;
|
||||||
materialDefinitionName = %assetName;
|
materialDefinitionName = %assetName;
|
||||||
};
|
};
|
||||||
|
|
@ -431,6 +431,8 @@ function AssetBrowser::buildMaterialAssetPreview(%this, %assetDef, %previewData)
|
||||||
@ "EditorGui.setEditor(MaterialEditorPlugin); "
|
@ "EditorGui.setEditor(MaterialEditorPlugin); "
|
||||||
@ "AssetBrowser.hideDialog();";
|
@ "AssetBrowser.hideDialog();";
|
||||||
|
|
||||||
|
%test = %assetDef.materialDefinitionName.diffuseMapAsset[0];
|
||||||
|
|
||||||
if(isFile(%assetDef.materialDefinitionName.diffuseMap[0]))
|
if(isFile(%assetDef.materialDefinitionName.diffuseMap[0]))
|
||||||
%previewData.previewImage = %assetDef.materialDefinitionName.diffuseMap[0];
|
%previewData.previewImage = %assetDef.materialDefinitionName.diffuseMap[0];
|
||||||
else if(%assetDef.materialDefinitionName.diffuseMapAsset[0] !$= "")
|
else if(%assetDef.materialDefinitionName.diffuseMapAsset[0] !$= "")
|
||||||
|
|
|
||||||
|
|
@ -43,20 +43,29 @@ function AssetBrowser::editShapeAsset(%this, %assetDef)
|
||||||
function AssetBrowser::prepareImportShapeAsset(%this, %assetItem)
|
function AssetBrowser::prepareImportShapeAsset(%this, %assetItem)
|
||||||
{
|
{
|
||||||
%fileExt = fileExt(%assetItem.filePath);
|
%fileExt = fileExt(%assetItem.filePath);
|
||||||
if(%fileExt $= ".dae")
|
|
||||||
|
if(!isObject(%assetItem.shapeInfo))
|
||||||
{
|
{
|
||||||
%shapeInfo = new GuiTreeViewCtrl();
|
%shapeInfo = new GuiTreeViewCtrl();
|
||||||
enumColladaForImport(%assetItem.filePath, %shapeInfo, false);
|
if(%fileExt $= ".dae")
|
||||||
|
{
|
||||||
|
enumColladaForImport(%assetItem.filePath, %shapeInfo, false);
|
||||||
|
}
|
||||||
|
else if(%fileExt $= ".dts")
|
||||||
|
{
|
||||||
|
%shapeInfo.insertItem(0, "Shape", 1);
|
||||||
|
%shapeInfo.insertItem(0, "Animations", 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GetShapeInfo(%assetItem.filePath, %shapeInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
%assetItem.shapeInfo = %shapeInfo;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
%shapeInfo = GetShapeInfo(%assetItem.filePath);
|
|
||||||
}
|
|
||||||
|
|
||||||
%assetItem.shapeInfo = %shapeInfo;
|
|
||||||
|
|
||||||
%shapeItem = %assetItem.shapeInfo.findItemByName("Shape");
|
%shapeCount = %assetItem.shapeInfo._meshCount;
|
||||||
%shapeCount = %assetItem.shapeInfo.getItemValue(%shapeItem);
|
%shapeItem = %assetItem.shapeInfo.findItemByName("Meshes");
|
||||||
|
|
||||||
%shapeId = ImportAssetTree.findItemByObjectId(%assetItem);
|
%shapeId = ImportAssetTree.findItemByObjectId(%assetItem);
|
||||||
|
|
||||||
|
|
@ -65,8 +74,8 @@ function AssetBrowser::prepareImportShapeAsset(%this, %assetItem)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
%animCount = %assetItem.shapeInfo._animCount;
|
||||||
%animItem = %assetItem.shapeInfo.findItemByName("Animations");
|
%animItem = %assetItem.shapeInfo.findItemByName("Animations");
|
||||||
%animCount = %assetItem.shapeInfo.getItemValue(%animItem);
|
|
||||||
|
|
||||||
if(ImportAssetWindow.activeImportConfig.ImportAnimations == 1 && %animCount > 0)
|
if(ImportAssetWindow.activeImportConfig.ImportAnimations == 1 && %animCount > 0)
|
||||||
{
|
{
|
||||||
|
|
@ -88,30 +97,29 @@ function AssetBrowser::prepareImportShapeAsset(%this, %assetItem)
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
%matCount = %assetItem.shapeInfo._materialCount;
|
||||||
%matItem = %assetItem.shapeInfo.findItemByName("Materials");
|
%matItem = %assetItem.shapeInfo.findItemByName("Materials");
|
||||||
%matCount = %assetItem.shapeInfo.getItemValue(%matItem);
|
|
||||||
|
|
||||||
if(ImportAssetWindow.activeImportConfig.importMaterials == 1 && %matCount > 0)
|
if(ImportAssetWindow.activeImportConfig.importMaterials == 1 && %matCount > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
%materialItem = %assetItem.shapeInfo.getChild(%matItem);
|
%materialItem = %assetItem.shapeInfo.getChild(%matItem);
|
||||||
|
|
||||||
%matName = %assetItem.shapeInfo.getItemText(%materialItem);
|
%matName = %assetItem.shapeInfo.getItemText(%materialItem);
|
||||||
|
|
||||||
%filePath = %assetItem.shapeInfo.getItemValue(%materialItem);
|
%filePath = %assetItem.shapeInfo.getItemValue(%materialItem);
|
||||||
if(%filePath !$= "")
|
if(%filePath !$= "" && isFile(%filePath))
|
||||||
{
|
{
|
||||||
AssetBrowser.addImportingAsset("Material", %filePath, %shapeId);
|
AssetBrowser.addImportingAsset("Material", %filePath, %assetItem);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//we need to try and find our material, since the shapeInfo wasn't able to find it automatically
|
//we need to try and find our material, since the shapeInfo wasn't able to find it automatically
|
||||||
%filePath = findImageFile(filePath(%assetItem.filePath), %matName);
|
%filePath = findImageFile(filePath(%assetItem.filePath), %matName);
|
||||||
if(%filePath !$= "")
|
if(%filePath !$= "" && isFile(%filePath))
|
||||||
AssetBrowser.addImportingAsset("Material", %filePath, %shapeId);
|
AssetBrowser.addImportingAsset("Material", %filePath, %assetItem);
|
||||||
else
|
else
|
||||||
AssetBrowser.addImportingAsset("Material", %matName, %shapeId);
|
AssetBrowser.addImportingAsset("Material", %matName, %assetItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
%materialItem = %assetItem.shapeInfo.getNextSibling(%materialItem);
|
%materialItem = %assetItem.shapeInfo.getNextSibling(%materialItem);
|
||||||
|
|
@ -119,21 +127,21 @@ function AssetBrowser::prepareImportShapeAsset(%this, %assetItem)
|
||||||
{
|
{
|
||||||
%matName = %assetItem.shapeInfo.getItemText(%materialItem);
|
%matName = %assetItem.shapeInfo.getItemText(%materialItem);
|
||||||
%filePath = %assetItem.shapeInfo.getItemValue(%materialItem);
|
%filePath = %assetItem.shapeInfo.getItemValue(%materialItem);
|
||||||
if(%filePath !$= "")
|
if(%filePath !$= "" && isFile(%filePath))
|
||||||
{
|
{
|
||||||
AssetBrowser.addImportingAsset("Material", %filePath, %shapeId);
|
AssetBrowser.addImportingAsset("Material", %filePath, %assetItem);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//we need to try and find our material, since the shapeInfo wasn't able to find it automatically
|
//we need to try and find our material, since the shapeInfo wasn't able to find it automatically
|
||||||
%filePath = findImageFile(filePath(%assetItem.filePath), %matName);
|
%filePath = findImageFile(filePath(%assetItem.filePath), %matName);
|
||||||
if(%filePath !$= "")
|
if(%filePath !$= "" && isFile(%filePath))
|
||||||
AssetBrowser.addImportingAsset("Material", %filePath, %shapeId);
|
AssetBrowser.addImportingAsset("Material", %filePath, %assetItem);
|
||||||
else
|
else
|
||||||
AssetBrowser.addImportingAsset("Material", %matName, %shapeId);
|
AssetBrowser.addImportingAsset("Material", %matName, %assetItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
%materialItem = %shapeInfo.getNextSibling(%materialItem);
|
%materialItem = %assetItem.shapeInfo.getNextSibling(%materialItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
201
Templates/BaseGame/game/tools/gui/EditorSettingsWindow.ed.gui
Normal file
201
Templates/BaseGame/game/tools/gui/EditorSettingsWindow.ed.gui
Normal file
|
|
@ -0,0 +1,201 @@
|
||||||
|
//--- OBJECT WRITE BEGIN ---
|
||||||
|
%guiContent = new GuiControl(EditorSettingsWindow,EditorGuiGroup) {
|
||||||
|
position = "0 0";
|
||||||
|
extent = "1024 768";
|
||||||
|
minExtent = "8 2";
|
||||||
|
horizSizing = "right";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "ToolsGuiDefaultProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "1";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "1";
|
||||||
|
|
||||||
|
new GuiWindowCollapseCtrl(ESettingsWindow) {
|
||||||
|
text = "Editor Settings";
|
||||||
|
resizeWidth = "0";
|
||||||
|
resizeHeight = "1";
|
||||||
|
canMove = "1";
|
||||||
|
canClose = "1";
|
||||||
|
canMinimize = "0";
|
||||||
|
canMaximize = "0";
|
||||||
|
canCollapse = "1";
|
||||||
|
closeCommand = "ESettingsWindow.hideDialog();";
|
||||||
|
edgeSnap = "1";
|
||||||
|
margin = "0 0 0 0";
|
||||||
|
padding = "0 0 0 0";
|
||||||
|
anchorTop = "1";
|
||||||
|
anchorBottom = "0";
|
||||||
|
anchorLeft = "1";
|
||||||
|
anchorRight = "0";
|
||||||
|
position = "34 48";
|
||||||
|
extent = "958 671";
|
||||||
|
minExtent = "319 100";
|
||||||
|
horizSizing = "right";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "ToolsGuiWindowProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "1";
|
||||||
|
internalName = "EditorSettingsWindow";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
|
||||||
|
new GuiSplitContainer() {
|
||||||
|
orientation = "Vertical";
|
||||||
|
splitterSize = "2";
|
||||||
|
splitPoint = "182 100";
|
||||||
|
fixedPanel = "None";
|
||||||
|
fixedSize = "100";
|
||||||
|
docking = "None";
|
||||||
|
margin = "0 0 0 0";
|
||||||
|
padding = "0 0 0 0";
|
||||||
|
anchorTop = "1";
|
||||||
|
anchorBottom = "0";
|
||||||
|
anchorLeft = "1";
|
||||||
|
anchorRight = "0";
|
||||||
|
position = "0 24";
|
||||||
|
extent = "958 647";
|
||||||
|
minExtent = "64 64";
|
||||||
|
horizSizing = "width";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "GuiDefaultProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
tooltipProfile = "GuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "1";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
|
||||||
|
new GuiPanel() {
|
||||||
|
docking = "Client";
|
||||||
|
margin = "0 0 0 0";
|
||||||
|
padding = "0 0 0 0";
|
||||||
|
anchorTop = "1";
|
||||||
|
anchorBottom = "0";
|
||||||
|
anchorLeft = "1";
|
||||||
|
anchorRight = "0";
|
||||||
|
position = "0 0";
|
||||||
|
extent = "180 647";
|
||||||
|
minExtent = "16 16";
|
||||||
|
horizSizing = "right";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "GuiDefaultProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
tooltipProfile = "GuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "1";
|
||||||
|
internalName = "Panel1";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
|
||||||
|
new GuiScrollCtrl() {
|
||||||
|
willFirstRespond = "1";
|
||||||
|
hScrollBar = "alwaysOff";
|
||||||
|
vScrollBar = "dynamic";
|
||||||
|
lockHorizScroll = "0";
|
||||||
|
lockVertScroll = "0";
|
||||||
|
constantThumbHeight = "0";
|
||||||
|
childMargin = "0 0";
|
||||||
|
mouseWheelScrollSpeed = "-1";
|
||||||
|
margin = "0 0 0 0";
|
||||||
|
padding = "0 0 0 0";
|
||||||
|
anchorTop = "1";
|
||||||
|
anchorBottom = "0";
|
||||||
|
anchorLeft = "1";
|
||||||
|
anchorRight = "0";
|
||||||
|
position = "3 3";
|
||||||
|
extent = "177 643";
|
||||||
|
minExtent = "100 50";
|
||||||
|
horizSizing = "width";
|
||||||
|
vertSizing = "height";
|
||||||
|
profile = "ToolsGuiScrollProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "1";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
|
||||||
|
new GuiTextListCtrl(ESettingsWindowList) {
|
||||||
|
columns = "0";
|
||||||
|
fitParentWidth = "0";
|
||||||
|
clipColumnText = "0";
|
||||||
|
position = "1 1";
|
||||||
|
extent = "9 2";
|
||||||
|
minExtent = "8 2";
|
||||||
|
horizSizing = "width";
|
||||||
|
vertSizing = "height";
|
||||||
|
profile = "ToolsGuiListBoxProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "0";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
new GuiPanel() {
|
||||||
|
docking = "Client";
|
||||||
|
margin = "0 0 0 0";
|
||||||
|
padding = "0 0 0 0";
|
||||||
|
anchorTop = "1";
|
||||||
|
anchorBottom = "0";
|
||||||
|
anchorLeft = "1";
|
||||||
|
anchorRight = "0";
|
||||||
|
position = "184 0";
|
||||||
|
extent = "774 647";
|
||||||
|
minExtent = "16 16";
|
||||||
|
horizSizing = "right";
|
||||||
|
vertSizing = "bottom";
|
||||||
|
profile = "ToolsGuiDefaultProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
tooltipProfile = "GuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "1";
|
||||||
|
internalName = "panel2";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
|
||||||
|
new GuiVariableInspector(SettingsInspector) {
|
||||||
|
dividerMargin = "5";
|
||||||
|
showCustomFields = "1";
|
||||||
|
stackingType = "Vertical";
|
||||||
|
horizStacking = "Left to Right";
|
||||||
|
vertStacking = "Top to Bottom";
|
||||||
|
padding = "1";
|
||||||
|
dynamicSize = "1";
|
||||||
|
dynamicNonStackExtent = "0";
|
||||||
|
dynamicPos = "0";
|
||||||
|
changeChildSizeToFit = "1";
|
||||||
|
changeChildPosition = "1";
|
||||||
|
position = "0 0";
|
||||||
|
extent = "773 643";
|
||||||
|
minExtent = "16 16";
|
||||||
|
horizSizing = "width";
|
||||||
|
vertSizing = "height";
|
||||||
|
profile = "GuiInspectorProfile";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
tooltipProfile = "GuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
isContainer = "1";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
//--- OBJECT WRITE END ---
|
||||||
202
Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs
Normal file
202
Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.cs
Normal file
|
|
@ -0,0 +1,202 @@
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
// Copyright (c) 2012 GarageGames, LLC
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
// of this software and associated documentation files (the "Software"), to
|
||||||
|
// deal in the Software without restriction, including without limitation the
|
||||||
|
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
// sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
// furnished to do so, subject to the following conditions:
|
||||||
|
//
|
||||||
|
// The above copyright notice and this permission notice shall be included in
|
||||||
|
// all copies or substantial portions of the Software.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
// IN THE SOFTWARE.
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function ESettingsWindow::startup( %this )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
function ESettingsWindow::onWake( %this )
|
||||||
|
{
|
||||||
|
new ArrayObject(SettingsPageList);
|
||||||
|
%this.addSettingsPage("Axis", "Axis Gizmo");
|
||||||
|
%this.addSettingsPage("General", "General Settings");
|
||||||
|
%this.addSettingsPage("Camera", "Camera Settings");
|
||||||
|
%this.addSettingsPage("SceneEditor", "Scene Editor");
|
||||||
|
%this.addSettingsPage("ShapeEditor", "Shape Editor");
|
||||||
|
%this.addSettingsPage("NavEditor", "Navigation Editor");
|
||||||
|
|
||||||
|
ESettingsWindowList.setSelectedById( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
function ESettingsWindow::hideDialog( %this )
|
||||||
|
{
|
||||||
|
%this.setVisible(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
function ESettingsWindow::ToggleVisibility()
|
||||||
|
{
|
||||||
|
if ( ESettingsWindow.visible )
|
||||||
|
{
|
||||||
|
ESettingsWindow.setVisible(false);
|
||||||
|
EditorSettings.write();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ESettingsWindow.setVisible(true);
|
||||||
|
ESettingsWindow.selectWindow();
|
||||||
|
ESettingsWindow.setCollapseGroup(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
ESettingsWindowList.setSelectedById( 1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
/*function ESettingsWindow::addTabPage( %this, %page )
|
||||||
|
{
|
||||||
|
ESettingsWindowTabBook.add( %page );
|
||||||
|
ESettingsWindowList.addRow( ESettingsWindowTabBook.getSelectedPage(), %page.text );
|
||||||
|
ESettingsWindowList.sort(0);
|
||||||
|
}*/
|
||||||
|
|
||||||
|
function ESettingsWindow::addSettingsPage(%this, %settingsPageName, %settingsPageText)
|
||||||
|
{
|
||||||
|
SettingsPageList.add(%settingsPageName, %settingsPageText);
|
||||||
|
|
||||||
|
ESettingsWindowList.addRow( SettingsPageList.count(), %settingsPageText );
|
||||||
|
ESettingsWindowList.sort(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
function ESettingsWindowList::onSelect( %this, %id, %text )
|
||||||
|
{
|
||||||
|
SettingsInspector.clearFields();
|
||||||
|
%pageName = SettingsPageList.getKey(SettingsPageList.getIndexFromValue(%text));
|
||||||
|
eval("ESettingsWindow.get" @ %pageName @ "Settings();");
|
||||||
|
}
|
||||||
|
|
||||||
|
function ESettingsWindow::getAxisSettings(%this)
|
||||||
|
{
|
||||||
|
SettingsInspector.startGroup("Gizmo");
|
||||||
|
SettingsInspector.addSettingsField("AxisGizmo/mouseRotateScalar", "Rotate Scalar", "float", "");
|
||||||
|
SettingsInspector.addSettingsField("AxisGizmo/mouseScaleScalar", "Scale Scalar", "float", "");
|
||||||
|
SettingsInspector.addSettingsField("AxisGizmo/renderWhenUsed", "Render When Manipulated", "bool", "");
|
||||||
|
SettingsInspector.addSettingsField("AxisGizmo/renderInfoText", "Render Tool Text", "bool", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
|
||||||
|
SettingsInspector.startGroup("Grid");
|
||||||
|
SettingsInspector.addSettingsField("AxisGizmo/Grid/renderPlane", "Render Plane", "bool", "");
|
||||||
|
SettingsInspector.addSettingsField("AxisGizmo/Grid/renderPlaneHashes", "Render Plane Hashes", "bool", "");
|
||||||
|
SettingsInspector.addSettingsField("AxisGizmo/Grid/planeDim", "Plane Size", "float", "");
|
||||||
|
SettingsInspector.addSettingsField("AxisGizmo/Grid/gridColor", "Plane Color", "colorI", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
|
function ESettingsWindow::getGeneralSettings(%this)
|
||||||
|
{
|
||||||
|
SettingsInspector.startGroup("Paths");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/newLevelFile", "New Level", "filename", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/torsionPath", "Torsion Path", "filename", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
|
||||||
|
SettingsInspector.startGroup("Theme");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Theme/backgroundColor", "Background Color", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Theme/windowTitleBGColor", "Window Title Color", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Theme/windowTitleFontColor", "Window Title Text Color", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Theme/mainTextColor", "Main Text Color", "colorI", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
|
function ESettingsWindow::getCameraSettings(%this)
|
||||||
|
{
|
||||||
|
SettingsInspector.startGroup("Mouse Control");
|
||||||
|
SettingsInspector.addSettingsField("Camera/invertYAxis", "Invert Y Axis", "bool", "");
|
||||||
|
SettingsInspector.addSettingsField("Camera/invertXAxis", "Invert X Axis", "bool", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
|
||||||
|
//Based on currently loaded level(rootScene)
|
||||||
|
SettingsInspector.startGroup(EditorSettings.value("WorldEditor/newLevelFile") @ " Camera");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/newLevelFile", "Camera Speed Min", "float", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/torsionPath", "Camera Speed Max", "200", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
|
function ESettingsWindow::getNavEditorSettings(%this)
|
||||||
|
{
|
||||||
|
SettingsInspector.startGroup("Test Spawn");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/newLevelFile", "Spawn Class", "list", "", "AIPlayer");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/torsionPath", "Datablock", "string", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
|
||||||
|
SettingsInspector.startGroup("Colors");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/newLevelFile", "Hover Spline", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/torsionPath", "Select Spline", "colorI", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
|
function ESettingsWindow::getSceneEditorSettings(%this)
|
||||||
|
{
|
||||||
|
SettingsInspector.startGroup("Render");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Render/renderObjHandle", "Object Icons", "bool", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Render/renderObjText", "Object Text", "bool", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Render/showMousePopupInfo", "Mouse Popup Info", "bool", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Render/renderPopupBackground", "Popup Menu Background", "bool", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
|
||||||
|
SettingsInspector.startGroup("Colors");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Grid/gridColor", "Grid Major", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Grid/gridMinorColor", "Grid Minor", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Grid/gridOriginColor", "Grid Origin", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Color/dragRectColor", "Drag Rect", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Color/objectTextColor", "Object Text", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Color/popupTextColor", "Popup Text", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/Color/popupBackgroundColor", "Popup Back", "colorI", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
|
||||||
|
SettingsInspector.startGroup("Misc");
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
function ESettingsWindow::getShapeEditorSettings(%this)
|
||||||
|
{
|
||||||
|
SettingsInspector.startGroup("Colors");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/newLevelFile", "Sun Diffuse", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/newLevelFile", "Sun Ambient", "colorI", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/newLevelFile", "Background", "colorI", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
|
||||||
|
SettingsInspector.startGroup("Grid");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/newLevelFile", "Grid Size", "float", "");
|
||||||
|
SettingsInspector.addSettingsField("WorldEditor/newLevelFile", "Grid Dimension", "vector2", "");
|
||||||
|
SettingsInspector.endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
|
//Read/write field functions
|
||||||
|
function SettingsInspector::addSettingsField(%this, %settingsFieldName, %labelText, %fieldType, %tooltip, %fieldData)
|
||||||
|
{
|
||||||
|
%moddedSettingsFieldName = strreplace(%settingsFieldName, "/", "-");
|
||||||
|
%this.addCallbackField(%moddedSettingsFieldName, %labelText, %fieldType, "", EditorSettings.value(%settingsFieldName), %fieldData, "changeEditorSetting");
|
||||||
|
}
|
||||||
|
|
||||||
|
function SettingsInspector::changeEditorSetting(%this, %varName, %value)
|
||||||
|
{
|
||||||
|
%varName = strreplace(%varName, "-", "/");
|
||||||
|
|
||||||
|
echo("Set " @ %varName @ " to be " @ %value);
|
||||||
|
|
||||||
|
EditorSettings.setValue(%varName, %value);
|
||||||
|
|
||||||
|
%id = ESettingsWindowList.getSelectedRow();
|
||||||
|
ESettingsWindowList.setSelectedRow(%id);
|
||||||
|
}
|
||||||
|
|
@ -37,8 +37,8 @@ new GuiControlProfile (ToolsGuiDefaultProfile)
|
||||||
mouseOverSelected = false;
|
mouseOverSelected = false;
|
||||||
|
|
||||||
// fill color
|
// fill color
|
||||||
opaque = false;
|
opaque = true;
|
||||||
fillColor = "48 48 48";
|
fillColor = "50 50 50";
|
||||||
fillColorHL = "91 101 116";
|
fillColorHL = "91 101 116";
|
||||||
fillColorSEL = "91 101 116";
|
fillColorSEL = "91 101 116";
|
||||||
fillColorNA = "255 0 255 ";
|
fillColorNA = "255 0 255 ";
|
||||||
|
|
@ -154,11 +154,11 @@ new GuiControlProfile (ToolsGuiWindowProfile)
|
||||||
{
|
{
|
||||||
opaque = false;
|
opaque = false;
|
||||||
border = 1;
|
border = 1;
|
||||||
fillColor = "48 48 48";
|
fillColor = EditorSettings.value("WorldEditor/Theme/windowTitleBGColor");
|
||||||
fillColorHL = "42 42 42";
|
fillColorHL = EditorSettings.value("WorldEditor/Theme/windowTitleBGHLColor");
|
||||||
fillColorNA = "42 42 42";
|
fillColorNA = EditorSettings.value("WorldEditor/Theme/windowTitleBGNAColor");
|
||||||
fontColor = "215 215 215";
|
fontColor = EditorSettings.value("WorldEditor/Theme/windowTitleFontColor");
|
||||||
fontColorHL = "215 215 215";
|
fontColorHL = EditorSettings.value("WorldEditor/Theme/windowTitleFontHLColor");
|
||||||
bevelColorHL = "255 255 255";
|
bevelColorHL = "255 255 255";
|
||||||
bevelColorLL = "0 0 0";
|
bevelColorLL = "0 0 0";
|
||||||
text = "untitled";
|
text = "untitled";
|
||||||
|
|
@ -548,6 +548,12 @@ new GuiControlProfile( ToolsGuiPopUpMenuEditProfile : ToolsGuiPopUpMenuDefault )
|
||||||
if( !isObject( ToolsGuiListBoxProfile ) )
|
if( !isObject( ToolsGuiListBoxProfile ) )
|
||||||
new GuiControlProfile( ToolsGuiListBoxProfile )
|
new GuiControlProfile( ToolsGuiListBoxProfile )
|
||||||
{
|
{
|
||||||
|
fillColorHL = "100 100 100";
|
||||||
|
fillColorNA = "150 150 150";
|
||||||
|
fontColor = "215 215 215";
|
||||||
|
fontColorHL = "215 215 215";
|
||||||
|
fontColorNA = "50 50 50";
|
||||||
|
|
||||||
tab = true;
|
tab = true;
|
||||||
canKeyFocus = true;
|
canKeyFocus = true;
|
||||||
category = "Tools";
|
category = "Tools";
|
||||||
|
|
|
||||||
|
|
@ -49,9 +49,6 @@ package Tools
|
||||||
//First, we want to ensure we don't inadvertently clean up our editor objects by leaving them in the MissionCleanup group, so lets change that real fast
|
//First, we want to ensure we don't inadvertently clean up our editor objects by leaving them in the MissionCleanup group, so lets change that real fast
|
||||||
$instantGroup = "";
|
$instantGroup = "";
|
||||||
pushInstantGroup();
|
pushInstantGroup();
|
||||||
|
|
||||||
new Settings(EditorSettings) { file = "tools/settings.xml"; };
|
|
||||||
EditorSettings.read();
|
|
||||||
|
|
||||||
echo( " % - Initializing Tools" );
|
echo( " % - Initializing Tools" );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,115 +1,126 @@
|
||||||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||||
<EditorSettings>
|
<EditorSettings>
|
||||||
<Group name="AxisGizmo">
|
<Group name="AxisGizmo">
|
||||||
|
<Setting name="mouseScaleScalar">0.8</Setting>
|
||||||
<Setting name="renderWhenUsed">0</Setting>
|
<Setting name="renderWhenUsed">0</Setting>
|
||||||
<Setting name="renderInfoText">1</Setting>
|
<Setting name="renderInfoText">1</Setting>
|
||||||
<Setting name="axisGizmoMaxScreenLen">100</Setting>
|
<Setting name="axisGizmoMaxScreenLen">100</Setting>
|
||||||
<Setting name="rotationSnap">15</Setting>
|
<Setting name="rotationSnap">15</Setting>
|
||||||
<Setting name="snapRotations">0</Setting>
|
<Setting name="snapRotations">0</Setting>
|
||||||
<Setting name="mouseRotateScalar">0.8</Setting>
|
<Setting name="mouseRotateScalar">0.8</Setting>
|
||||||
<Setting name="mouseScaleScalar">0.8</Setting>
|
|
||||||
<Group name="Grid">
|
<Group name="Grid">
|
||||||
<Setting name="renderPlaneHashes">0</Setting>
|
|
||||||
<Setting name="gridSize">10 10 10</Setting>
|
|
||||||
<Setting name="renderPlane">0</Setting>
|
<Setting name="renderPlane">0</Setting>
|
||||||
<Setting name="snapToGrid">0</Setting>
|
|
||||||
<Setting name="gridColor">255 255 255 20</Setting>
|
<Setting name="gridColor">255 255 255 20</Setting>
|
||||||
<Setting name="planeDim">500</Setting>
|
<Setting name="planeDim">500</Setting>
|
||||||
|
<Setting name="renderPlaneHashes">0</Setting>
|
||||||
|
<Setting name="snapToGrid">0</Setting>
|
||||||
|
<Setting name="gridSize">10 10 10</Setting>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="WorldEditor">
|
<Group name="WorldEditor">
|
||||||
<Setting name="forceLoadDAE">0</Setting>
|
|
||||||
<Setting name="displayType">6</Setting>
|
|
||||||
<Setting name="orthoFOV">50</Setting>
|
|
||||||
<Setting name="orthoShowGrid">1</Setting>
|
|
||||||
<Setting name="currentEditor">WorldEditorInspectorPlugin</Setting>
|
|
||||||
<Setting name="dropType">screenCenter</Setting>
|
|
||||||
<Setting name="undoLimit">40</Setting>
|
<Setting name="undoLimit">40</Setting>
|
||||||
|
<Setting name="orthoFOV">50</Setting>
|
||||||
|
<Setting name="displayType">6</Setting>
|
||||||
|
<Setting name="forceLoadDAE">0</Setting>
|
||||||
|
<Setting name="orthoShowGrid">1</Setting>
|
||||||
|
<Setting name="dropType">screenCenter</Setting>
|
||||||
|
<Setting name="currentEditor">WorldEditorInspectorPlugin</Setting>
|
||||||
|
<Setting name="torsionPath">AssetWork_Debug.exe</Setting>
|
||||||
|
<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">0</Setting>
|
||||||
|
</Group>
|
||||||
<Group name="Color">
|
<Group name="Color">
|
||||||
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
|
|
||||||
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
|
|
||||||
<Setting name="dragRectColor">255 255 0 255</Setting>
|
|
||||||
<Setting name="objectTextColor">255 255 255 255</Setting>
|
|
||||||
<Setting name="objSelectColor">255 0 0 255</Setting>
|
<Setting name="objSelectColor">255 0 0 255</Setting>
|
||||||
<Setting name="selectionBoxColor">255 255 0 255</Setting>
|
<Setting name="objectTextColor">255 255 255 255</Setting>
|
||||||
|
<Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
|
||||||
<Setting name="objMouseOverColor">0 255 0 255</Setting>
|
<Setting name="objMouseOverColor">0 255 0 255</Setting>
|
||||||
</Group>
|
<Setting name="dragRectColor">255 255 0 255</Setting>
|
||||||
<Group name="ObjectIcons">
|
<Setting name="popupBackgroundColor">100 100 100 255</Setting>
|
||||||
<Setting name="fadeIconsStartAlpha">255</Setting>
|
<Setting name="selectionBoxColor">255 255 0 255</Setting>
|
||||||
<Setting name="fadeIconsEndDist">20</Setting>
|
|
||||||
<Setting name="fadeIconsStartDist">8</Setting>
|
|
||||||
<Setting name="fadeIcons">1</Setting>
|
|
||||||
<Setting name="fadeIconsEndAlpha">0</Setting>
|
|
||||||
</Group>
|
|
||||||
<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="Tools">
|
|
||||||
<Setting name="snapSoftSize">2</Setting>
|
|
||||||
<Setting name="snapSoft">0</Setting>
|
|
||||||
<Setting name="dropAtScreenCenterMax">100</Setting>
|
|
||||||
<Setting name="objectsUseBoxCenter">1</Setting>
|
|
||||||
<Setting name="boundingBoxCollision">0</Setting>
|
|
||||||
<Setting name="dropAtScreenCenterScalar">1</Setting>
|
|
||||||
<Setting name="snapGround">0</Setting>
|
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="Render">
|
<Group name="Render">
|
||||||
<Setting name="renderSelectionBox">1</Setting>
|
|
||||||
<Setting name="renderObjText">1</Setting>
|
|
||||||
<Setting name="renderPopupBackground">1</Setting>
|
|
||||||
<Setting name="renderObjHandle">1</Setting>
|
<Setting name="renderObjHandle">1</Setting>
|
||||||
|
<Setting name="renderSelectionBox">1</Setting>
|
||||||
|
<Setting name="renderPopupBackground">1</Setting>
|
||||||
<Setting name="showMousePopupInfo">1</Setting>
|
<Setting name="showMousePopupInfo">1</Setting>
|
||||||
|
<Setting name="renderObjText">1</Setting>
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="Grid">
|
<Group name="Tools">
|
||||||
<Setting name="gridMinorColor">51 51 51 100</Setting>
|
<Setting name="dropAtScreenCenterMax">100</Setting>
|
||||||
<Setting name="gridSnap">0</Setting>
|
<Setting name="snapSoft">0</Setting>
|
||||||
<Setting name="gridOriginColor">255 255 255 100</Setting>
|
<Setting name="snapGround">0</Setting>
|
||||||
<Setting name="gridSize">1</Setting>
|
<Setting name="dropAtScreenCenterScalar">1</Setting>
|
||||||
<Setting name="gridColor">102 102 102 100</Setting>
|
<Setting name="snapSoftSize">2</Setting>
|
||||||
|
<Setting name="objectsUseBoxCenter">1</Setting>
|
||||||
|
<Setting name="boundingBoxCollision">0</Setting>
|
||||||
|
</Group>
|
||||||
|
<Group name="ObjectIcons">
|
||||||
|
<Setting name="fadeIconsStartDist">8</Setting>
|
||||||
|
<Setting name="fadeIconsEndDist">20</Setting>
|
||||||
|
<Setting name="fadeIconsStartAlpha">255</Setting>
|
||||||
|
<Setting name="fadeIconsEndAlpha">0</Setting>
|
||||||
|
<Setting name="fadeIcons">1</Setting>
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="Docs">
|
<Group name="Docs">
|
||||||
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
|
|
||||||
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
|
|
||||||
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
|
<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>
|
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
|
||||||
|
<Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
|
||||||
|
</Group>
|
||||||
|
<Group name="Images">
|
||||||
|
<Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
|
||||||
|
<Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
|
||||||
|
<Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
|
||||||
|
</Group>
|
||||||
|
<Group name="Theme">
|
||||||
|
<Setting name="windowTitleBGColor">50 50 50 255</Setting>
|
||||||
|
<Setting name="windowTitleBGHLColor">48 48 48 255</Setting>
|
||||||
|
<Setting name="windowTitleBGNAColor">180 180 180 255</Setting>
|
||||||
|
<Setting name="windowTitleFontColor">215 215 215 255</Setting>
|
||||||
|
<Setting name="windowTitleFontHLColor">255 255 255 255</Setting>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="GuiEditor">
|
<Group name="GuiEditor">
|
||||||
<Setting name="lastPath">tools/materialEditor/gui</Setting>
|
<Setting name="lastPath">tools/gui</Setting>
|
||||||
<Setting name="previewResolution">1024 768</Setting>
|
<Setting name="previewResolution">1024 768</Setting>
|
||||||
<Group name="Snapping">
|
|
||||||
<Setting name="snapToGuides">1</Setting>
|
|
||||||
<Setting name="sensitivity">2</Setting>
|
|
||||||
<Setting name="snapToEdges">1</Setting>
|
|
||||||
<Setting name="snapToControls">1</Setting>
|
|
||||||
<Setting name="snap2GridSize">8</Setting>
|
|
||||||
<Setting name="snapToCenters">1</Setting>
|
|
||||||
<Setting name="snap2Grid">0</Setting>
|
|
||||||
<Setting name="snapToCanvas">1</Setting>
|
|
||||||
</Group>
|
|
||||||
<Group name="Rendering">
|
|
||||||
<Setting name="drawBorderLines">1</Setting>
|
|
||||||
<Setting name="drawGuides">1</Setting>
|
|
||||||
</Group>
|
|
||||||
<Group name="Help">
|
<Group name="Help">
|
||||||
<Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
|
<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>
|
<Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
|
||||||
|
<Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
|
||||||
|
</Group>
|
||||||
|
<Group name="Snapping">
|
||||||
|
<Setting name="sensitivity">2</Setting>
|
||||||
|
<Setting name="snapToCenters">1</Setting>
|
||||||
|
<Setting name="snap2Grid">0</Setting>
|
||||||
|
<Setting name="snap2GridSize">8</Setting>
|
||||||
|
<Setting name="snapToGuides">1</Setting>
|
||||||
|
<Setting name="snapToEdges">1</Setting>
|
||||||
|
<Setting name="snapToControls">1</Setting>
|
||||||
|
<Setting name="snapToCanvas">1</Setting>
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="Library">
|
<Group name="Library">
|
||||||
<Setting name="viewType">Categorized</Setting>
|
<Setting name="viewType">Categorized</Setting>
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="EngineDevelopment">
|
<Group name="EngineDevelopment">
|
||||||
<Setting name="showEditorGuis">0</Setting>
|
<Setting name="showEditorGuis">0</Setting>
|
||||||
<Setting name="showEditorProfiles">0</Setting>
|
|
||||||
<Setting name="toggleIntoEditor">0</Setting>
|
<Setting name="toggleIntoEditor">0</Setting>
|
||||||
|
<Setting name="showEditorProfiles">0</Setting>
|
||||||
|
</Group>
|
||||||
|
<Group name="Rendering">
|
||||||
|
<Setting name="drawGuides">1</Setting>
|
||||||
|
<Setting name="drawBorderLines">1</Setting>
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="Selection">
|
<Group name="Selection">
|
||||||
<Setting name="fullBox">0</Setting>
|
<Setting name="fullBox">0</Setting>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
|
<Group name="NavEditor">
|
||||||
|
<Setting name="SpawnClass">AIPlayer</Setting>
|
||||||
|
</Group>
|
||||||
<Group name="LevelInformation">
|
<Group name="LevelInformation">
|
||||||
<Setting name="levelsDirectory">data/FPSGameplay/levels</Setting>
|
<Setting name="levelsDirectory">data/FPSGameplay/levels</Setting>
|
||||||
<Group name="levels">
|
<Group name="levels">
|
||||||
|
|
@ -118,9 +129,6 @@
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<Group name="NavEditor">
|
|
||||||
<Setting name="SpawnClass">AIPlayer</Setting>
|
|
||||||
</Group>
|
|
||||||
<Group name="ConvexEditor">
|
<Group name="ConvexEditor">
|
||||||
<Setting name="materialName">Grid_512_Orange</Setting>
|
<Setting name="materialName">Grid_512_Orange</Setting>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
|
||||||
|
|
@ -141,8 +141,8 @@ function EditorGui::init(%this)
|
||||||
// Editor Settings Window
|
// Editor Settings Window
|
||||||
if( !isObject( %this-->EditorSettingsWindow ) )
|
if( !isObject( %this-->EditorSettingsWindow ) )
|
||||||
{
|
{
|
||||||
exec("~/worldEditor/gui/EditorSettingsWindow.ed.gui");
|
exec("tools/gui/EditorSettingsWindow.ed.gui");
|
||||||
exec("~/worldEditor/scripts/editorSettingsWindow.ed.cs");
|
exec("tools/gui/editorSettingsWindow.ed.cs");
|
||||||
%this.add( ESettingsWindow );
|
%this.add( ESettingsWindow );
|
||||||
ESettingsWindow.setVisible(false);
|
ESettingsWindow.setVisible(false);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue