diff --git a/Engine/source/T3D/Scene.cpp b/Engine/source/T3D/Scene.cpp index 7189fb4ff..75517fc90 100644 --- a/Engine/source/T3D/Scene.cpp +++ b/Engine/source/T3D/Scene.cpp @@ -282,7 +282,7 @@ bool Scene::saveScene(StringTableEntry fileName) dSprintf(depSlotName, sizeof(depSlotName), "%s%d", "staticObjectAssetDependency", i); char depValue[255]; - dSprintf(depValue, sizeof(depValue), "@Asset=%s", utilizedAssetsList[i]); + dSprintf(depValue, sizeof(depValue), "%s=%s", ASSET_ID_SIGNATURE, utilizedAssetsList[i]); levelAssetDef->setDataField(StringTable->insert(depSlotName), NULL, StringTable->insert(depValue)); diff --git a/Engine/source/T3D/accumulationVolume.cpp b/Engine/source/T3D/accumulationVolume.cpp index 4c2e8b009..37e9f4ae9 100644 --- a/Engine/source/T3D/accumulationVolume.cpp +++ b/Engine/source/T3D/accumulationVolume.cpp @@ -85,19 +85,20 @@ AccumulationVolume::AccumulationVolume() mWorldToObj.identity(); // Accumulation Texture. - mTextureName = ""; - mAccuTexture = NULL; + INIT_IMAGEASSET(Texture); resetWorldBox(); } AccumulationVolume::~AccumulationVolume() { - mAccuTexture = NULL; + mTexture = nullptr; } void AccumulationVolume::initPersistFields() { + addProtectedField("textureAsset", TypeImageAssetId, Offset(mTextureAssetId, AccumulationVolume), + &_setTexture, &defaultProtectedGetFn, "Accumulation texture."); addProtectedField( "texture", TypeStringFilename, Offset( mTextureName, AccumulationVolume ), &_setTexture, &defaultProtectedGetFn, "Accumulation texture." ); @@ -235,7 +236,7 @@ U32 AccumulationVolume::packUpdate( NetConnection *connection, U32 mask, BitStre if (stream->writeFlag(mask & InitialUpdateMask)) { - stream->write( mTextureName ); + PACK_IMAGEASSET(connection, Texture); } return retMask; @@ -247,8 +248,8 @@ void AccumulationVolume::unpackUpdate( NetConnection *connection, BitStream *str if (stream->readFlag()) { - stream->read( &mTextureName ); - setTexture(mTextureName); + UNPACK_IMAGEASSET(connection, Texture); + //setTexture(mTextureName); } } @@ -262,13 +263,7 @@ void AccumulationVolume::inspectPostApply() void AccumulationVolume::setTexture( const String& name ) { - mTextureName = name; - if ( isClientObject() && mTextureName.isNotEmpty() ) - { - mAccuTexture.set(mTextureName, &GFXStaticTextureSRGBProfile, "AccumulationVolume::mAccuTexture"); - if ( mAccuTexture.isNull() ) - Con::warnf( "AccumulationVolume::setTexture - Unable to load texture: %s", mTextureName.c_str() ); - } + _setTexture(StringTable->insert(name.c_str())); refreshVolumes(); } @@ -312,7 +307,7 @@ void AccumulationVolume::refreshVolumes() if ( object.isNull() ) continue; if ( volume->containsPoint(object->getPosition()) ) - object->mAccuTex = volume->mAccuTexture; + object->mAccuTex = volume->getTextureResource(); } } } @@ -346,6 +341,6 @@ void AccumulationVolume::updateObject(SceneObject* object) if ( volume.isNull() ) continue; if ( volume->containsPoint(object->getPosition()) ) - object->mAccuTex = volume->mAccuTexture; + object->mAccuTex = volume->getTextureResource(); } -} \ No newline at end of file +} diff --git a/Engine/source/T3D/accumulationVolume.h b/Engine/source/T3D/accumulationVolume.h index eb9bce059..2b05fa81b 100644 --- a/Engine/source/T3D/accumulationVolume.h +++ b/Engine/source/T3D/accumulationVolume.h @@ -58,15 +58,15 @@ class AccumulationVolume : public ScenePolyhedralSpace mutable Vector< SceneObject* > mVolumeQueryList; - // Name (path) of the accumulation texture. - String mTextureName; - // SceneSpace. virtual void _renderObject( ObjectRenderInst* ri, SceneRenderState* state, BaseMatInstance* overrideMat ); - public: + DECLARE_IMAGEASSET(AccumulationVolume, Texture, onTextureChanged, GFXStaticTextureSRGBProfile); + DECLARE_IMAGEASSET_NET_SETGET(AccumulationVolume, Texture, -1); - GFXTexHandle mAccuTexture; + void onTextureChanged() {} + + public: AccumulationVolume(); ~AccumulationVolume(); diff --git a/Engine/source/T3D/assets/CubemapAsset.cpp b/Engine/source/T3D/assets/CubemapAsset.cpp index b68fea184..db2c7c213 100644 --- a/Engine/source/T3D/assets/CubemapAsset.cpp +++ b/Engine/source/T3D/assets/CubemapAsset.cpp @@ -136,7 +136,7 @@ void CubemapAsset::initializeAsset() { mScriptFile = expandAssetFilePath(mScriptFile); - if(Platform::isFile(mScriptFile)) + if(Torque::FS::IsScriptFile(mScriptFile)) Con::executeFile(mScriptFile, false, false); } @@ -144,7 +144,7 @@ void CubemapAsset::onAssetRefresh() { mScriptFile = expandAssetFilePath(mScriptFile); - if (Platform::isFile(mScriptFile)) + if (Torque::FS::IsScriptFile(mScriptFile)) Con::executeFile(mScriptFile, false, false); } @@ -207,8 +207,8 @@ GuiControl* GuiInspectorTypeCubemapAssetPtr::constructEditControl() dSprintf(szBuffer, sizeof(szBuffer), "CubemapEditor.openCubemapAsset(%d.getText());", retCtrl->getId()); mShapeEdButton->setField("Command", szBuffer); - char bitmapName[512] = "tools/worldEditor/images/toolbar/shape-editor"; - mShapeEdButton->setBitmap(bitmapName); + char bitmapName[512] = "ToolsModule:shape_editor_n_image"; + mShapeEdButton->setBitmap(StringTable->insert(bitmapName)); mShapeEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile"); mShapeEdButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile"); diff --git a/Engine/source/T3D/assets/GUIAsset.cpp b/Engine/source/T3D/assets/GUIAsset.cpp index 912bba3ae..aa3268d85 100644 --- a/Engine/source/T3D/assets/GUIAsset.cpp +++ b/Engine/source/T3D/assets/GUIAsset.cpp @@ -47,14 +47,14 @@ IMPLEMENT_CONOBJECT(GUIAsset); -ConsoleType(GUIAssetPtr, TypeGUIAssetPtr, String, ASSET_ID_FIELD_PREFIX) +ConsoleType(GUIAssetPtr, TypeGUIAssetPtr, const char*, ASSET_ID_FIELD_PREFIX) //----------------------------------------------------------------------------- ConsoleGetType(TypeGUIAssetPtr) { // Fetch asset Id. - return *((StringTableEntry*)dptr); + return *((const char**)(dptr)); } //----------------------------------------------------------------------------- @@ -67,11 +67,7 @@ ConsoleSetType(TypeGUIAssetPtr) // Yes, so fetch field value. const char* pFieldValue = argv[0]; - // Fetch asset Id. - StringTableEntry* assetId = (StringTableEntry*)(dptr); - - // Update asset value. - *assetId = StringTable->insert(pFieldValue); + *((const char**)dptr) = StringTable->insert(argv[0]); return; } @@ -123,12 +119,12 @@ void GUIAsset::initializeAsset() { mGUIPath = expandAssetFilePath(mGUIFile); - if (Platform::isFile(mGUIPath)) + if (Torque::FS::IsScriptFile(mGUIPath)) Con::executeFile(mGUIPath, false, false); mScriptPath = expandAssetFilePath(mScriptFile); - if (Platform::isFile(mScriptPath)) + if (Torque::FS::IsScriptFile(mScriptPath)) Con::executeFile(mScriptPath, false, false); } @@ -136,12 +132,12 @@ void GUIAsset::onAssetRefresh() { mGUIPath = expandAssetFilePath(mGUIFile); - if (Platform::isFile(mGUIPath)) + if (Torque::FS::IsScriptFile(mGUIPath)) Con::executeFile(mGUIPath, false, false); mScriptPath = expandAssetFilePath(mScriptFile); - if (Platform::isFile(mScriptPath)) + if (Torque::FS::IsScriptFile(mScriptPath)) Con::executeFile(mScriptPath, false, false); } @@ -183,6 +179,50 @@ void GUIAsset::setScriptFile(const char* pScriptFile) refreshAsset(); } +StringTableEntry GUIAsset::getAssetIdByGUIName(StringTableEntry guiName) +{ + StringTableEntry assetId = StringTable->EmptyString(); + + AssetQuery* query = new AssetQuery(); + U32 foundCount = AssetDatabase.findAssetType(query, "GUIAsset"); + if (foundCount == 0) + { + //Didn't work, so have us fall back to a placeholder asset + assetId = StringTable->insert("Core_Rendering:noMaterial"); + } + else + { + GuiControl* guiObject; + if (!Sim::findObject(guiName, guiObject)) + return ""; + + StringTableEntry guiFile = guiObject->getFilename(); + + for (U32 i = 0; i < foundCount; i++) + { + GUIAsset* guiAsset = AssetDatabase.acquireAsset(query->mAssetList[i]); + if (guiAsset && guiAsset->getGUIPath() == guiFile) + { + assetId = guiAsset->getAssetId(); + AssetDatabase.releaseAsset(query->mAssetList[i]); + break; + } + AssetDatabase.releaseAsset(query->mAssetList[i]); + } + } + + return assetId; +} + +#ifdef TORQUE_TOOLS +DefineEngineStaticMethod(GUIAsset, getAssetIdByGUIName, const char*, (const char* guiName), (""), + "Queries the Asset Database to see if any asset exists that is associated with the provided GUI Name.\n" + "@return The AssetId of the associated asset, if any.") +{ + return GUIAsset::getAssetIdByGUIName(StringTable->insert(guiName)); +} +#endif + //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId //----------------------------------------------------------------------------- @@ -221,13 +261,13 @@ GuiControl* GuiInspectorTypeGUIAssetPtr::constructEditControl() dSprintf(szBuffer, sizeof(szBuffer), "echo(\"Game Object Editor not implemented yet!\");", retCtrl->getId()); mSMEdButton->setField("Command", szBuffer); - char bitmapName[512] = "tools/worldEditor/images/toolbar/shape-editor"; - mSMEdButton->setBitmap(bitmapName); + char bitmapName[512] = "ToolsModule:GameTSCtrl_image"; + mSMEdButton->setBitmap(StringTable->insert(bitmapName)); mSMEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile"); mSMEdButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile"); mSMEdButton->setDataField(StringTable->insert("hovertime"), NULL, "1000"); - mSMEdButton->setDataField(StringTable->insert("tooltip"), NULL, "Open this file in the State Machine Editor"); + mSMEdButton->setDataField(StringTable->insert("tooltip"), NULL, "Open this file in the GUI Editor"); mSMEdButton->registerObject(); addObject(mSMEdButton); diff --git a/Engine/source/T3D/assets/GUIAsset.h b/Engine/source/T3D/assets/GUIAsset.h index 1135eba7b..bd3bdcff3 100644 --- a/Engine/source/T3D/assets/GUIAsset.h +++ b/Engine/source/T3D/assets/GUIAsset.h @@ -60,6 +60,8 @@ public: static void initPersistFields(); virtual void copyTo(SimObject* object); + static StringTableEntry getAssetIdByGUIName(StringTableEntry guiName); + /// Declare Console Object. DECLARE_CONOBJECT(GUIAsset); diff --git a/Engine/source/T3D/assets/GameObjectAsset.cpp b/Engine/source/T3D/assets/GameObjectAsset.cpp index f1a006228..17b067f3b 100644 --- a/Engine/source/T3D/assets/GameObjectAsset.cpp +++ b/Engine/source/T3D/assets/GameObjectAsset.cpp @@ -133,7 +133,7 @@ void GameObjectAsset::initializeAsset() //Ensure we have an expanded filepath mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath; - if (Platform::isFile(mScriptPath)) + if (Torque::FS::IsScriptFile(mScriptPath)) Con::executeFile(mScriptPath, false, false); mTAMLPath = getOwned() ? expandAssetFilePath(mTAMLFile) : mTAMLPath; @@ -144,7 +144,7 @@ void GameObjectAsset::onAssetRefresh() //Ensure we have an expanded filepath mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath; - if (Platform::isFile(mScriptPath)) + if (Torque::FS::IsScriptFile(mScriptPath)) Con::executeFile(mScriptPath, false, false); mTAMLPath = getOwned() ? expandAssetFilePath(mTAMLFile) : mTAMLPath; @@ -192,7 +192,7 @@ void GameObjectAsset::setTAMLFile(const char* pTAMLFile) const char* GameObjectAsset::create() { - if (!Platform::isFile(mTAMLFile)) + if (!Torque::FS::IsFile(mTAMLFile)) return ""; // Set the format mode. diff --git a/Engine/source/T3D/assets/ImageAsset.cpp b/Engine/source/T3D/assets/ImageAsset.cpp index c6fad29af..f1dfa97e0 100644 --- a/Engine/source/T3D/assets/ImageAsset.cpp +++ b/Engine/source/T3D/assets/ImageAsset.cpp @@ -42,23 +42,30 @@ #include "gfx/gfxStringEnumTranslate.h" +#include "ImageAssetInspectors.h" + // Debug Profiling. #include "platform/profiler.h" #include "T3D/assets/assetImporter.h" +#include "gfx/gfxDrawUtil.h" + +//----------------------------------------------------------------------------- + +StringTableEntry ImageAsset::smNoImageAssetFallback(StringTable->insert(Con::getVariable("$Core::NoImageAssetFallback"))); //----------------------------------------------------------------------------- IMPLEMENT_CONOBJECT(ImageAsset); -ConsoleType(ImageAssetPtr, TypeImageAssetPtr, String, ASSET_ID_FIELD_PREFIX) +ConsoleType(ImageAssetPtr, TypeImageAssetPtr, const char*, ASSET_ID_FIELD_PREFIX) //----------------------------------------------------------------------------- ConsoleGetType(TypeImageAssetPtr) { // Fetch asset Id. - return *((StringTableEntry*)dptr); + return *((const char**)(dptr)); } //----------------------------------------------------------------------------- @@ -69,13 +76,7 @@ ConsoleSetType(TypeImageAssetPtr) if (argc == 1) { // Yes, so fetch field value. - const char* pFieldValue = argv[0]; - - // Fetch asset Id. - StringTableEntry* assetId = (StringTableEntry*)(dptr); - - // Update asset value. - *assetId = StringTable->insert(pFieldValue); + *((const char**)dptr) = StringTable->insert(argv[0]); return; } @@ -84,7 +85,7 @@ ConsoleSetType(TypeImageAssetPtr) Con::warnf("(TypeImageAssetPtr) - Cannot set multiple args to a single asset."); } -ConsoleType(assetIdString, TypeImageAssetId, String, ASSET_ID_FIELD_PREFIX) +ConsoleType(assetIdString, TypeImageAssetId, const char*, ASSET_ID_FIELD_PREFIX) ConsoleGetType(TypeImageAssetId) { @@ -97,14 +98,7 @@ ConsoleSetType(TypeImageAssetId) // Was a single argument specified? if (argc == 1) { - // Yes, so fetch field value. - const char* pFieldValue = argv[0]; - - // Fetch asset Id. - StringTableEntry* assetId = (StringTableEntry*)(dptr); - - // Update asset value. - *assetId = StringTable->insert(pFieldValue); + *((const char**)dptr) = StringTable->insert(argv[0]); return; } @@ -117,26 +111,27 @@ ConsoleSetType(TypeImageAssetId) ImplementEnumType(ImageAssetType, "Type of mesh data available in a shape.\n" "@ingroup gameObjects") - { ImageAsset::Albedo, "Albedo", "" }, - { ImageAsset::Normal, "Normal", "" }, - { ImageAsset::ORMConfig, "ORMConfig", "" }, - { ImageAsset::GUI, "GUI", "" }, - { ImageAsset::Roughness, "Roughness", "" }, - { ImageAsset::AO, "AO", "" }, - { ImageAsset::Metalness, "Metalness", "" }, - { ImageAsset::Glow, "Glow", "" }, - { ImageAsset::Particle, "Particle", "" }, - { ImageAsset::Decal, "Decal", "" }, - { ImageAsset::Cubemap, "Cubemap", "" }, +{ ImageAsset::Albedo, "Albedo", "" }, +{ ImageAsset::Normal, "Normal", "" }, +{ ImageAsset::ORMConfig, "ORMConfig", "" }, +{ ImageAsset::GUI, "GUI", "" }, +{ ImageAsset::Roughness, "Roughness", "" }, +{ ImageAsset::AO, "AO", "" }, +{ ImageAsset::Metalness, "Metalness", "" }, +{ ImageAsset::Glow, "Glow", "" }, +{ ImageAsset::Particle, "Particle", "" }, +{ ImageAsset::Decal, "Decal", "" }, +{ ImageAsset::Cubemap, "Cubemap", "" }, EndImplementEnumType; //----------------------------------------------------------------------------- -ImageAsset::ImageAsset() : AssetBase(), mImage(nullptr), mUseMips(true), mIsHDRImage(false), mIsValidImage(false), mImageType(Albedo) +ImageAsset::ImageAsset() : AssetBase(), mUseMips(true), mIsHDRImage(false), mIsValidImage(false), mImageType(Albedo) { mImageFileName = StringTable->EmptyString(); mImagePath = StringTable->EmptyString(); + mLoadedState = AssetErrCode::NotLoaded; } //----------------------------------------------------------------------------- @@ -145,6 +140,15 @@ ImageAsset::~ImageAsset() { } + +void ImageAsset::consoleInit() +{ + Parent::consoleInit(); + Con::addVariable("$Core::NoImageAssetFallback", TypeString, &smNoImageAssetFallback, + "The assetId of the texture to display when the requested image asset is missing.\n" + "@ingroup GFX\n"); +} + //----------------------------------------------------------------------------- void ImageAsset::initPersistFields() @@ -163,85 +167,52 @@ void ImageAsset::initPersistFields() //------------------------------------------------------------------------------ //Utility function to 'fill out' bindings and resources with a matching asset if one exists -bool ImageAsset::getAssetByFilename(StringTableEntry fileName, AssetPtr* imageAsset) +U32 ImageAsset::getAssetByFilename(StringTableEntry fileName, AssetPtr* imageAsset) { AssetQuery query; S32 foundAssetcount = AssetDatabase.findAssetLooseFile(&query, fileName); if (foundAssetcount == 0) { - //Didn't find any assets - //If possible, see if we can run an in-place import and the get the asset from that -#if TORQUE_DEBUG - Con::warnf("ImageAsset::getAssetByFilename - Attempted to in-place import a image file(%s) that had no associated asset", fileName); -#endif - - AssetImporter* autoAssetImporter; - if (!Sim::findObject("autoAssetImporter", autoAssetImporter)) - { - autoAssetImporter = new AssetImporter(); - autoAssetImporter->registerObject("autoAssetImporter"); - } - - StringTableEntry resultingAssetId = autoAssetImporter->autoImportFile(fileName); - - if (resultingAssetId != StringTable->EmptyString()) - { - imageAsset->setAssetId(resultingAssetId); - - if (!imageAsset->isNull()) - return true; - } - //Didn't work, so have us fall back to a placeholder asset - imageAsset->setAssetId(StringTable->insert("Core_Rendering:noImage")); + imageAsset->setAssetId(ImageAsset::smNoImageAssetFallback); - if (!imageAsset->isNull()) - return true; + if (imageAsset->isNull()) + { + //Well that's bad, loading the fallback failed. + Con::warnf("ImageAsset::getAssetByFilename - Finding of asset associated with file %s failed with no fallback asset", fileName); + return AssetErrCode::Failed; + } - //That didn't work, so fail out - return false; + //handle noshape not being loaded itself + if ((*imageAsset)->mLoadedState == BadFileReference) + { + Con::warnf("ImageAsset::getAssetByFilename - Finding of associated with file %s failed, and fallback asset reported error of Bad File Reference.", fileName); + return AssetErrCode::BadFileReference; + } + + Con::warnf("ImageAsset::getAssetByFilename - Finding of associated with file %s failed, utilizing fallback asset", fileName); + + (*imageAsset)->mLoadedState = AssetErrCode::UsingFallback; + return AssetErrCode::UsingFallback; } else { //acquire and bind the asset, and return it out imageAsset->setAssetId(query.mAssetList[0]); - return true; + return (*imageAsset)->mLoadedState; } } StringTableEntry ImageAsset::getAssetIdByFilename(StringTableEntry fileName) { - StringTableEntry imageAssetId = StringTable->EmptyString(); + if (fileName == StringTable->EmptyString()) + return StringTable->EmptyString(); + + StringTableEntry imageAssetId = ImageAsset::smNoImageAssetFallback; AssetQuery query; S32 foundAssetcount = AssetDatabase.findAssetLooseFile(&query, fileName); - if (foundAssetcount == 0) - { - //Didn't find any assets - //If possible, see if we can run an in-place import and the get the asset from that -#if TORQUE_DEBUG - Con::warnf("ImageAsset::getAssetByFilename - Attempted to in-place import a image file(%s) that had no associated asset", fileName); -#endif - - AssetImporter* autoAssetImporter; - if (!Sim::findObject("autoAssetImporter", autoAssetImporter)) - { - autoAssetImporter = new AssetImporter(); - autoAssetImporter->registerObject("autoAssetImporter"); - } - - StringTableEntry resultingAssetId = autoAssetImporter->autoImportFile(fileName); - - if (resultingAssetId != StringTable->EmptyString()) - { - imageAssetId = resultingAssetId; - return imageAssetId; - } - - //Didn't work, so have us fall back to a placeholder asset - imageAssetId = StringTable->insert("Core_Rendering:noImage"); - } - else + if (foundAssetcount != 0) { //acquire and bind the asset, and return it out imageAssetId = query.mAssetList[0]; @@ -250,22 +221,37 @@ StringTableEntry ImageAsset::getAssetIdByFilename(StringTableEntry fileName) return imageAssetId; } -bool ImageAsset::getAssetById(StringTableEntry assetId, AssetPtr* imageAsset) +U32 ImageAsset::getAssetById(StringTableEntry assetId, AssetPtr* imageAsset) { (*imageAsset) = assetId; - if (!imageAsset->isNull()) - return true; + if (imageAsset->notNull()) + { + return (*imageAsset)->mLoadedState; + } + else + { + if (imageAsset->isNull()) + { + //Well that's bad, loading the fallback failed. + Con::warnf("ImageAsset::getAssetById - Finding of asset with id %s failed with no fallback asset", assetId); + return AssetErrCode::Failed; + } - //Didn't work, so have us fall back to a placeholder asset - StringTableEntry noImageId = StringTable->insert("Core_Rendering:noMaterial"); - imageAsset->setAssetId(noImageId); + //handle noshape not being loaded itself + if ((*imageAsset)->mLoadedState == BadFileReference) + { + Con::warnf("ImageAsset::getAssetById - Finding of asset with id %s failed, and fallback asset reported error of Bad File Reference.", assetId); + return AssetErrCode::BadFileReference; + } - if (!imageAsset->isNull()) - return true; + Con::warnf("ImageAsset::getAssetById - Finding of asset with id %s failed, utilizing fallback asset", assetId); - return false; + (*imageAsset)->mLoadedState = AssetErrCode::UsingFallback; + return AssetErrCode::UsingFallback; + } } + //------------------------------------------------------------------------------ void ImageAsset::copyTo(SimObject* object) { @@ -275,32 +261,49 @@ void ImageAsset::copyTo(SimObject* object) void ImageAsset::loadImage() { - SAFE_DELETE(mImage); - if (mImagePath) { - if (!Platform::isFile(mImagePath)) + if (!Torque::FS::IsFile(mImagePath)) { Con::errorf("ImageAsset::initializeAsset: Attempted to load file %s but it was not valid!", mImageFileName); + mLoadedState = BadFileReference; return; } - mImage.set(mImagePath, &GFXStaticTextureSRGBProfile, avar("%s() - mImage (line %d)", __FUNCTION__, __LINE__)); + mLoadedState = Ok; + mIsValidImage = true; + return; - if (mImage) + //GFXTexHandle texture = getTexture(&GFXStaticTextureSRGBProfile); + + //mTexture.set(mImagePath, &GFXStaticTextureSRGBProfile, avar("%s() - mImage (line %d)", __FUNCTION__, __LINE__)); + + /*if (texture.isValid()) { mIsValidImage = true; + + //mBitmap = texture.getBitmap(); + return; - } + }*/ + + mChangeSignal.trigger(); } + mLoadedState = BadFileReference; mIsValidImage = false; } void ImageAsset::initializeAsset() { - mImagePath = expandAssetFilePath(mImageFileName); + if (mImageFileName == StringTable->insert("z.png")) + { + Con::printf("Loaded z"); + } + ResourceManager::get().getChangedSignal().notify(this, &ImageAsset::_onResourceChanged); + + mImagePath = expandAssetFilePath(mImageFileName); loadImage(); } @@ -311,6 +314,16 @@ void ImageAsset::onAssetRefresh() loadImage(); } +void ImageAsset::_onResourceChanged(const Torque::Path& path) +{ + if (path != Torque::Path(mImagePath)) + return; + + refreshAsset(); + + loadImage(); +} + void ImageAsset::setImageFileName(const char* pScriptFile) { // Sanity! @@ -320,24 +333,34 @@ void ImageAsset::setImageFileName(const char* pScriptFile) mImageFileName = StringTable->insert(pScriptFile); } -GFXTexHandle ImageAsset::getImage(GFXTextureProfile requestedProfile) +const GBitmap& ImageAsset::getImage() { - /*if (mResourceMap.contains(requestedProfile)) + return GBitmap(); //TODO fix this +} + +GFXTexHandle ImageAsset::getTexture(GFXTextureProfile* requestedProfile) +{ + if (mResourceMap.contains(requestedProfile)) { + mLoadedState = Ok; return mResourceMap.find(requestedProfile)->value; } else { //If we don't have an existing map case to the requested format, we'll just create it and insert it in - GFXTexHandle newImage; - newImage.set(mImageFileName, &requestedProfile, avar("%s() - mImage (line %d)", __FUNCTION__, __LINE__)); - mResourceMap.insert(requestedProfile, newImage); + GFXTexHandle newTex = TEXMGR->createTexture(mImagePath, requestedProfile); + if (newTex) + { + mResourceMap.insert(requestedProfile, newTex); + mLoadedState = Ok; + return newTex; + } + else + mLoadedState = BadFileReference; + } - return newImage; - }*/ - - if (mImage.isValid()) - return mImage; + //if (mTexture.isValid()) + // return mTexture; return nullptr; } @@ -348,7 +371,17 @@ const char* ImageAsset::getImageInfo() { static const U32 bufSize = 2048; char* returnBuffer = Con::getReturnBuffer(bufSize); - dSprintf(returnBuffer, bufSize, "%s %d %d %d", GFXStringTextureFormat[mImage.getFormat()], mImage.getHeight(), mImage.getWidth(), mImage.getDepth()); + + GFXTexHandle newTex = TEXMGR->createTexture(mImagePath, &GFXStaticTextureSRGBProfile); + if (newTex) + { + dSprintf(returnBuffer, bufSize, "%s %d %d %d", GFXStringTextureFormat[newTex->getFormat()], newTex->getHeight(), newTex->getWidth(), newTex->getDepth()); + newTex = nullptr; + } + else + { + dSprintf(returnBuffer, bufSize, "ImageAsset::getImageInfo() - Failed to get image info for %s", getAssetId()); + } return returnBuffer; } @@ -384,6 +417,11 @@ const char* ImageAsset::getImageTypeNameFromType(ImageAsset::ImageTypes type) ImageAsset::ImageTypes ImageAsset::getImageTypeFromName(const char* name) { + if (dStrIsEmpty(name)) + { + return (ImageTypes)Albedo; + } + S32 ret = -1; for (S32 i = 0; i < ImageTypeCount; i++) { @@ -414,6 +452,15 @@ DefineEngineMethod(ImageAsset, getImageInfo, const char*, (), , return object->getImageInfo(); } +#ifdef TORQUE_TOOLS +DefineEngineStaticMethod(ImageAsset, getAssetIdByFilename, const char*, (const char* filePath), (""), + "Queries the Asset Database to see if any asset exists that is associated with the provided file path.\n" + "@return The AssetId of the associated asset, if any.") +{ + return ImageAsset::getAssetIdByFilename(StringTable->insert(filePath)); +} +#endif + //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId //----------------------------------------------------------------------------- @@ -435,11 +482,16 @@ void GuiInspectorTypeImageAssetPtr::consoleInit() GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl() { + if (mInspector->getInspectObject() == nullptr) + return nullptr; + // Create base filename edit controls GuiControl* retCtrl = Parent::constructEditControl(); if (retCtrl == NULL) return retCtrl; + retCtrl->getRenderTooltipDelegate().bind(this, &GuiInspectorTypeImageAssetPtr::renderTooltip); + // Change filespec char szBuffer[512]; dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.showDialog(\"ImageAsset\", \"AssetBrowser.changeAsset\", %s, %s);", @@ -456,8 +508,8 @@ GuiControl* GuiInspectorTypeImageAssetPtr::constructEditControl() dSprintf(szBuffer, sizeof(szBuffer), "ShapeEditorPlugin.openShapeAssetId(%d.getText());", retCtrl->getId()); mImageEdButton->setField("Command", szBuffer); - char bitmapName[512] = "tools/worldEditor/images/toolbar/shape-editor"; - mImageEdButton->setBitmap(bitmapName); + char bitmapName[512] = "ToolsModule:GameTSCtrl_image"; + mImageEdButton->setBitmap(StringTable->insert(bitmapName)); mImageEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile"); mImageEdButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile"); @@ -496,6 +548,66 @@ bool GuiInspectorTypeImageAssetPtr::updateRects() return resized; } +bool GuiInspectorTypeImageAssetPtr::renderTooltip(const Point2I& hoverPos, const Point2I& cursorPos, const char* tipText) +{ + if (!mAwake) + return false; + + GuiCanvas* root = getRoot(); + if (!root) + return false; + + AssetPtr imgAsset; + U32 assetState = ImageAsset::getAssetById(getData(), &imgAsset); + if (imgAsset == NULL || assetState == ImageAsset::Failed) + return false; + + StringTableEntry filename = imgAsset->getImagePath(); + if (!filename || !filename[0]) + return false; + + GFXTexHandle texture(filename, &GFXStaticTextureSRGBProfile, avar("%s() - tooltip texture (line %d)", __FUNCTION__, __LINE__)); + if (texture.isNull()) + return false; + + // Render image at a reasonable screen size while + // keeping its aspect ratio... + Point2I screensize = getRoot()->getWindowSize(); + Point2I offset = hoverPos; + Point2I tipBounds; + + U32 texWidth = texture.getWidth(); + U32 texHeight = texture.getHeight(); + F32 aspect = (F32)texHeight / (F32)texWidth; + + const F32 newWidth = 150.0f; + F32 newHeight = aspect * newWidth; + + // Offset below cursor image + offset.y += 20; // TODO: Attempt to fix?: root->getCursorExtent().y; + tipBounds.x = newWidth; + tipBounds.y = newHeight; + + // Make sure all of the tooltip will be rendered width the app window, + // 5 is given as a buffer against the edge + if (screensize.x < offset.x + tipBounds.x + 5) + offset.x = screensize.x - tipBounds.x - 5; + if (screensize.y < offset.y + tipBounds.y + 5) + offset.y = hoverPos.y - tipBounds.y - 5; + + RectI oldClip = GFX->getClipRect(); + RectI rect(offset, tipBounds); + GFX->setClipRect(rect); + + GFXDrawUtil* drawer = GFX->getDrawUtil(); + drawer->clearBitmapModulation(); + GFX->getDrawUtil()->drawBitmapStretch(texture, rect); + + GFX->setClipRect(oldClip); + + return true; +} + IMPLEMENT_CONOBJECT(GuiInspectorTypeImageAssetId); ConsoleDocClass(GuiInspectorTypeImageAssetId, diff --git a/Engine/source/T3D/assets/ImageAsset.h b/Engine/source/T3D/assets/ImageAsset.h index 8b9e9729c..ec16179aa 100644 --- a/Engine/source/T3D/assets/ImageAsset.h +++ b/Engine/source/T3D/assets/ImageAsset.h @@ -20,8 +20,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- -#ifndef IMAGE_ASSET_H -#define IMAGE_ASSET_H +#pragma once #ifndef _ASSET_BASE_H_ #include "assets/assetBase.h" @@ -45,7 +44,9 @@ #include "gfx/bitmap/gBitmap.h" #include "gfx/gfxTextureHandle.h" -#include "gui/editor/guiInspectorTypes.h" +#include "sim/netConnection.h" + +#include //----------------------------------------------------------------------------- class ImageAsset : public AssetBase @@ -70,24 +71,33 @@ public: ImageTypeCount = 11 }; + static StringTableEntry smNoImageAssetFallback; + protected: StringTableEntry mImageFileName; StringTableEntry mImagePath; - GFXTexHandle mImage; - bool mIsValidImage; bool mUseMips; bool mIsHDRImage; ImageTypes mImageType; - Map mResourceMap; + HashMap mResourceMap; + + typedef Signal ImageAssetChanged; + ImageAssetChanged mChangeSignal; + + typedef Signal ImageAssetArrayChanged; + ImageAssetArrayChanged mChangeArraySignal; public: ImageAsset(); virtual ~ImageAsset(); + /// Set up some global script interface stuff. + static void consoleInit(); + /// Engine. static void initPersistFields(); virtual void copyTo(SimObject* object); @@ -95,32 +105,40 @@ public: /// Declare Console Object. DECLARE_CONOBJECT(ImageAsset); - void setImageFileName(const char* pScriptFile); + void _onResourceChanged(const Torque::Path& path); + + ImageAssetChanged& getChangedSignal() { return mChangeSignal; } + ImageAssetArrayChanged& getChangedArraySignal() { return mChangeArraySignal; } + + void setImageFileName(StringTableEntry pScriptFile); inline StringTableEntry getImageFileName(void) const { return mImageFileName; }; inline StringTableEntry getImagePath(void) const { return mImagePath; }; bool isValid() { return mIsValidImage; } - GFXTexHandle getImage(GFXTextureProfile requestedProfile); + const GBitmap& getImage(); + GFXTexHandle getTexture(GFXTextureProfile* requestedProfile); - const char* getImageInfo(); + StringTableEntry getImageInfo(); - static const char* getImageTypeNameFromType(ImageTypes type); - static ImageTypes getImageTypeFromName(const char* name); + static StringTableEntry getImageTypeNameFromType(ImageTypes type); + static ImageTypes getImageTypeFromName(StringTableEntry name); void setImageType(ImageTypes type) { mImageType = type; } + ImageTypes getImageType() { return mImageType; } - static bool getAssetByFilename(StringTableEntry fileName, AssetPtr* imageAsset); + static U32 getAssetByFilename(StringTableEntry fileName, AssetPtr* imageAsset); static StringTableEntry getAssetIdByFilename(StringTableEntry fileName); - static bool getAssetById(StringTableEntry assetId, AssetPtr* imageAsset); + static U32 getAssetById(StringTableEntry assetId, AssetPtr* imageAsset); + static U32 getAssetById(String assetId, AssetPtr* imageAsset) { return getAssetById(assetId.c_str(), imageAsset); }; protected: virtual void initializeAsset(void); virtual void onAssetRefresh(void); - static bool setImageFileName(void* obj, const char* index, const char* data) { static_cast(obj)->setImageFileName(data); return false; } - static const char* getImageFileName(void* obj, const char* data) { return static_cast(obj)->getImageFileName(); } + static bool setImageFileName(void* obj, StringTableEntry index, StringTableEntry data) { static_cast(obj)->setImageFileName(data); return false; } + static StringTableEntry getImageFileName(void* obj, StringTableEntry data) { return static_cast(obj)->getImageFileName(); } void loadImage(); }; @@ -131,89 +149,468 @@ DefineConsoleType(TypeImageAssetId, String) typedef ImageAsset::ImageTypes ImageAssetType; DefineEnumType(ImageAssetType); -class GuiInspectorTypeImageAssetPtr : public GuiInspectorTypeFileName -{ - typedef GuiInspectorTypeFileName Parent; -public: +#pragma region Singular Asset Macros - GuiBitmapButtonCtrl* mImageEdButton; - - DECLARE_CONOBJECT(GuiInspectorTypeImageAssetPtr); - static void consoleInit(); - - virtual GuiControl* constructEditControl(); - virtual bool updateRects(); -}; - -class GuiInspectorTypeImageAssetId : public GuiInspectorTypeImageAssetPtr -{ - typedef GuiInspectorTypeImageAssetPtr Parent; -public: - - DECLARE_CONOBJECT(GuiInspectorTypeImageAssetId); - static void consoleInit(); -}; - -#define assetText(x,suff) std::string(std::string(#x) + std::string(#suff)).c_str() - -#define initMapSlot(name) m##name##Filename = String::EmptyString; m##name##AssetId = StringTable->EmptyString(); m##name##Asset = NULL; -#define bindMapSlot(name) if (m##name##AssetId != String::EmptyString) m##name##Asset = m##name##AssetId; - -#define scriptBindMapSlot(name, consoleClass, docs) addField(#name, TypeImageFilename, Offset(m##name##Filename, consoleClass), assetText(name, docs)); \ - addProtectedField(assetText(name, Asset), TypeImageAssetId, Offset(m##name##AssetId, consoleClass), consoleClass::_set##name##Asset, & defaultProtectedGetFn, assetText(name, asset reference.)); - -#define initMapArraySlot(name,id) m##name##Filename[id] = String::EmptyString; m##name##AssetId[id] = StringTable->EmptyString(); m##name##Asset[id] = NULL; -#define bindMapArraySlot(name,id) if (m##name##AssetId[id] != String::EmptyString) m##name##Asset[id] = m##name##AssetId[id]; -#define scriptBindMapArraySlot(name, arraySize, consoleClass, docs) addField(#name, TypeImageFilename, Offset(m##name##Filename, consoleClass), arraySize, assetText(name, docs)); \ - addProtectedField(assetText(name,Asset), TypeImageAssetId, Offset(m##name##AssetId, consoleClass), consoleClass::_set##name##AssetSlot, &defaultProtectedGetFn, arraySize, assetText(name,asset reference.)); - -#define DECLARE_TEXTUREMAP(className,name) protected: \ - FileName m##name##Filename;\ - StringTableEntry m##name##AssetId;\ - AssetPtr m##name##Asset;\ - public: \ - const String& get##name() const { return m##name##Filename; }\ - void set##name(FileName _in) { m##name##Filename = _in; }\ - const AssetPtr & get##name##Asset() const { return m##name##Asset; }\ - void set##name##Asset(AssetPtr_in) { m##name##Asset = _in; }\ -static bool _set##name##Asset(void* obj, const char* index, const char* data)\ -{\ - className* mat = static_cast(obj);\ - mat->m##name##AssetId = StringTable->insert(data);\ - if (ImageAsset::getAssetById(mat->m##name##AssetId, &mat->m##name##Asset))\ +//Singular assets +/// +/// Declares an image asset +/// This establishes the assetId, asset and legacy filepath fields, along with supplemental getter and setter functions +/// +#define DECLARE_IMAGEASSET(className, name, changeFunc, profile) public: \ + GFXTexHandle m##name = NULL;\ + StringTableEntry m##name##Name; \ + StringTableEntry m##name##AssetId;\ + AssetPtr m##name##Asset;\ + GFXTextureProfile* m##name##Profile = &profile;\ +public: \ + const StringTableEntry get##name##File() const { return m##name##Name; }\ + void set##name##File(const FileName &_in) { m##name##Name = StringTable->insert(_in.c_str());}\ + const AssetPtr & get##name##Asset() const { return m##name##Asset; }\ + void set##name##Asset(const AssetPtr &_in) { m##name##Asset = _in;}\ + \ + bool _set##name(StringTableEntry _in)\ {\ - if (mat->m##name##Asset.getAssetId() != StringTable->insert("Core_Rendering:noMaterial"))\ - mat->m##name##Filename = StringTable->EmptyString();\ - return true;\ - }\ - return true;\ -} - -#define GET_TEXTUREMAP(name) get##name() -#define SET_TEXTUREMAP(name,_in) set##name(_in) -#define GET_TEXTUREASSET(name) get##name##Asset() -#define SET_TEXTUREASSET(name,_in) set##name##Asset(_in) - -#define DECLARE_TEXTUREARRAY(className,name,max) FileName m##name##Filename[max];\ - StringTableEntry m##name##AssetId[max];\ - AssetPtr m##name##Asset[max];\ -static bool _set##name##AssetSlot(void* obj, const char* index, const char* data)\ -{\ - className* mat = static_cast(obj);\ - if (!index) return false;\ - U32 idx = dAtoi(index);\ - if (idx >= max)\ - return false;\ - mat->m##name##AssetId[idx] = StringTable->insert(data);\ - if (ImageAsset::getAssetById(mat->m##name##AssetId[idx], &mat->m##name##Asset[idx]))\ - {\ - if (mat->m##name##Asset[idx].getAssetId() != StringTable->insert("Core_Rendering:noMaterial"))\ + if(m##name##AssetId != _in || m##name##Name != _in)\ {\ - mat->m##name##Filename[idx] = StringTable->EmptyString();\ + if (m##name##Asset.notNull())\ + {\ + m##name##Asset->getChangedSignal().remove(this, &className::changeFunc);\ + }\ + if (_in == StringTable->EmptyString())\ + {\ + m##name##Name = StringTable->EmptyString();\ + m##name##AssetId = StringTable->EmptyString();\ + m##name##Asset = NULL;\ + m##name.free();\ + m##name = NULL;\ + return true;\ + }\ + else if(_in[0] == '$' || _in[0] == '#')\ + {\ + m##name##Name = _in;\ + m##name##AssetId = StringTable->EmptyString();\ + m##name##Asset = NULL;\ + m##name.free();\ + m##name = NULL;\ + return true;\ + }\ + \ + if (AssetDatabase.isDeclaredAsset(_in))\ + {\ + m##name##AssetId = _in;\ + \ + U32 assetState = ImageAsset::getAssetById(m##name##AssetId, &m##name##Asset);\ + \ + if (ImageAsset::Ok == assetState)\ + {\ + m##name##Name = StringTable->EmptyString();\ + }\ + }\ + else\ + {\ + StringTableEntry assetId = ImageAsset::getAssetIdByFilename(_in);\ + if (assetId != StringTable->EmptyString())\ + {\ + m##name##AssetId = assetId;\ + if (ImageAsset::getAssetById(m##name##AssetId, &m##name##Asset) == ImageAsset::Ok)\ + {\ + m##name##Name = StringTable->EmptyString();\ + }\ + }\ + else\ + {\ + m##name##Name = _in;\ + m##name##AssetId = StringTable->EmptyString();\ + m##name##Asset = NULL;\ + }\ + }\ + }\ + if (get##name() != StringTable->EmptyString() && m##name##Name != StringTable->insert("texhandle"))\ + {\ + if (m##name##Asset.notNull())\ + {\ + m##name##Asset->getChangedSignal().notify(this, &className::changeFunc);\ + }\ + \ + m##name.set(get##name(), m##name##Profile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__));\ + }\ + else\ + {\ + m##name.free();\ + m##name = NULL;\ + }\ + \ + if(get##name() == StringTable->EmptyString())\ + return true;\ + \ + if (m##name##Asset.notNull() && m##name##Asset->getStatus() != ImageAsset::Ok)\ + {\ + Con::errorf("%s(%s)::_set%s() - image asset failure\"%s\" due to [%s]", macroText(className), getName(), macroText(name), _in, ImageAsset::getAssetErrstrn(m##name##Asset->getStatus()).c_str());\ + return false; \ + }\ + else if (bool(m##name) == NULL)\ + {\ + Con::errorf("%s(%s)::_set%s() - Couldn't load image \"%s\"", macroText(className), getName(), macroText(name), _in);\ + return false;\ }\ return true;\ }\ - return true;\ + \ + const StringTableEntry get##name() const\ + {\ + if (m##name##Asset && (m##name##Asset->getImageFileName() != StringTable->EmptyString()))\ + return Platform::makeRelativePathName(m##name##Asset->getImagePath(), Platform::getMainDotCsDir());\ + else if (m##name##AssetId != StringTable->EmptyString())\ + return m##name##AssetId;\ + else if (m##name##Name != StringTable->EmptyString())\ + return StringTable->insert(Platform::makeRelativePathName(m##name##Name, Platform::getMainDotCsDir()));\ + else\ + return StringTable->EmptyString();\ + }\ + GFXTexHandle get##name##Resource() \ + {\ + return m##name;\ + } + +#define DECLARE_IMAGEASSET_SETGET(className, name)\ + static bool _set##name##Data(void* obj, const char* index, const char* data)\ + {\ + bool ret = false;\ + className* object = static_cast(obj);\ + ret = object->_set##name(StringTable->insert(data));\ + return ret;\ + } + +#define DECLARE_IMAGEASSET_NET_SETGET(className, name, bitmask)\ + static bool _set##name##Data(void* obj, const char* index, const char* data)\ + {\ + bool ret = false;\ + className* object = static_cast(obj);\ + ret = object->_set##name(StringTable->insert(data));\ + if(ret)\ + object->setMaskBits(bitmask);\ + return ret;\ + } + +#define DEF_IMAGEASSET_BINDS(className,name)\ +DefineEngineMethod(className, get##name, const char*, (), , "get name")\ +{\ + return object->get##name(); \ +}\ +DefineEngineMethod(className, get##name##Asset, const char*, (), , assetText(name, asset reference))\ +{\ + return object->m##name##AssetId; \ +}\ +DefineEngineMethod(className, set##name, bool, (const char* map), , assetText(name,assignment. first tries asset then flat file.))\ +{\ + return object->_set##name(StringTable->insert(map));\ } + +#define INIT_IMAGEASSET(name) \ + m##name##Name = StringTable->EmptyString(); \ + m##name##AssetId = StringTable->EmptyString(); \ + m##name##Asset = NULL; + +#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS + +#define INITPERSISTFIELD_IMAGEASSET(name, consoleClass, docs) \ + addProtectedField(#name, TypeImageFilename, Offset(m##name##Name, consoleClass), _set##name##Data, &defaultProtectedGetFn, assetDoc(name, docs)); \ + addProtectedField(assetText(name, Asset), TypeImageAssetId, Offset(m##name##AssetId, consoleClass), _set##name##Data, &defaultProtectedGetFn, assetDoc(name, asset docs.)); + +#else + +#define INITPERSISTFIELD_IMAGEASSET(name, consoleClass, docs) \ + addProtectedField(#name, TypeImageFilename, Offset(m##name##Name, consoleClass), _set##name##Data, &defaultProtectedGetFn, assetDoc(name, docs), AbstractClassRep::FIELD_HideInInspectors); \ + addProtectedField(assetText(name, Asset), TypeImageAssetId, Offset(m##name##AssetId, consoleClass), _set##name##Data, &defaultProtectedGetFn, assetDoc(name, asset docs.)); + +#endif // SHOW_LEGACY_FILE_FIELDS + +#define CLONE_IMAGEASSET(name) \ + m##name##Name = other.m##name##Name;\ + m##name##AssetId = other.m##name##AssetId;\ + m##name##Asset = other.m##name##Asset; + +#define LOAD_IMAGEASSET(name)\ +if (m##name##AssetId != StringTable->EmptyString())\ +{\ + S32 assetState = ImageAsset::getAssetById(m##name##AssetId, &m##name##Asset);\ + if (assetState == ImageAsset::Ok )\ + {\ + m##name##Name = StringTable->EmptyString();\ + }\ + else Con::warnf("Warning: %s::LOAD_IMAGEASSET(%s)-%s", mClassName, m##name##AssetId, ImageAsset::getAssetErrstrn(assetState).c_str());\ +} + +#define PACKDATA_IMAGEASSET(name)\ + if (stream->writeFlag(m##name##Asset.notNull()))\ + {\ + stream->writeString(m##name##Asset.getAssetId());\ + _set##name(m##name##AssetId);\ + }\ + else\ + stream->writeString(m##name##Name); + +#define UNPACKDATA_IMAGEASSET(name)\ + if (stream->readFlag())\ + {\ + m##name##AssetId = stream->readSTString();\ + }\ + else\ + m##name##Name = stream->readSTString(); + +#define PACK_IMAGEASSET(netconn, name)\ + if (stream->writeFlag(m##name##Asset.notNull()))\ + {\ + NetStringHandle assetIdStr = m##name##Asset.getAssetId();\ + netconn->packNetStringHandleU(stream, assetIdStr);\ + }\ + else\ + stream->writeString(m##name##Name); + +#define UNPACK_IMAGEASSET(netconn, name)\ + if (stream->readFlag())\ + {\ + m##name##AssetId = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\ + _set##name(m##name##AssetId);\ + }\ + else\ + m##name##Name = stream->readSTString(); + +#pragma endregion + +#pragma region Arrayed Asset Macros + +//Arrayed Assets +#define DECLARE_IMAGEASSET_ARRAY(className, name, profile, max) public: \ + static const U32 sm##name##Count = max;\ + GFXTexHandle m##name[max];\ + StringTableEntry m##name##Name[max]; \ + StringTableEntry m##name##AssetId[max];\ + AssetPtr m##name##Asset[max];\ + GFXTextureProfile * m##name##Profile = &profile;\ +public: \ + const StringTableEntry get##name##File(const U32& index) const { return m##name##Name[index]; }\ + void set##name##File(const FileName &_in, const U32& index) { m##name##Name[index] = StringTable->insert(_in.c_str());}\ + const AssetPtr & get##name##Asset(const U32& index) const { return m##name##Asset[index]; }\ + void set##name##Asset(const AssetPtr &_in, const U32& index) { m##name##Asset[index] = _in;}\ + \ + bool _set##name(StringTableEntry _in, const U32& index)\ + {\ + if(m##name##AssetId[index] != _in || m##name##Name[index] != _in)\ + {\ + if(index >= sm##name##Count || index < 0)\ + return false;\ + if (_in == StringTable->EmptyString())\ + {\ + m##name##Name[index] = StringTable->EmptyString();\ + m##name##AssetId[index] = StringTable->EmptyString();\ + m##name##Asset[index] = NULL;\ + m##name[index].free();\ + m##name[index] = NULL;\ + return true;\ + }\ + else if(_in[0] == '$' || _in[0] == '#')\ + {\ + m##name##Name[index] = _in;\ + m##name##AssetId[index] = StringTable->EmptyString();\ + m##name##Asset[index] = NULL;\ + m##name[index].free();\ + m##name[index] = NULL;\ + return true;\ + }\ + \ + if (AssetDatabase.isDeclaredAsset(_in))\ + {\ + m##name##AssetId[index] = _in;\ + \ + U32 assetState = ImageAsset::getAssetById(m##name##AssetId[index], &m##name##Asset[index]);\ + \ + if (ImageAsset::Ok == assetState)\ + {\ + m##name##Name[index] = StringTable->EmptyString();\ + }\ + }\ + else\ + {\ + StringTableEntry assetId = ImageAsset::getAssetIdByFilename(_in);\ + if (assetId != StringTable->EmptyString())\ + {\ + m##name##AssetId[index] = assetId;\ + if (ImageAsset::getAssetById(m##name##AssetId[index], &m##name##Asset[index]) == ImageAsset::Ok)\ + {\ + m##name##Name[index] = StringTable->EmptyString();\ + }\ + }\ + else\ + {\ + m##name##Name[index] = _in;\ + m##name##AssetId[index] = StringTable->EmptyString();\ + m##name##Asset[index] = NULL;\ + }\ + }\ + }\ + if (get##name(index) != StringTable->EmptyString() && m##name##Name[index] != StringTable->insert("texhandle"))\ + {\ + m##name[index].set(get##name(index), m##name##Profile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__));\ + }\ + else\ + {\ + m##name[index].free();\ + m##name[index] = NULL;\ + }\ + \ + if(get##name(index) == StringTable->EmptyString())\ + return true;\ + \ + if (m##name##Asset[index].notNull() && m##name##Asset[index]->getStatus() != ImageAsset::Ok)\ + {\ + Con::errorf("%s(%s)::_set%s(%i) - image asset failure\"%s\" due to [%s]", macroText(className), getName(), macroText(name), index, _in, ImageAsset::getAssetErrstrn(m##name##Asset[index]->getStatus()).c_str());\ + return false; \ + }\ + else if (bool(m##name[index]) == NULL)\ + {\ + Con::errorf("%s(%s)::_set%s(%i) - Couldn't load image \"%s\"", macroText(className), getName(), macroText(name), index, _in);\ + return false; \ + }\ + return true;\ + }\ + \ + const StringTableEntry get##name(const U32& index) const\ + {\ + if (m##name##Asset[index] && (m##name##Asset[index]->getImageFileName() != StringTable->EmptyString()))\ + return Platform::makeRelativePathName(m##name##Asset[index]->getImagePath(), Platform::getMainDotCsDir());\ + else if (m##name##AssetId[index] != StringTable->EmptyString())\ + return m##name##AssetId[index];\ + else if (m##name##Name[index] != StringTable->EmptyString())\ + return StringTable->insert(Platform::makeRelativePathName(m##name##Name[index], Platform::getMainDotCsDir()));\ + else\ + return StringTable->EmptyString();\ + }\ + GFXTexHandle get##name##Resource(const U32& index) \ + {\ + if(index >= sm##name##Count || index < 0)\ + return nullptr;\ + return m##name[index];\ + } + +#define DECLARE_IMAGEASSET_ARRAY_SETGET(className, name)\ + static bool _set##name##Data(void* obj, const char* index, const char* data)\ + {\ + if (!index) return false;\ + U32 idx = dAtoi(index);\ + if (idx >= sm##name##Count)\ + return false;\ + bool ret = false;\ + className* object = static_cast(obj);\ + ret = object->_set##name(StringTable->insert(data),idx);\ + return ret;\ + } + +#define DECLARE_IMAGEASSET_ARRAY_NET_SETGET(className, name, bitmask)\ + static bool _set##name##Data(void* obj, const char* index, const char* data)\ + {\ + if (!index) return false;\ + U32 idx = dAtoi(index);\ + if (idx >= sm##name##Count)\ + return false;\ + bool ret = false;\ + className* object = static_cast(obj);\ + ret = object->_set##name(StringTable->insert(data),idx);\ + if(ret)\ + object->setMaskBits(bitmask);\ + return ret;\ + } + +#define DEF_IMAGEASSET_ARRAY_BINDS(className,name)\ +DefineEngineMethod(className, get##name, const char*, (S32 index), , "get name")\ +{\ + return object->get##name(index); \ +}\ +DefineEngineMethod(className, get##name##Asset, const char*, (S32 index), , assetText(name, asset reference))\ +{\ + if(index >= className::sm##name##Count || index < 0)\ + return "";\ + return object->m##name##AssetId[index]; \ +}\ +DefineEngineMethod(className, set##name, bool, (const char* map, S32 index), , assetText(name,assignment. first tries asset then flat file.))\ +{\ + return object->_set##name(StringTable->insert(map), index);\ +} + +#define INIT_IMAGEASSET_ARRAY(name, index) \ +{\ + m##name##Name[index] = StringTable->EmptyString(); \ + m##name##AssetId[index] = StringTable->EmptyString(); \ + m##name##Asset[index] = NULL;\ +} + +#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS + +#define INITPERSISTFIELD_IMAGEASSET_ARRAY(name, arraySize, consoleClass, docs) \ + addProtectedField(#name, TypeImageFilename, Offset(m##name##Name, consoleClass), _set##name##Data, &defaultProtectedGetFn, arraySize, assetDoc(name, docs)); \ + addProtectedField(assetText(name, Asset), TypeImageAssetId, Offset(m##name##AssetId, consoleClass), _set##name##Data, &defaultProtectedGetFn, arraySize, assetDoc(name, asset docs.)); + +#else + +#define INITPERSISTFIELD_IMAGEASSET_ARRAY(name, arraySize, consoleClass, docs) \ + addProtectedField(#name, TypeImageFilename, Offset(m##name##Name, consoleClass), _set##name##Data, &defaultProtectedGetFn, arraySize, assetDoc(name, docs), AbstractClassRep::FIELD_HideInInspectors); \ + addProtectedField(assetText(name, Asset), TypeImageAssetId, Offset(m##name##AssetId, consoleClass), _set##name##Data, &defaultProtectedGetFn, arraySize, assetDoc(name, asset docs.)); + #endif +#define CLONE_IMAGEASSET_ARRAY(name, index) \ +{\ + m##name##Name[index] = other.m##name##Name[index];\ + m##name##AssetId[index] = other.m##name##AssetId[index];\ + m##name##Asset[index] = other.m##name##Asset[index];\ +} + +#define LOAD_IMAGEASSET_ARRAY(name, index)\ +if (m##name##AssetId[index] != StringTable->EmptyString())\ +{\ + S32 assetState = ImageAsset::getAssetById(m##name##AssetId[index], &m##name##Asset[index]);\ + if (assetState == ImageAsset::Ok )\ + {\ + m##name##Name[index] = StringTable->EmptyString();\ + }\ + else Con::warnf("Warning: %s::LOAD_IMAGEASSET(%s)-%s", mClassName, m##name##AssetId[index], ImageAsset::getAssetErrstrn(assetState).c_str());\ +} + +#define PACKDATA_IMAGEASSET_ARRAY(name, index)\ + if (stream->writeFlag(m##name##Asset[index].notNull()))\ + {\ + stream->writeString(m##name##Asset[index].getAssetId());\ + }\ + else\ + stream->writeString(m##name##Name[index]); + +#define UNPACKDATA_IMAGEASSET_ARRAY(name, index)\ + if (stream->readFlag())\ + {\ + m##name##AssetId[index] = stream->readSTString();\ + _set##name(m##name##AssetId[index], index);\ + }\ + else\ + m##name##Name[index] = stream->readSTString(); + +#define PACK_IMAGEASSET_ARRAY(netconn, name, index)\ + if (stream->writeFlag(m##name##Asset[index].notNull()))\ + {\ + NetStringHandle assetIdStr = m##name##Asset[index].getAssetId();\ + netconn->packNetStringHandleU(stream, assetIdStr);\ + }\ + else\ + stream->writeString(m##name##Name[index]); + +#define UNPACK_IMAGEASSET_ARRAY(netconn, name, index)\ + if (stream->readFlag())\ + {\ + m##name##AssetId[index] = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\ + _set##name(m##name##AssetId[index], index);\ + }\ + else\ + m##name##Name[index] = stream->readSTString(); + +#pragma endregion + + diff --git a/Engine/source/T3D/assets/ImageAssetInspectors.h b/Engine/source/T3D/assets/ImageAssetInspectors.h new file mode 100644 index 000000000..75b7942d1 --- /dev/null +++ b/Engine/source/T3D/assets/ImageAssetInspectors.h @@ -0,0 +1,31 @@ +#pragma once + +#include "ImageAsset.h" + +#ifndef _GUI_INSPECTOR_TYPES_H_ +#include "gui/editor/guiInspectorTypes.h" +#endif + +class GuiInspectorTypeImageAssetPtr : public GuiInspectorTypeFileName +{ + typedef GuiInspectorTypeFileName Parent; +public: + + GuiBitmapButtonCtrl* mImageEdButton; + + DECLARE_CONOBJECT(GuiInspectorTypeImageAssetPtr); + static void consoleInit(); + + virtual GuiControl* constructEditControl(); + virtual bool updateRects(); + bool renderTooltip(const Point2I& hoverPos, const Point2I& cursorPos, const char* tipText = NULL); +}; + +class GuiInspectorTypeImageAssetId : public GuiInspectorTypeImageAssetPtr +{ + typedef GuiInspectorTypeImageAssetPtr Parent; +public: + + DECLARE_CONOBJECT(GuiInspectorTypeImageAssetId); + static void consoleInit(); +}; diff --git a/Engine/source/T3D/assets/LevelAsset.cpp b/Engine/source/T3D/assets/LevelAsset.cpp index 8b043a0f1..0b5415ea8 100644 --- a/Engine/source/T3D/assets/LevelAsset.cpp +++ b/Engine/source/T3D/assets/LevelAsset.cpp @@ -47,14 +47,14 @@ IMPLEMENT_CONOBJECT(LevelAsset); -ConsoleType(LevelAssetPtr, TypeLevelAssetPtr, String, ASSET_ID_FIELD_PREFIX) +ConsoleType(LevelAssetPtr, TypeLevelAssetPtr, const char*, ASSET_ID_FIELD_PREFIX) //----------------------------------------------------------------------------- ConsoleGetType(TypeLevelAssetPtr) { // Fetch asset Id. - return *((StringTableEntry*)dptr); + return *((const char**)(dptr)); } //----------------------------------------------------------------------------- @@ -65,13 +65,7 @@ ConsoleSetType(TypeLevelAssetPtr) if (argc == 1) { // Yes, so fetch field value. - const char* pFieldValue = argv[0]; - - // Fetch asset Id. - StringTableEntry* assetId = (StringTableEntry*)(dptr); - - // Update asset value. - *assetId = StringTable->insert(pFieldValue); + *((const char**)dptr) = StringTable->insert(argv[0]); return; } @@ -86,14 +80,12 @@ LevelAsset::LevelAsset() : AssetBase(), mIsSubLevel(false) { mLevelName = StringTable->EmptyString(); mLevelFile = StringTable->EmptyString(); - mPreviewImage = StringTable->EmptyString(); mPostFXPresetFile = StringTable->EmptyString(); mDecalsFile = StringTable->EmptyString(); mForestFile = StringTable->EmptyString(); mNavmeshFile = StringTable->EmptyString(); mLevelPath = StringTable->EmptyString(); - mPreviewImagePath = StringTable->EmptyString(); mPostFXPresetPath = StringTable->EmptyString(); mDecalsPath = StringTable->EmptyString(); mForestPath = StringTable->EmptyString(); @@ -104,6 +96,9 @@ LevelAsset::LevelAsset() : AssetBase(), mIsSubLevel(false) mEditorFile = StringTable->EmptyString(); mBakedSceneFile = StringTable->EmptyString(); + + mPreviewImageAssetId = StringTable->EmptyString(); + mPreviewImageAsset = StringTable->EmptyString(); } //----------------------------------------------------------------------------- @@ -122,8 +117,6 @@ void LevelAsset::initPersistFields() addProtectedField("LevelFile", TypeAssetLooseFilePath, Offset(mLevelFile, LevelAsset), &setLevelFile, &getLevelFile, "Path to the actual level file."); addField("LevelName", TypeString, Offset(mLevelName, LevelAsset), "Human-friendly name for the level."); - addProtectedField("PreviewImage", TypeAssetLooseFilePath, Offset(mPreviewImage, LevelAsset), - &setPreviewImageFile, &getPreviewImageFile, "Path to the image used for selection preview."); addProtectedField("PostFXPresetFile", TypeAssetLooseFilePath, Offset(mPostFXPresetFile, LevelAsset), &setPostFXPresetFile, &getPostFXPresetFile, "Path to the level's postFXPreset."); @@ -157,24 +150,32 @@ void LevelAsset::initializeAsset() // Call parent. Parent::initializeAsset(); - // Ensure the image-file is expanded. - mPreviewImagePath = expandAssetFilePath(mPreviewImage); - mLevelPath = expandAssetFilePath(mLevelFile); - mPostFXPresetPath = expandAssetFilePath(mPostFXPresetFile); - mDecalsPath = expandAssetFilePath(mDecalsFile); - mForestPath = expandAssetFilePath(mForestFile); - mNavmeshPath = expandAssetFilePath(mNavmeshFile); + loadAsset(); } void LevelAsset::onAssetRefresh(void) +{ + loadAsset(); +} + +void LevelAsset::loadAsset() { // Ensure the image-file is expanded. - mPreviewImagePath = expandAssetFilePath(mPreviewImage); mLevelPath = expandAssetFilePath(mLevelFile); mPostFXPresetPath = expandAssetFilePath(mPostFXPresetFile); mDecalsPath = expandAssetFilePath(mDecalsFile); mForestPath = expandAssetFilePath(mForestFile); mNavmeshPath = expandAssetFilePath(mNavmeshFile); + + StringTableEntry previewImageAssetId = getAssetDependencyField("previewImageAsset"); + + if (previewImageAssetId != StringTable->EmptyString()) + { + mPreviewImageAssetId = previewImageAssetId; + + AssetPtr previewImgAsset = mPreviewImageAssetId; + mPreviewImageAsset = previewImgAsset; + } } // @@ -197,23 +198,19 @@ void LevelAsset::setLevelFile(const char* pLevelFile) refreshAsset(); } -void LevelAsset::setImageFile(const char* pImageFile) +StringTableEntry LevelAsset::getPreviewImageAsset() const { - // Sanity! - AssertFatal(pImageFile != NULL, "Cannot use a NULL image file."); + return mPreviewImageAssetId; +} - // Fetch image file. - pImageFile = StringTable->insert(pImageFile); +StringTableEntry LevelAsset::getPreviewImagePath(void) const +{ + if (mPreviewImageAsset.notNull() && mPreviewImageAsset->isAssetValid()) + { + return mPreviewImageAsset->getImagePath(); + } - // Ignore no change, - if (pImageFile == mPreviewImage) - return; - - // Update. - mPreviewImage = pImageFile; - - // Refresh the asset. - refreshAsset(); + return StringTable->EmptyString(); } void LevelAsset::setEditorFile(const char* pEditorFile) @@ -368,11 +365,18 @@ DefineEngineMethod(LevelAsset, getLevelPath, const char*, (),, return object->getLevelPath(); } +DefineEngineMethod(LevelAsset, getPreviewImageAsset, const char*, (), , + "Gets the full path of the asset's defined preview image file.\n" + "@return The string result of the level preview image path") +{ + return object->getPreviewImageAsset(); +} + DefineEngineMethod(LevelAsset, getPreviewImagePath, const char*, (), , "Gets the full path of the asset's defined preview image file.\n" "@return The string result of the level preview image path") { - return object->getImagePath(); + return object->getPreviewImagePath(); } DefineEngineMethod(LevelAsset, getPostFXPresetPath, const char*, (), , diff --git a/Engine/source/T3D/assets/LevelAsset.h b/Engine/source/T3D/assets/LevelAsset.h index eb91f3142..6b85bb476 100644 --- a/Engine/source/T3D/assets/LevelAsset.h +++ b/Engine/source/T3D/assets/LevelAsset.h @@ -38,6 +38,7 @@ #ifndef _ASSET_FIELD_TYPES_H_ #include "assets/assetFieldTypes.h" #endif +#include "T3D/assets/ImageAsset.h" //----------------------------------------------------------------------------- class LevelAsset : public AssetBase @@ -50,14 +51,12 @@ class LevelAsset : public AssetBase StringTableEntry mDecalsFile; StringTableEntry mForestFile; StringTableEntry mNavmeshFile; - StringTableEntry mPreviewImage; StringTableEntry mLevelPath; StringTableEntry mPostFXPresetPath; StringTableEntry mDecalsPath; StringTableEntry mForestPath; StringTableEntry mNavmeshPath; - StringTableEntry mPreviewImagePath; StringTableEntry mEditorFile; StringTableEntry mBakedSceneFile; @@ -69,6 +68,9 @@ class LevelAsset : public AssetBase Vector mAssetDependencies; + StringTableEntry mPreviewImageAssetId; + AssetPtr mPreviewImageAsset; + public: LevelAsset(); virtual ~LevelAsset(); @@ -93,15 +95,16 @@ public: inline StringTableEntry getForestFile(void) const { return mForestFile; }; void setNavmeshFile(const char* pNavmeshFile); inline StringTableEntry getNavmeshFile(void) const { return mNavmeshFile; }; - void setImageFile(const char* pImageFile); - inline StringTableEntry getImageFile(void) const { return mPreviewImage; }; + + StringTableEntry getPreviewImageAsset(void) const; inline StringTableEntry getLevelPath(void) const { return mLevelPath; }; inline StringTableEntry getPostFXPresetPath(void) const { return mPostFXPresetPath; }; inline StringTableEntry getDecalsPath(void) const { return mDecalsPath; }; inline StringTableEntry getForestPath(void) const { return mForestPath; }; inline StringTableEntry getNavmeshPath(void) const { return mNavmeshPath; }; - inline StringTableEntry getImagePath(void) const { return mPreviewImagePath; }; + + StringTableEntry getPreviewImagePath(void) const; void setEditorFile(const char* pEditorFile); inline StringTableEntry getEditorFile(void) const { return mEditorFile; }; @@ -113,8 +116,6 @@ public: protected: static bool setLevelFile(void *obj, const char *index, const char *data) { static_cast(obj)->setLevelFile(data); return false; } static const char* getLevelFile(void* obj, const char* data) { return static_cast(obj)->getLevelFile(); } - static bool setPreviewImageFile(void *obj, const char *index, const char *data) { static_cast(obj)->setImageFile(data); return false; } - static const char* getPreviewImageFile(void* obj, const char* data) { return static_cast(obj)->getImageFile(); } static bool setEditorFile(void* obj, const char* index, const char* data) { static_cast(obj)->setEditorFile(data); return false; } static const char* getEditorFile(void* obj, const char* data) { return static_cast(obj)->getEditorFile(); } @@ -134,6 +135,7 @@ protected: virtual void initializeAsset(void); virtual void onAssetRefresh(void); + void loadAsset(); }; DefineConsoleType(TypeLevelAssetPtr, LevelAsset) diff --git a/Engine/source/T3D/assets/MaterialAsset.cpp b/Engine/source/T3D/assets/MaterialAsset.cpp index e1818323a..94b1d48ea 100644 --- a/Engine/source/T3D/assets/MaterialAsset.cpp +++ b/Engine/source/T3D/assets/MaterialAsset.cpp @@ -43,6 +43,8 @@ #include "T3D/assets/assetImporter.h" +StringTableEntry MaterialAsset::smNoMaterialAssetFallback(StringTable->insert(Con::getVariable("$Core::NoMaterialAssetFallback"))); + //----------------------------------------------------------------------------- IMPLEMENT_CONOBJECT(MaterialAsset); @@ -89,7 +91,7 @@ ConsoleSetType(TypeMaterialAssetPtr) } -ConsoleType(assetIdString, TypeMaterialAssetId, String, ASSET_ID_FIELD_PREFIX) +ConsoleType(assetIdString, TypeMaterialAssetId, const char*, ASSET_ID_FIELD_PREFIX) ConsoleGetType(TypeMaterialAssetId) { @@ -125,16 +127,26 @@ MaterialAsset::MaterialAsset() mScriptFile = StringTable->EmptyString(); mScriptPath = StringTable->EmptyString(); mMatDefinitionName = StringTable->EmptyString(); + mMaterialDefinition = nullptr; } //----------------------------------------------------------------------------- MaterialAsset::~MaterialAsset() { + //SAFE_DELETE(mMaterialDefinition); } //----------------------------------------------------------------------------- +void MaterialAsset::consoleInit() +{ + Parent::consoleInit(); + Con::addVariable("$Core::NoMaterialAssetFallback", TypeString, &smNoMaterialAssetFallback, + "The assetId of the material to display when the requested material asset is missing.\n" + "@ingroup GFX\n"); +} + void MaterialAsset::initPersistFields() { // Call parent. @@ -152,32 +164,22 @@ void MaterialAsset::initializeAsset() // Call parent. Parent::initializeAsset(); - compileShader(); - mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath; - if (Platform::isFile(mScriptPath)) + if (Torque::FS::IsScriptFile(mScriptPath)) Con::executeFile(mScriptPath, false, false); + + loadMaterial(); } void MaterialAsset::onAssetRefresh() { mScriptPath = getOwned() ? expandAssetFilePath(mScriptFile) : mScriptPath; - if (Platform::isFile(mScriptPath)) + if (Torque::FS::IsScriptFile(mScriptPath)) Con::executeFile(mScriptPath, false, false); - if (mMatDefinitionName != StringTable->EmptyString()) - { - Material* matDef; - if (!Sim::findObject(mMatDefinitionName, matDef)) - { - Con::errorf("MaterialAsset: Unable to find the Material %s", mMatDefinitionName); - return; - } - - matDef->reload(); - } + loadMaterial(); } void MaterialAsset::setScriptFile(const char* pScriptFile) @@ -197,142 +199,162 @@ void MaterialAsset::setScriptFile(const char* pScriptFile) //------------------------------------------------------------------------------ -void MaterialAsset::compileShader() +void MaterialAsset::loadMaterial() { + if (mMaterialDefinition) + SAFE_DELETE(mMaterialDefinition); + + if (mMatDefinitionName != StringTable->EmptyString()) + { + Material* matDef; + if (!Sim::findObject(mMatDefinitionName, matDef)) + { + Con::errorf("MaterialAsset: Unable to find the Material %s", mMatDefinitionName); + mLoadedState = BadFileReference; + return; + } + + mMaterialDefinition = matDef; + + mLoadedState = Ok; + + mMaterialDefinition->reload(); + return; + } + + mLoadedState = Failed; } +//------------------------------------------------------------------------------ + void MaterialAsset::copyTo(SimObject* object) { // Call to parent. Parent::copyTo(object); } -DefineEngineMethod(MaterialAsset, compileShader, void, (), , "Compiles the material's generated shader, if any. Not yet implemented\n") -{ - object->compileShader(); -} - //------------------------------------------------------------------------------ -StringTableEntry MaterialAsset::getAssetIdByMaterialName(StringTableEntry matName) +U32 MaterialAsset::getAssetByMaterialName(StringTableEntry matName, AssetPtr* matAsset) { - StringTableEntry materialAssetId = StringTable->EmptyString(); - - AssetQuery* query = new AssetQuery(); - U32 foundCount = AssetDatabase.findAssetType(query, "MaterialAsset"); - if (foundCount == 0) + AssetQuery query; + U32 foundAssetcount = AssetDatabase.findAssetType(&query, "MaterialAsset"); + if (foundAssetcount == 0) { //Didn't work, so have us fall back to a placeholder asset - materialAssetId = StringTable->insert("Core_Rendering:noMaterial"); + matAsset->setAssetId(MaterialAsset::smNoMaterialAssetFallback); + + if (matAsset->isNull()) + { + //Well that's bad, loading the fallback failed. + Con::warnf("MaterialAsset::getAssetByMaterialName - Finding of asset associated with material name %s failed with no fallback asset", matName); + return AssetErrCode::Failed; + } + + //handle noshape not being loaded itself + if ((*matAsset)->mLoadedState == BadFileReference) + { + Con::warnf("ShapeAsset::getAssetByMaterialName - Finding of associated with aterial name %s failed, and fallback asset reported error of Bad File Reference.", matName); + return AssetErrCode::BadFileReference; + } + + Con::warnf("ShapeAsset::getAssetByMaterialName - Finding of associated with aterial name %s failed, utilizing fallback asset", matName); + + (*matAsset)->mLoadedState = AssetErrCode::UsingFallback; + return AssetErrCode::UsingFallback; } else + { + for (U32 i = 0; i < foundAssetcount; i++) + { + MaterialAsset* tMatAsset = AssetDatabase.acquireAsset(query.mAssetList[i]); + if (tMatAsset && tMatAsset->getMaterialDefinitionName() == matName) + { + matAsset->setAssetId(query.mAssetList[i]); + AssetDatabase.releaseAsset(query.mAssetList[i]); + return (*matAsset)->mLoadedState; + } + AssetDatabase.releaseAsset(query.mAssetList[i]); //cleanup if that's not the one we needed + } + } +} + +StringTableEntry MaterialAsset::getAssetIdByMaterialName(StringTableEntry matName) +{ + if (matName == StringTable->EmptyString()) + return StringTable->EmptyString(); + + StringTableEntry materialAssetId = MaterialAsset::smNoMaterialAssetFallback; + + AssetQuery query; + U32 foundCount = AssetDatabase.findAssetType(&query, "MaterialAsset"); + if (foundCount != 0) { for (U32 i = 0; i < foundCount; i++) { - MaterialAsset* matAsset = AssetDatabase.acquireAsset(query->mAssetList[i]); + MaterialAsset* matAsset = AssetDatabase.acquireAsset(query.mAssetList[i]); if (matAsset && matAsset->getMaterialDefinitionName() == matName) { materialAssetId = matAsset->getAssetId(); + AssetDatabase.releaseAsset(query.mAssetList[i]); break; } - AssetDatabase.releaseAsset(query->mAssetList[i]); //cleanup if that's not the one we needed - } - - if (materialAssetId == StringTable->EmptyString()) - { - //Try auto-importing it if it exists already - BaseMaterialDefinition* baseMatDef; - if (!Sim::findObject(matName, baseMatDef)) - { - //Not even a real material, apparently? - //return back a blank - return StringTable->EmptyString(); - } - - //Ok, a real mat def, we can work with this -#if TORQUE_DEBUG - Con::warnf("MaterialAsset::getAssetIdByMaterialName - Attempted to in-place import a material(%s) that had no associated asset", matName); -#endif - - AssetImporter* autoAssetImporter; - if (!Sim::findObject("autoAssetImporter", autoAssetImporter)) - { - autoAssetImporter = new AssetImporter(); - autoAssetImporter->registerObject("autoAssetImporter"); - } - - autoAssetImporter->resetImportSession(true); - - String originalMaterialDefFile = Torque::Path(baseMatDef->getFilename()).getPath(); - - autoAssetImporter->setTargetPath(originalMaterialDefFile); - - autoAssetImporter->resetImportConfig(); - - AssetImportObject* assetObj = autoAssetImporter->addImportingAsset("MaterialAsset", originalMaterialDefFile, nullptr, matName); - - //Find out if the filepath has an associated module to it. If we're importing in-place, it needs to be within a module's directory - ModuleDefinition* targetModuleDef = AssetImporter::getModuleFromPath(originalMaterialDefFile); - - if (targetModuleDef == nullptr) - { - return StringTable->EmptyString(); - } - else - { - autoAssetImporter->setTargetModuleId(targetModuleDef->getModuleId()); - } - - autoAssetImporter->processImportAssets(); - - bool hasIssues = autoAssetImporter->validateAssets(); - - if (hasIssues) - { - //log it - Con::errorf("Error! Import process of Material(%s) has failed due to issues discovered during validation!", matName); - return StringTable->EmptyString(); - } - else - { - autoAssetImporter->importAssets(); - } - -#if TORQUE_DEBUG - autoAssetImporter->dumpActivityLog(); -#endif - - if (hasIssues) - { - return StringTable->EmptyString(); - } - else - { - String assetId = autoAssetImporter->getTargetModuleId() + ":" + assetObj->assetName; - return StringTable->insert(assetId.c_str()); - } + AssetDatabase.releaseAsset(query.mAssetList[i]); } } return materialAssetId; } -bool MaterialAsset::getAssetById(StringTableEntry assetId, AssetPtr* materialAsset) +U32 MaterialAsset::getAssetById(StringTableEntry assetId, AssetPtr* materialAsset) { (*materialAsset) = assetId; - if (!materialAsset->isNull()) - return true; + if (materialAsset->notNull()) + { + return (*materialAsset)->mLoadedState; + } + else + { + //Didn't work, so have us fall back to a placeholder asset + materialAsset->setAssetId(MaterialAsset::smNoMaterialAssetFallback); - //Didn't work, so have us fall back to a placeholder asset - StringTableEntry noImageId = StringTable->insert("Core_Rendering:noMaterial"); - materialAsset->setAssetId(noImageId); + if (materialAsset->isNull()) + { + //Well that's bad, loading the fallback failed. + Con::warnf("MaterialAsset::getAssetById - Finding of asset with id %s failed with no fallback asset", assetId); + return AssetErrCode::Failed; + } - if (!materialAsset->isNull()) - return true; + //handle noshape not being loaded itself + if ((*materialAsset)->mLoadedState == BadFileReference) + { + Con::warnf("MaterialAsset::getAssetById - Finding of asset with id %s failed, and fallback asset reported error of Bad File Reference.", assetId); + return AssetErrCode::BadFileReference; + } - return false; + Con::warnf("MaterialAsset::getAssetById - Finding of asset with id %s failed, utilizing fallback asset", assetId); + + (*materialAsset)->mLoadedState = AssetErrCode::UsingFallback; + return AssetErrCode::UsingFallback; + } } +#ifdef TORQUE_TOOLS +DefineEngineStaticMethod(MaterialAsset, getAssetIdByMaterialName, const char*, (const char* materialName), (""), + "Queries the Asset Database to see if any asset exists that is associated with the provided material name.\n" + "@return The AssetId of the associated asset, if any.") +{ + return MaterialAsset::getAssetIdByMaterialName(StringTable->insert(materialName)); +} + +DefineEngineMethod(MaterialAsset, getScriptPath, const char*, (), , + "Queries the Asset Database to see if any asset exists that is associated with the provided material name.\n" + "@return The AssetId of the associated asset, if any.") +{ + return object->getScriptPath(); +} +#endif + //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId //----------------------------------------------------------------------------- @@ -373,13 +395,13 @@ GuiControl* GuiInspectorTypeMaterialAssetPtr::constructEditControl() dSprintf(szBuffer, sizeof(szBuffer), "AssetBrowser.editAsset(%d.getText());", retCtrl->getId()); mEditButton->setField("Command", szBuffer); - char bitmapName[512] = "tools/worldEditor/images/toolbar/material-editor"; - mEditButton->setBitmap(bitmapName); + char bitmapName[512] = "ToolsModule:material_editor_n_image"; + mEditButton->setBitmap(StringTable->insert(bitmapName)); mEditButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile"); mEditButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile"); mEditButton->setDataField(StringTable->insert("hovertime"), NULL, "1000"); - mEditButton->setDataField(StringTable->insert("tooltip"), NULL, "Open this file in the Material Editor"); + mEditButton->setDataField(StringTable->insert("tooltip"), NULL, "Open this asset in the Material Editor"); mEditButton->registerObject(); addObject(mEditButton); diff --git a/Engine/source/T3D/assets/MaterialAsset.h b/Engine/source/T3D/assets/MaterialAsset.h index 4451d4515..3ba5cdce4 100644 --- a/Engine/source/T3D/assets/MaterialAsset.h +++ b/Engine/source/T3D/assets/MaterialAsset.h @@ -53,6 +53,7 @@ #include "materials/matTextureTarget.h" #include "materials/materialDefinition.h" #include "materials/customMaterialDefinition.h" +#include "materials/materialManager.h" //----------------------------------------------------------------------------- class MaterialAsset : public AssetBase @@ -64,25 +65,42 @@ class MaterialAsset : public AssetBase StringTableEntry mScriptPath; StringTableEntry mMatDefinitionName; + SimObjectPtr mMaterialDefinition; + +public: + static StringTableEntry smNoMaterialAssetFallback; + public: MaterialAsset(); virtual ~MaterialAsset(); + /// Set up some global script interface stuff. + static void consoleInit(); + /// Engine. static void initPersistFields(); virtual void copyTo(SimObject* object); - void compileShader(); + void loadMaterial(); StringTableEntry getMaterialDefinitionName() { return mMatDefinitionName; } + SimObjectPtr getMaterialDefinition() { return mMaterialDefinition; } void setScriptFile(const char* pScriptFile); inline StringTableEntry getScriptFile(void) const { return mScriptFile; }; inline StringTableEntry getScriptPath(void) const { return mScriptPath; }; - static StringTableEntry getAssetIdByMaterialName(StringTableEntry fileName); - static bool getAssetById(StringTableEntry assetId, AssetPtr* materialAsset); + /// + /// Looks for any assets that uses the provided Material Definition name. + /// If none are found, attempts to auto-import the material definition if the + /// material definition exists. + /// + /// Material Definition name to look for + /// AssetId of matching asset. + static StringTableEntry getAssetIdByMaterialName(StringTableEntry matName); + static U32 getAssetById(StringTableEntry assetId, AssetPtr* materialAsset); + static U32 getAssetByMaterialName(StringTableEntry matName, AssetPtr* matAsset); /// Declare Console Object. DECLARE_CONOBJECT(MaterialAsset); @@ -124,159 +142,203 @@ public: static void consoleInit(); }; -#define assetText(x,suff) std::string(std::string(#x) + std::string(#suff)).c_str() +#pragma region Singular Asset Macros -#define initMaterialAsset(name) m##name##Name = ""; m##name##AssetId = StringTable->EmptyString(); m##name##Asset = NULL; -#define bindMaterialAsset(name) if (m##name##AssetId != StringTable->EmptyString()) m##name##Asset = m##name##AssetId; - -#define scriptBindMaterialAsset(name, consoleClass, docs)\ - addProtectedField(assetText(name, File), TypeMaterialName, Offset(m##name##Name, consoleClass), consoleClass::_set##name##Name, & defaultProtectedGetFn, assetText(name, docs), AbstractClassRep::FIELD_HideInInspectors); \ - addProtectedField(assetText(name, Asset), TypeMaterialAssetId, Offset(m##name##AssetId, consoleClass), consoleClass::_set##name##Asset, & defaultProtectedGetFn, assetText(name, asset reference.)); - -#define DECLARE_MATERIALASSET(className,name) protected: \ - String m##name##Name;\ - StringTableEntry m##name##AssetId;\ - AssetPtr m##name##Asset;\ - public: \ - const String& get##name() const { return m##name##Name; }\ - void set##name(FileName _in) { m##name##Name = _in; }\ - const AssetPtr & get##name##Asset() const { return m##name##Asset; }\ - void set##name##Asset(AssetPtr_in) { m##name##Asset = _in; }\ -static bool _set##name##Name(void* obj, const char* index, const char* data)\ -{\ - className* shape = static_cast(obj);\ +//Singular assets +/// +/// Declares an material asset +/// This establishes the assetId, asset and legacy filepath fields, along with supplemental getter and setter functions +/// +#define DECLARE_MATERIALASSET(className, name) public: \ + StringTableEntry m##name##Name;\ + StringTableEntry m##name##AssetId;\ + AssetPtr m##name##Asset;\ + SimObjectPtr m##name;\ +public: \ + const StringTableEntry get##name##File() const { return m##name##Name; }\ + void set##name##Name(const FileName &_in) { m##name##Name = StringTable->insert(_in.c_str());}\ + const AssetPtr & get##name##Asset() const { return m##name##Asset; }\ + void set##name##Asset(const AssetPtr &_in) { m##name##Asset = _in;}\ \ - StringTableEntry assetId = MaterialAsset::getAssetIdByMaterialName(StringTable->insert(data));\ - if (assetId != StringTable->EmptyString())\ + bool _set##name(StringTableEntry _in)\ {\ - if (shape->_set##name##Asset(obj, index, assetId))\ + if(m##name##AssetId != _in || m##name##Name != _in)\ {\ - if (assetId == StringTable->insert("Core_Rendering:noMaterial"))\ + if (_in == StringTable->EmptyString())\ {\ - shape->m##name##Name = data;\ - shape->m##name##AssetId = StringTable->EmptyString();\ - \ + m##name##Name = StringTable->EmptyString();\ + m##name##AssetId = StringTable->EmptyString();\ + m##name##Asset = NULL;\ + m##name = NULL;\ return true;\ }\ + \ + if (AssetDatabase.isDeclaredAsset(_in))\ + {\ + m##name##AssetId = _in;\ + \ + U32 assetState = MaterialAsset::getAssetById(m##name##AssetId, &m##name##Asset);\ + \ + if (MaterialAsset::Ok == assetState)\ + {\ + m##name##Name = StringTable->EmptyString();\ + }\ + }\ else\ {\ - shape->m##name##AssetId = assetId;\ - shape->m##name##Name = StringTable->EmptyString();\ - \ - return false;\ + StringTableEntry assetId = MaterialAsset::getAssetIdByMaterialName(_in);\ + if (assetId != StringTable->EmptyString())\ + {\ + m##name##AssetId = assetId;\ + if (MaterialAsset::getAssetById(m##name##AssetId, &m##name##Asset) == MaterialAsset::Ok)\ + {\ + m##name##Name = StringTable->EmptyString();\ + }\ + }\ + else\ + {\ + m##name##Name = _in;\ + m##name##AssetId = StringTable->EmptyString();\ + m##name##Asset = NULL;\ + }\ }\ }\ - }\ - else\ - {\ - shape->m##name##Asset = StringTable->EmptyString();\ - }\ - \ - return true;\ -}\ -\ -static bool _set##name##Asset(void* obj, const char* index, const char* data)\ -{\ - className* shape = static_cast(obj);\ - shape->m##name##AssetId = StringTable->insert(data);\ - if (MaterialAsset::getAssetById(shape->m##name##AssetId, &shape->m##name##Asset))\ - {\ - if (shape->m##name##Asset.getAssetId() != StringTable->insert("Core_Rendering:noMaterial"))\ - shape->m##name##Name = StringTable->EmptyString();\ - \ - return true;\ - }\ - return false;\ -}\ -\ -static bool set##name##Asset(const char* assetId)\ -{\ - m##name##AssetId = StringTable->insert(assetId);\ - if (m##name##AssetId != StringTable->EmptyString())\ - m##name##Asset = m##name##AssetId;\ -} - -/// -/// DECLARE_MATERIALASSET is a utility macro for MaterialAssets. It takes in the name of the class using it, the name of the field for the material, and a networking bitmask -/// The first 2 are for setting up/filling out the fields and class member defines -/// The bitmask is for when the material is changed, it can automatically kick a network update on the owner object to pass the changed asset to clients -/// -#define DECLARE_NET_MATERIALASSET(className,name,bitmask) protected: \ - String m##name##Name;\ - StringTableEntry m##name##AssetId;\ - AssetPtr m##name##Asset;\ - public: \ - const String& get##name() const { return m##name##Name; }\ - void set##name(FileName _in) { m##name##Name = _in; }\ - const AssetPtr & get##name##Asset() const { return m##name##Asset; }\ - void set##name##Asset(AssetPtr_in) { m##name##Asset = _in; }\ -static bool _set##name##Name(void* obj, const char* index, const char* data)\ -{\ - className* shape = static_cast(obj);\ - \ - StringTableEntry assetId = MaterialAsset::getAssetIdByMaterialName(StringTable->insert(data));\ - if (assetId != StringTable->EmptyString())\ - {\ - if (shape->_set##name##Asset(obj, index, assetId))\ + if (get##name() != StringTable->EmptyString() && m##name##Asset.notNull())\ {\ - if (assetId == StringTable->insert("Core_Rendering:noMaterial"))\ - {\ - shape->m##name##Name = data;\ - shape->m##name##AssetId = StringTable->EmptyString();\ - \ - return true;\ - }\ - else\ - {\ - shape->m##name##AssetId = assetId;\ - shape->m##name##Name = StringTable->EmptyString();\ - \ + if (m##name && String(m##name##Asset->getMaterialDefinitionName()).equal(m##name->getName(), String::NoCase))\ return false;\ - }\ + \ + Material* tempMat = nullptr;\ + \ + if (!Sim::findObject(m##name##Asset->getMaterialDefinitionName(), tempMat))\ + Con::errorf("%s::_set%s() - Material %s was not found.", macroText(className), macroText(name), m##name##Asset->getMaterialDefinitionName());\ + m##name = tempMat;\ + }\ + else\ + {\ + m##name = NULL;\ }\ - }\ - else\ - {\ - shape->m##name##Asset = StringTable->EmptyString();\ - }\ - \ - return true;\ -}\ -\ -static bool _set##name##Asset(void* obj, const char* index, const char* data)\ -{\ - className* shape = static_cast(obj);\ - shape->m##name##AssetId = StringTable->insert(data);\ - if (MaterialAsset::getAssetById(shape->m##name##AssetId, &shape->m##name##Asset))\ - {\ - if (shape->m##name##Asset.getAssetId() != StringTable->insert("Core_Rendering:noMaterial"))\ - shape->m##name##Name = StringTable->EmptyString();\ \ - shape->setMaskBits(bitmask);\ - shape->inspectPostApply();\ - return true;\ - }\ - shape->inspectPostApply();\ - return false;\ -}\ -\ -bool set##name##AssetId(const char* _assetId)\ -{\ - m##name##AssetId = StringTable->insert(_assetId);\ - if (m##name##AssetId != StringTable->EmptyString())\ - {\ - m##name##Asset = m##name##AssetId;\ + if(get##name() == StringTable->EmptyString())\ + return true;\ \ - setMaskBits(bitmask);\ - inspectPostApply();\ + if (m##name##Asset.notNull() && m##name##Asset->getStatus() != MaterialAsset::Ok)\ + {\ + Con::errorf("%s::_set%s() - material asset failure\"%s\" due to [%s]", macroText(className), macroText(name), _in, MaterialAsset::getAssetErrstrn(m##name##Asset->getStatus()).c_str());\ + return false; \ + }\ + else if (bool(m##name) == NULL)\ + {\ + Con::errorf("%s::_set%s() - Couldn't load material \"%s\"", macroText(className), macroText(name), _in);\ + return false;\ + }\ return true;\ }\ \ - return false;\ + const StringTableEntry get##name() const\ + {\ + if (m##name##Asset && (m##name##Asset->getMaterialDefinitionName() != StringTable->EmptyString()))\ + return m##name##Asset->getMaterialDefinitionName();\ + else if (m##name##AssetId != StringTable->EmptyString())\ + return m##name##AssetId;\ + else if (m##name##Name != StringTable->EmptyString())\ + return m##name##Name;\ + else\ + return StringTable->EmptyString();\ + }\ + SimObjectPtr get##name##Resource() \ + {\ + return m##name##;\ + } + +#define DECLARE_MATERIALASSET_SETGET(className, name)\ + static bool _set##name##Data(void* obj, const char* index, const char* data)\ + {\ + bool ret = false;\ + className* object = static_cast(obj);\ + ret = object->_set##name(StringTable->insert(data));\ + return ret;\ + } + +#define DECLARE_MATERIALASSET_NET_SETGET(className, name, bitmask)\ + static bool _set##name##Data(void* obj, const char* index, const char* data)\ + {\ + bool ret = false;\ + className* object = static_cast(obj);\ + ret = object->_set##name(StringTable->insert(data));\ + if(ret)\ + object->setMaskBits(bitmask);\ + return ret;\ + } + +#define DEF_MATERIALASSET_BINDS(className,name)\ +DefineEngineMethod(className, get##name, const char*, (), , "get name")\ +{\ + return object->get##name(); \ +}\ +DefineEngineMethod(className, get##name##Asset, const char*, (), , assetText(name, asset reference))\ +{\ + return object->m##name##AssetId; \ +}\ +DefineEngineMethod(className, set##name, bool, (const char* mat), , assetText(name,assignment. first tries asset then material name.))\ +{\ + return object->_set##name(StringTable->insert(mat));\ } +#define INIT_MATERIALASSET(name) \ + m##name##Name = StringTable->EmptyString(); \ + m##name##AssetId = StringTable->EmptyString(); \ + m##name##Asset = NULL;\ + m##name = NULL; -#define packMaterialAsset(netconn, name)\ +#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS + +#define INITPERSISTFIELD_MATERIALASSET(name, consoleClass, docs) \ + addProtectedField(#name, TypeMaterialName, Offset(m##name##Name, consoleClass), _set##name##Data, &defaultProtectedGetFn,assetDoc(name, docs)); \ + addProtectedField(assetText(name, Asset), TypeMaterialAssetId, Offset(m##name##AssetId, consoleClass), _set##name##Data, &defaultProtectedGetFn, assetDoc(name, asset docs.)); + +#else + +#define INITPERSISTFIELD_MATERIALASSET(name, consoleClass, docs) \ + addProtectedField(#name, TypeMaterialName, Offset(m##name##Name, consoleClass), _set##name##Data, &defaultProtectedGetFn,assetDoc(name, docs), AbstractClassRep::FIELD_HideInInspectors); \ + addProtectedField(assetText(name, Asset), TypeMaterialAssetId, Offset(m##name##AssetId, consoleClass), _set##name##Data, &defaultProtectedGetFn, assetDoc(name, asset docs.)); + +#endif // SHOW_LEGACY_FILE_FIELDS + +#define CLONE_MATERIALASSET(name) \ + m##name##Name = other.m##name##Name;\ + m##name##AssetId = other.m##name##AssetId;\ + m##name##Asset = other.m##name##Asset; + +#define LOAD_MATERIALASSET(name)\ +if (m##name##AssetId != StringTable->EmptyString())\ +{\ + S32 assetState = MaterialAsset::getAssetById(m##name##AssetId, &m##name##Asset);\ + if (assetState == MaterialAsset::Ok )\ + {\ + m##name##Name = StringTable->EmptyString();\ + }\ + else Con::warnf("Warning: %s::LOAD_MATERIALASSET(%s)-%s", mClassName, m##name##AssetId, MaterialAsset::getAssetErrstrn(assetState).c_str());\ +} + +#define PACKDATA_MATERIALASSET(name)\ + if (stream->writeFlag(m##name##Asset.notNull()))\ + {\ + stream->writeString(m##name##Asset.getAssetId());\ + }\ + else\ + stream->writeString(m##name##Name); + +#define UNPACKDATA_MATERIALASSET(name)\ + if (stream->readFlag())\ + {\ + m##name##AssetId = stream->readSTString();\ + _set##name(m##name##AssetId);\ + }\ + else\ + m##name##Name = stream->readSTString(); + +#define PACK_MATERIALASSET(netconn, name)\ if (stream->writeFlag(m##name##Asset.notNull()))\ {\ NetStringHandle assetIdStr = m##name##Asset.getAssetId();\ @@ -285,14 +347,16 @@ bool set##name##AssetId(const char* _assetId)\ else\ stream->writeString(m##name##Name); -#define unpackMaterialAsset(netconn, name)\ +#define UNPACK_MATERIALASSET(netconn, name)\ if (stream->readFlag())\ {\ m##name##AssetId = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\ - MaterialAsset::getAssetById(m##name##AssetId, &m##name##Asset);\ + _set##name(m##name##AssetId);\ }\ else\ - m##name##Name = stream->readSTString();\ + m##name##Name = stream->readSTString(); + +#pragma endregion #endif // _ASSET_BASE_H_ diff --git a/Engine/source/T3D/assets/ParticleAsset.cpp b/Engine/source/T3D/assets/ParticleAsset.cpp index e68051d81..566611355 100644 --- a/Engine/source/T3D/assets/ParticleAsset.cpp +++ b/Engine/source/T3D/assets/ParticleAsset.cpp @@ -160,8 +160,8 @@ GuiControl* GuiInspectorTypeParticleAssetPtr::constructEditControl() dSprintf(szBuffer, sizeof(szBuffer), "echo(\"Game Object Editor not implemented yet!\");", retCtrl->getId()); mSMEdButton->setField("Command", szBuffer); - char bitmapName[512] = "tools/worldEditor/images/toolbar/shape-editor"; - mSMEdButton->setBitmap(bitmapName); + char bitmapName[512] = "ToolsModule:shape_editor_n_image"; + mSMEdButton->setBitmap(StringTable->insert(bitmapName)); mSMEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile"); mSMEdButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile"); diff --git a/Engine/source/T3D/assets/PostEffectAsset.cpp b/Engine/source/T3D/assets/PostEffectAsset.cpp index 5ad69d134..e14d3ad7f 100644 --- a/Engine/source/T3D/assets/PostEffectAsset.cpp +++ b/Engine/source/T3D/assets/PostEffectAsset.cpp @@ -136,7 +136,7 @@ void PostEffectAsset::initializeAsset() mHLSLShaderPath = expandAssetFilePath(mHLSLShaderFile); mGLSLShaderPath = expandAssetFilePath(mGLSLShaderFile); - if (Platform::isFile(mScriptPath)) + if (Torque::FS::IsScriptFile(mScriptPath)) Con::executeFile(mScriptPath, false, false); } @@ -146,7 +146,7 @@ void PostEffectAsset::onAssetRefresh() mHLSLShaderPath = expandAssetFilePath(mHLSLShaderFile); mGLSLShaderPath = expandAssetFilePath(mGLSLShaderFile); - if (Platform::isFile(mScriptPath)) + if (Torque::FS::IsScriptFile(mScriptPath)) Con::executeFile(mScriptPath, false, false); } diff --git a/Engine/source/T3D/assets/ScriptAsset.cpp b/Engine/source/T3D/assets/ScriptAsset.cpp index 7ad0adaec..5ff8889e2 100644 --- a/Engine/source/T3D/assets/ScriptAsset.cpp +++ b/Engine/source/T3D/assets/ScriptAsset.cpp @@ -124,7 +124,7 @@ void ScriptAsset::initializeAsset() { mScriptPath = expandAssetFilePath(mScriptFile); - if (Platform::isFile(mScriptPath)) + if (Torque::FS::IsScriptFile(mScriptPath)) { //We're initialized properly, so we'll go ahead and kick along any dependencies we may have as well AssetManager::typeAssetDependsOnHash::Iterator assetDependenciesItr = mpOwningAssetManager->getDependedOnAssets()->find(mpAssetDefinition->mAssetId); @@ -152,7 +152,7 @@ void ScriptAsset::onAssetRefresh() { mScriptPath = expandAssetFilePath(mScriptFile); - if (Platform::isFile(mScriptPath)) + if (Torque::FS::IsScriptFile(mScriptPath)) { //Refresh any dependencies we may have for (U32 i = 0; i < mScriptAssets.size(); i++) @@ -192,7 +192,7 @@ bool ScriptAsset::execScript() return false; - if (Platform::isFile(mScriptPath)) + if (Torque::FS::IsScriptFile(mScriptPath)) { return Con::executeFile(mScriptPath, false, false); } diff --git a/Engine/source/T3D/assets/ShapeAsset.cpp b/Engine/source/T3D/assets/ShapeAsset.cpp index 07c8a9b0b..61b76d006 100644 --- a/Engine/source/T3D/assets/ShapeAsset.cpp +++ b/Engine/source/T3D/assets/ShapeAsset.cpp @@ -50,6 +50,8 @@ #include "ts/tsLastDetail.h" #endif +StringTableEntry ShapeAsset::smNoShapeAssetFallback(StringTable->insert(Con::getVariable("$Core::NoShapeAssetFallback"))); + //----------------------------------------------------------------------------- IMPLEMENT_CONOBJECT(ShapeAsset); @@ -86,7 +88,7 @@ ConsoleSetType(TypeShapeAssetPtr) //----------------------------------------------------------------------------- -ConsoleType(assetIdString, TypeShapeAssetId, String, ASSET_ID_FIELD_PREFIX) +ConsoleType(assetIdString, TypeShapeAssetId, const char*, ASSET_ID_FIELD_PREFIX) ConsoleGetType(TypeShapeAssetId) { @@ -100,13 +102,7 @@ ConsoleSetType(TypeShapeAssetId) if (argc == 1) { // Yes, so fetch field value. - const char* pFieldValue = argv[0]; - - // Fetch asset Id. - StringTableEntry* assetId = (StringTableEntry*)(dptr); - - // Update asset value. - *assetId = StringTable->insert(pFieldValue); + *((const char**)dptr) = StringTable->insert(argv[0]); return; } @@ -143,6 +139,17 @@ ShapeAsset::~ShapeAsset() //----------------------------------------------------------------------------- +void ShapeAsset::consoleInit() +{ + Parent::consoleInit(); + + Con::addVariable("$Core::NoShapeAssetFallback", TypeString, &smNoShapeAssetFallback, + "The assetId of the shape to display when the requested shape asset is missing.\n" + "@ingroup GFX\n"); +} + +//----------------------------------------------------------------------------- + void ShapeAsset::initPersistFields() { // Call parent. @@ -154,7 +161,7 @@ void ShapeAsset::initPersistFields() &setShapeConstructorFile, &getShapeConstructorFile, "Path to the shape file we want to render"); } -void ShapeAsset::setDataField(StringTableEntry slotName, const char *array, const char *value) +void ShapeAsset::setDataField(StringTableEntry slotName, StringTableEntry array, StringTableEntry value) { Parent::setDataField(slotName, array, value); @@ -344,49 +351,39 @@ bool ShapeAsset::loadShape() //------------------------------------------------------------------------------ //Utility function to 'fill out' bindings and resources with a matching asset if one exists -bool ShapeAsset::getAssetByFilename(StringTableEntry fileName, AssetPtr* shapeAsset) +U32 ShapeAsset::getAssetByFilename(StringTableEntry fileName, AssetPtr* shapeAsset) { AssetQuery query; S32 foundAssetcount = AssetDatabase.findAssetLooseFile(&query, fileName); if (foundAssetcount == 0) { - //Didn't find any assets - //If possible, see if we can run an in-place import and the get the asset from that -#if TORQUE_DEBUG - Con::warnf("ShapeAsset::getAssetByFilename - Attempted to in-place import a shapefile(%s) that had no associated asset", fileName); -#endif - - AssetImporter* autoAssetImporter; - if (!Sim::findObject("autoAssetImporter", autoAssetImporter)) - { - autoAssetImporter = new AssetImporter(); - autoAssetImporter->registerObject("autoAssetImporter"); - } - - StringTableEntry resultingAssetId = autoAssetImporter->autoImportFile(fileName); - - if (resultingAssetId != StringTable->EmptyString()) - { - shapeAsset->setAssetId(resultingAssetId); - - if (!shapeAsset->isNull()) - return true; - } - //Didn't work, so have us fall back to a placeholder asset - shapeAsset->setAssetId(StringTable->insert("Core_Rendering:noshape")); + shapeAsset->setAssetId(ShapeAsset::smNoShapeAssetFallback); - if (!shapeAsset->isNull()) - return true; + if (shapeAsset->isNull()) + { + //Well that's bad, loading the fallback failed. + Con::warnf("ShapeAsset::getAssetByFilename - Finding of asset associated with file %s failed with no fallback asset", fileName); + return AssetErrCode::Failed; + } - //That didn't work, so fail out - return false; + //handle noshape not being loaded itself + if ((*shapeAsset)->mLoadedState == BadFileReference) + { + Con::warnf("ShapeAsset::getAssetByFilename - Finding of associated with file %s failed, and fallback asset reported error of Bad File Reference.", fileName); + return AssetErrCode::BadFileReference; + } + + Con::warnf("ShapeAsset::getAssetByFilename - Finding of associated with file %s failed, utilizing fallback asset", fileName); + + (*shapeAsset)->mLoadedState = AssetErrCode::UsingFallback; + return AssetErrCode::UsingFallback; } else { //acquire and bind the asset, and return it out shapeAsset->setAssetId(query.mAssetList[0]); - return true; + return (*shapeAsset)->mLoadedState; } } @@ -395,37 +392,11 @@ StringTableEntry ShapeAsset::getAssetIdByFilename(StringTableEntry fileName) if (fileName == StringTable->EmptyString()) return StringTable->EmptyString(); - StringTableEntry shapeAssetId = StringTable->EmptyString(); + StringTableEntry shapeAssetId = ShapeAsset::smNoShapeAssetFallback; AssetQuery query; S32 foundAssetcount = AssetDatabase.findAssetLooseFile(&query, fileName); - if (foundAssetcount == 0) - { - //Didn't find any assets - //If possible, see if we can run an in-place import and the get the asset from that -#if TORQUE_DEBUG - Con::warnf("ShapeAsset::getAssetByFilename - Attempted to in-place import a shapefile(%s) that had no associated asset", fileName); -#endif - - AssetImporter* autoAssetImporter; - if (!Sim::findObject("autoAssetImporter", autoAssetImporter)) - { - autoAssetImporter = new AssetImporter(); - autoAssetImporter->registerObject("autoAssetImporter"); - } - - StringTableEntry resultingAssetId = autoAssetImporter->autoImportFile(fileName); - - if (resultingAssetId != StringTable->EmptyString()) - { - shapeAssetId = resultingAssetId; - return shapeAssetId; - } - - //Didn't work, so have us fall back to a placeholder asset - shapeAssetId = StringTable->insert("Core_Rendering:noshape"); - } - else + if (foundAssetcount != 0) { //acquire and bind the asset, and return it out shapeAssetId = query.mAssetList[0]; @@ -438,24 +409,34 @@ U32 ShapeAsset::getAssetById(StringTableEntry assetId, AssetPtr* sha { (*shapeAsset) = assetId; - if ((*shapeAsset)) - return (*shapeAsset)->mLoadedState; - if (shapeAsset->notNull()) + { + return (*shapeAsset)->mLoadedState; + } + else { //Didn't work, so have us fall back to a placeholder asset - StringTableEntry noShapeId = StringTable->insert("Core_Rendering:noshape"); - shapeAsset->setAssetId(noShapeId); + shapeAsset->setAssetId(ShapeAsset::smNoShapeAssetFallback); + + if (shapeAsset->isNull()) + { + //Well that's bad, loading the fallback failed. + Con::warnf("ShapeAsset::getAssetById - Finding of asset with id %s failed with no fallback asset", assetId); + return AssetErrCode::Failed; + } //handle noshape not being loaded itself if ((*shapeAsset)->mLoadedState == BadFileReference) - return AssetErrCode::Failed; + { + Con::warnf("ShapeAsset::getAssetById - Finding of asset with id %s failed, and fallback asset reported error of Bad File Reference.", assetId); + return AssetErrCode::BadFileReference; + } + + Con::warnf("ShapeAsset::getAssetById - Finding of asset with id %s failed, utilizing fallback asset", assetId); (*shapeAsset)->mLoadedState = AssetErrCode::UsingFallback; return AssetErrCode::UsingFallback; } - - return AssetErrCode::Failed; } //------------------------------------------------------------------------------ @@ -555,17 +536,37 @@ DefineEngineMethod(ShapeAsset, getAnimation, ShapeAnimationAsset*, (S32 index), } DefineEngineMethod(ShapeAsset, getShapeFile, const char*, (), , - "Creates a new script asset using the targetFilePath.\n" - "@return The bool result of calling exec") + "Gets the shape's file path\n" + "@return The filename of the shape file") { return object->getShapeFilePath(); } +DefineEngineMethod(ShapeAsset, getShapeConstructorFilePath, const char*, (), , + "Gets the shape's constructor file.\n" + "@return The filename of the shape constructor file") +{ + return object->getShapeConstructorFilePath(); +} + +DefineEngineMethod(ShapeAsset, getStatusString, String, (), , "get status string")\ +{ + return ShapeAsset::getAssetErrstrn(object->getStatus()); +} + + #ifdef TORQUE_TOOLS DefineEngineMethod(ShapeAsset, generateCachedPreviewImage, const char*, (S32 resolution), (256), "") { return object->generateCachedPreviewImage(resolution); } + +DefineEngineStaticMethod(ShapeAsset, getAssetIdByFilename, const char*, (const char* filePath), (""), + "Queries the Asset Database to see if any asset exists that is associated with the provided file path.\n" + "@return The AssetId of the associated asset, if any.") +{ + return ShapeAsset::getAssetIdByFilename(StringTable->insert(filePath)); +} #endif //----------------------------------------------------------------------------- @@ -611,8 +612,8 @@ GuiControl* GuiInspectorTypeShapeAssetPtr::constructEditControl() dSprintf(szBuffer, sizeof(szBuffer), "ShapeEditorPlugin.openShapeAssetId(%d.getText());", retCtrl->getId()); mShapeEdButton->setField("Command", szBuffer); - char bitmapName[512] = "tools/worldEditor/images/toolbar/shape-editor"; - mShapeEdButton->setBitmap(bitmapName); + char bitmapName[512] = "ToolsModule:shape_editor_n_image"; + mShapeEdButton->setBitmap(StringTable->insert(bitmapName)); mShapeEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile"); mShapeEdButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile"); diff --git a/Engine/source/T3D/assets/ShapeAsset.h b/Engine/source/T3D/assets/ShapeAsset.h index 29dbbf090..d7cf981c0 100644 --- a/Engine/source/T3D/assets/ShapeAsset.h +++ b/Engine/source/T3D/assets/ShapeAsset.h @@ -81,9 +81,11 @@ protected: Vector> mAnimationAssets; typedef Signal ShapeAssetChanged; - ShapeAssetChanged mChangeSignal; + typedef Signal ShapeAssetArrayChanged; + ShapeAssetArrayChanged mChangeArraySignal; + public: enum ShapeAssetErrCode { @@ -93,7 +95,12 @@ public: Extended }; + static StringTableEntry smNoShapeAssetFallback; + static const String mErrCodeStrings[ShapeAssetErrCode::Extended - Parent::Extended + 1]; + + static U32 getAssetErrCode(AssetPtr shapeAsset) { if (shapeAsset) return shapeAsset->mLoadedState; else return 0; } + static String getAssetErrstrn(U32 errCode) { if (errCode < Parent::Extended) return Parent::getAssetErrstrn(errCode); @@ -104,11 +111,14 @@ public: ShapeAsset(); virtual ~ShapeAsset(); + /// Set up some global script interface stuff. + static void consoleInit(); + /// Engine. static void initPersistFields(); virtual void copyTo(SimObject* object); - virtual void setDataField(StringTableEntry slotName, const char *array, const char *value); + virtual void setDataField(StringTableEntry slotName, StringTableEntry array, StringTableEntry value); virtual void initializeAsset(); @@ -116,25 +126,25 @@ public: DECLARE_CONOBJECT(ShapeAsset); bool loadShape(); - U32 mLoadedState; TSShape* getShape() { return mShape; } Resource getShapeResource() { return mShape; } void SplitSequencePathAndName(String& srcPath, String& srcName); - StringTableEntry getShapeFilename() { return mFilePath; } - + StringTableEntry getShapeFileName() { return mFileName; } + StringTableEntry getShapePath() { return mFilePath; } + U32 getShapeFilenameHash() { return _StringTable::hashString(mFilePath); } Vector> getMaterialAssets() { return mMaterialAssets; } - inline AssetPtr getMaterialAsset(U32 matId) - { - if(matId >= mMaterialAssets.size()) - return nullptr; - else - return mMaterialAssets[matId]; + inline AssetPtr getMaterialAsset(U32 matId) + { + if (matId >= mMaterialAssets.size()) + return nullptr; + else + return mMaterialAssets[matId]; } void clearMaterialAssets() { mMaterialAssets.clear(); } @@ -145,9 +155,10 @@ public: S32 getAnimationCount() { return mAnimationAssets.size(); } ShapeAnimationAsset* getAnimation(S32 index); - void _onResourceChanged(const Torque::Path &path); + void _onResourceChanged(const Torque::Path& path); ShapeAssetChanged& getChangedSignal() { return mChangeSignal; } + ShapeAssetArrayChanged& getChangedArraySignal() { return mChangeArraySignal; } void setShapeFile(const char* pScriptFile); inline StringTableEntry getShapeFile(void) const { return mFileName; }; @@ -158,13 +169,11 @@ public: inline StringTableEntry getShapeFilePath(void) const { return mFilePath; }; inline StringTableEntry getShapeConstructorFilePath(void) const { return mConstructorFilePath; }; - static bool getAssetByFilename(StringTableEntry fileName, AssetPtr* shapeAsset); + static U32 getAssetByFilename(StringTableEntry fileName, AssetPtr* shapeAsset); static StringTableEntry getAssetIdByFilename(StringTableEntry fileName); static U32 getAssetById(StringTableEntry assetId, AssetPtr* shapeAsset); - static StringTableEntry getNoShapeAssetId() { return StringTable->insert("Core_Rendering:noshape"); } - #ifdef TORQUE_TOOLS const char* generateCachedPreviewImage(S32 resolution); #endif @@ -172,7 +181,7 @@ public: protected: virtual void onAssetRefresh(void); - static bool setShapeFile(void *obj, const char *index, const char *data) { static_cast(obj)->setShapeFile(data); return false; } + static bool setShapeFile(void* obj, StringTableEntry index, StringTableEntry data) { static_cast(obj)->setShapeFile(data); return false; } static const char* getShapeFile(void* obj, const char* data) { return static_cast(obj)->getShapeFile(); } static bool setShapeConstructorFile(void* obj, const char* index, const char* data) { static_cast(obj)->setShapeConstructorFile(data); return false; } @@ -192,7 +201,7 @@ class GuiInspectorTypeShapeAssetPtr : public GuiInspectorTypeFileName typedef GuiInspectorTypeFileName Parent; public: - GuiBitmapButtonCtrl *mShapeEdButton; + GuiBitmapButtonCtrl* mShapeEdButton; DECLARE_CONOBJECT(GuiInspectorTypeShapeAssetPtr); static void consoleInit(); @@ -211,86 +220,415 @@ public: }; #endif -#define assetText(x,suff) std::string(std::string(#x) + std::string(#suff)).c_str() +#pragma region Singular Asset Macros -#define initShapeAsset(name) m##name##Name = StringTable->EmptyString(); m##name##AssetId = StringTable->EmptyString(); m##name##Asset = NULL; -#define cloneShapeAsset(name) m##name##Name = other.m##name##Name; m##name##AssetId = other.m##name##AssetId; m##name##Asset = other.m##name##Asset; -#define bindShapeAsset(name) if (m##name##AssetId != StringTable->EmptyString()) m##name##Asset = m##name##AssetId; - -#define scriptBindShapeAsset(name, consoleClass, docs) addProtectedField(assetText(name, File), TypeShapeFilename, Offset(m##name##Name, consoleClass), consoleClass::_set##name##Filename, & defaultProtectedGetFn, assetText(name, docs)); \ - addProtectedField(assetText(name, Asset), TypeShapeAssetId, Offset(m##name##AssetId, consoleClass), consoleClass::_set##name##Asset, & defaultProtectedGetFn, assetText(name, asset reference.)); - -#define DECLARE_SHAPEASSET(className,name)\ - StringTableEntry m##name##Name;\ - StringTableEntry m##name##AssetId;\ - AssetPtr m##name##Asset;\ - const StringTableEntry& get##name() const { return m##name##Name; }\ - void set##name(FileName _in) { m##name##Name = _in; }\ - const AssetPtr & get##name##Asset() const { return m##name##Asset; }\ - void set##name##Asset(AssetPtr_in) { m##name##Asset = _in; }\ -static bool _set##name##Filename(void* obj, const char* index, const char* data)\ -{\ - className* shape = static_cast(obj);\ +#define DECLARE_SHAPEASSET(className,name,changeFunc) public: \ + Resourcem##name;\ + StringTableEntry m##name##Name; \ + StringTableEntry m##name##AssetId;\ + AssetPtr m##name##Asset;\ +public: \ + const StringTableEntry get##name##File() const { return StringTable->insert(m##name##Name); }\ + void set##name##Name(const FileName &_in) { m##name##Name = _in;}\ + const AssetPtr & get##name##Asset() const { return m##name##Asset; }\ + void set##name##Asset(const AssetPtr &_in) { m##name##Asset = _in;}\ \ - StringTableEntry assetId = ShapeAsset::getAssetIdByFilename(StringTable->insert(data));\ - if (assetId != StringTable->EmptyString())\ + bool _set##name(StringTableEntry _in)\ {\ - if (shape->_set##name##Asset(obj, index, assetId))\ + if(m##name##AssetId != _in || m##name##Name != _in)\ {\ - if (assetId == StringTable->insert("Core_Rendering:noShape"))\ + if (m##name##Asset.notNull())\ {\ - shape->m##name##Name = data;\ - shape->m##name##AssetId = StringTable->EmptyString();\ - \ + m##name##Asset->getChangedSignal().remove(this, &className::changeFunc);\ + }\ + if (_in == StringTable->EmptyString())\ + {\ + m##name##Name = StringTable->EmptyString();\ + m##name##AssetId = StringTable->EmptyString();\ + m##name##Asset = NULL;\ + m##name = NULL;\ return true;\ }\ + \ + if (AssetDatabase.isDeclaredAsset(_in))\ + {\ + m##name##AssetId = _in;\ + \ + U32 assetState = ShapeAsset::getAssetById(m##name##AssetId, &m##name##Asset);\ + \ + if (ShapeAsset::Ok == assetState)\ + {\ + m##name##Name = StringTable->EmptyString();\ + }\ + }\ else\ {\ - shape->m##name##AssetId = assetId;\ - shape->m##name##Name = StringTable->EmptyString();\ - \ - return false;\ + StringTableEntry assetId = ShapeAsset::getAssetIdByFilename(_in);\ + if (assetId != StringTable->EmptyString())\ + {\ + m##name##AssetId = assetId;\ + if (ShapeAsset::getAssetById(m##name##AssetId, &m##name##Asset) == ShapeAsset::Ok)\ + {\ + m##name##Name = StringTable->EmptyString();\ + }\ + }\ + else\ + {\ + m##name##Name = _in;\ + m##name##AssetId = StringTable->EmptyString();\ + m##name##Asset = NULL;\ + }\ }\ }\ - }\ - else\ - {\ - shape->m##name##Asset = StringTable->EmptyString();\ - }\ - \ - return true;\ -}\ -\ -static bool _set##name##Asset(void* obj, const char* index, const char* data)\ -{\ - className* shape = static_cast(obj);\ - shape->m##name##AssetId = StringTable->insert(data);\ - if (ShapeAsset::getAssetById(shape->m##name##AssetId, &shape->m##name##Asset))\ - {\ - if (shape->m##name##Asset.getAssetId() != StringTable->insert("Core_Rendering:noShape"))\ - shape->m##name##Name = StringTable->EmptyString();\ + if (get##name() != StringTable->EmptyString() && m##name##Asset.notNull())\ + {\ + m##name = m##name##Asset->getShapeResource();\ + \ + m##name##Asset->getChangedSignal().notify(this, &className::changeFunc);\ + }\ + else\ + {\ + m##name = NULL;\ + }\ + \ + if(get##name() == StringTable->EmptyString())\ + return true;\ + \ + if (m##name##Asset.notNull() && m##name##Asset->getStatus() != ShapeAsset::Ok)\ + {\ + Con::errorf("%s(%s)::_set%s() - shape asset failure \"%s\" due to [%s]", macroText(className), getName(), macroText(name), _in, ShapeAsset::getAssetErrstrn(m##name##Asset->getStatus()).c_str());\ + return false; \ + }\ + else if (bool(m##name) == NULL)\ + {\ + Con::errorf("%s(%s)::_set%s() - Couldn't load shape \"%s\"", macroText(className), getName(), macroText(name), _in);\ + return false;\ + }\ return true;\ }\ - return false;\ -}\ -void pack##name##Asset(BitStream *stream)\ + \ + const StringTableEntry get##name() const\ + {\ + if (m##name##Asset && (m##name##Asset->getShapePath() != StringTable->EmptyString()))\ + return m##name##Asset->getShapePath();\ + else if (m##name##AssetId != StringTable->EmptyString())\ + return m##name##AssetId;\ + else if (m##name##Name != StringTable->EmptyString())\ + return m##name##Name;\ + else\ + return StringTable->EmptyString();\ + }\ + Resource get##name##Resource() \ + {\ + return m##name;\ + } + +#define DECLARE_SHAPEASSET_SETGET(className, name)\ + static bool _set##name##Data(void* obj, const char* index, const char* data)\ + {\ + bool ret = false;\ + className* object = static_cast(obj);\ + ret = object->_set##name(StringTable->insert(data));\ + return ret;\ + } + +#define DECLARE_SHAPEASSET_NET_SETGET(className, name, bitmask)\ + static bool _set##name##Data(void* obj, const char* index, const char* data)\ + {\ + bool ret = false;\ + className* object = static_cast(obj);\ + ret = object->_set##name(StringTable->insert(data));\ + if(ret)\ + object->setMaskBits(bitmask);\ + return ret;\ + } + +#define DEF_SHAPEASSET_BINDS(className,name)\ +DefineEngineMethod(className, get##name, String, (), , "get name")\ {\ + return object->get##name(); \ +}\ +DefineEngineMethod(className, get##name##Asset, String, (), , assetText(name, asset reference))\ +{\ + return object->m##name##AssetId; \ +}\ +DefineEngineMethod(className, set##name, bool, (const char* shape), , assetText(name,assignment. first tries asset then flat file.))\ +{\ + return object->_set##name(StringTable->insert(shape));\ +} + +#define INIT_SHAPEASSET(name) \ + m##name##Name = StringTable->EmptyString(); \ + m##name##AssetId = StringTable->EmptyString(); \ + m##name##Asset = NULL; \ + m##name = NULL; + +#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS + +#define INITPERSISTFIELD_SHAPEASSET(name, consoleClass, docs) \ + addProtectedField(assetText(name, File), TypeShapeFilename, Offset(m##name##Name, consoleClass), _set##name##Data, & defaultProtectedGetFn, assetText(name, docs)); \ + addProtectedField(assetText(name, Asset), TypeShapeAssetId, Offset(m##name##AssetId, consoleClass), _set##name##Data, & defaultProtectedGetFn, assetText(name, asset reference.)); + +#else + +#define INITPERSISTFIELD_SHAPEASSET(name, consoleClass, docs) \ + addProtectedField(assetText(name, File), TypeShapeFilename, Offset(m##name##Name, consoleClass), _set##name##Data, & defaultProtectedGetFn, assetText(name, docs), AbstractClassRep::FIELD_HideInInspectors); \ + addProtectedField(assetText(name, Asset), TypeShapeAssetId, Offset(m##name##AssetId, consoleClass), _set##name##Data, & defaultProtectedGetFn, assetText(name, asset reference.)); + +#endif // SHOW_LEGACY_FILE_FIELDS + +#define CLONE_SHAPEASSET(name) \ + m##name##Name = other.m##name##Name;\ + m##name##AssetId = other.m##name##AssetId;\ + m##name##Asset = other.m##name##Asset;\ + +#define PACKDATA_SHAPEASSET(name)\ if (stream->writeFlag(m##name##Asset.notNull()))\ + {\ stream->writeString(m##name##Asset.getAssetId());\ + }\ else\ - stream->writeString(m##name##Name);\ -}\ -void unpack##name##Asset(BitStream *stream)\ -{\ + stream->writeString(m##name##Name); + +#define UNPACKDATA_SHAPEASSET(name)\ if (stream->readFlag())\ {\ m##name##AssetId = stream->readSTString();\ - ShapeAsset::getAssetById(m##name##AssetId, &m##name##Asset);\ - m##name##Name = m##name##Asset->getShapeFilename(); \ + _set##name(m##name##AssetId);\ }\ else\ - m##name##Name = stream->readSTString();\ + m##name##Name = stream->readSTString(); + +#define PACK_SHAPEASSET(netconn, name)\ + if (stream->writeFlag(m##name##Asset.notNull()))\ + {\ + NetStringHandle assetIdStr = m##name##Asset.getAssetId();\ + netconn->packNetStringHandleU(stream, assetIdStr);\ + }\ + else\ + stream->writeString(m##name##Name); + +#define UNPACK_SHAPEASSET(netconn, name)\ + if (stream->readFlag())\ + {\ + m##name##AssetId = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\ + _set##name(m##name##AssetId);\ + }\ + else\ + m##name##Name = stream->readSTString(); + +#pragma endregion + +#pragma region Arrayed Asset Macros + +#define DECLARE_SHAPEASSET_ARRAY(className,name,max) public: \ + static const U32 sm##name##Count = max;\ + Resourcem##name[max];\ + StringTableEntry m##name##Name[max]; \ + StringTableEntry m##name##AssetId[max];\ + AssetPtr m##name##Asset[max];\ +public: \ + const StringTableEntry get##name##File(const U32& index) const { return m##name##Name[index]; }\ + void set##name##Name(const FileName &_in, const U32& index) { m##name##Name[index] = _in;}\ + const AssetPtr & get##name##Asset(const U32& index) const { return m##name##Asset[index]; }\ + void set##name##Asset(const AssetPtr &_in, const U32& index) { m##name##Asset[index] = _in;}\ + \ + bool _set##name(StringTableEntry _in, const U32& index)\ + {\ + if(m##name##AssetId[index] != _in || m##name##Name[index] != _in)\ + {\ + if(index >= sm##name##Count || index < 0)\ + return false;\ + if (_in == StringTable->EmptyString())\ + {\ + m##name##Name[index] = StringTable->EmptyString();\ + m##name##AssetId[index] = StringTable->EmptyString();\ + m##name##Asset[index] = NULL;\ + m##name[index] = NULL;\ + return true;\ + }\ + \ + if (AssetDatabase.isDeclaredAsset(_in))\ + {\ + m##name##AssetId[index] = _in;\ + \ + U32 assetState = ShapeAsset::getAssetById(m##name##AssetId[index], &m##name##Asset[index]);\ + \ + if (ShapeAsset::Ok == assetState)\ + {\ + m##name##Name[index] = StringTable->EmptyString();\ + }\ + }\ + else\ + {\ + StringTableEntry assetId = ShapeAsset::getAssetIdByFilename(_in);\ + if (assetId != StringTable->EmptyString())\ + {\ + m##name##AssetId[index] = assetId;\ + if (ShapeAsset::getAssetById(m##name##AssetId[index], &m##name##Asset[index]) == ShapeAsset::Ok)\ + {\ + m##name##Name[index] = StringTable->EmptyString();\ + }\ + }\ + else\ + {\ + m##name##Name[index] = _in;\ + m##name##AssetId[index] = StringTable->EmptyString();\ + m##name##Asset[index] = NULL;\ + }\ + }\ + }\ + if (get##name(index) != StringTable->EmptyString() && m##name##Asset[index].notNull())\ + {\ + m##name[index] = m##name##Asset[index]->getShapeResource();\ + }\ + else\ + {\ + m##name[index] = NULL;\ + }\ + \ + if(get##name(index) == StringTable->EmptyString())\ + return true;\ + \ + if (m##name##Asset[index].notNull() && m##name##Asset[index]->getStatus() != ShapeAsset::Ok)\ + {\ + Con::errorf("%s(%s)::_set%s(%i) - shape asset failure \"%s\" due to [%s]", macroText(className), getName(), macroText(name), index, _in, ShapeAsset::getAssetErrstrn(m##name##Asset[index]->getStatus()).c_str());\ + return false; \ + }\ + else if (bool(m##name[index]) == NULL)\ + {\ + Con::errorf("%s(%s)::_set%s(%i) - Couldn't load shape \"%s\"", macroText(className), getName(), macroText(name), index, _in);\ + return false; \ + }\ + return true;\ + }\ + \ + const StringTableEntry get##name(const U32& index) const\ + {\ + if (m##name##Asset[index] && (m##name##Asset[index]->getShapePath() != StringTable->EmptyString()))\ + return m##name##Asset[index]->getShapePath();\ + else if (m##name##AssetId[index] != StringTable->EmptyString())\ + return m##name##AssetId[index];\ + else if (m##name##Name[index] != StringTable->EmptyString())\ + return StringTable->insert(m##name##Name[index]);\ + else\ + return StringTable->EmptyString();\ + }\ + Resource get##name##Resource(const U32& index) \ + {\ + if(index >= sm##name##Count || index < 0)\ + return nullptr;\ + return m##name[index];\ + } + +#define DECLARE_SHAPEASSET_ARRAY_SETGET(className, name)\ + static bool _set##name##Data(void* obj, const char* index, const char* data)\ + {\ + if (!index) return false;\ + U32 idx = dAtoi(index);\ + if (idx >= sm##name##Count)\ + return false;\ + bool ret = false;\ + className* object = static_cast(obj);\ + ret = object->_set##name(StringTable->insert(data), idx);\ + return ret;\ + } + +#define DECLARE_SHAPEASSET_ARRAY_NET_SETGET(className, name, bitmask)\ + static bool _set##name##Data(void* obj, const char* index, const char* data)\ + {\ + if (!index) return false;\ + U32 idx = dAtoi(index);\ + if (idx >= sm##name##Count)\ + return false;\ + bool ret = false;\ + className* object = static_cast(obj);\ + ret = object->_set##name(StringTable->insert(data), idx);\ + if(ret)\ + object->setMaskBits(bitmask);\ + return ret;\ + } + +#define DEF_SHAPEASSET_ARRAY_BINDS(className,name)\ +DefineEngineMethod(className, get##name, String, (S32 index), , "get name")\ +{\ + return object->get##name(index); \ +}\ +DefineEngineMethod(className, get##name##Asset, String, (S32 index), , assetText(name, asset reference))\ +{\ + if(index >= className::sm##name##Count || index < 0)\ + return "";\ + return object->m##name##AssetId[index]; \ +}\ +DefineEngineMethod(className, set##name, bool, (const char* shape, S32 index), , assetText(name,assignment. first tries asset then flat file.))\ +{\ + return object->_set##name(StringTable->insert(shape), index);\ } -#endif +#define INIT_SHAPEASSET_ARRAY(name, index) \ +{\ + m##name##Name[index] = StringTable->EmptyString(); \ + m##name##AssetId[index] = StringTable->EmptyString(); \ + m##name##Asset[index] = NULL; \ + m##name[index] = NULL;\ +} +#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS + +#define INITPERSISTFIELD_SHAPEASSET_ARRAY(name, arraySize, consoleClass, docs) \ + addProtectedField(assetText(name, File), TypeShapeFilename, Offset(m##name##Name, consoleClass), _set##name##Data, & defaultProtectedGetFn, arraySize, assetText(name, docs)); \ + addProtectedField(assetText(name, Asset), TypeShapeAssetId, Offset(m##name##AssetId, consoleClass), _set##name##Data, & defaultProtectedGetFn, arraySize, assetText(name, asset reference.)); + +#else + +#define INITPERSISTFIELD_SHAPEASSET_ARRAY(name, arraySize, consoleClass, docs) \ + addProtectedField(assetText(name, File), TypeShapeFilename, Offset(m##name##Name, consoleClass), _set##name##Data, & defaultProtectedGetFn, arraySize, assetText(name, docs), AbstractClassRep::FIELD_HideInInspectors); \ + addProtectedField(assetText(name, Asset), TypeShapeAssetId, Offset(m##name##AssetId, consoleClass), _set##name##Data, & defaultProtectedGetFn, arraySize,assetText(name, asset reference.)); + +#endif // SHOW_LEGACY_FILE_FIELDS + +#define CLONE_SHAPEASSET_ARRAY(name, index) \ +{\ + m##name##Name[index] = other.m##name##Name[index];\ + m##name##AssetId[index] = other.m##name##AssetId[index];\ + m##name##Asset[index] = other.m##name##Asset[index];\ +} + +#define PACKDATA_SHAPEASSET_ARRAY(name, index)\ + if (stream->writeFlag(m##name##Asset[index].notNull()))\ + {\ + stream->writeString(m##name##Asset[index].getAssetId());\ + }\ + else\ + stream->writeString(m##name##Name[index]); + +#define UNPACKDATA_SHAPEASSET_ARRAY(name, index)\ + if (stream->readFlag())\ + {\ + m##name##AssetId[index] = stream->readSTString();\ + _set##name(m##name##AssetId[index], index);\ + }\ + else\ + m##name##Name[index] = stream->readSTString(); + +#define PACK_SHAPEASSET_ARRAY(netconn, name, index)\ + if (stream->writeFlag(m##name##Asset[index].notNull()))\ + {\ + NetStringHandle assetIdStr = m##name##Asset[index].getAssetId();\ + netconn->packNetStringHandleU(stream, assetIdStr);\ + }\ + else\ + stream->writeString(m##name##Name[index]); + +#define UNPACK_SHAPEASSET_ARRAY(netconn, name, index)\ + if (stream->readFlag())\ + {\ + m##name##AssetId[index] = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\ + _set##name(m##name##AssetId[index], index);\ + }\ + else\ + m##name##Name[index] = stream->readSTString(); + +#pragma endregion + +#endif diff --git a/Engine/source/T3D/assets/SoundAsset.cpp b/Engine/source/T3D/assets/SoundAsset.cpp index 7a7b1d6b4..a2e13f0b5 100644 --- a/Engine/source/T3D/assets/SoundAsset.cpp +++ b/Engine/source/T3D/assets/SoundAsset.cpp @@ -42,19 +42,20 @@ // Debug Profiling. #include "platform/profiler.h" +#include "sfx/sfxTypes.h" //----------------------------------------------------------------------------- IMPLEMENT_CONOBJECT(SoundAsset); -ConsoleType(SoundAssetPtr, TypeSoundAssetPtr, SoundAsset, ASSET_ID_FIELD_PREFIX) +ConsoleType(SoundAssetPtr, TypeSoundAssetPtr, const char*, ASSET_ID_FIELD_PREFIX) //----------------------------------------------------------------------------- ConsoleGetType(TypeSoundAssetPtr) { // Fetch asset Id. - return (*((AssetPtr*)dptr)).getAssetId(); + return *((const char**)(dptr)); } //----------------------------------------------------------------------------- @@ -65,21 +66,7 @@ ConsoleSetType(TypeSoundAssetPtr) if (argc == 1) { // Yes, so fetch field value. - const char* pFieldValue = argv[0]; - - // Fetch asset pointer. - AssetPtr* pAssetPtr = dynamic_cast*>((AssetPtrBase*)(dptr)); - - // Is the asset pointer the correct type? - if (pAssetPtr == NULL) - { - // No, so fail. - //Con::warnf("(TypeSoundAssetPtr) - Failed to set asset Id '%d'.", pFieldValue); - return; - } - - // Set asset. - pAssetPtr->setAssetId(pFieldValue); + *((const char**)dptr) = StringTable->insert(argv[0]); return; } @@ -90,15 +77,57 @@ ConsoleSetType(TypeSoundAssetPtr) //----------------------------------------------------------------------------- +ConsoleType(assetIdString, TypeSoundAssetId, const char*, ASSET_ID_FIELD_PREFIX) + +ConsoleGetType(TypeSoundAssetId) +{ + // Fetch asset Id. + return *((const char**)(dptr)); +} + +ConsoleSetType(TypeSoundAssetId) +{ + // Was a single argument specified? + if (argc == 1) + { + // Yes, so fetch field value. + *((const char**)dptr) = StringTable->insert(argv[0]); + + return; + } + + // Warn. + Con::warnf("(TypeAssetId) - Cannot set multiple args to a single asset."); +} + +//----------------------------------------------------------------------------- + SoundAsset::SoundAsset() { mSoundFile = StringTable->EmptyString(); mSoundPath = StringTable->EmptyString(); + mSubtitleString = StringTable->EmptyString(); - mPitchAdjust = 1; - mVolumeAdjust = 1; + mLoadedState = AssetErrCode::NotLoaded; + mPreload = false; + // SFX description inits + // reverb is useless here, reverb is inacted on listener. + mProfileDesc.mPitch = 1; + mProfileDesc.mVolume = 1; + mProfileDesc.mIs3D = false; + mProfileDesc.mIsLooping = false; + mProfileDesc.mIsStreaming = false; + mProfileDesc.mUseHardware = false; + mProfileDesc.mMinDistance = 1; + mProfileDesc.mMaxDistance = 100; + mProfileDesc.mConeInsideAngle = 360; + mProfileDesc.mConeOutsideAngle = 360; + mProfileDesc.mConeOutsideVolume = 1; + mProfileDesc.mRolloffFactor = -1.0f; + mProfileDesc.mScatterDistance = Point3F(0.f, 0.f, 0.f); + mProfileDesc.mPriority = 1.0f; + mProfileDesc.mSourceGroup = NULL; - //mSound = nullptr; } //----------------------------------------------------------------------------- @@ -117,8 +146,24 @@ void SoundAsset::initPersistFields() addProtectedField("soundFile", TypeAssetLooseFilePath, Offset(mSoundFile, SoundAsset), &setSoundFile, &getSoundFile, "Path to the sound file."); - addField("pitchAdjust", TypeF32, Offset(mPitchAdjust, SoundAsset), "Adjustment of the pitch value"); - addField("volumeAdjust", TypeF32, Offset(mVolumeAdjust, SoundAsset), "Adjustment to the volume."); + addField("pitchAdjust", TypeF32, Offset(mProfileDesc.mPitch, SoundAsset), "Adjustment of the pitch value 1 is default."); + addField("volumeAdjust", TypeF32, Offset(mProfileDesc.mVolume, SoundAsset), "Adjustment to the volume."); + addField("is3D", TypeBool, Offset(mProfileDesc.mIs3D, SoundAsset), "Set this sound to 3D."); + addField("isLooping", TypeBool, Offset(mProfileDesc.mIsLooping, SoundAsset), "Does this sound loop."); + // if streaming, a default packet size should be chosen for all sounds. + addField("isStreaming", TypeBool, Offset(mProfileDesc.mIsStreaming, SoundAsset), "Use streaming."); + //....why? + addField("useHardware", TypeBool, Offset(mProfileDesc.mUseHardware, SoundAsset), "Use hardware mixing for this sound."); + addField("minDistance", TypeF32, Offset(mProfileDesc.mMinDistance, SoundAsset), "Minimum distance for sound."); + // more like it. + addField("maxDistance", TypeF32, Offset(mProfileDesc.mMaxDistance, SoundAsset), "Max distance for sound."); + addField("coneInsideAngle", TypeS32, Offset(mProfileDesc.mConeInsideAngle, SoundAsset), "Cone inside angle."); + addField("coneOutsideAngle", TypeS32, Offset(mProfileDesc.mConeOutsideAngle, SoundAsset), "Cone outside angle."); + addField("coneOutsideVolume", TypeS32, Offset(mProfileDesc.mConeOutsideVolume, SoundAsset), "Cone outside volume."); + addField("rolloffFactor", TypeF32, Offset(mProfileDesc.mRolloffFactor, SoundAsset), "Rolloff factor."); + addField("scatterDistance", TypePoint3F, Offset(mProfileDesc.mScatterDistance, SoundAsset), "Randomization to the spacial position of the sound."); + addField("sourceGroup", TypeSFXSourceName, Offset(mProfileDesc.mSourceGroup, SoundAsset), "Group that sources playing with this description should be put into."); + } //------------------------------------------------------------------------------ @@ -131,20 +176,73 @@ void SoundAsset::copyTo(SimObject* object) void SoundAsset::initializeAsset(void) { - mSoundPath = expandAssetFilePath(mSoundFile); + Parent::initializeAsset(); + + if (mSoundFile == StringTable->EmptyString()) + return; + + //ResourceManager::get().getChangedSignal.notify(this, &SoundAsset::_onResourceChanged); + + //Ensure our path is expando'd if it isn't already + if (!Platform::isFullPath(mSoundPath)) + mSoundPath = getOwned() ? expandAssetFilePath(mSoundFile) : mSoundPath; + + mSoundPath = expandAssetFilePath(mSoundPath); + + loadSound(); +} + +void SoundAsset::_onResourceChanged(const Torque::Path &path) +{ + if (path != Torque::Path(mSoundPath)) + return; + + refreshAsset(); + + loadSound(); } void SoundAsset::onAssetRefresh(void) { - mSoundPath = expandAssetFilePath(mSoundFile); + if (mSoundFile == StringTable->EmptyString()) + return; + + //Update + if (!Platform::isFullPath(mSoundFile)) + mSoundPath = getOwned() ? expandAssetFilePath(mSoundFile) : mSoundPath; + + loadSound(); +} + +bool SoundAsset::loadSound() +{ + if (mSoundPath) + { + if (!Torque::FS::IsFile(mSoundPath)) + { + Con::errorf("SoundAsset::initializeAsset: Attempted to load file %s but it was not valid!", mSoundFile); + mLoadedState = BadFileReference; + return false; + } + else + {// = new SFXProfile(mProfileDesc, mSoundFile, mPreload); + mSFXProfile.setDescription(&mProfileDesc); + mSFXProfile.setSoundFileName(mSoundFile); + mSFXProfile.setPreload(mPreload); + } + + } + mChangeSignal.trigger(); + mLoadedState = Ok; + return true; } void SoundAsset::setSoundFile(const char* pSoundFile) { // Sanity! - AssertFatal(pSoundFile != NULL, "Cannot use a NULL shape file."); + AssertFatal(pSoundFile != NULL, "Cannot use a NULL sound file."); - // Fetch image file. + // Fetch sound file. pSoundFile = StringTable->insert(pSoundFile); // Ignore no change, @@ -152,7 +250,7 @@ void SoundAsset::setSoundFile(const char* pSoundFile) return; // Update. - mSoundFile = StringTable->insert(pSoundFile); + mSoundFile = pSoundFile; // Refresh the asset. refreshAsset(); @@ -162,3 +260,43 @@ DefineEngineMethod(SoundAsset, getSoundPath, const char*, (), , "") { return object->getSoundPath(); } + +IMPLEMENT_CONOBJECT(GuiInspectorTypeSoundAssetPtr); + +ConsoleDocClass(GuiInspectorTypeSoundAssetPtr, + "@brief Inspector field type for Sounds\n\n" + "Editor use only.\n\n" + "@internal" +); + +void GuiInspectorTypeSoundAssetPtr::consoleInit() +{ + Parent::consoleInit(); + + ConsoleBaseType::getType(TypeSoundAssetPtr)->setInspectorFieldType("GuiInspectorTypeSoundAssetPtr"); +} + +GuiControl * GuiInspectorTypeSoundAssetPtr::constructEditControl() +{ + return nullptr; +} + +bool GuiInspectorTypeSoundAssetPtr::updateRects() +{ + return false; +} + +IMPLEMENT_CONOBJECT(GuiInspectorTypeSoundAssetId); + +ConsoleDocClass(GuiInspectorTypeSoundAssetId, + "@brief Inspector field type for Sounds\n\n" + "Editor use only.\n\n" + "@internal" +); + +void GuiInspectorTypeSoundAssetId::consoleInit() +{ + Parent::consoleInit(); + + ConsoleBaseType::getType(TypeSoundAssetId)->setInspectorFieldType("GuiInspectorTypeSoundAssetId"); +} diff --git a/Engine/source/T3D/assets/SoundAsset.h b/Engine/source/T3D/assets/SoundAsset.h index 013780cae..eb273291c 100644 --- a/Engine/source/T3D/assets/SoundAsset.h +++ b/Engine/source/T3D/assets/SoundAsset.h @@ -39,7 +39,25 @@ #include "assets/assetFieldTypes.h" #endif -class SFXTrack; +#include "gui/editor/guiInspectorTypes.h" + +#ifndef _BITSTREAM_H_ +#include "core/stream/bitStream.h" +#endif + +#ifndef _SFXRESOURCE_H_ +#include "sfx/sfxResource.h" +#endif + +#ifndef _SFXDESCRIPTION_H_ +#include "sfx/sfxDescription.h" +#endif // !_SFXDESCRIPTION_H_ + +#ifndef _SFXPROFILE_H_ +#include "sfx/sfxProfile.h" +#endif // !_SFXPROFILE_H_ + +class SFXResource; //----------------------------------------------------------------------------- class SoundAsset : public AssetBase @@ -49,8 +67,36 @@ class SoundAsset : public AssetBase protected: StringTableEntry mSoundFile; StringTableEntry mSoundPath; + SFXProfile mSFXProfile; + SFXDescription mProfileDesc; + // subtitles + StringTableEntry mSubtitleString; + bool mPreload; + + /*These will be needed in the refactor! + Resource mSoundResource; + + + // SFXDesctriptions, some off these will be removed F32 mPitchAdjust; F32 mVolumeAdjust; + bool mIs3D; + bool mLoop; + bool mIsStreaming; + bool mUseHardware; + + F32 mMinDistance; + F32 mMaxDistance; + U32 mConeInsideAngle; + U32 mConeOutsideAngle; + F32 mConeOutsideVolume; + F32 mRolloffFactor; + Point3F mScatterDistance; + F32 mPriority; + */ + + typedef Signal SoundAssetChanged; + SoundAssetChanged mChangeSignal; public: SoundAsset(); @@ -60,16 +106,26 @@ public: static void initPersistFields(); virtual void copyTo(SimObject* object); + //SFXResource* getSound() { return mSoundResource; } + Resource getSoundResource() { return mSFXProfile.getResource(); } + /// Declare Console Object. DECLARE_CONOBJECT(SoundAsset); void setSoundFile(const char* pSoundFile); + bool loadSound(); inline StringTableEntry getSoundFile(void) const { return mSoundFile; }; - inline StringTableEntry getSoundPath(void) const { return mSoundPath; }; + SFXProfile* getSfxProfile() { return &mSFXProfile; } + SFXDescription* getSfxDescription() { return &mProfileDesc; } + + bool isLoop() { return mProfileDesc.mIsLooping; } + bool is3D() { return mProfileDesc.mIs3D; } + protected: virtual void initializeAsset(void); + void _onResourceChanged(const Torque::Path & path); virtual void onAssetRefresh(void); static bool setSoundFile(void *obj, const char *index, const char *data) { static_cast(obj)->setSoundFile(data); return false; } @@ -77,6 +133,229 @@ protected: }; DefineConsoleType(TypeSoundAssetPtr, SoundAsset) +DefineConsoleType(TypeSoundAssetId, String) + +//----------------------------------------------------------------------------- +// TypeAssetId GuiInspectorField Class +//----------------------------------------------------------------------------- +class GuiInspectorTypeSoundAssetPtr : public GuiInspectorTypeFileName +{ + typedef GuiInspectorTypeFileName Parent; +public: + + GuiBitmapButtonCtrl* mSoundButton; + + DECLARE_CONOBJECT(GuiInspectorTypeSoundAssetPtr); + static void consoleInit(); + + virtual GuiControl* constructEditControl(); + virtual bool updateRects(); +}; + +class GuiInspectorTypeSoundAssetId : public GuiInspectorTypeSoundAssetPtr +{ + typedef GuiInspectorTypeSoundAssetPtr Parent; +public: + + DECLARE_CONOBJECT(GuiInspectorTypeSoundAssetId); + static void consoleInit(); +}; + +#pragma region Singular Asset Macros + +//Singular assets +/// +/// Declares a sound asset +/// This establishes the assetId, asset and legacy filepath fields, along with supplemental getter and setter functions +/// +#define DECLARE_SOUNDASSET(className, name, profile) public: \ + Resource m##name;\ + StringTableEntry m##name##Name; \ + StringTableEntry m##name##AssetId;\ + AssetPtr m##name##Asset = NULL;\ + SFXProfile* m##name##Profile = &profile;\ +public: \ + const StringTableEntry get##name##File() const { return m##name##Name); }\ + void set##name##File(const FileName &_in) { m##name##Name = StringTable->insert(_in.c_str());}\ + const AssetPtr & get##name##Asset() const { return m##name##Asset; }\ + void set##name##Asset(const AssetPtr &_in) { m##name##Asset = _in;}\ + \ + bool _set##name(StringTableEntry _in)\ + {\ + if(m##name##AssetId != _in || m##name##Name != _in)\ + {\ + if (_in == StringTable->EmptyString())\ + {\ + m##name##Name = StringTable->EmptyString();\ + m##name##AssetId = StringTable->EmptyString();\ + m##name##Asset = NULL;\ + m##name = NULL;\ + return true;\ + }\ + \ + if (AssetDatabase.isDeclaredAsset(_in))\ + {\ + m##name##AssetId = _in;\ + \ + U32 assetState = SoundAsset::getAssetById(m##name##AssetId, &m##name##Asset);\ + \ + if (SoundAsset::Ok == assetState)\ + {\ + m##name##Name = StringTable->EmptyString();\ + }\ + }\ + else\ + {\ + StringTableEntry assetId = SoundAsset::getAssetIdByFilename(_in);\ + if (assetId != StringTable->EmptyString())\ + {\ + m##name##AssetId = assetId;\ + if(SoundAsset::getAssetById(m##name##AssetId, &m##name##Asset) == SoundAsset::Ok)\ + {\ + m##name##Name = StringTable->EmptyString();\ + }\ + }\ + else\ + {\ + m##name##Name = _in;\ + m##name##AssetId = StringTable->EmptyString();\ + m##name##Asset = NULL;\ + }\ + }\ + }\ + if (get##name() != StringTable->EmptyString() && m##name##Asset.notNull())\ + {\ + m##name = m##name##Asset->getSoundResource();\ + }\ + else\ + {\ + m##name = NULL;\ + }\ + \ + if (m##name##Asset.notNull() && m##name##Asset->getStatus() != ShapeAsset::Ok)\ + {\ + Con::errorf("%s(%s)::_set%s() - sound asset failure\"%s\" due to [%s]", macroText(className), getName(), macroText(name), _in, ShapeAsset::getAssetErrstrn(m##name##Asset->getStatus()).c_str());\ + return false; \ + }\ + else if (bool(m##name) == NULL)\ + {\ + Con::errorf("%s(%s)::_set%s() - Couldn't load sound \"%s\"", macroText(className), getName(), macroText(name), _in);\ + return false;\ + }\ + return true;\ + }\ + \ + const StringTableEntry get##name() const\ + {\ + if (m##name##Asset && (m##name##Asset->getSoundPath() != StringTable->EmptyString()))\ + return m##name##Asset->getSoundPath();\ + else if (m##name##AssetId != StringTable->EmptyString())\ + return m##name##AssetId;\ + else if (m##name##Name != StringTable->EmptyString())\ + return StringTable->insert(m##name##Name);\ + else\ + return StringTable->EmptyString();\ + }\ + Resource get##name##Resource() \ + {\ + return m##name;\ + } + +#define DECLARE_SOUNDASSET_SETGET(className, name)\ + static bool _set##name##Data(void* obj, const char* index, const char* data)\ + {\ + bool ret = false;\ + className* object = static_cast(obj);\ + ret = object->_set##name(StringTable->insert(data));\ + return ret;\ + } + +#define DECLARE_SOUNDASSET_NET_SETGET(className, name, bitmask)\ + static bool _set##name##Data(void* obj, const char* index, const char* data)\ + {\ + bool ret = false;\ + className* object = static_cast(obj);\ + ret = object->_set##name(StringTable->insert(data));\ + if(ret)\ + object->setMaskBits(bitmask);\ + return ret;\ + } + +#define DEF_SOUNDASSET_BINDS(className,name)\ +DefineEngineMethod(className, get##name, String, (), , "get name")\ +{\ + return object->get##name(); \ +}\ +DefineEngineMethod(className, get##name##Asset, String, (), , assetText(name, asset reference))\ +{\ + return object->m##name##AssetId; \ +}\ +DefineEngineMethod(className, set##name, bool, (const char* shape), , assetText(name,assignment. first tries asset then flat file.))\ +{\ + return object->_set##name(StringTable->insert(shape));\ +} + +#define INIT_SOUNDASSET(name) \ + m##name##Name = StringTable->EmptyString(); \ + m##name##AssetId = StringTable->EmptyString(); \ + m##name##Asset = NULL; \ + m##name = NULL;\ + +#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS + +#define INITPERSISTFIELD_SOUNDASSET(name, consoleClass, docs) \ + addProtectedField(assetText(name, File), TypeSoundFilename, Offset(m##name##Name, consoleClass), _set##name##Data, & defaultProtectedGetFn, assetText(name, docs)); \ + addProtectedField(assetText(name, Asset), TypeSoundAssetId, Offset(m##name##AssetId, consoleClass), _set##name##Data, & defaultProtectedGetFn, assetText(name, asset reference.)); + +#else + +#define INITPERSISTFIELD_SOUNDASSET(name, consoleClass, docs) \ + addProtectedField(assetText(name, File), TypeSoundFilename, Offset(m##name##Name, consoleClass), _set##name##Data, & defaultProtectedGetFn, assetText(name, docs), AbstractClassRep::FIELD_HideInInspectors); \ + addProtectedField(assetText(name, Asset), TypeSoundAssetId, Offset(m##name##AssetId, consoleClass), _set##name##Data, & defaultProtectedGetFn, assetText(name, asset reference.)); + +#endif // TORQUE_SHOW_LEGACY_FILE_FIELDS + +#define CLONE_SOUNDASSET(name) \ + m##name##Name = other.m##name##Name;\ + m##name##AssetId = other.m##name##AssetId;\ + m##name##Asset = other.m##name##Asset;\ + +#define PACKDATA_SOUNDASSET(name)\ + if (stream->writeFlag(m##name##Asset.notNull()))\ + {\ + stream->writeString(m##name##Asset.getAssetId());\ + }\ + else\ + stream->writeString(m##name##Name); + +#define UNPACKDATA_SOUNDASSET(name)\ + if (stream->readFlag())\ + {\ + m##name##AssetId = stream->readSTString();\ + _set##name(m##name##AssetId);\ + }\ + else\ + m##name##Name = stream->readSTString(); + +#define PACK_SOUNDASSET(netconn, name)\ + if (stream->writeFlag(m##name##Asset.notNull()))\ + {\ + NetStringHandle assetIdStr = m##name##Asset.getAssetId();\ + netconn->packNetStringHandleU(stream, assetIdStr);\ + }\ + else\ + stream->writeString(m##name##Name); + +#define UNPACK_SOUNDASSET(netconn, name)\ + if (stream->readFlag())\ + {\ + m##name##AssetId = StringTable->insert(netconn->unpackNetStringHandleU(stream).getString());\ + _set##name(m##name##AssetId);\ + }\ + else\ + m##name##Name = stream->readSTString(); + +#pragma endregion #endif // _ASSET_BASE_H_ diff --git a/Engine/source/T3D/assets/TerrainAsset.cpp b/Engine/source/T3D/assets/TerrainAsset.cpp index 52d81ccc8..40bc950b0 100644 --- a/Engine/source/T3D/assets/TerrainAsset.cpp +++ b/Engine/source/T3D/assets/TerrainAsset.cpp @@ -91,7 +91,7 @@ ConsoleSetType(TypeTerrainAssetPtr) //----------------------------------------------------------------------------- -ConsoleType(assetIdString, TypeTerrainAssetId, String, ASSET_ID_FIELD_PREFIX) +ConsoleType(assetIdString, TypeTerrainAssetId, const char*, ASSET_ID_FIELD_PREFIX) ConsoleGetType(TypeTerrainAssetId) { @@ -107,11 +107,7 @@ ConsoleSetType(TypeTerrainAssetId) // Yes, so fetch field value. const char* pFieldValue = argv[0]; - // Fetch asset Id. - StringTableEntry* assetId = (StringTableEntry*)(dptr); - - // Update asset value. - *assetId = StringTable->insert(pFieldValue); + *((const char**)dptr) = StringTable->insert(argv[0]); return; } @@ -194,7 +190,7 @@ void TerrainAsset::setTerrainFileName(const char* pScriptFile) bool TerrainAsset::loadTerrain() { - if (!Platform::isFile(mTerrainFilePath)) + if (!Torque::FS::IsFile(mTerrainFilePath)) return false; mTerrMaterialAssets.clear(); @@ -471,8 +467,8 @@ GuiControl* GuiInspectorTypeTerrainAssetPtr::constructEditControl() mShapeEdButton->setField("Command", "EditorGui.setEditor(TerrainEditorPlugin);"); - char bitmapName[512] = "tools/worldEditor/images/toolbar/shape-editor"; - mShapeEdButton->setBitmap(bitmapName); + char bitmapName[512] = "ToolsModule:TerrainBlock_image"; + mShapeEdButton->setBitmap(StringTable->insert(bitmapName)); mShapeEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile"); mShapeEdButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile"); diff --git a/Engine/source/T3D/assets/TerrainMaterialAsset.cpp b/Engine/source/T3D/assets/TerrainMaterialAsset.cpp index 5ab0e1c66..717d497aa 100644 --- a/Engine/source/T3D/assets/TerrainMaterialAsset.cpp +++ b/Engine/source/T3D/assets/TerrainMaterialAsset.cpp @@ -119,11 +119,9 @@ void TerrainMaterialAsset::initializeAsset() // Call parent. Parent::initializeAsset(); - compileShader(); - mScriptPath = expandAssetFilePath(mScriptFile); - if (Platform::isFile(mScriptPath)) + if (Torque::FS::IsScriptFile(mScriptPath)) Con::executeFile(mScriptPath, false, false); } @@ -131,7 +129,7 @@ void TerrainMaterialAsset::onAssetRefresh() { mScriptPath = expandAssetFilePath(mScriptFile); - if (Platform::isFile(mScriptPath)) + if (Torque::FS::IsScriptFile(mScriptPath)) Con::executeFile(mScriptPath, false, false); if (mMatDefinitionName != StringTable->EmptyString()) @@ -164,21 +162,49 @@ void TerrainMaterialAsset::setScriptFile(const char* pScriptFile) //------------------------------------------------------------------------------ -void TerrainMaterialAsset::compileShader() -{ -} - void TerrainMaterialAsset::copyTo(SimObject* object) { // Call to parent. Parent::copyTo(object); } -DefineEngineMethod(TerrainMaterialAsset, compileShader, void, (), , "Compiles the material's generated shader, if any. Not yet implemented\n") +StringTableEntry TerrainMaterialAsset::getAssetIdByMaterialName(StringTableEntry matName) { - object->compileShader(); + StringTableEntry materialAssetId = StringTable->EmptyString(); + + AssetQuery* query = new AssetQuery(); + U32 foundCount = AssetDatabase.findAssetType(query, "TerrainMaterialAsset"); + if (foundCount == 0) + { + //Didn't work, so have us fall back to a placeholder asset + materialAssetId = StringTable->insert("Core_Rendering:noMaterial"); + } + else + { + for (U32 i = 0; i < foundCount; i++) + { + TerrainMaterialAsset* matAsset = AssetDatabase.acquireAsset(query->mAssetList[i]); + if (matAsset && matAsset->getMaterialDefinitionName() == matName) + { + materialAssetId = matAsset->getAssetId(); + AssetDatabase.releaseAsset(query->mAssetList[i]); + break; + } + AssetDatabase.releaseAsset(query->mAssetList[i]); + } + } + + return materialAssetId; } +#ifdef TORQUE_TOOLS +DefineEngineStaticMethod(TerrainMaterialAsset, getAssetIdByMaterialName, const char*, (const char* materialName), (""), + "Queries the Asset Database to see if any asset exists that is associated with the provided material name.\n" + "@return The AssetId of the associated asset, if any.") +{ + return TerrainMaterialAsset::getAssetIdByMaterialName(StringTable->insert(materialName)); +} +#endif //----------------------------------------------------------------------------- // GuiInspectorTypeAssetId //----------------------------------------------------------------------------- @@ -218,7 +244,7 @@ GuiControl* GuiInspectorTypeTerrainMaterialAssetPtr::constructEditControl() TerrainMaterial* materialDef = nullptr; - char bitmapName[512] = "tools/worldEditor/images/toolbar/shape-editor"; + char bitmapName[512] = "ToolsModule:material_editor_n_image"; /*if (!Sim::findObject(matAsset->getMaterialDefinitionName(), materialDef)) { @@ -245,7 +271,7 @@ GuiControl* GuiInspectorTypeTerrainMaterialAssetPtr::constructEditControl() StringBuilder strbld; strbld.append(matAsset->getMaterialDefinitionName()); strbld.append("\n"); - strbld.append("Open this file in the Material Editor"); + strbld.append("Open this asset in the Material Editor"); mMatPreviewButton->setDataField(StringTable->insert("tooltip"), NULL, strbld.data()); diff --git a/Engine/source/T3D/assets/TerrainMaterialAsset.h b/Engine/source/T3D/assets/TerrainMaterialAsset.h index 22854dd59..e0a60e391 100644 --- a/Engine/source/T3D/assets/TerrainMaterialAsset.h +++ b/Engine/source/T3D/assets/TerrainMaterialAsset.h @@ -66,7 +66,7 @@ public: static void initPersistFields(); virtual void copyTo(SimObject* object); - void compileShader(); + static StringTableEntry getAssetIdByMaterialName(StringTableEntry matName); StringTableEntry getMaterialDefinitionName() { return mMatDefinitionName; } diff --git a/Engine/source/T3D/assets/assetImporter.cpp b/Engine/source/T3D/assets/assetImporter.cpp index 5f2e54931..c1758a44a 100644 --- a/Engine/source/T3D/assets/assetImporter.cpp +++ b/Engine/source/T3D/assets/assetImporter.cpp @@ -32,10 +32,11 @@ ConsoleDocClass(AssetImportConfig, IMPLEMENT_CONOBJECT(AssetImportConfig); AssetImportConfig::AssetImportConfig() : - DuplicatAutoResolution("AutoRename"), + DuplicateAutoResolution("AutoRename"), WarningsAsErrors(false), PreventImportWithErrors(true), AutomaticallyPromptMissingFiles(false), + AddDirectoryPrefixToAssetName(false), ImportMesh(true), AlwaysAddShapeSuffix(false), AddedShapeSuffix("_shape"), @@ -89,7 +90,7 @@ AssetImportConfig::AssetImportConfig() : ImageType("GUI"), DiffuseTypeSuffixes("_ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL,_A,_C,-ALBEDO,-DIFFUSE,-ALB,-DIF,-COLOR,-COL,-A,-C"), NormalTypeSuffixes("_NORMAL,_NORM,_N,-NORMAL,-NORM,-N"), - MetalnessTypeSuffixes("_METAL,_MET,_METALNESS,_METALLIC,_M,-METAL, -MET, -METALNESS, -METALLIC, -M"), + MetalnessTypeSuffixes("_METAL,_MET,_METALNESS,_METALLIC,_M,-METAL,-MET,-METALNESS,-METALLIC,-M"), RoughnessTypeSuffixes("_ROUGH,_ROUGHNESS,_R,-ROUGH,-ROUGHNESS,-R"), SmoothnessTypeSuffixes("_SMOOTH,_SMOOTHNESS,_S,-SMOOTH,-SMOOTHNESS,-S"), AOTypeSuffixes("_AO,_AMBIENT,_AMBIENTOCCLUSION,-AO,-AMBIENT,-AMBIENTOCCLUSION"), @@ -131,10 +132,11 @@ void AssetImportConfig::initPersistFields() Parent::initPersistFields(); addGroup("General"); - addField("DuplicatAutoResolution", TypeRealString, Offset(DuplicatAutoResolution, AssetImportConfig), "Duplicate Asset Auto-Resolution Action. Options are None, AutoPrune, AutoRename"); + addField("DuplicateAutoResolution", TypeRealString, Offset(DuplicateAutoResolution, AssetImportConfig), "Duplicate Asset Auto-Resolution Action. Options are None, AutoPrune, AutoRename, FolderPrefix"); addField("WarningsAsErrors", TypeBool, Offset(WarningsAsErrors, AssetImportConfig), "Indicates if warnings should be treated as errors"); addField("PreventImportWithErrors", TypeBool, Offset(PreventImportWithErrors, AssetImportConfig), "Indicates if importing should be prevented from completing if any errors are detected at all"); addField("AutomaticallyPromptMissingFiles", TypeBool, Offset(AutomaticallyPromptMissingFiles, AssetImportConfig), "Should the importer automatically prompt to find missing files if they are not detected automatically by the importer"); + addField("AddDirectoryPrefixToAssetName", TypeBool, Offset(AddDirectoryPrefixToAssetName, AssetImportConfig), "Should the importer add the folder name as a prefix to the assetName. Helps prevent name collisions."); endGroup("General"); addGroup("Meshes"); @@ -228,10 +230,11 @@ void AssetImportConfig::initPersistFields() void AssetImportConfig::loadImportConfig(Settings* configSettings, String configName) { //General - DuplicatAutoResolution = configSettings->value(String(configName + "/General/DuplicatAutoResolution").c_str()); + DuplicateAutoResolution = configSettings->value(String(configName + "/General/DuplicateAutoResolution").c_str()); WarningsAsErrors = dAtob(configSettings->value(String(configName + "/General/WarningsAsErrors").c_str())); PreventImportWithErrors = dAtob(configSettings->value(String(configName + "/General/PreventImportWithErrors").c_str())); AutomaticallyPromptMissingFiles = dAtob(configSettings->value(String(configName + "/General/AutomaticallyPromptMissingFiles").c_str())); + AddDirectoryPrefixToAssetName = dAtob(configSettings->value(String(configName + "/General/AddDirectoryPrefixToAssetName").c_str())); //Meshes ImportMesh = dAtob(configSettings->value(String(configName + "/Meshes/ImportMesh").c_str())); @@ -317,10 +320,11 @@ void AssetImportConfig::loadImportConfig(Settings* configSettings, String config void AssetImportConfig::CopyTo(AssetImportConfig* target) const { - target->DuplicatAutoResolution = DuplicatAutoResolution; + target->DuplicateAutoResolution = DuplicateAutoResolution; target->WarningsAsErrors = WarningsAsErrors; target->PreventImportWithErrors = PreventImportWithErrors; target->AutomaticallyPromptMissingFiles = AutomaticallyPromptMissingFiles; + target->AddDirectoryPrefixToAssetName = AddDirectoryPrefixToAssetName; //Meshes target->ImportMesh = ImportMesh; @@ -1444,8 +1448,8 @@ void AssetImporter::processImportAssets(AssetImportObject* assetItem) if (!childItem->processed) { //Sanitize before modifying our asset name(suffix additions, etc) - if (childItem->assetName != childItem->cleanAssetName) - childItem->assetName = childItem->cleanAssetName; + //if (childItem->assetName != childItem->cleanAssetName) + // childItem->assetName = childItem->cleanAssetName; //handle special pre-processing here for any types that need it @@ -1579,6 +1583,28 @@ void AssetImporter::processImageAsset(AssetImportObject* assetItem) } } + else + { + //If we're processing an unaffiliated image without generating materials for it, we can check some other bits + if (assetItem->parentAssetItem == nullptr) + { + if (assetItem->typeHint != String::EmptyString) + { + ImageAssetType type = ImageAsset::getImageTypeFromName(StringTable->insert(assetItem->typeHint.c_str())); + + if (type == ImageAssetType::GUI) + { + + } + } + } + } + + if(assetItem->assetName == assetItem->cleanAssetName && activeImportConfig->AlwaysAddImageSuffix) + { + assetItem->assetName = assetItem->assetName + activeImportConfig->AddedImageSuffix; + assetItem->cleanAssetName = assetItem->assetName; + } assetItem->processed = true; } @@ -1612,174 +1638,214 @@ void AssetImporter::processMaterialAsset(AssetImportObject* assetItem) } } - if (activeImportConfig->AlwaysAddMaterialSuffix) + if (activeImportConfig->UseExistingMaterials) { - assetItem->assetName += activeImportConfig->AddedMaterialSuffix; - } + //So if the material already exists, we should just use that. So first, let's find out if it already exists - if (activeImportConfig->PopulateMaterialMaps) - { - //If we're trying to populate the rest of our material maps, we need to go looking - dSprintf(importLogBuffer, sizeof(importLogBuffer), "Attempting to Auto-Populate Material Maps"); - activityLog.push_back(importLogBuffer); + //check to see if the definition for this already exists + StringTableEntry existingMatAsset = MaterialAsset::getAssetIdByMaterialName(StringTable->insert(assetName)); - AssetImportObject* matchedImageTypes[ImageAsset::ImageTypeCount] = { nullptr }; - - String materialImageNoSuffix; - - for (U32 i = 0; i < assetItem->childAssetItems.size(); i++) + if (existingMatAsset != StringTable->EmptyString()) { - AssetImportObject* childAssetItem = assetItem->childAssetItems[i]; + assetItem->skip = true; + dSprintf(importLogBuffer, sizeof(importLogBuffer), "Material %s has been skipped because we already found an asset Id that uses that material definition. The found assetId is: %s", assetItem->assetName.c_str(), existingMatAsset); + activityLog.push_back(importLogBuffer); + return; + } - if (childAssetItem->skip || childAssetItem->assetType != String("ImageAsset")) - continue; + //If there was no existing assetId, then lets see if it already exists in a legacy file, like a materials.cs or materials.tscript + //If it does, we'll just make our asset point to that instead of a new file + Material* mat = MATMGR->getMaterialDefinitionByName(assetName); - for (S32 t = 0; t < ImageAsset::ImageTypeCount; t++) + if (!mat) + mat = MATMGR->getMaterialDefinitionByMapTo(assetName); + + if (!mat && assetItem->assetName != assetItem->cleanAssetName) + { + mat = MATMGR->getMaterialDefinitionByName(assetItem->cleanAssetName); + + if (!mat) + mat = MATMGR->getMaterialDefinitionByMapTo(assetItem->cleanAssetName); + } + + if(mat) + { + //We found a match, so just modify our asset item's info to point against it. This will create the asset definition, but otherwise leave the material definition as-is. + assetItem->filePath = mat->getFilename(); + } + } + else + { + if (activeImportConfig->AlwaysAddMaterialSuffix) //we only opt to force on the suffix if we're not obligating using the original material defs + { + assetItem->assetName += activeImportConfig->AddedMaterialSuffix; + assetItem->cleanAssetName = assetItem->assetName; + } + + if (activeImportConfig->PopulateMaterialMaps) + { + //If we're trying to populate the rest of our material maps, we need to go looking + dSprintf(importLogBuffer, sizeof(importLogBuffer), "Attempting to Auto-Populate Material Maps"); + activityLog.push_back(importLogBuffer); + + AssetImportObject* matchedImageTypes[ImageAsset::ImageTypeCount] = { nullptr }; + + String materialImageNoSuffix; + + for (U32 i = 0; i < assetItem->childAssetItems.size(); i++) { - //If the imageType name and child asset image type match, check it off our list - if (!dStricmp(ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)t), childAssetItem->imageSuffixType.c_str())) + AssetImportObject* childAssetItem = assetItem->childAssetItems[i]; + + if (childAssetItem->skip || childAssetItem->assetType != String("ImageAsset")) + continue; + + for (S32 t = 0; t < ImageAsset::ImageTypeCount; t++) { - matchedImageTypes[t] = childAssetItem; - - if (t == ImageAsset::ImageTypes::Albedo) + //If the imageType name and child asset image type match, check it off our list + if (!dStricmp(ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)t), childAssetItem->imageSuffixType.c_str())) { - String sufType; - String suffix = parseImageSuffixes(childAssetItem->assetName, &sufType); + matchedImageTypes[t] = childAssetItem; - String imageAssetName = childAssetItem->assetName; + if (t == ImageAsset::ImageTypes::Albedo) + { + String sufType; + String suffix = parseImageSuffixes(childAssetItem->assetName, &sufType); - if (suffix.isEmpty()) - materialImageNoSuffix = imageAssetName; - else - materialImageNoSuffix = imageAssetName.erase(imageAssetName.length() - suffix.length(), suffix.length());//cache this for later as we may need it for file association lookups + String imageAssetName = childAssetItem->assetName; + + if (suffix.isEmpty()) + materialImageNoSuffix = imageAssetName; + else + materialImageNoSuffix = imageAssetName.erase(imageAssetName.length() - suffix.length(), suffix.length());//cache this for later as we may need it for file association lookups + } } } } - } - //Now that we've checked off any existingly matched image types, process through the unmatched to look for files that associate - for (S32 t = 0; t < ImageAsset::ImageTypeCount; t++) - { - //This type wasn't found, so try and find a match based on suffix - String suffixList; - - switch (t) + //Now that we've checked off any existingly matched image types, process through the unmatched to look for files that associate + for (S32 t = 0; t < ImageAsset::ImageTypeCount; t++) { - case ImageAsset::Albedo: - suffixList = activeImportConfig->DiffuseTypeSuffixes; - break; - case ImageAsset::Normal: - suffixList = activeImportConfig->NormalTypeSuffixes; - break; - case ImageAsset::ORMConfig: - suffixList = activeImportConfig->PBRTypeSuffixes; - break; - case ImageAsset::Metalness: - suffixList = activeImportConfig->MetalnessTypeSuffixes; - break; - case ImageAsset::AO: - suffixList = activeImportConfig->AOTypeSuffixes; - break; - case ImageAsset::Roughness: - suffixList = activeImportConfig->RoughnessTypeSuffixes; - break; - //TODO: Glow map lookup too - } + //This type wasn't found, so try and find a match based on suffix + String suffixList; - if (!matchedImageTypes[t]) - { - U32 suffixCount = StringUnit::getUnitCount(suffixList.c_str(), ",;\t"); - for (U32 i = 0; i < suffixCount; i++) + switch (t) { - //First, try checking based on the material's assetName for our patternbase - String testPath = assetItem->filePath.getRootAndPath(); - testPath += "/" + assetItem->cleanAssetName + StringUnit::getUnit(suffixList.c_str(), i, ",;\t"); + case ImageAsset::Albedo: + suffixList = activeImportConfig->DiffuseTypeSuffixes; + break; + case ImageAsset::Normal: + suffixList = activeImportConfig->NormalTypeSuffixes; + break; + case ImageAsset::ORMConfig: + suffixList = activeImportConfig->PBRTypeSuffixes; + break; + case ImageAsset::Metalness: + suffixList = activeImportConfig->MetalnessTypeSuffixes; + break; + case ImageAsset::AO: + suffixList = activeImportConfig->AOTypeSuffixes; + break; + case ImageAsset::Roughness: + suffixList = activeImportConfig->RoughnessTypeSuffixes; + break; + //TODO: Glow map lookup too + } - String imagePath = AssetImporter::findImagePath(testPath); - - if (imagePath.isNotEmpty()) + if (!matchedImageTypes[t]) + { + U32 suffixCount = StringUnit::getUnitCount(suffixList.c_str(), ",;\t"); + for (U32 i = 0; i < suffixCount; i++) { - //got a match! - AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, ""); + //First, try checking based on the material's assetName for our patternbase + String testPath = assetItem->filePath.getRootAndPath(); + testPath += "/" + assetItem->cleanAssetName + StringUnit::getUnit(suffixList.c_str(), i, ",;\t"); - newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)t); + String imagePath = AssetImporter::findImagePath(testPath); - matchedImageTypes[t] = newImageAssetObj; - break; - } - else - { - if(materialImageNoSuffix.isNotEmpty()) + if (imagePath.isNotEmpty()) { - testPath = assetItem->filePath.getRootAndPath(); - testPath += "/" + materialImageNoSuffix + StringUnit::getUnit(suffixList.c_str(), i, ",;\t"); + //got a match! + AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, ""); - imagePath = AssetImporter::findImagePath(testPath); + newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)t); - if (imagePath.isNotEmpty()) + matchedImageTypes[t] = newImageAssetObj; + break; + } + else + { + if (materialImageNoSuffix.isNotEmpty()) { - //got a match! - AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, ""); + testPath = assetItem->filePath.getRootAndPath(); + testPath += "/" + materialImageNoSuffix + StringUnit::getUnit(suffixList.c_str(), i, ",;\t"); - newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)t); + imagePath = AssetImporter::findImagePath(testPath); - matchedImageTypes[t] = newImageAssetObj; - break; + if (imagePath.isNotEmpty()) + { + //got a match! + AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, ""); + + newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType((ImageAsset::ImageTypes)t); + + matchedImageTypes[t] = newImageAssetObj; + break; + } } } } - } - //If we're the abledo slot and after all that we didn't find anything, it probably is a suffixless image - if (t == ImageAsset::Albedo && matchedImageTypes[t] == nullptr) - { - String testPath = assetItem->filePath.getRootAndPath() + "/" + assetItem->cleanAssetName; - String imagePath = AssetImporter::findImagePath(testPath); - - if (imagePath.isNotEmpty()) + //If we're the abledo slot and after all that we didn't find anything, it probably is a suffixless image + if (t == ImageAsset::Albedo && matchedImageTypes[t] == nullptr) { - //got a match! - AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, ""); + String testPath = assetItem->filePath.getRootAndPath() + "/" + assetItem->cleanAssetName; + String imagePath = AssetImporter::findImagePath(testPath); - //In the event that the names match, we want to avoid duplications, so we'll go ahead and append a suffix onto our new image asset - if (newImageAssetObj->assetName == assetItem->assetName) + if (imagePath.isNotEmpty()) { - newImageAssetObj->assetName += StringUnit::getUnit(suffixList.c_str(), 0, ",;\t"); - newImageAssetObj->cleanAssetName = newImageAssetObj->assetName; + //got a match! + AssetImportObject* newImageAssetObj = addImportingAsset("ImageAsset", imagePath, assetItem, ""); + + //In the event that the names match, we want to avoid duplications, so we'll go ahead and append a suffix onto our new image asset + if (newImageAssetObj->assetName == assetItem->assetName) + { + newImageAssetObj->assetName += StringUnit::getUnit(suffixList.c_str(), 0, ",;\t"); + newImageAssetObj->cleanAssetName = newImageAssetObj->assetName; + } + + newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType(ImageAsset::ImageTypes::Albedo); + + matchedImageTypes[t] = newImageAssetObj; } - - newImageAssetObj->imageSuffixType = ImageAsset::getImageTypeNameFromType(ImageAsset::ImageTypes::Albedo); - - matchedImageTypes[t] = newImageAssetObj; + } + } + else + { + //just a bit of cleanup and logical testing for matches + //in the event we KNOW what the type is, but we don't have a suffix, such as a found image on a material lookup + //that doesn't have a suffix, we assume it to be the albedo, so we'll just append the suffix to avoid collisions if + //the name already matches our material name, similar to above logic + if (matchedImageTypes[t]->assetName == assetItem->assetName) + { + matchedImageTypes[t]->assetName += StringUnit::getUnit(suffixList.c_str(), 0, ",;\t"); + matchedImageTypes[t]->cleanAssetName = matchedImageTypes[t]->assetName; } } } - else + + /*for (U32 i = 0; i < assetItem->childAssetItems.size(); i++) { - //just a bit of cleanup and logical testing for matches - //in the event we KNOW what the type is, but we don't have a suffix, such as a found image on a material lookup - //that doesn't have a suffix, we assume it to be the albedo, so we'll just append the suffix to avoid collisions if - //the name already matches our material name, similar to above logic - if (matchedImageTypes[t]->assetName == assetItem->assetName) + AssetImportObject* childAssetItem = assetItem->childAssetItems[i]; + + if (childAssetItem->skip || childAssetItem->processed || childAssetItem->assetType != String("ImageAsset")) + continue; + + if (childAssetItem->imageSuffixType == String("Albedo")) { - matchedImageTypes[t]->assetName += StringUnit::getUnit(suffixList.c_str(), 0, ",;\t"); - matchedImageTypes[t]->cleanAssetName = matchedImageTypes[t]->assetName; + assetItem->diffuseImageAsset = % childAssetItem; } - } + }*/ } - - /*for (U32 i = 0; i < assetItem->childAssetItems.size(); i++) - { - AssetImportObject* childAssetItem = assetItem->childAssetItems[i]; - - if (childAssetItem->skip || childAssetItem->processed || childAssetItem->assetType != String("ImageAsset")) - continue; - - if (childAssetItem->imageSuffixType == String("Albedo")) - { - assetItem->diffuseImageAsset = % childAssetItem; - } - }*/ } assetItem->processed = true; @@ -1822,6 +1888,7 @@ void AssetImporter::processShapeAsset(AssetImportObject* assetItem) if (activeImportConfig->AlwaysAddShapeSuffix) { assetItem->assetName += activeImportConfig->AddedShapeSuffix; + assetItem->cleanAssetName = assetItem->assetName; } S32 meshCount = dAtoi(assetItem->shapeInfo->getDataField(StringTable->insert("_meshCount"), nullptr)); @@ -1888,7 +1955,7 @@ void AssetImporter::processShapeMaterialInfo(AssetImportObject* assetItem, S32 m if (matName == assetItem->assetName) { //So apparently we managed to name the material the same as the shape. So we'll tweak the name - matAssetName += activeImportConfig->AlwaysAddMaterialSuffix; + matAssetName += activeImportConfig->AddedMaterialSuffix; } //Do a check so we don't import materials that are on our ignore list @@ -2278,18 +2345,18 @@ void AssetImporter::resolveAssetItemIssues(AssetImportObject* assetItem) String humanReadableReason = assetItem->statusType == String("DuplicateImportAsset") ? "Importing asset was duplicate of another importing asset" : "Importing asset was duplicate of an existing asset"; //get the config value for duplicateAutoResolution - if (activeImportConfig->DuplicatAutoResolution == String("AutoPrune")) + if (activeImportConfig->DuplicateAutoResolution == String("AutoPrune")) { //delete the item deleteImportingAsset(assetItem); //log it's deletion - dSprintf(importLogBuffer, sizeof(importLogBuffer), "Asset %s was autoprined due to %s as part of the Import Configuration", assetItem->assetName.c_str(), humanReadableReason.c_str()); + dSprintf(importLogBuffer, sizeof(importLogBuffer), "Asset %s was autopruned due to %s as part of the Import Configuration", assetItem->assetName.c_str(), humanReadableReason.c_str()); activityLog.push_back(importLogBuffer); importIssues = false; } - else if (activeImportConfig->DuplicatAutoResolution == String("AutoRename")) + else if (activeImportConfig->DuplicateAutoResolution == String("AutoRename")) { //Set trailing number String renamedAssetName = assetItem->assetName; @@ -2308,10 +2375,31 @@ void AssetImporter::resolveAssetItemIssues(AssetImportObject* assetItem) resetAssetValidationStatus(assetItem); importIssues = false; } - else if (activeImportConfig->DuplicatAutoResolution == String("UseExisting")) + else if (activeImportConfig->DuplicateAutoResolution == String("UseExisting")) { } + else if (activeImportConfig->DuplicateAutoResolution == String("FolderPrefix")) + { + //Set trailing number + String renamedAssetName = assetItem->assetName; + String owningFolder = assetItem->filePath.getDirectory(assetItem->filePath.getDirectoryCount() - 1); + + renamedAssetName = owningFolder + "_" + renamedAssetName; + + //Log it's renaming + dSprintf(importLogBuffer, sizeof(importLogBuffer), "Asset %s was renamed due to %s as part of the Import Configuration", assetItem->assetName.c_str(), humanReadableReason.c_str()); + activityLog.push_back(importLogBuffer); + + dSprintf(importLogBuffer, sizeof(importLogBuffer), "Asset %s was renamed to %s", assetItem->assetName.c_str(), renamedAssetName.c_str()); + activityLog.push_back(importLogBuffer); + + assetItem->assetName = renamedAssetName; + + //Whatever status we had prior is no longer relevent, so reset the status + resetAssetValidationStatus(assetItem); + importIssues = false; + } } else if (assetItem->statusType == String("MissingFile")) { @@ -2348,7 +2436,7 @@ void AssetImporter::resetImportConfig() // // Importing // -StringTableEntry AssetImporter::autoImportFile(Torque::Path filePath) +StringTableEntry AssetImporter::autoImportFile(Torque::Path filePath, String typeHint) { //Just in case we're reusing the same importer object from another import session, nuke any existing files resetImportSession(true); @@ -2359,6 +2447,8 @@ StringTableEntry AssetImporter::autoImportFile(Torque::Path filePath) { dSprintf(importLogBuffer, sizeof(importLogBuffer), "Unable to import file %s because it is a folder or zip.", filePath.getFullPath().c_str()); activityLog.push_back(importLogBuffer); + + dumpActivityLog(); return StringTable->EmptyString(); } @@ -2366,6 +2456,8 @@ StringTableEntry AssetImporter::autoImportFile(Torque::Path filePath) { dSprintf(importLogBuffer, sizeof(importLogBuffer), "Unable to import file %s because it is of an unrecognized/unsupported type.", filePath.getFullPath().c_str()); activityLog.push_back(importLogBuffer); + + dumpActivityLog(); return StringTable->EmptyString(); } @@ -2374,7 +2466,10 @@ StringTableEntry AssetImporter::autoImportFile(Torque::Path filePath) if (targetModuleDef == nullptr) { - //log it + dSprintf(importLogBuffer, sizeof(importLogBuffer), "Unable to import file %s because it is not in a valid module folder.", filePath.getFullPath().c_str()); + activityLog.push_back(importLogBuffer); + + dumpActivityLog(); return StringTable->EmptyString(); } else @@ -2404,14 +2499,7 @@ StringTableEntry AssetImporter::autoImportFile(Torque::Path filePath) importAssets(); } -#if TORQUE_DEBUG - Con::printf("/***************/"); - for (U32 i = 0; i < activityLog.size(); i++) - { - Con::printf(activityLog[i].c_str()); - } - Con::printf("/***************/"); -#endif + dumpActivityLog(); if (hasIssues) { @@ -2628,8 +2716,15 @@ Torque::Path AssetImporter::importImageAsset(AssetImportObject* assetItem) newAsset->setDataField(StringTable->insert("originalFilePath"), nullptr, qualifiedFromFile); } - ImageAsset::ImageTypes imageType = ImageAsset::getImageTypeFromName(assetItem->imageSuffixType.c_str()); - newAsset->setImageType(imageType); + if (assetItem->typeHint != String::EmptyString) + { + newAsset->setImageType(ImageAsset::getImageTypeFromName(StringTable->insert(assetItem->typeHint.c_str()))); + } + else + { + ImageAsset::ImageTypes imageType = ImageAsset::getImageTypeFromName(assetItem->imageSuffixType.c_str()); + newAsset->setImageType(imageType); + } Taml tamlWriter; bool importSuccessful = tamlWriter.write(newAsset, tamlPath.c_str()); @@ -2694,7 +2789,7 @@ Torque::Path AssetImporter::importMaterialAsset(AssetImportObject* assetItem) dSprintf(dependencyFieldName, 64, "imageMap%i", dependencySlotId); char dependencyFieldDef[512]; - dSprintf(dependencyFieldDef, 512, "@Asset=%s:%s", targetModuleId.c_str(), childItem->assetName.c_str()); + dSprintf(dependencyFieldDef, 512, "%s=%s:%s", ASSET_ID_SIGNATURE, targetModuleId.c_str(), childItem->assetName.c_str()); newAsset->setDataField(StringTable->insert(dependencyFieldName), nullptr, dependencyFieldDef); @@ -2752,74 +2847,96 @@ Torque::Path AssetImporter::importMaterialAsset(AssetImportObject* assetItem) FileObject* file = new FileObject(); file->registerObject(); - //Now write the script file containing our material out - //There's 2 ways to do this. If we're in-place importing an existing asset, we can see if the definition existed already, like in an old - //materials.tscript file. if it does, we can just find the object by name, and save it out to our new file - //If not, we'll just generate one - Material* existingMat = MATMGR->getMaterialDefinitionByName(assetName); - - //It's also possible that, for legacy models, the material hooks in via the material's mapTo field, and the material name is something completely different - //So we'll check for that as well if we didn't find it by name up above - if (existingMat == nullptr) + if (activeImportConfig->UseExistingMaterials && Platform::isFile(qualifiedFromFile)) { - existingMat = MATMGR->getMaterialDefinitionByMapTo(assetName); - } + //Now write the script file containing our material out + //There's 2 ways to do this. If we're in-place importing an existing asset, we can see if the definition existed already, like in an old + //materials.tscript file. if it does, we can just find the object by name, and save it out to our new file + //If not, we'll just generate one + Material* existingMat = MATMGR->getMaterialDefinitionByName(assetName); - if (existingMat) - { - for (U32 i = 0; i < assetItem->childAssetItems.size(); i++) + //It's also possible that, for legacy models, the material hooks in via the material's mapTo field, and the material name is something completely different + //So we'll check for that as well if we didn't find it by name up above + if (existingMat == nullptr) + existingMat = MATMGR->getMaterialDefinitionByMapTo(assetName); + + if (existingMat == nullptr && assetItem->assetName != assetItem->cleanAssetName) { - AssetImportObject* childItem = assetItem->childAssetItems[i]; - - if (childItem->skip || !childItem->processed || childItem->assetType.compare("ImageAsset") != 0) - continue; - - String path = childItem->filePath.getFullFileName(); - - String mapFieldName = ""; - String assetFieldName = ""; - - ImageAsset::ImageTypes imageType = ImageAsset::getImageTypeFromName(childItem->imageSuffixType); - - if (imageType == ImageAsset::ImageTypes::Albedo || childItem->imageSuffixType.isEmpty()) - { - mapFieldName = "DiffuseMap"; - } - else if (imageType == ImageAsset::ImageTypes::Normal) - { - mapFieldName = "NormalMap"; - } - else if (imageType == ImageAsset::ImageTypes::ORMConfig) - { - mapFieldName = "ORMConfig"; - } - else if (imageType == ImageAsset::ImageTypes::Metalness) - { - mapFieldName = "MetalnessMap"; - } - else if (imageType == ImageAsset::ImageTypes::AO) - { - mapFieldName = "AOMap"; - } - else if (imageType == ImageAsset::ImageTypes::Roughness) - { - mapFieldName = "RoughnessMap"; - } - - assetFieldName = mapFieldName + "Asset[0]"; - mapFieldName += "[0]"; - - //If there's already an existing image map file on the material definition in this slot, don't override it - if(!path.isEmpty()) - existingMat->writeField(mapFieldName.c_str(), path.c_str()); - - String targetAsset = targetModuleId + ":" + childItem->assetName; - - existingMat->writeField(assetFieldName.c_str(), targetAsset.c_str()); + existingMat = MATMGR->getMaterialDefinitionByName(assetItem->cleanAssetName); + if (existingMat == nullptr) + existingMat = MATMGR->getMaterialDefinitionByMapTo(assetItem->cleanAssetName); + } + + if (existingMat) + { + PersistenceManager* persistMgr; + if (Sim::findObject("ImageAssetValidator", persistMgr)) + { + for (U32 i = 0; i < assetItem->childAssetItems.size(); i++) + { + AssetImportObject* childItem = assetItem->childAssetItems[i]; + + if (childItem->skip || !childItem->processed || childItem->assetType.compare("ImageAsset") != 0) + continue; + + String path = childItem->filePath.getFullFileName(); + + String mapFieldName = ""; + String assetFieldName = ""; + + ImageAsset::ImageTypes imageType = ImageAsset::getImageTypeFromName(childItem->imageSuffixType); + + if (imageType == ImageAsset::ImageTypes::Albedo || childItem->imageSuffixType.isEmpty()) + { + mapFieldName = "DiffuseMap"; + } + else if (imageType == ImageAsset::ImageTypes::Normal) + { + mapFieldName = "NormalMap"; + } + else if (imageType == ImageAsset::ImageTypes::ORMConfig) + { + mapFieldName = "ORMConfig"; + } + else if (imageType == ImageAsset::ImageTypes::Metalness) + { + mapFieldName = "MetalnessMap"; + } + else if (imageType == ImageAsset::ImageTypes::AO) + { + mapFieldName = "AOMap"; + } + else if (imageType == ImageAsset::ImageTypes::Roughness) + { + mapFieldName = "RoughnessMap"; + } + + assetFieldName = mapFieldName + "Asset[0]"; + mapFieldName += "[0]"; + + //If there's already an existing image map file on the material definition in this slot, don't override it + if (!path.isEmpty()) + existingMat->writeField(mapFieldName.c_str(), path.c_str()); + + String targetAsset = targetModuleId + ":" + childItem->assetName; + + existingMat->writeField(assetFieldName.c_str(), targetAsset.c_str()); + } + + persistMgr->setDirty(existingMat); + } + else + { + Con::errorf("ImageAssetValidator not found!"); + } + } + else + { + dSprintf(importLogBuffer, sizeof(importLogBuffer), "Error! Failed to find original material definition %s!", assetName); + activityLog.push_back(importLogBuffer); + return tamlPath; } - existingMat->save(scriptPath.c_str()); } - //However, if we didn't find any existing material, then we'll want to go ahead and just write out a new one else if (file->openForWrite(scriptPath.c_str())) { file->writeLine((U8*)"//--- OBJECT WRITE BEGIN ---"); @@ -2936,7 +3053,7 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem) newAsset->setShapeFile(shapeFileName.c_str()); newAsset->setShapeConstructorFile(constructorFileName.c_str()); - AssetImportConfig* cachedConfig = new AssetImportConfig();; + AssetImportConfig* cachedConfig = new AssetImportConfig(); cachedConfig->registerObject(); activeImportConfig->CopyTo(cachedConfig); @@ -2968,7 +3085,7 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem) dSprintf(dependencyFieldName, 64, "materialSlot%i", dependencySlotId); char dependencyFieldDef[512]; - dSprintf(dependencyFieldDef, 512, "@Asset=%s:%s", targetModuleId.c_str(), childItem->assetName.c_str()); + dSprintf(dependencyFieldDef, 512, "%s=%s:%s", ASSET_ID_SIGNATURE, targetModuleId.c_str(), childItem->assetName.c_str()); newAsset->setDataField(StringTable->insert(dependencyFieldName), nullptr, dependencyFieldDef); @@ -2980,7 +3097,7 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem) dSprintf(dependencyFieldName, 64, "animationSequence%i", dependencySlotId); char dependencyFieldDef[512]; - dSprintf(dependencyFieldDef, 512, "@Asset=%s:%s", targetModuleId.c_str(), childItem->assetName.c_str()); + dSprintf(dependencyFieldDef, 512, "%s=%s:%s", ASSET_ID_SIGNATURE, targetModuleId.c_str(), childItem->assetName.c_str()); newAsset->setDataField(StringTable->insert(dependencyFieldName), nullptr, dependencyFieldDef); @@ -3010,19 +3127,47 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem) return ""; } - if (!isInPlace && Platform::isFile(qualifiedFromCSFile)) + if (!isInPlace) { - if(!dPathCopy(qualifiedFromCSFile, qualifiedToCSFile, !isReimport)) + if (Platform::isFile(qualifiedFromCSFile)) { - dSprintf(importLogBuffer, sizeof(importLogBuffer), "Error! Unable to copy file %s", qualifiedFromCSFile); + if (!dPathCopy(qualifiedFromCSFile, qualifiedToCSFile, !isReimport)) + { + dSprintf(importLogBuffer, sizeof(importLogBuffer), "Error! Unable to copy file %s", qualifiedFromCSFile); + activityLog.push_back(importLogBuffer); + } + else + { + //We successfully copied the original constructor file, so no extra work required + makeNewConstructor = false; + dSprintf(importLogBuffer, sizeof(importLogBuffer), "Successfully copied original TSShape Constructor file %s", qualifiedFromCSFile); + activityLog.push_back(importLogBuffer); + } + } + } + else + { + //We're doing an in-place import, so double check we've already got a constructor file in the expected spot + if (Platform::isFile(qualifiedFromCSFile)) + { + //Yup, found it, we're good to go + makeNewConstructor = false; + dSprintf(importLogBuffer, sizeof(importLogBuffer), "Existing TSShape Constructor file %s found", qualifiedFromCSFile); activityLog.push_back(importLogBuffer); } else { - //We successfully copied the original constructor file, so no extra work required - makeNewConstructor = false; - dSprintf(importLogBuffer, sizeof(importLogBuffer), "Successfully copied original TSShape Constructor file %s", qualifiedFromCSFile); - activityLog.push_back(importLogBuffer); + //Didn't work, but it's possible it's using the old .cs extension when our extension variable is set to something else, so check that one as well just to be sure + Torque::Path constrFilePath = qualifiedFromCSFile; + constrFilePath.setExtension("cs"); + + if (Platform::isFile(constrFilePath.getFullPath().c_str())) + { + //Yup, found it, we're good to go + makeNewConstructor = false; + dSprintf(importLogBuffer, sizeof(importLogBuffer), "Existing TSShape Constructor file %s found", constrFilePath.getFullPath().c_str()); + activityLog.push_back(importLogBuffer); + } } } } @@ -3033,10 +3178,10 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem) activityLog.push_back(importLogBuffer); //find/create shape constructor - TSShapeConstructor* constructor = TSShapeConstructor::findShapeConstructor(Torque::Path(qualifiedToFile).getFullPath()); + TSShapeConstructor* constructor = TSShapeConstructor::findShapeConstructorByFilename(Torque::Path(qualifiedToFile).getFullPath()); if (constructor == nullptr) { - constructor = new TSShapeConstructor(qualifiedToFile); + constructor = new TSShapeConstructor(StringTable->insert(qualifiedToFile)); String constructorName = assetItem->filePath.getFileName() + assetItem->filePath.getExtension().substr(0, 3); constructorName.replace(" ", "_"); @@ -3046,7 +3191,6 @@ Torque::Path AssetImporter::importShapeAsset(AssetImportObject* assetItem) constructor->registerObject(constructorName.c_str()); } - //now we write the import config logic into the constructor itself to ensure we load like we wanted it to String neverImportMats; diff --git a/Engine/source/T3D/assets/assetImporter.h b/Engine/source/T3D/assets/assetImporter.h index e95bde57a..af4fac28b 100644 --- a/Engine/source/T3D/assets/assetImporter.h +++ b/Engine/source/T3D/assets/assetImporter.h @@ -22,7 +22,7 @@ public: /// /// Duplicate Asset Auto-Resolution Action. Options are None, AutoPrune, AutoRename /// - String DuplicatAutoResolution; + String DuplicateAutoResolution; /// /// Indicates if warnings should be treated as errors. @@ -40,6 +40,11 @@ public: bool AutomaticallyPromptMissingFiles; // + /// + /// Should the importer add the folder name as a prefix to the assetName. Helps prevent name collisions. + /// + bool AddDirectoryPrefixToAssetName; + // // //Mesh Settings /// @@ -531,6 +536,13 @@ public: /// GuiTreeViewCtrl* shapeInfo; + // + /// + /// A string that can hold a hint string to help the auto-import ensure the correct asset subtype is assigned. + /// e.g. "GUI" would inform an image asset being imported that it should be flagged as a GUI image type + /// + String typeHint; + public: AssetImportObject(); virtual ~AssetImportObject(); @@ -820,9 +832,10 @@ public: /// /// Runs the import process on a single file in-place. Intended primarily for autoimporting a loose file that's in the game directory. /// @param filePath, The filePath of the file to be imported in as an asset + /// @param typeHint, Optional. A string that provides a hint of the intended asset type. Such as an image being intended for GUI use. /// @return AssetId of the asset that was imported. If import failed, it will be empty. /// - StringTableEntry autoImportFile(Torque::Path filePath); + StringTableEntry autoImportFile(Torque::Path filePath, String typeHint); /// /// Runs the import process in the current session diff --git a/Engine/source/T3D/assets/assetImporter_ScriptBinding.h b/Engine/source/T3D/assets/assetImporter_ScriptBinding.h index cb0f6cadc..88125760a 100644 --- a/Engine/source/T3D/assets/assetImporter_ScriptBinding.h +++ b/Engine/source/T3D/assets/assetImporter_ScriptBinding.h @@ -47,11 +47,11 @@ DefineEngineMethod(AssetImporter, getActivityLogLine, String, (S32 i), (0), return object->getActivityLogLine(0); } -DefineEngineMethod(AssetImporter, autoImportFile, String, (String path), (""), +DefineEngineMethod(AssetImporter, autoImportFile, String, (String path, String typeHint), ("", ""), "Creates a new script asset using the targetFilePath.\n" "@return The bool result of calling exec") { - return object->autoImportFile(path); + return object->autoImportFile(path, typeHint); } DefineEngineMethod(AssetImporter, addImportingFile, AssetImportObject*, (String path), (""), diff --git a/Engine/source/T3D/assets/stateMachineAsset.cpp b/Engine/source/T3D/assets/stateMachineAsset.cpp index abe8cb416..c58b486cd 100644 --- a/Engine/source/T3D/assets/stateMachineAsset.cpp +++ b/Engine/source/T3D/assets/stateMachineAsset.cpp @@ -195,8 +195,8 @@ GuiControl* GuiInspectorTypeStateMachineAssetPtr::constructEditControl() dSprintf(szBuffer, sizeof(szBuffer), "StateMachineEditor.loadStateMachineAsset(%d.getText()); Canvas.pushDialog(StateMachineEditor);", retCtrl->getId()); mSMEdButton->setField("Command", szBuffer); - char bitmapName[512] = "tools/worldEditor/images/toolbar/shape-editor"; - mSMEdButton->setBitmap(bitmapName); + char bitmapName[512] = "ToolsModule:shape_editor_n_image"; + mSMEdButton->setBitmap(StringTable->insert(bitmapName)); mSMEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile"); mSMEdButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile"); diff --git a/Engine/source/T3D/convexShape.cpp b/Engine/source/T3D/convexShape.cpp index 90bb2bc04..99f3f418a 100644 --- a/Engine/source/T3D/convexShape.cpp +++ b/Engine/source/T3D/convexShape.cpp @@ -264,7 +264,7 @@ bool ConvexShape::protectedSetSurfaceTexture(void *object, const char *index, co surfaceMaterial surface; - surface.materialName = data; + surface._setMaterial(data); shape->mSurfaceTextures.push_back(surface); @@ -272,7 +272,7 @@ bool ConvexShape::protectedSetSurfaceTexture(void *object, const char *index, co } ConvexShape::ConvexShape() - : mMaterialName( "Grid512_OrangeLines_Mat" ), + : mMaterialInst( NULL ), //mVertCount( 0 ), //mPrimCount( 0 ), @@ -289,6 +289,8 @@ ConvexShape::ConvexShape() mSurfaceBuffers.clear(); mSurfaceUVs.clear(); mSurfaceTextures.clear(); + + INIT_MATERIALASSET(Material); } ConvexShape::~ConvexShape() @@ -310,7 +312,7 @@ void ConvexShape::initPersistFields() { addGroup( "Rendering" ); - addField( "material", TypeMaterialName, Offset( mMaterialName, ConvexShape ), "Material used to render the ConvexShape surface." ); + INITPERSISTFIELD_MATERIALASSET(Material, ConvexShape, "Default material used to render the ConvexShape surface."); endGroup( "Rendering" ); @@ -461,9 +463,7 @@ void ConvexShape::writeFields( Stream &stream, U32 tabStop ) char buffer[1024]; dMemset(buffer, 0, 1024); - const char* tex = mSurfaceTextures[i].materialName.c_str(); - - dSprintf(buffer, 1024, "surfaceTexture = \"%s\";", mSurfaceTextures[i].materialName.c_str()); + dSprintf(buffer, 1024, "surfaceTexture = \"%s\";", mSurfaceTextures[i].getMaterial()); stream.writeLine((const U8*)buffer); } @@ -528,7 +528,7 @@ U32 ConvexShape::packUpdate( NetConnection *conn, U32 mask, BitStream *stream ) if ( stream->writeFlag( mask & UpdateMask ) ) { - stream->write( mMaterialName ); + PACK_MATERIALASSET(conn, Material); U32 surfCount = mSurfaces.size(); stream->writeInt( surfCount, 32 ); @@ -556,8 +556,13 @@ U32 ConvexShape::packUpdate( NetConnection *conn, U32 mask, BitStream *stream ) //next check for any texture coord or scale mods for(U32 i=0; i < surfaceTex; i++) { - String a = mSurfaceTextures[i].materialName; - stream->write( mSurfaceTextures[i].materialName ); + if (stream->writeFlag(mSurfaceTextures[i].mMaterialAsset.notNull())) + { + NetStringHandle assetIdStr = mSurfaceTextures[i].mMaterialAsset.getAssetId(); + conn->packNetStringHandleU(stream, assetIdStr); + } + else + stream->writeString(mSurfaceTextures[i].mMaterialName); } } @@ -579,7 +584,7 @@ void ConvexShape::unpackUpdate( NetConnection *conn, BitStream *stream ) if ( stream->readFlag() ) // UpdateMask { - stream->read( &mMaterialName ); + UNPACK_MATERIALASSET(conn, Material); mSurfaces.clear(); mSurfaceUVs.clear(); @@ -619,7 +624,13 @@ void ConvexShape::unpackUpdate( NetConnection *conn, BitStream *stream ) { mSurfaceTextures.increment(); - stream->read( &mSurfaceTextures[i].materialName ); + if (stream->readFlag()) + { + mSurfaceTextures[i].mMaterialAssetId = StringTable->insert(conn->unpackNetStringHandleU(stream).getString()); + mSurfaceTextures[i]._setMaterial(mSurfaceTextures[i].mMaterialAssetId); + } + else + mSurfaceTextures[i].mMaterialName = stream->readSTString(); } if (isProperlyAdded()) @@ -1207,13 +1218,13 @@ void ConvexShape::_updateMaterial() for (U32 i = 0; igetMaterial()->getName(), String::NoCase)) + if (mSurfaceTextures[i].materialInst && + mSurfaceTextures[i].getMaterialAsset()->getMaterialDefinitionName() == mSurfaceTextures[i].materialInst->getMaterial()->getName()) continue; - Material *material; + Material* material = mSurfaceTextures[i].getMaterialResource(); - if (!Sim::findObject(mSurfaceTextures[i].materialName, material)) - //bail + if (material == nullptr) continue; mSurfaceTextures[i].materialInst = material->createMatInstance(); @@ -1229,15 +1240,15 @@ void ConvexShape::_updateMaterial() } // If the material name matches then don't bother updating it. - if (mMaterialInst && mMaterialName.equal(mMaterialInst->getMaterial()->getName(), String::NoCase)) + if (mMaterialInst && getMaterialAsset()->getMaterialDefinitionName() == mMaterialInst->getMaterial()->getName()) return; SAFE_DELETE( mMaterialInst ); - Material *material; - - if ( !Sim::findObject( mMaterialName, material ) ) - Sim::findObject( "WarningMaterial", material ); + Material* material = getMaterialResource(); + + if (material == nullptr) + return; mMaterialInst = material->createMatInstance(); @@ -2159,3 +2170,5 @@ void ConvexShape::Geometry::generate(const Vector< PlaneF > &planes, const Vecto faces.push_back( newFace ); } } + +DEF_MATERIALASSET_BINDS(ConvexShape, Material); diff --git a/Engine/source/T3D/convexShape.h b/Engine/source/T3D/convexShape.h index 3bbd2e657..22dc4553b 100644 --- a/Engine/source/T3D/convexShape.h +++ b/Engine/source/T3D/convexShape.h @@ -36,6 +36,8 @@ #include "collision/convex.h" #endif +#include "T3D/assets/MaterialAsset.h" + class ConvexShape; // Crap name, but whatcha gonna do. @@ -134,14 +136,17 @@ public: struct surfaceMaterial { // The name of the Material we will use for rendering - String materialName; + DECLARE_MATERIALASSET(surfaceMaterial, Material); + + DECLARE_MATERIALASSET_SETGET(surfaceMaterial, Material); // The actual Material instance BaseMatInstance* materialInst; surfaceMaterial() { - materialName = ""; + INIT_MATERIALASSET(Material); + materialInst = NULL; } }; @@ -258,8 +263,8 @@ protected: protected: - // The name of the Material we will use for rendering - String mMaterialName; + DECLARE_MATERIALASSET(ConvexShape, Material); + DECLARE_MATERIALASSET_SETGET(ConvexShape, Material); // The actual Material instance BaseMatInstance* mMaterialInst; diff --git a/Engine/source/T3D/debris.cpp b/Engine/source/T3D/debris.cpp index de991db51..2362fd089 100644 --- a/Engine/source/T3D/debris.cpp +++ b/Engine/source/T3D/debris.cpp @@ -109,13 +109,14 @@ DebrisData::DebrisData() minSpinSpeed = 0.0f; maxSpinSpeed = 0.0f; textureName = NULL; - shapeName = NULL; fade = true; useRadiusMass = false; baseRadius = 1.0f; gravModifier = 1.0f; terminalVelocity = 0.0f; ignoreWater = true; + + INIT_SHAPEASSET(Shape); } //#define TRACK_DEBRIS_DATA_CLONES @@ -150,8 +151,9 @@ DebrisData::DebrisData(const DebrisData& other, bool temp_clone) : GameBaseData( gravModifier = other.gravModifier; terminalVelocity = other.terminalVelocity; ignoreWater = other.ignoreWater; - shapeName = other.shapeName; - shape = other.shape; // -- TSShape loaded using shapeName + + CLONE_SHAPEASSET(Shape); + textureName = other.textureName; explosionId = other.explosionId; // -- for pack/unpack of explosion ptr explosion = other.explosion; @@ -189,12 +191,7 @@ DebrisData* DebrisData::cloneAndPerformSubstitutions(const SimObject* owner, S32 void DebrisData::onPerformSubstitutions() { - if( shapeName && shapeName[0] != '\0') - { - shape = ResourceManager::get().load(shapeName); - if( bool(shape) == false ) - Con::errorf("DebrisData::onPerformSubstitutions(): failed to load shape \"%s\"", shapeName); - } + _setShape(getShape()); } bool DebrisData::onAdd() @@ -277,20 +274,20 @@ bool DebrisData::preload(bool server, String &errorStr) if( server ) return true; - if( shapeName && shapeName[0] != '\0' && !bool(shape) ) + if (mShapeAsset.notNull()) { - shape = ResourceManager::get().load(shapeName); - if( bool(shape) == false ) + if (!mShape) { - errorStr = String::ToString("DebrisData::load: Couldn't load shape \"%s\"", shapeName); + errorStr = String::ToString("DebrisData::load: Couldn't load shape \"%s\"", mShapeAssetId); return false; } else { - TSShapeInstance* pDummy = new TSShapeInstance(shape, !server); + TSShapeInstance* pDummy = new TSShapeInstance(mShape, !server); delete pDummy; + if (!server && !mShape->preloadMaterialList(mShape.getPath()) && NetConnection::filesWereDownloaded()) + return false; } - } return true; @@ -300,9 +297,9 @@ void DebrisData::initPersistFields() { addGroup("Display"); addField("texture", TypeString, Offset(textureName, DebrisData), - "@brief Texture imagemap to use for this debris object.\n\nNot used any more.\n"); - addField("shapeFile", TypeShapeFilename, Offset(shapeName, DebrisData), - "@brief Object model to use for this debris object.\n\nThis shape is optional. You could have Debris made up of only particles.\n"); + "@brief Texture imagemap to use for this debris object.\n\nNot used any more.\n", AbstractClassRep::FIELD_HideInInspectors); + + INITPERSISTFIELD_SHAPEASSET(Shape, DebrisData, "Shape to use for this debris object."); endGroup("Display"); addGroup("Datablocks"); @@ -384,7 +381,8 @@ void DebrisData::packData(BitStream* stream) stream->write(ignoreWater); stream->writeString( textureName ); - stream->writeString( shapeName ); + + PACKDATA_SHAPEASSET(Shape); for( S32 i=0; iread(&ignoreWater); textureName = stream->readSTString(); - shapeName = stream->readSTString(); + + UNPACKDATA_SHAPEASSET(Shape); for( S32 i=0; ifriction; // Setup our bounding box - if( mDataBlock->shape ) + if( mDataBlock->mShape ) { - mObjBox = mDataBlock->shape->mBounds; + mObjBox = mDataBlock->mShape->mBounds; } else { mObjBox = Box3F(Point3F(-1, -1, -1), Point3F(1, 1, 1)); } - if( mDataBlock->shape ) + if( mDataBlock->mShape) { - mShape = new TSShapeInstance( mDataBlock->shape, true); + mShape = new TSShapeInstance( mDataBlock->mShape, true); } if( mPart ) diff --git a/Engine/source/T3D/debris.h b/Engine/source/T3D/debris.h index 87dcff2e9..cc5e25c7d 100644 --- a/Engine/source/T3D/debris.h +++ b/Engine/source/T3D/debris.h @@ -35,6 +35,8 @@ #include "T3D/gameBase/gameBase.h" #endif +#include "T3D/assets/ShapeAsset.h" + class ParticleEmitterData; class ParticleEmitter; class ExplosionData; @@ -81,8 +83,8 @@ struct DebrisData : public GameBaseData F32 terminalVelocity; // max velocity magnitude bool ignoreWater; - const char* shapeName; - Resource shape; + DECLARE_SHAPEASSET(DebrisData, Shape, onShapeChanged); + DECLARE_SHAPEASSET_SETGET(DebrisData, Shape); StringTableEntry textureName; @@ -108,6 +110,8 @@ public: DebrisData* cloneAndPerformSubstitutions(const SimObject*, S32 index=0); virtual void onPerformSubstitutions(); virtual bool allowSubstitutions() const { return true; } + + void onShapeChanged() {} }; //************************************************************************** diff --git a/Engine/source/T3D/decal/decalData.cpp b/Engine/source/T3D/decal/decalData.cpp index e517d2897..6951d76e3 100644 --- a/Engine/source/T3D/decal/decalData.cpp +++ b/Engine/source/T3D/decal/decalData.cpp @@ -76,7 +76,7 @@ ConsoleDocClass( DecalData, DecalData::DecalData() { size = 5; - materialName = ""; + INIT_MATERIALASSET(Material); lifeSpan = 5000; fadeTime = 1000; @@ -89,7 +89,6 @@ DecalData::DecalData() fadeStartPixelSize = -1.0f; fadeEndPixelSize = 200.0f; - material = NULL; matInst = NULL; renderPriority = 10; @@ -144,8 +143,7 @@ void DecalData::initPersistFields() addField( "size", TypeF32, Offset( size, DecalData ), "Width and height of the decal in meters before scale is applied." ); - addField( "material", TypeMaterialName, Offset( materialName, DecalData ), - "Material to use for this decal." ); + INITPERSISTFIELD_MATERIALASSET(Material, DecalData, "Material to use for this decal."); addField( "lifeSpan", TypeS32, Offset( lifeSpan, DecalData ), "Time (in milliseconds) before this decal will be automatically deleted." ); @@ -226,7 +224,7 @@ void DecalData::onStaticModified( const char *slotName, const char *newValue ) // To allow changing materials live. if ( dStricmp( slotName, "material" ) == 0 ) { - materialName = newValue; + _setMaterial(newValue); _updateMaterial(); } // To allow changing name live. @@ -259,7 +257,9 @@ void DecalData::packData( BitStream *stream ) stream->write( lookupName ); stream->write( size ); - stream->write( materialName ); + + PACKDATA_MATERIALASSET(Material); + stream->write( lifeSpan ); stream->write( fadeTime ); stream->write( texCoordCount ); @@ -285,8 +285,10 @@ void DecalData::unpackData( BitStream *stream ) stream->read( &lookupName ); assignName(lookupName); - stream->read( &size ); - stream->read( &materialName ); + stream->read( &size ); + + UNPACKDATA_MATERIALASSET(Material); + _updateMaterial(); stream->read( &lifeSpan ); stream->read( &fadeTime ); @@ -311,8 +313,10 @@ void DecalData::_initMaterial() { SAFE_DELETE( matInst ); - if ( material ) - matInst = material->createMatInstance(); + if (mMaterialAsset.notNull()) + { + matInst = getMaterialResource()->createMatInstance(); + } else matInst = MATMGR->createMatInstance( "WarningMaterial" ); @@ -324,7 +328,7 @@ void DecalData::_initMaterial() matInst->init( MATMGR->getDefaultFeatures(), getGFXVertexFormat() ); if( !matInst->isValid() ) { - Con::errorf( "DecalData::_initMaterial - failed to create material instance for '%s'", materialName.c_str() ); + Con::errorf( "DecalData::_initMaterial - failed to create material instance for '%s'", mMaterialAssetId ); SAFE_DELETE( matInst ); matInst = MATMGR->createMatInstance( "WarningMaterial" ); matInst->init( MATMGR->getDefaultFeatures(), getGFXVertexFormat< DecalVertex >() ); @@ -333,38 +337,29 @@ void DecalData::_initMaterial() void DecalData::_updateMaterial() { - if ( materialName.isEmpty() ) + if(mMaterialAsset.isNull()) return; - Material *pMat = NULL; - if ( !Sim::findObject( materialName, pMat ) ) - { - Con::printf( "DecalData::unpackUpdate, failed to find Material of name %s!", materialName.c_str() ); - return; - } - - material = pMat; - // Only update material instance if we have one allocated. if ( matInst ) _initMaterial(); } -Material* DecalData::getMaterial() +Material* DecalData::getMaterialDefinition() { - if ( !material ) + if ( !getMaterialResource() ) { _updateMaterial(); - if ( !material ) - material = static_cast( Sim::findObject("WarningMaterial") ); + if ( !mMaterial ) + mMaterial = static_cast( Sim::findObject("WarningMaterial") ); } - return material; + return mMaterial; } BaseMatInstance* DecalData::getMaterialInstance() { - if ( !material || !matInst || matInst->getMaterial() != material ) + if ( !mMaterial || !matInst || matInst->getMaterial() != mMaterial) _initMaterial(); return matInst; diff --git a/Engine/source/T3D/decal/decalData.h b/Engine/source/T3D/decal/decalData.h index 4eb5001a2..5c32c4427 100644 --- a/Engine/source/T3D/decal/decalData.h +++ b/Engine/source/T3D/decal/decalData.h @@ -36,6 +36,8 @@ #include "console/dynamicTypes.h" #endif +#include "T3D/assets/MaterialAsset.h" + GFXDeclareVertexFormat( DecalVertex ) { // .xyz = coords @@ -75,11 +77,8 @@ class DecalData : public SimDataBlock F32 fadeStartPixelSize; F32 fadeEndPixelSize; - /// Name of material to use. - String materialName; - - /// Render material for decal. - SimObjectPtr material; + DECLARE_MATERIALASSET(DecalData, Material); + DECLARE_MATERIALASSET_SETGET(DecalData, Material); /// Material instance for decal. BaseMatInstance *matInst; @@ -113,7 +112,7 @@ class DecalData : public SimDataBlock virtual void packData( BitStream* ); virtual void unpackData( BitStream* ); - Material* getMaterial(); + Material* getMaterialDefinition(); BaseMatInstance* getMaterialInstance(); static SimSet* getSet(); diff --git a/Engine/source/T3D/decal/decalDataFile.cpp b/Engine/source/T3D/decal/decalDataFile.cpp index 6ee7a2648..04b8656a9 100644 --- a/Engine/source/T3D/decal/decalDataFile.cpp +++ b/Engine/source/T3D/decal/decalDataFile.cpp @@ -206,8 +206,8 @@ bool DecalDataFile::read( Stream &stream ) data->lookupName = name; data->registerObject(name); Sim::getRootGroup()->addObject( data ); - data->materialName = "WarningMaterial"; - data->material = dynamic_cast(Sim::findObject("WarningMaterial")); + data->mMaterialName = "WarningMaterial"; + data->mMaterial = dynamic_cast(Sim::findObject("WarningMaterial")); Con::errorf( "DecalDataFile::read() - DecalData %s does not exist! Temporarily created %s_missing.", lookupName.c_str(), lookupName.c_str()); } diff --git a/Engine/source/T3D/decal/decalManager.cpp b/Engine/source/T3D/decal/decalManager.cpp index 2ea8f5b68..6d8c3b90b 100644 --- a/Engine/source/T3D/decal/decalManager.cpp +++ b/Engine/source/T3D/decal/decalManager.cpp @@ -186,7 +186,7 @@ S32 QSORT_CALLBACK cmpDecalRenderOrder( const void *p1, const void *p2 ) if ( (*pd2)->mFlags & SaveDecal ) { - S32 id = ( (*pd1)->mDataBlock->getMaterial()->getId() - (*pd2)->mDataBlock->getMaterial()->getId() ); + S32 id = ( (*pd1)->mDataBlock->getMaterialDefinition()->getId() - (*pd2)->mDataBlock->getMaterialDefinition()->getId() ); if ( id != 0 ) return id; @@ -1225,7 +1225,7 @@ void DecalManager::prepRenderImage( SceneRenderState* state ) { DecalInstance *decal = mDecalQueue[i]; DecalData *data = decal->mDataBlock; - Material *mat = data->getMaterial(); + Material *mat = data->getMaterialDefinition(); if ( currentBatch == NULL ) { diff --git a/Engine/source/T3D/examples/renderMeshExample.cpp b/Engine/source/T3D/examples/renderMeshExample.cpp index 49094598d..772c7bae6 100644 --- a/Engine/source/T3D/examples/renderMeshExample.cpp +++ b/Engine/source/T3D/examples/renderMeshExample.cpp @@ -59,11 +59,7 @@ RenderMeshExample::RenderMeshExample() // Set it as a "static" object that casts shadows mTypeMask |= StaticObjectType | StaticShapeObjectType; - // Make sure we the Material instance to NULL - // so we don't try to access it incorrectly - mMaterialInst = NULL; - - initMaterialAsset(Material); + INIT_MATERIALASSET(Material); } RenderMeshExample::~RenderMeshExample() @@ -78,7 +74,7 @@ RenderMeshExample::~RenderMeshExample() void RenderMeshExample::initPersistFields() { addGroup( "Rendering" ); - scriptBindMaterialAsset(Material, RenderMeshExample, "The material used to render the mesh."); + INITPERSISTFIELD_MATERIALASSET(Material, RenderMeshExample, "The material used to render the mesh."); endGroup( "Rendering" ); // SceneObject already handles exposing the transform @@ -147,7 +143,7 @@ U32 RenderMeshExample::packUpdate( NetConnection *conn, U32 mask, BitStream *str // Write out any of the updated editable properties if (stream->writeFlag(mask & UpdateMask)) { - packMaterialAsset(conn, Material); + PACK_MATERIALASSET(conn, Material); } return retMask; @@ -168,7 +164,7 @@ void RenderMeshExample::unpackUpdate(NetConnection *conn, BitStream *stream) if ( stream->readFlag() ) // UpdateMask { - unpackMaterialAsset(conn, Material); + UNPACK_MATERIALASSET(conn, Material); if ( isProperlyAdded() ) updateMaterial(); diff --git a/Engine/source/T3D/examples/renderMeshExample.h b/Engine/source/T3D/examples/renderMeshExample.h index 611a2de65..1c20e4bfe 100644 --- a/Engine/source/T3D/examples/renderMeshExample.h +++ b/Engine/source/T3D/examples/renderMeshExample.h @@ -64,18 +64,18 @@ class RenderMeshExample : public SceneObject NextFreeMask = Parent::NextFreeMask << 2 }; - //-------------------------------------------------------------------------- - // Rendering variables - //-------------------------------------------------------------------------- - DECLARE_NET_MATERIALASSET(RenderMeshExample, Material, UpdateMask); - - // The actual Material instance - BaseMatInstance* mMaterialInst; - // Define our vertex format here so we don't have to // change it in multiple spots later typedef GFXVertexPNT VertexType; + //-------------------------------------------------------------------------- + // Rendering variables + //-------------------------------------------------------------------------- + BaseMatInstance* mMaterialInst; + + DECLARE_MATERIALASSET(RenderMeshExample, Material); + DECLARE_MATERIALASSET_NET_SETGET(RenderMeshExample, Material, UpdateMask); + // The GFX vertex and primitive buffers GFXVertexBufferHandle< VertexType > mVertexBuffer; GFXPrimitiveBufferHandle mPrimitiveBuffer; diff --git a/Engine/source/T3D/examples/renderShapeExample.cpp b/Engine/source/T3D/examples/renderShapeExample.cpp index 5f0847b90..faf2f9b3f 100644 --- a/Engine/source/T3D/examples/renderShapeExample.cpp +++ b/Engine/source/T3D/examples/renderShapeExample.cpp @@ -72,8 +72,7 @@ RenderShapeExample::~RenderShapeExample() void RenderShapeExample::initPersistFields() { addGroup( "Rendering" ); - addField( "shapeFile", TypeStringFilename, Offset( mShapeFile, RenderShapeExample ), - "The path to the DTS shape file." ); + INITPERSISTFIELD_SHAPEASSET(Shape, RenderShapeExample, "The path to the shape file.") endGroup( "Rendering" ); // SceneObject already handles exposing the transform @@ -146,7 +145,7 @@ U32 RenderShapeExample::packUpdate( NetConnection *conn, U32 mask, BitStream *st // Write out any of the updated editable properties if ( stream->writeFlag( mask & UpdateMask ) ) { - stream->write( mShapeFile ); + PACK_SHAPEASSET(conn, Shape); // Allow the server object a chance to handle a new shape createShape(); @@ -170,7 +169,7 @@ void RenderShapeExample::unpackUpdate(NetConnection *conn, BitStream *stream) if ( stream->readFlag() ) // UpdateMask { - stream->read( &mShapeFile ); + UNPACK_SHAPEASSET(conn, Shape); if ( isProperlyAdded() ) createShape(); @@ -182,33 +181,22 @@ void RenderShapeExample::unpackUpdate(NetConnection *conn, BitStream *stream) //----------------------------------------------------------------------------- void RenderShapeExample::createShape() { - if ( mShapeFile.isEmpty() ) + if ( getShape() == StringTable->EmptyString() ) return; // If this is the same shape then no reason to update it - if ( mShapeInstance && mShapeFile.equal( mShape.getPath().getFullPath(), String::NoCase ) ) + if ( mShapeInstance && getShape() == StringTable->insert(mShape.getPath().getFullPath().c_str()) ) return; // Clean up our previous shape if ( mShapeInstance ) SAFE_DELETE( mShapeInstance ); - mShape = NULL; - - // Attempt to get the resource from the ResourceManager - mShape = ResourceManager::get().load( mShapeFile ); - - if ( !mShape ) - { - Con::errorf( "RenderShapeExample::createShape() - Unable to load shape: %s", mShapeFile.c_str() ); - return; - } // Attempt to preload the Materials for this shape if ( isClientObject() && !mShape->preloadMaterialList( mShape.getPath() ) && NetConnection::filesWereDownloaded() ) { - mShape = NULL; return; } diff --git a/Engine/source/T3D/examples/renderShapeExample.h b/Engine/source/T3D/examples/renderShapeExample.h index 255d39045..9c03cbc72 100644 --- a/Engine/source/T3D/examples/renderShapeExample.h +++ b/Engine/source/T3D/examples/renderShapeExample.h @@ -30,6 +30,8 @@ #include "ts/tsShapeInstance.h" #endif +#include "T3D/assets/ShapeAsset.h" + //----------------------------------------------------------------------------- // This class implements a basic SceneObject that can exist in the world at a // 3D position and render itself. There are several valid ways to render an @@ -59,12 +61,13 @@ class RenderShapeExample : public SceneObject //-------------------------------------------------------------------------- // Rendering variables //-------------------------------------------------------------------------- - // The name of the shape file we will use for rendering - String mShapeFile; + DECLARE_SHAPEASSET(RenderShapeExample, Shape, onShapeChanged); + DECLARE_SHAPEASSET_SETGET(RenderShapeExample, Shape); + // The actual shape instance TSShapeInstance* mShapeInstance; - // Store the resource so we can access the filename later - Resource mShape; + + void onShapeChanged() {} public: RenderShapeExample(); diff --git a/Engine/source/T3D/fx/explosion.cpp b/Engine/source/T3D/fx/explosion.cpp index be9badc73..aa86e27a9 100644 --- a/Engine/source/T3D/fx/explosion.cpp +++ b/Engine/source/T3D/fx/explosion.cpp @@ -225,7 +225,6 @@ ConsoleDocClass( ExplosionData, ExplosionData::ExplosionData() { - dtsFileName = NULL; particleDensity = 10; particleRadius = 1.0f; @@ -238,7 +237,8 @@ ExplosionData::ExplosionData() explosionScale.set(1.0f, 1.0f, 1.0f); playSpeed = 1.0f; - explosionShape = NULL; + INIT_SHAPEASSET(ExplosionShape); + explosionAnimation = -1; dMemset( emitterList, 0, sizeof( emitterList ) ); @@ -305,7 +305,6 @@ ExplosionData::ExplosionData(const ExplosionData& other, bool temp_clone) : Game Con::errorf("ExplosionData -- Clones are on the loose!"); #endif - dtsFileName = other.dtsFileName; faceViewer = other.faceViewer; particleDensity = other.particleDensity; particleRadius = other.particleRadius; @@ -314,7 +313,7 @@ ExplosionData::ExplosionData(const ExplosionData& other, bool temp_clone) : Game particleEmitterId = other.particleEmitterId; // -- for pack/unpack of particleEmitter ptr explosionScale = other.explosionScale; playSpeed = other.playSpeed; - explosionShape = other.explosionShape; // -- TSShape loaded using dtsFileName + CLONE_SHAPEASSET(ExplosionShape); explosionAnimation = other.explosionAnimation; // -- from explosionShape sequence "ambient" dMemcpy( emitterList, other.emitterList, sizeof( emitterList ) ); dMemcpy( emitterIDList, other.emitterIDList, sizeof( emitterIDList ) ); // -- for pack/unpack of emitterList ptrs @@ -392,10 +391,9 @@ ExplosionData* ExplosionData::cloneAndPerformSubstitutions(const SimObject* owne void ExplosionData::initPersistFields() { - addField( "explosionShape", TypeShapeFilename, Offset(dtsFileName, ExplosionData), - "@brief Optional DTS or DAE shape to place at the center of the explosion.\n\n" - "The ambient animation of this model will be played automatically at " - "the start of the explosion." ); + INITPERSISTFIELD_SHAPEASSET(ExplosionShape, ExplosionData, "@brief Optional shape asset to place at the center of the explosion.\n\n" + "The ambient animation of this model will be played automatically at the start of the explosion."); + addField( "explosionScale", TypePoint3F, Offset(explosionScale, ExplosionData), "\"X Y Z\" scale factor applied to the explosionShape model at the start " "of the explosion." ); @@ -656,7 +654,7 @@ void ExplosionData::packData(BitStream* stream) { Parent::packData(stream); - stream->writeString(dtsFileName); + PACKDATA_SHAPEASSET(ExplosionShape); sfxWrite( stream, soundProfile ); if (stream->writeFlag(particleEmitter)) @@ -759,7 +757,7 @@ void ExplosionData::unpackData(BitStream* stream) { Parent::unpackData(stream); - dtsFileName = stream->readSTString(); + UNPACKDATA_SHAPEASSET(ExplosionShape); sfxRead( stream, &soundProfile ); @@ -874,22 +872,16 @@ bool ExplosionData::preload(bool server, String &errorStr) Con::errorf(ConsoleLogEntry::General, "Error, unable to load particle emitter for explosion datablock"); } - if (dtsFileName && dtsFileName[0]) { - explosionShape = ResourceManager::get().load(dtsFileName); - if (!bool(explosionShape)) { - errorStr = String::ToString("ExplosionData: Couldn't load shape \"%s\"", dtsFileName); - return false; - } + if (mExplosionShapeAsset.notNull()) { // Resolve animations - explosionAnimation = explosionShape->findSequence("ambient"); + explosionAnimation = mExplosionShape->findSequence("ambient"); // Preload textures with a dummy instance... - TSShapeInstance* pDummy = new TSShapeInstance(explosionShape, !server); + TSShapeInstance* pDummy = new TSShapeInstance(mExplosionShape, !server); delete pDummy; } else { - explosionShape = NULL; explosionAnimation = -1; } @@ -1377,8 +1369,8 @@ bool Explosion::explode() launchDebris( mInitialNormal ); spawnSubExplosions(); - if (bool(mDataBlock->explosionShape) && mDataBlock->explosionAnimation != -1) { - mExplosionInstance = new TSShapeInstance(mDataBlock->explosionShape, true); + if (bool(mDataBlock->mExplosionShape) && mDataBlock->explosionAnimation != -1) { + mExplosionInstance = new TSShapeInstance(mDataBlock->mExplosionShape, true); mExplosionThread = mExplosionInstance->addThread(); mExplosionInstance->setSequence(mExplosionThread, mDataBlock->explosionAnimation, 0); @@ -1388,7 +1380,7 @@ bool Explosion::explode() mEndingMS = U32(mExplosionInstance->getScaledDuration(mExplosionThread) * 1000.0f); mObjScale.convolve(mDataBlock->explosionScale); - mObjBox = mDataBlock->explosionShape->mBounds; + mObjBox = mDataBlock->mExplosionShape->mBounds; resetWorldBox(); } diff --git a/Engine/source/T3D/fx/explosion.h b/Engine/source/T3D/fx/explosion.h index df4396a76..a82d28644 100644 --- a/Engine/source/T3D/fx/explosion.h +++ b/Engine/source/T3D/fx/explosion.h @@ -41,6 +41,8 @@ #include "lighting/lightInfo.h" #endif +#include "T3D/assets/ShapeAsset.h" + class ParticleEmitter; class ParticleEmitterData; class TSThread; @@ -62,8 +64,6 @@ class ExplosionData : public GameBaseData { }; public: - StringTableEntry dtsFileName; - bool faceViewer; S32 particleDensity; @@ -76,7 +76,9 @@ class ExplosionData : public GameBaseData { Point3F explosionScale; F32 playSpeed; - Resource explosionShape; + DECLARE_SHAPEASSET(ExplosionData, ExplosionShape, onShapeChanged); + DECLARE_SHAPEASSET_SETGET(ExplosionData, ExplosionShape); + S32 explosionAnimation; ParticleEmitterData* emitterList[EC_NUM_EMITTERS]; @@ -137,6 +139,8 @@ public: /*D*/ ~ExplosionData(); ExplosionData* cloneAndPerformSubstitutions(const SimObject*, S32 index=0); virtual bool allowSubstitutions() const { return true; } + + void onShapeChanged() {} }; diff --git a/Engine/source/T3D/fx/groundCover.cpp b/Engine/source/T3D/fx/groundCover.cpp index 5fa81914e..41f8a8c1a 100644 --- a/Engine/source/T3D/fx/groundCover.cpp +++ b/Engine/source/T3D/fx/groundCover.cpp @@ -49,6 +49,7 @@ #include "materials/matInstance.h" #include "renderInstance/renderDeferredMgr.h" #include "console/engineAPI.h" +#include "T3D/assets/MaterialAsset.h" /// This is used for rendering ground cover billboards. GFXImplementVertexFormat( GCVertex ) @@ -458,9 +459,9 @@ GroundCover::GroundCover() mRandomSeed = 1; - initMaterialAsset(Material); + INIT_MATERIALASSET(Material); + mMaterialInst = NULL; - mMatInst = NULL; mMatParams = NULL; mTypeRectsParam = NULL; mFadeParams = NULL; @@ -519,7 +520,8 @@ GroundCover::GroundCover() mBillboardRects[i].point.set( 0.0f, 0.0f ); mBillboardRects[i].extent.set( 1.0f, 1.0f ); - mShapeFilenames[i] = NULL; + INIT_SHAPEASSET_ARRAY(Shape, i); + mShapeInstances[i] = NULL; mBillboardAspectScales[i] = 1.0f; @@ -530,7 +532,7 @@ GroundCover::GroundCover() GroundCover::~GroundCover() { - SAFE_DELETE( mMatInst ); + SAFE_DELETE( mMaterialInst ); } IMPLEMENT_CO_NETOBJECT_V1(GroundCover); @@ -539,7 +541,7 @@ void GroundCover::initPersistFields() { addGroup( "GroundCover General" ); - scriptBindMaterialAsset(Material, GroundCover, "Material used by all GroundCover segments."); + INITPERSISTFIELD_MATERIALASSET(Material, GroundCover, "Material used by all GroundCover segments."); addField( "radius", TypeF32, Offset( mRadius, GroundCover ), "Outer generation radius from the current camera position." ); addField( "dissolveRadius",TypeF32, Offset( mFadeRadius, GroundCover ), "This is less than or equal to radius and defines when fading of cover elements begins." ); @@ -559,7 +561,8 @@ void GroundCover::initPersistFields() addField( "billboardUVs", TypeRectUV, Offset( mBillboardRects, GroundCover ), MAX_COVERTYPES, "Subset material UV coordinates for this cover billboard." ); - addField( "shapeFilename", TypeFilename, Offset( mShapeFilenames, GroundCover ), MAX_COVERTYPES, "The cover shape filename. [Optional]" ); + addField("shapeFilename", TypeFilename, Offset(mShapeName, GroundCover), MAX_COVERTYPES, "The cover shape filename. [Optional]", AbstractClassRep::FIELD_HideInInspectors); + INITPERSISTFIELD_SHAPEASSET_ARRAY(Shape, MAX_COVERTYPES, GroundCover, "The cover shape. [Optional]"); addField( "layer", TypeTerrainMaterialName, Offset( mLayer, GroundCover ), MAX_COVERTYPES, "Terrain material name to limit coverage to, or blank to not limit." ); @@ -710,7 +713,7 @@ U32 GroundCover::packUpdate( NetConnection *connection, U32 mask, BitStream *str // TODO: We could probably optimize a few of these // based on reasonable units at some point. - packMaterialAsset(connection, Material); + PACK_MATERIALASSET(connection, Material); stream->write( mRadius ); stream->write( mZOffset ); @@ -741,11 +744,11 @@ U32 GroundCover::packUpdate( NetConnection *connection, U32 mask, BitStream *str stream->write( mMinSlope[i] ); stream->write( mMaxSlope[i] ); - stream->writeFlag(mConformToNormal[i]); - stream->write(mMinRotX[i]); - stream->write(mMaxRotX[i]); - stream->write(mMinRotY[i]); - stream->write(mMaxRotY[i]); + stream->writeFlag(mConformToNormal[i]); + stream->write(mMinRotX[i]); + stream->write(mMaxRotX[i]); + stream->write(mMinRotY[i]); + stream->write(mMaxRotY[i]); stream->write( mMinElevation[i] ); stream->write( mMaxElevation[i] ); @@ -763,7 +766,7 @@ U32 GroundCover::packUpdate( NetConnection *connection, U32 mask, BitStream *str stream->write( mBillboardRects[i].extent.x ); stream->write( mBillboardRects[i].extent.y ); - stream->writeString( mShapeFilenames[i] ); + PACK_SHAPEASSET_ARRAY(connection, Shape, i); } stream->writeFlag( mDebugRenderCells ); @@ -781,7 +784,7 @@ void GroundCover::unpackUpdate( NetConnection *connection, BitStream *stream ) if (stream->readFlag()) { - unpackMaterialAsset(connection, Material); + UNPACK_MATERIALASSET(connection, Material); stream->read( &mRadius ); stream->read( &mZOffset ); @@ -812,11 +815,11 @@ void GroundCover::unpackUpdate( NetConnection *connection, BitStream *stream ) stream->read( &mMinSlope[i] ); stream->read( &mMaxSlope[i] ); - mConformToNormal[i] = stream->readFlag(); - stream->read(&mMinRotX[i]); - stream->read(&mMaxRotX[i]); - stream->read(&mMinRotY[i]); - stream->read(&mMaxRotY[i]); + mConformToNormal[i] = stream->readFlag(); + stream->read(&mMinRotX[i]); + stream->read(&mMaxRotX[i]); + stream->read(&mMinRotY[i]); + stream->read(&mMaxRotY[i]); stream->read( &mMinElevation[i] ); stream->read( &mMaxElevation[i] ); @@ -834,7 +837,7 @@ void GroundCover::unpackUpdate( NetConnection *connection, BitStream *stream ) stream->read( &mBillboardRects[i].extent.x ); stream->read( &mBillboardRects[i].extent.y ); - mShapeFilenames[i] = stream->readSTString(); + UNPACK_SHAPEASSET_ARRAY(connection, Shape, i); } mDebugRenderCells = stream->readFlag(); @@ -854,28 +857,12 @@ void GroundCover::unpackUpdate( NetConnection *connection, BitStream *stream ) void GroundCover::_initMaterial() { - if (mMaterialAsset.notNull()) - { - if (mMatInst && String(mMaterialAsset->getMaterialDefinitionName()).equal(mMatInst->getMaterial()->getName(), String::NoCase)) - return; + SAFE_DELETE(mMaterialInst); - SAFE_DELETE(mMatInst); - - if (!Sim::findObject(mMaterialAsset->getMaterialDefinitionName(), mMaterial)) - Con::errorf("GroundCover::_initMaterial - Material %s was not found.", mMaterialAsset->getMaterialDefinitionName()); - - if (mMaterial) - mMatInst = mMaterial->createMatInstance(); - else - mMatInst = MATMGR->createMatInstance("WarningMaterial"); - - if (!mMatInst) - Con::errorf("GroundCover::_initMaterial - no Material called '%s'", mMaterialAsset->getMaterialDefinitionName()); - } + if (mMaterialAsset.notNull() && mMaterialAsset->getStatus() == MaterialAsset::Ok) + mMaterialInst = mMaterial->createMatInstance(); else - { - return; - } + mMaterialInst = MATMGR->createMatInstance("WarningMaterial"); // Add our special feature that makes it all work... FeatureSet features = MATMGR->getDefaultFeatures(); @@ -883,10 +870,10 @@ void GroundCover::_initMaterial() // Our feature requires a pointer back to this object // to properly setup its shader consts. - mMatInst->setUserObject( this ); + mMaterialInst->setUserObject( this ); // DO IT! - mMatInst->init( features, getGFXVertexFormat() ); + mMaterialInst->init( features, getGFXVertexFormat() ); } void GroundCover::_initShapes() @@ -895,25 +882,17 @@ void GroundCover::_initShapes() for ( S32 i=0; i < MAX_COVERTYPES; i++ ) { - if ( !mShapeFilenames[i] || !mShapeFilenames[i][0] ) + if ( mShapeAsset[i].isNull() || mShape[i] == nullptr) continue; - // Load the shape. - Resource shape = ResourceManager::get().load(mShapeFilenames[i]); - if ( !(bool)shape ) + if ( isClientObject() && !mShape[i]->preloadMaterialList(mShape[i].getPath()) && NetConnection::filesWereDownloaded() ) { - Con::warnf( "GroundCover::_initShapes() unable to load shape: %s", mShapeFilenames[i] ); - continue; - } - - if ( isClientObject() && !shape->preloadMaterialList(shape.getPath()) && NetConnection::filesWereDownloaded() ) - { - Con::warnf( "GroundCover::_initShapes() material preload failed for shape: %s", mShapeFilenames[i] ); + Con::warnf( "GroundCover::_initShapes() material preload failed for shape: %s", mShapeAssetId[i] ); continue; } // Create the shape instance. - mShapeInstances[i] = new TSShapeInstance( shape, isClientObject() ); + mShapeInstances[i] = new TSShapeInstance(mShape[i], isClientObject() ); } } @@ -982,16 +961,16 @@ void GroundCover::_initialize( U32 cellCount, U32 cellPlacementCount ) // Rebuild the texture aspect scales for each type. F32 textureAspect = 1.0f; - if( mMatInst && mMatInst->isValid()) + if( mMaterialInst && mMaterialInst->isValid()) { - Material* mat = dynamic_cast(mMatInst->getMaterial()); + Material* mat = dynamic_cast(mMaterialInst->getMaterial()); if(mat) { GFXTexHandle tex; - if (!mat->mDiffuseMapFilename[0].isEmpty()) - tex = GFXTexHandle(mat->mDiffuseMapFilename[0], &GFXStaticTextureSRGBProfile, "GroundCover texture aspect ratio check"); - else if (!mat->mDiffuseMapAsset[0].isNull()) - tex = mat->mDiffuseMapAsset[0]->getImage(GFXStaticTextureSRGBProfile); + if (mat->getDiffuseMapResource(0)) + tex = mat->getDiffuseMapResource(0); + else if (mat->getDiffuseMap(0) != StringTable->EmptyString()) + tex = GFXTexHandle(mat->getDiffuseMap(0), &GFXStaticTextureSRGBProfile, "GroundCover texture aspect ratio check"); if(tex.isValid()) { @@ -1580,7 +1559,7 @@ void GroundCover::_updateCoverGrid( const Frustum &culler ) void GroundCover::prepRenderImage( SceneRenderState *state ) { // Reset stats each time we hit the diffuse pass. - if (mMatInst == nullptr) + if (mMaterialInst == nullptr) return; if( state->isDiffusePass() ) @@ -1617,7 +1596,7 @@ void GroundCover::prepRenderImage( SceneRenderState *state ) // Render billboards but not into shadow passes. - if ( !state->isShadowPass() && mMatInst->isValid() && !mDebugNoBillboards ) + if ( !state->isShadowPass() && mMaterialInst->isValid() && !mDebugNoBillboards ) { PROFILE_SCOPE( GroundCover_RenderBillboards ); @@ -1692,7 +1671,7 @@ void GroundCover::prepRenderImage( SceneRenderState *state ) if ( mCuller.isCulled( cell->getRenderBounds() ) ) continue; - cell->renderBillboards( state, mMatInst, &mPrimBuffer ); + cell->renderBillboards( state, mMaterialInst, &mPrimBuffer ); } } diff --git a/Engine/source/T3D/fx/groundCover.h b/Engine/source/T3D/fx/groundCover.h index cf9d2a4f4..fbf6bf263 100644 --- a/Engine/source/T3D/fx/groundCover.h +++ b/Engine/source/T3D/fx/groundCover.h @@ -45,7 +45,7 @@ #include "shaderGen/shaderFeature.h" #endif -#include "T3D/assets/MaterialAsset.h" +#include "T3D/assets/ShapeAsset.h" class TerrainBlock; class GroundCoverCell; @@ -266,9 +266,10 @@ protected: static F32 smDensityScale; static F32 smFadeScale; - DECLARE_NET_MATERIALASSET(GroundCover, Material, InitialUpdateMask); - Material* mMaterial; - BaseMatInstance *mMatInst; + BaseMatInstance* mMaterialInst; + + DECLARE_MATERIALASSET(GroundCover, Material); + DECLARE_MATERIALASSET_NET_SETGET(GroundCover, Material, InitialUpdateMask); GroundCoverShaderConstData mShaderConstData; @@ -339,7 +340,8 @@ protected: RectF mBillboardRects[MAX_COVERTYPES]; /// The cover shape filenames. - StringTableEntry mShapeFilenames[MAX_COVERTYPES]; + DECLARE_SHAPEASSET_ARRAY(GroundCover, Shape, MAX_COVERTYPES); + DECLARE_SHAPEASSET_ARRAY_NET_SETGET(GroundCover, Shape, -1); /// The cover shape instances. TSShapeInstance* mShapeInstances[MAX_COVERTYPES]; diff --git a/Engine/source/T3D/fx/particle.cpp b/Engine/source/T3D/fx/particle.cpp index 66539ab24..7cfa7e182 100644 --- a/Engine/source/T3D/fx/particle.cpp +++ b/Engine/source/T3D/fx/particle.cpp @@ -121,10 +121,10 @@ ParticleData::ParticleData() animTexTiling.set(0,0); // tiling dimensions animTexFramesString = NULL; // string of animation frame indices animTexUVs = NULL; // array of tile vertex UVs - textureName = NULL; // texture filename - textureHandle = NULL; // loaded texture handle - textureExtName = NULL; - textureExtHandle = NULL; + + INIT_IMAGEASSET(Texture); + INIT_IMAGEASSET(TextureExt); + constrain_pos = false; start_angle = 0.0f; angle_variance = 0.0f; @@ -203,11 +203,13 @@ void ParticleData::initPersistFields() "animTexFrames = \"0-16 20 19 18 17 31-21\";\n" "@endtsexample\n" ); - addField( "textureName", TYPEID< StringTableEntry >(), Offset(textureName, ParticleData), - "Texture file to use for this particle." ); - addField( "animTexName", TYPEID< StringTableEntry >(), Offset(textureName, ParticleData), + addProtectedField( "textureName", TYPEID< StringTableEntry >(), Offset(mTextureName, ParticleData), _setTextureData, defaultProtectedGetFn, + "Texture file to use for this particle.", AbstractClassRep::FIELD_HideInInspectors ); + addField( "animTexName", TYPEID< StringTableEntry >(), Offset(mTextureName, ParticleData), "@brief Texture file to use for this particle if animateTexture is true.\n\n" - "Deprecated. Use textureName instead." ); + "Deprecated. Use textureName instead.", AbstractClassRep::FIELD_HideInInspectors); + INITPERSISTFIELD_IMAGEASSET(Texture, ParticleData, "Texture to use for this particle."); + // Interpolation variables addField( "colors", TYPEID< LinearColorF >(), Offset(colors, ParticleData), PDC_NUM_KEYS, @@ -224,8 +226,9 @@ void ParticleData::initPersistFields() "@brief Time keys used with the colors and sizes keyframes.\n\n" "Values are from 0.0 (particle creation) to 1.0 (end of lifespace)." ); - addGroup("AFX"); - addField("textureExtName", TypeFilename, Offset(textureExtName, ParticleData)); + addGroup("AFX"); + addProtectedField("textureExtName", TypeFilename, Offset(mTextureExtName, ParticleData), _setTextureExtData, &defaultProtectedGetFn, "", AbstractClassRep::FIELD_HideInInspectors); + INITPERSISTFIELD_IMAGEASSET(TextureExt, ParticleData, ""); addField("constrainPos", TypeBool, Offset(constrain_pos, ParticleData)); addField("angle", TypeF32, Offset(start_angle, ParticleData)); addField("angleVariance", TypeF32, Offset(angle_variance, ParticleData)); @@ -290,8 +293,8 @@ void ParticleData::packData(BitStream* stream) stream->writeFloat( times[i], 8); } - if (stream->writeFlag(textureName && textureName[0])) - stream->writeString(textureName); + //PACKDATA_IMAGEASSET(Texture); + for (i = 0; i < 4; i++) mathWrite(*stream, texCoords[i]); if (stream->writeFlag(animateTexture)) @@ -303,8 +306,9 @@ void ParticleData::packData(BitStream* stream) mathWrite(*stream, animTexTiling); stream->writeInt(framesPerSec, 8); } - if (stream->writeFlag(textureExtName && textureExtName[0])) - stream->writeString(textureExtName); + + //PACKDATA_IMAGEASSET(TextureExt); + stream->writeFlag(constrain_pos); stream->writeFloat(start_angle/360.0f, 11); stream->writeFloat(angle_variance/180.0f, 10); @@ -373,7 +377,9 @@ void ParticleData::unpackData(BitStream* stream) sizes[i] = stream->readFloat(16) * MaxParticleSize; times[i] = stream->readFloat(8); } - textureName = (stream->readFlag()) ? stream->readSTString() : 0; + + //UNPACKDATA_IMAGEASSET(Texture); + for (i = 0; i < 4; i++) mathRead(*stream, &texCoords[i]); @@ -384,7 +390,9 @@ void ParticleData::unpackData(BitStream* stream) mathRead(*stream, &animTexTiling); framesPerSec = stream->readInt(8); } - textureExtName = (stream->readFlag()) ? stream->readSTString() : 0; + + //UNPACKDATA_IMAGEASSET(Texture); + constrain_pos = stream->readFlag(); start_angle = 360.0f*stream->readFloat(11); angle_variance = 180.0f*stream->readFloat(10); @@ -556,27 +564,6 @@ bool ParticleData::preload(bool server, String &errorStr) bool error = false; if(!server) { - // Here we attempt to load the particle's texture if specified. An undefined - // texture is *not* an error since the emitter may provide one. - if (textureName && textureName[0]) - { - textureHandle = GFXTexHandle(textureName, &GFXStaticTextureSRGBProfile, avar("%s() - textureHandle (line %d)", __FUNCTION__, __LINE__)); - if (!textureHandle) - { - errorStr = String::ToString("Missing particle texture: %s", textureName); - error = true; - } - } - if (textureExtName && textureExtName[0]) - { - textureExtHandle = GFXTexHandle(textureExtName, &GFXStaticTextureSRGBProfile, avar("%s() - textureExtHandle (line %d)", __FUNCTION__, __LINE__)); - if (!textureExtHandle) - { - errorStr = String::ToString("Missing particle texture: %s", textureName); - error = true; - } - } - if (animateTexture) { // Here we parse animTexFramesString into byte-size frame numbers in animTexFrames. @@ -698,15 +685,14 @@ void ParticleData::initializeParticle(Particle* init, const Point3F& inheritVelo bool ParticleData::reload(char errorBuffer[256]) { bool error = false; - if (textureName && textureName[0]) + + StringTableEntry particleTex = getTexture(); + + if (!_setTexture(particleTex)) { - textureHandle = GFXTexHandle(textureName, &GFXStaticTextureSRGBProfile, avar("%s() - textureHandle (line %d)", __FUNCTION__, __LINE__)); - if (!textureHandle) - { - dSprintf(errorBuffer, 256, "Missing particle texture: %s", textureName); - error = true; - } - } + dSprintf(errorBuffer, 256, "Missing particle texture: %s", particleTex); + } + /* numFrames = 0; for( S32 i=0; i animTexFrames; - StringTableEntry textureName; - GFXTexHandle textureHandle; - static bool protectedSetSizes( void *object, const char *index, const char *data ); - static bool protectedSetTimes( void *object, const char *index, const char *data ); + DECLARE_IMAGEASSET(ParticleData, Texture, onImageChanged, GFXStaticTextureSRGBProfile); + DECLARE_IMAGEASSET_SETGET(ParticleData, Texture); - public: + static bool protectedSetSizes(void* object, const char* index, const char* data); + static bool protectedSetTimes(void* object, const char* index, const char* data); + + void onImageChanged() {} + +public: ParticleData(); ~ParticleData(); @@ -111,9 +116,10 @@ class ParticleData : public SimDataBlock protected: F32 spinBias; bool randomizeSpinDir; - StringTableEntry textureExtName; public: - GFXTexHandle textureExtHandle; + DECLARE_IMAGEASSET(ParticleData, TextureExt, onImageChanged, GFXStaticTextureSRGBProfile); + DECLARE_IMAGEASSET_SETGET(ParticleData, TextureExt); + bool constrain_pos; F32 start_angle; F32 angle_variance; diff --git a/Engine/source/T3D/fx/particleEmitter.cpp b/Engine/source/T3D/fx/particleEmitter.cpp index 3af8df7c1..5f7b0829d 100644 --- a/Engine/source/T3D/fx/particleEmitter.cpp +++ b/Engine/source/T3D/fx/particleEmitter.cpp @@ -741,11 +741,11 @@ bool ParticleEmitterData::preload(bool server, String &errorStr) // otherwise, check that all particles refer to the same texture else if (particleDataBlocks.size() > 1) { - StringTableEntry txr_name = particleDataBlocks[0]->textureName; + StringTableEntry txr_name = particleDataBlocks[0]->getTexture(); for (S32 i = 1; i < particleDataBlocks.size(); i++) { // warn if particle textures are inconsistent - if (particleDataBlocks[i]->textureName != txr_name) + if (particleDataBlocks[i]->getTexture() != txr_name) { Con::warnf(ConsoleLogEntry::General, "ParticleEmitterData(%s) particles reference different textures.", getName()); break; @@ -1225,7 +1225,7 @@ void ParticleEmitter::prepRenderImage(SceneRenderState* state) if (mDataBlock->textureHandle) ri->diffuseTex = &*(mDataBlock->textureHandle); else - ri->diffuseTex = &*(part_list_head.next->dataBlock->textureHandle); + ri->diffuseTex = &*(part_list_head.next->dataBlock->getTextureResource()); ri->softnessDistance = mDataBlock->softnessDistance; diff --git a/Engine/source/T3D/fx/precipitation.cpp b/Engine/source/T3D/fx/precipitation.cpp index 7c022b528..caebe48cd 100644 --- a/Engine/source/T3D/fx/precipitation.cpp +++ b/Engine/source/T3D/fx/precipitation.cpp @@ -129,9 +129,12 @@ PrecipitationData::PrecipitationData() { soundProfile = NULL; - mDropName = StringTable->EmptyString(); + INIT_IMAGEASSET(Drop); + mDropShaderName = StringTable->EmptyString(); - mSplashName = StringTable->EmptyString(); + + INIT_IMAGEASSET(Splash); + mSplashShaderName = StringTable->EmptyString(); mDropsPerSide = 4; @@ -142,18 +145,32 @@ void PrecipitationData::initPersistFields() { addField( "soundProfile", TYPEID< SFXTrack >(), Offset(soundProfile, PrecipitationData), "Looping SFXProfile effect to play while Precipitation is active." ); - addField( "dropTexture", TypeFilename, Offset(mDropName, PrecipitationData), + + addProtectedField( "dropTexture", TypeFilename, Offset(mDropName, PrecipitationData), &_setDropData, &defaultProtectedGetFn, "@brief Texture filename for drop particles.\n\n" "The drop texture can contain several different drop sub-textures " "arranged in a grid. There must be the same number of rows as columns. A " - "random frame will be chosen for each drop." ); + "random frame will be chosen for each drop.", AbstractClassRep::FIELD_HideInInspectors ); + + INITPERSISTFIELD_IMAGEASSET(Drop, PrecipitationData, "@brief Texture for drop particles.\n\n" + "The drop texture can contain several different drop sub-textures " + "arranged in a grid. There must be the same number of rows as columns. A " + "random frame will be chosen for each drop."); + addField( "dropShader", TypeString, Offset(mDropShaderName, PrecipitationData), "The name of the shader used for raindrops." ); - addField( "splashTexture", TypeFilename, Offset(mSplashName, PrecipitationData), + + addProtectedField("splashTexture", TypeFilename, Offset(mSplashName, PrecipitationData), &_setSplashData, &defaultProtectedGetFn, "@brief Texture filename for splash particles.\n\n" "The splash texture can contain several different splash sub-textures " "arranged in a grid. There must be the same number of rows as columns. A " - "random frame will be chosen for each splash." ); + "random frame will be chosen for each splash.", AbstractClassRep::FIELD_HideInInspectors); + + INITPERSISTFIELD_IMAGEASSET(Splash, PrecipitationData, "@brief Texture for splash particles.\n\n" + "The splash texture can contain several different splash sub-textures " + "arranged in a grid. There must be the same number of rows as columns. A " + "random frame will be chosen for each splash."); + addField( "splashShader", TypeString, Offset(mSplashShaderName, PrecipitationData), "The name of the shader used for splashes." ); addField( "dropsPerSide", TypeS32, Offset(mDropsPerSide, PrecipitationData), @@ -185,9 +202,12 @@ void PrecipitationData::packData(BitStream* stream) sfxWrite( stream, soundProfile ); - stream->writeString(mDropName); + PACKDATA_IMAGEASSET(Drop); + stream->writeString(mDropShaderName); - stream->writeString(mSplashName); + + PACKDATA_IMAGEASSET(Splash); + stream->writeString(mSplashShaderName); stream->write(mDropsPerSide); stream->write(mSplashesPerSide); @@ -199,9 +219,12 @@ void PrecipitationData::unpackData(BitStream* stream) sfxRead( stream, &soundProfile ); - mDropName = stream->readSTString(); + UNPACKDATA_IMAGEASSET(Drop); + mDropShaderName = stream->readSTString(); - mSplashName = stream->readSTString(); + + UNPACKDATA_IMAGEASSET(Splash); + mSplashShaderName = stream->readSTString(); stream->read(&mDropsPerSide); stream->read(&mSplashesPerSide); @@ -604,8 +627,10 @@ void Precipitation::initMaterials() mDropShader = NULL; mSplashShader = NULL; - if( dStrlen(pd->mDropName) > 0 && !mDropHandle.set(pd->mDropName, &GFXStaticTextureSRGBProfile, avar("%s() - mDropHandle (line %d)", __FUNCTION__, __LINE__)) ) - Con::warnf("Precipitation::initMaterials - failed to locate texture '%s'!", pd->mDropName); + if(pd->mDrop.isNull()) + Con::warnf("Precipitation::initMaterials - failed to locate texture '%s'!", pd->getDrop()); + else + mDropHandle = pd->mDrop; if ( dStrlen(pd->mDropShaderName) > 0 ) { @@ -625,8 +650,10 @@ void Precipitation::initMaterials() } } - if( dStrlen(pd->mSplashName) > 0 && !mSplashHandle.set(pd->mSplashName, &GFXStaticTextureSRGBProfile, avar("%s() - mSplashHandle (line %d)", __FUNCTION__, __LINE__)) ) - Con::warnf("Precipitation::initMaterials - failed to locate texture '%s'!", pd->mSplashName); + if (pd->mSplash.isNull()) + Con::warnf("Precipitation::initMaterials - failed to locate texture '%s'!", pd->getSplash()); + else + mSplashHandle = pd->mSplash; if ( dStrlen(pd->mSplashShaderName) > 0 ) { diff --git a/Engine/source/T3D/fx/precipitation.h b/Engine/source/T3D/fx/precipitation.h index 358a19f80..58c8c44dd 100644 --- a/Engine/source/T3D/fx/precipitation.h +++ b/Engine/source/T3D/fx/precipitation.h @@ -33,6 +33,8 @@ #include "renderInstance/renderPassManager.h" #endif +#include "T3D/assets/ImageAsset.h" + class SFXTrack; class SFXSource; @@ -45,9 +47,14 @@ class PrecipitationData : public GameBaseData public: SFXTrack* soundProfile; - StringTableEntry mDropName; ///< Texture filename for drop particles + DECLARE_IMAGEASSET(PrecipitationData, Drop, onDropChanged, GFXStaticTextureSRGBProfile); ///< Texture for drop particles + DECLARE_IMAGEASSET_SETGET(PrecipitationData, Drop); + StringTableEntry mDropShaderName; ///< The name of the shader used for raindrops - StringTableEntry mSplashName; ///< Texture filename for splash particles + + DECLARE_IMAGEASSET(PrecipitationData, Splash, onSplashChanged, GFXStaticTextureSRGBProfile); ///< Texture for splash particles + DECLARE_IMAGEASSET_SETGET(PrecipitationData, Splash); + StringTableEntry mSplashShaderName; ///< The name of the shader used for raindrops S32 mDropsPerSide; ///< How many drops are on a side of the raindrop texture. @@ -59,6 +66,9 @@ class PrecipitationData : public GameBaseData static void initPersistFields(); virtual void packData(BitStream* stream); virtual void unpackData(BitStream* stream); + + void onDropChanged() {} + void onSplashChanged() {} }; struct Raindrop diff --git a/Engine/source/T3D/fx/splash.cpp b/Engine/source/T3D/fx/splash.cpp index d77c46edb..c6ac5582b 100644 --- a/Engine/source/T3D/fx/splash.cpp +++ b/Engine/source/T3D/fx/splash.cpp @@ -93,9 +93,10 @@ SplashData::SplashData() explosion = NULL; explosionId = 0; - dMemset( textureName, 0, sizeof( textureName ) ); - U32 i; + for (i = 0; i < NUM_TEX; i++) + INIT_IMAGEASSET_ARRAY(Texture, i); + for( i=0; iwriteString(textureName[i]); + PACKDATA_IMAGEASSET_ARRAY(Texture, i); } } @@ -252,7 +255,7 @@ void SplashData::unpackData(BitStream* stream) for( i=0; ireadSTString(); + UNPACKDATA_IMAGEASSET_ARRAY(Texture, i); } } @@ -280,9 +283,9 @@ bool SplashData::preload(bool server, String &errorStr) for( i=0; iaddObject(this); mMoveList->init(); - const char *argv[MaxConnectArgs + 2]; argv[0] = "onConnect"; argv[1] = NULL; // Filled in later @@ -646,6 +645,7 @@ void GameConnection::setCameraObject(GameBase *obj) smFovUpdate.trigger(fov); } } + } GameBase* GameConnection::getCameraObject() diff --git a/Engine/source/T3D/gameBase/gameConnection.h b/Engine/source/T3D/gameBase/gameConnection.h index e71db483f..c735fb62c 100644 --- a/Engine/source/T3D/gameBase/gameConnection.h +++ b/Engine/source/T3D/gameBase/gameConnection.h @@ -403,7 +403,7 @@ protected: public: void setRolloverObj(SceneObject*); SceneObject* getRolloverObj() { return mRolloverObj; } - void setSelectedObj(SceneObject*, bool propagate_to_client=false); + void setSelectedObj(SceneObject*, bool propagate_to_client=false); SceneObject* getSelectedObj() { return mSelectedObj; } void setPreSelectedObjFromRollover(); void clearPreSelectedObj(); diff --git a/Engine/source/T3D/groundPlane.cpp b/Engine/source/T3D/groundPlane.cpp index 62cee84ee..5c3033cbc 100644 --- a/Engine/source/T3D/groundPlane.cpp +++ b/Engine/source/T3D/groundPlane.cpp @@ -76,6 +76,7 @@ GroundPlane::GroundPlane() mScaleU( 1.0f ), mScaleV( 1.0f ), mMaterial( NULL ), + mMaterialInst(NULL), mPhysicsRep( NULL ), mMin( 0.0f, 0.0f ), mMax( 0.0f, 0.0f ) @@ -86,13 +87,15 @@ GroundPlane::GroundPlane() mConvexList = new Convex; mTypeMask |= TerrainLikeObjectType; - initMaterialAsset(Material); + INIT_MATERIALASSET(Material); } GroundPlane::~GroundPlane() { - if( mMaterial ) - SAFE_DELETE( mMaterial ); + mMaterial = nullptr; + + if(mMaterialInst) + SAFE_DELETE(mMaterialInst); mConvexList->nukeList(); SAFE_DELETE( mConvexList ); @@ -106,7 +109,7 @@ void GroundPlane::initPersistFields() addField( "scaleU", TypeF32, Offset( mScaleU, GroundPlane ), "Scale of texture repeat in the U direction." ); addField( "scaleV", TypeF32, Offset( mScaleV, GroundPlane ), "Scale of texture repeat in the V direction." ); - scriptBindMaterialAsset(Material, GroundPlane, "The material used to render the ground plane."); + INITPERSISTFIELD_MATERIALASSET(Material, GroundPlane, "The material used to render the ground plane."); endGroup( "Plane" ); @@ -153,6 +156,11 @@ bool GroundPlane::onAdd() void GroundPlane::onRemove() { + if (!mMaterialAsset.isNull()) + AssetDatabase.releaseAsset(mMaterialAsset.getAssetId()); + + //SAFE_DELETE(mMaterialInst); + SAFE_DELETE( mPhysicsRep ); removeFromScene(); @@ -191,7 +199,7 @@ U32 GroundPlane::packUpdate( NetConnection* connection, U32 mask, BitStream* str stream->write( mScaleU ); stream->write( mScaleV ); - packMaterialAsset(connection, Material); + PACK_MATERIALASSET(connection, Material); return retMask; } @@ -204,7 +212,7 @@ void GroundPlane::unpackUpdate( NetConnection* connection, BitStream* stream ) stream->read( &mScaleU ); stream->read( &mScaleV ); - unpackMaterialAsset(connection, Material); + UNPACK_MATERIALASSET(connection, Material); // If we're added then something possibly changed in // the editor... do an update of the material and the @@ -220,14 +228,14 @@ void GroundPlane::_updateMaterial() { if (mMaterialAsset.notNull()) { - if (mMaterial && String(mMaterialAsset->getMaterialDefinitionName()).equal(mMaterial->getMaterial()->getName(), String::NoCase)) + if (mMaterialInst && String(mMaterialAsset->getMaterialDefinitionName()).equal(mMaterialInst->getMaterial()->getName(), String::NoCase)) return; - SAFE_DELETE(mMaterial); + SAFE_DELETE(mMaterialInst); - mMaterial = MATMGR->createMatInstance(mMaterialAsset->getMaterialDefinitionName(), getGFXVertexFormat< VertexType >()); + mMaterialInst = MATMGR->createMatInstance(mMaterialAsset->getMaterialDefinitionName(), getGFXVertexFormat< VertexType >()); - if (!mMaterial) + if (!mMaterialInst) Con::errorf("GroundPlane::_updateMaterial - no Material called '%s'", mMaterialAsset->getMaterialDefinitionName()); } } @@ -242,7 +250,7 @@ bool GroundPlane::castRay( const Point3F& start, const Point3F& end, RayInfo* in info->t = t; info->setContactPoint( start, end ); info->normal.set( 0, 0, 1 ); - info->material = mMaterial; + info->material = mMaterialInst; info->object = this; info->distance = 0; info->faceDot = 0; @@ -336,7 +344,7 @@ bool GroundPlane::buildPolyList( PolyListContext context, AbstractPolyList* poly } Box3F planeBox = getPlaneBox(); - polyList->addBox( planeBox, mMaterial ); + polyList->addBox( planeBox, mMaterialInst ); return true; } @@ -353,7 +361,7 @@ void GroundPlane::prepRenderImage( SceneRenderState* state ) // If we don't have a material instance after the override then // we can skip rendering all together. - BaseMatInstance *matInst = state->getOverrideMaterial( mMaterial ); + BaseMatInstance *matInst = state->getOverrideMaterial(mMaterialInst); if ( !matInst ) return; @@ -584,7 +592,7 @@ void GroundPlane::generateGrid( U32 width, U32 height, F32 squareSize, void GroundPlane::getUtilizedAssets(Vector* usedAssetsList) { - if (!mMaterialAsset.isNull() && mMaterialAsset->getAssetId() != StringTable->insert("Core_Rendering:noMaterial")) + if (!mMaterialAsset.isNull() && mMaterialAsset->getAssetId() != MaterialAsset::smNoMaterialAssetFallback) usedAssetsList->push_back_unique(mMaterialAsset->getAssetId()); } diff --git a/Engine/source/T3D/groundPlane.h b/Engine/source/T3D/groundPlane.h index 1bcb59583..752c78668 100644 --- a/Engine/source/T3D/groundPlane.h +++ b/Engine/source/T3D/groundPlane.h @@ -104,9 +104,11 @@ private: F32 mSquareSize; ///< World units per grid cell edge. F32 mScaleU; ///< Scale factor for U texture coordinates. F32 mScaleV; ///< Scale factor for V texture coordinates. - BaseMatInstance* mMaterial; ///< Instantiated material based on given material name. - DECLARE_NET_MATERIALASSET(GroundPlane, Material, -1); + BaseMatInstance* mMaterialInst; + + DECLARE_MATERIALASSET(GroundPlane, Material); + DECLARE_MATERIALASSET_NET_SETGET(GroundPlane, Material, -1); PhysicsBody *mPhysicsRep; diff --git a/Engine/source/T3D/guiObjectView.cpp b/Engine/source/T3D/guiObjectView.cpp index 5330a1ee6..5158004ee 100644 --- a/Engine/source/T3D/guiObjectView.cpp +++ b/Engine/source/T3D/guiObjectView.cpp @@ -634,7 +634,7 @@ void GuiObjectView::_initAnimation() { Con::errorf( "GuiObjectView::_initAnimation - Cannot find animation sequence '%s' on '%s'", mAnimationSeqName.c_str(), - mModelName.c_str() + mModelName ); return; @@ -649,7 +649,7 @@ void GuiObjectView::_initAnimation() { Con::errorf( "GuiObjectView::_initAnimation - Sequence '%i' out of range for model '%s'", mAnimationSeq, - mModelName.c_str() + mModelName ); mAnimationSeq = -1; @@ -685,7 +685,7 @@ void GuiObjectView::_initMount() { Con::errorf( "GuiObjectView::_initMount - No node '%s' on '%s'", mMountNodeName.c_str(), - mModelName.c_str() + mModelName ); return; @@ -698,7 +698,7 @@ void GuiObjectView::_initMount() { Con::errorf( "GuiObjectView::_initMount - Mount node index '%i' out of range for '%s'", mMountNode, - mModelName.c_str() + mModelName ); mMountNode = -1; diff --git a/Engine/source/T3D/guiObjectView.h b/Engine/source/T3D/guiObjectView.h index 792e59c43..ff84ff111 100644 --- a/Engine/source/T3D/guiObjectView.h +++ b/Engine/source/T3D/guiObjectView.h @@ -30,6 +30,8 @@ #include "ts/tsShapeInstance.h" #endif +#include "T3D/assets/ShapeAsset.h" + class LightInfo; @@ -68,7 +70,7 @@ class GuiObjectView : public GuiTSCtrl /// @{ /// Name of the model loaded for display. - String mModelName; + StringTableEntry mModelName; /// Model being displayed in the view. TSShapeInstance* mModel; diff --git a/Engine/source/T3D/levelInfo.cpp b/Engine/source/T3D/levelInfo.cpp index 47bc49beb..7d6905841 100644 --- a/Engine/source/T3D/levelInfo.cpp +++ b/Engine/source/T3D/levelInfo.cpp @@ -98,8 +98,8 @@ LevelInfo::LevelInfo() mNetFlags.set( ScopeAlways | Ghostable ); mAdvancedLightmapSupport = true; - mAccuTextureName = ""; - mAccuTexture = NULL; + + INIT_IMAGEASSET(AccuTexture); // Register with the light manager activation signal, and we need to do it first // so the advanced light bin manager can be instructed about MRT lightmaps @@ -166,8 +166,7 @@ void LevelInfo::initPersistFields() //addField( "advancedLightmapSupport", TypeBool, Offset( mAdvancedLightmapSupport, LevelInfo ), // "Enable expanded support for mixing static and dynamic lighting (more costly)" ); - addProtectedField("AccuTexture", TypeStringFilename, Offset(mAccuTextureName, LevelInfo), - &_setLevelAccuTexture, &defaultProtectedGetFn, "Accumulation texture."); + INITPERSISTFIELD_IMAGEASSET(AccuTexture, LevelInfo, "Accumulation texture."); endGroup( "Lighting" ); @@ -216,7 +215,8 @@ U32 LevelInfo::packUpdate(NetConnection *conn, U32 mask, BitStream *stream) sfxWrite( stream, mSoundAmbience ); stream->writeInt( mSoundDistanceModel, 1 ); - stream->write(mAccuTextureName); + PACK_IMAGEASSET(conn, AccuTexture); + return retMask; } @@ -261,8 +261,9 @@ void LevelInfo::unpackUpdate(NetConnection *conn, BitStream *stream) SFX->setDistanceModel( mSoundDistanceModel ); } - stream->read(&mAccuTextureName); - setLevelAccuTexture(mAccuTextureName); + + UNPACK_IMAGEASSET(conn, AccuTexture); + setLevelAccuTexture(getAccuTexture()); } //----------------------------------------------------------------------------- @@ -361,21 +362,21 @@ void LevelInfo::_onLMActivate(const char *lm, bool enable) bool LevelInfo::_setLevelAccuTexture(void *object, const char *index, const char *data) { LevelInfo* volume = reinterpret_cast< LevelInfo* >(object); - volume->setLevelAccuTexture(data); + volume->setLevelAccuTexture(StringTable->insert(data)); return false; } -void LevelInfo::setLevelAccuTexture(const String& name) +void LevelInfo::setLevelAccuTexture(StringTableEntry name) { - mAccuTextureName = name; - if (isClientObject() && mAccuTextureName.isNotEmpty()) + _setAccuTexture(name); + + if (isClientObject() && getAccuTexture() != StringTable->EmptyString()) { - mAccuTexture.set(mAccuTextureName, &GFXStaticTextureSRGBProfile, "AccumulationVolume::mAccuTexture"); if (mAccuTexture.isNull()) - Con::warnf("AccumulationVolume::setTexture - Unable to load texture: %s", mAccuTextureName.c_str()); + Con::warnf("AccumulationVolume::setTexture - Unable to load texture: %s", getAccuTexture()); else gLevelAccuMap = mAccuTexture; } AccumulationVolume::refreshVolumes(); -} \ No newline at end of file +} diff --git a/Engine/source/T3D/levelInfo.h b/Engine/source/T3D/levelInfo.h index dbdaec941..5b998dada 100644 --- a/Engine/source/T3D/levelInfo.h +++ b/Engine/source/T3D/levelInfo.h @@ -40,6 +40,8 @@ #include "gfx/gfxTextureHandle.h" #endif +#include "T3D/assets/ImageAsset.h" + class SFXAmbience; class SFXSoundscape; @@ -101,8 +103,11 @@ class LevelInfo : public NetObject void _onLMActivate(const char *lm, bool enable); protected: - // Name (path) of the accumulation texture. - String mAccuTextureName; + + DECLARE_IMAGEASSET(LevelInfo, AccuTexture, onAccuTextureChanged, GFXStaticTextureSRGBProfile); + DECLARE_IMAGEASSET_SETGET(LevelInfo, AccuTexture); + + void onAccuTextureChanged() {} public: @@ -137,13 +142,11 @@ class LevelInfo : public NetObject UpdateMask = BIT(0) }; - GFXTexHandle mAccuTexture; - virtual U32 packUpdate( NetConnection *conn, U32 mask, BitStream *stream ); virtual void unpackUpdate( NetConnection *conn, BitStream *stream ); static bool _setLevelAccuTexture(void *object, const char *index, const char *data); - void setLevelAccuTexture(const String& name); + void setLevelAccuTexture(StringTableEntry name); /// @} }; -#endif // _LEVELINFO_H_ \ No newline at end of file +#endif // _LEVELINFO_H_ diff --git a/Engine/source/T3D/lightFlareData.cpp b/Engine/source/T3D/lightFlareData.cpp index 7acdbf727..98f406a1b 100644 --- a/Engine/source/T3D/lightFlareData.cpp +++ b/Engine/source/T3D/lightFlareData.cpp @@ -131,7 +131,9 @@ LightFlareData::LightFlareData() dMemset( mElementUseLightColor, 0, sizeof( bool ) * MAX_ELEMENTS ); for ( U32 i = 0; i < MAX_ELEMENTS; i++ ) - mElementDist[i] = -1.0f; + mElementDist[i] = -1.0f; + + INIT_IMAGEASSET(FlareTexture); } LightFlareData::~LightFlareData() @@ -158,8 +160,7 @@ void LightFlareData::initPersistFields() addField( "flareEnabled", TypeBool, Offset( mFlareEnabled, LightFlareData ), "Allows the user to disable this flare globally for any lights referencing it." ); - addField( "flareTexture", TypeImageFilename, Offset( mFlareTextureName, LightFlareData ), - "The texture / sprite sheet for this flare." ); + INITPERSISTFIELD_IMAGEASSET(FlareTexture, LightFlareData, "The texture / sprite sheet for this flare."); addArray( "Elements", MAX_ELEMENTS ); @@ -217,7 +218,9 @@ void LightFlareData::packData( BitStream *stream ) Parent::packData( stream ); stream->writeFlag( mFlareEnabled ); - stream->write( mFlareTextureName ); + + PACKDATA_IMAGEASSET(FlareTexture); + stream->write( mScale ); stream->write( mOcclusionRadius ); stream->writeFlag( mRenderReflectPass ); @@ -240,7 +243,9 @@ void LightFlareData::unpackData( BitStream *stream ) Parent::unpackData( stream ); mFlareEnabled = stream->readFlag(); - stream->read( &mFlareTextureName ); + + UNPACKDATA_IMAGEASSET(FlareTexture); + stream->read( &mScale ); stream->read( &mOcclusionRadius ); mRenderReflectPass = stream->readFlag(); @@ -631,12 +636,6 @@ bool LightFlareData::_preload( bool server, String &errorStr ) if ( mElementCount > 0 ) _makePrimBuffer( &mFlarePrimBuffer, mElementCount ); - if ( !server ) - { - if ( mFlareTextureName.isNotEmpty() ) - mFlareTexture.set( mFlareTextureName, &GFXStaticTextureSRGBProfile, "FlareTexture" ); - } - return true; } diff --git a/Engine/source/T3D/lightFlareData.h b/Engine/source/T3D/lightFlareData.h index e0517abda..6d79aac7b 100644 --- a/Engine/source/T3D/lightFlareData.h +++ b/Engine/source/T3D/lightFlareData.h @@ -45,6 +45,8 @@ #include "gfx/gfxOcclusionQuery.h" #endif +#include "T3D/assets/ImageAsset.h" + class LightInfo; struct ObjectRenderInst; class SceneRenderState; @@ -104,6 +106,8 @@ protected: void _makePrimBuffer( GFXPrimitiveBufferHandle *pb, U32 count ); void _renderCorona( ObjectRenderInst *ri, SceneRenderState *state, BaseMatInstance *overrideMat ); + void onImageChanged() {} + protected: static const U32 LosMask; @@ -115,8 +119,10 @@ protected: F32 mScale; bool mFlareEnabled; - String mFlareTextureName; - GFXTexHandle mFlareTexture; + + DECLARE_IMAGEASSET(LightFlareData, FlareTexture, onImageChanged, GFXStaticTextureSRGBProfile); + DECLARE_IMAGEASSET_SETGET(LightFlareData, FlareTexture); + F32 mOcclusionRadius; bool mRenderReflectPass; @@ -133,4 +139,4 @@ protected: GFXPrimitiveBufferHandle mFlarePrimBuffer; }; -#endif // _LIGHTFLAREDATA_H_ \ No newline at end of file +#endif // _LIGHTFLAREDATA_H_ diff --git a/Engine/source/T3D/lighting/reflectionProbe.cpp b/Engine/source/T3D/lighting/reflectionProbe.cpp index 5715c069b..985f4871c 100644 --- a/Engine/source/T3D/lighting/reflectionProbe.cpp +++ b/Engine/source/T3D/lighting/reflectionProbe.cpp @@ -111,6 +111,7 @@ ReflectionProbe::ReflectionProbe() mUseHDRCaptures = true; + mCubemapName = StringTable->EmptyString(); mStaticCubemap = NULL; mProbeUniqueID = ""; @@ -259,7 +260,7 @@ bool ReflectionProbe::_setReflectionMode(void *object, const char *index, const { //Clear our cubemap if we changed it to be baked, just for cleanliness probe->mReflectionModeType = BakedCubemap; - probe->mCubemapName = ""; + probe->mCubemapName = StringTable->EmptyString(); } probe->setMaskBits(StaticDataMask); @@ -426,7 +427,7 @@ U32 ReflectionProbe::packUpdate(NetConnection *conn, U32 mask, BitStream *stream stream->write(mRadius); stream->write(mProbeUniqueID); stream->write((U32)mReflectionModeType); - stream->write(mCubemapName); + stream->writeString(mCubemapName); } if (stream->writeFlag(mask & EnabledMask)) @@ -474,8 +475,8 @@ void ReflectionProbe::unpackUpdate(NetConnection *conn, BitStream *stream) stream->read(&reflectModeType); mReflectionModeType = (ReflectionModeType)reflectModeType; - String oldCubemapName = mCubemapName; - stream->read(&mCubemapName); + StringTableEntry oldCubemapName = mCubemapName; + mCubemapName = stream->readSTString(); if(oldReflectModeType != mReflectionModeType || oldCubemapName != mCubemapName) mCubemapDirty = true; @@ -630,7 +631,7 @@ void ReflectionProbe::processStaticCubemap() String path = Con::getVariable("$pref::ReflectionProbes::CurrentLevelPath", "levels/"); char irradFileName[256]; - dSprintf(irradFileName, 256, "%s%s_Irradiance.dds", path.c_str(), mCubemapName.c_str()); + dSprintf(irradFileName, 256, "%s%s_Irradiance.dds", path.c_str(), mCubemapName); if (Platform::isFile(irradFileName)) { @@ -645,7 +646,7 @@ void ReflectionProbe::processStaticCubemap() } char prefilterFileName[256]; - dSprintf(prefilterFileName, 256, "%s%s_Prefilter.dds", path.c_str(), mCubemapName.c_str()); + dSprintf(prefilterFileName, 256, "%s%s_Prefilter.dds", path.c_str(), mCubemapName); if (Platform::isFile(prefilterFileName)) { diff --git a/Engine/source/T3D/lighting/reflectionProbe.h b/Engine/source/T3D/lighting/reflectionProbe.h index 4096bfeda..017cd21df 100644 --- a/Engine/source/T3D/lighting/reflectionProbe.h +++ b/Engine/source/T3D/lighting/reflectionProbe.h @@ -162,7 +162,7 @@ protected: /// /// This is used when a static cubemap is used. The name of the cubemap is looked up and loaded for the IBL calculations /// - String mCubemapName; + StringTableEntry mCubemapName; CubemapData *mStaticCubemap; GFXCubemapHandle mDynamicCubemap; diff --git a/Engine/source/T3D/physics/physicsDebris.cpp b/Engine/source/T3D/physics/physicsDebris.cpp index 33bc2d936..835871bb5 100644 --- a/Engine/source/T3D/physics/physicsDebris.cpp +++ b/Engine/source/T3D/physics/physicsDebris.cpp @@ -73,7 +73,8 @@ PhysicsDebrisData::PhysicsDebrisData() { lifetime = 5.0f; lifetimeVariance = 0.0f; - shapeName = NULL; + + INIT_SHAPEASSET(Shape); } bool PhysicsDebrisData::onAdd() @@ -91,21 +92,17 @@ bool PhysicsDebrisData::preload( bool server, String &errorStr ) if ( server ) return true; - if ( shapeName && shapeName[0] != '\0' && !bool(shape) ) + if ( mShapeAsset.notNull() ) { - shape = ResourceManager::get().load( shapeName ); - if ( bool(shape) == false ) - { - errorStr = String::ToString( "PhysicsDebrisData::load: Couldn't load shape \"%s\"", shapeName ); - return false; - } - else - { - // Create a dummy shape to force the generation of shaders and materials - // during the level load and not during gameplay. - TSShapeInstance *pDummy = new TSShapeInstance( shape, !server ); - delete pDummy; - } + // Create a dummy shape to force the generation of shaders and materials + // during the level load and not during gameplay. + TSShapeInstance *pDummy = new TSShapeInstance( mShape, !server ); + delete pDummy; + } + else + { + errorStr = String::ToString("PhysicsDebrisData::load: Couldn't load shape asset \"%s\"", mShapeAssetId); + return false; } return true; @@ -115,8 +112,11 @@ void PhysicsDebrisData::initPersistFields() { addGroup( "Display" ); - addField( "shapeFile", TypeShapeFilename, Offset( shapeName, PhysicsDebrisData ), + addProtectedField( "shapeFile", TypeShapeFilename, Offset( mShapeName, PhysicsDebrisData ), &_setShapeData, &defaultProtectedGetFn, "@brief Path to the .DAE or .DTS file to use for this shape.\n\n" + "Compatable with Live-Asset Reloading.", AbstractClassRep::FIELD_HideInInspectors); + + INITPERSISTFIELD_SHAPEASSET(Shape, PhysicsDebrisData, "@brief Shape to use with this debris.\n\n" "Compatable with Live-Asset Reloading."); addField( "castShadows", TypeBool, Offset( castShadows, PhysicsDebrisData ), @@ -214,7 +214,8 @@ void PhysicsDebrisData::packData(BitStream* stream) stream->write( angularSleepThreshold ); stream->write( waterDampingScale ); stream->write( buoyancyDensity ); - stream->writeString( shapeName ); + + PACKDATA_SHAPEASSET(Shape); } void PhysicsDebrisData::unpackData(BitStream* stream) @@ -235,7 +236,7 @@ void PhysicsDebrisData::unpackData(BitStream* stream) stream->read( &waterDampingScale ); stream->read( &buoyancyDensity ); - shapeName = stream->readSTString(); + UNPACKDATA_SHAPEASSET(Shape); } DefineEngineMethod( PhysicsDebrisData, preload, void, (), , @@ -246,7 +247,8 @@ DefineEngineMethod( PhysicsDebrisData, preload, void, (), , { String errorStr; - object->shape = NULL; + object->_setShape(object->getShape()); + if( !object->preload( false, errorStr ) ) Con::errorf( "PhsysicsDebrisData::preload - error: %s", errorStr.c_str() ); } @@ -358,7 +360,7 @@ bool PhysicsDebris::onAdd() } // Setup our bounding box - mObjBox = mDataBlock->shape->mBounds; + mObjBox = mDataBlock->mShape->mBounds; resetWorldBox(); // Add it to the client scene. @@ -621,7 +623,7 @@ void PhysicsDebris::_createFragments() if ( !mWorld ) return; - TSShape *shape = mDataBlock->shape; + TSShape *shape = mDataBlock->mShape; mShapeInstance = new TSShapeInstance( shape, true ); mShapeInstance->animate(); @@ -695,7 +697,7 @@ void PhysicsDebris::_findNodes( U32 colNode, Vector &nodeIds ) // 1. Visible mesh nodes are siblings of the collision node under a common parent dummy node // 2. Collision node is a child of its visible mesh node - TSShape *shape = mDataBlock->shape; + TSShape *shape = mDataBlock->mShape; S32 itr = shape->nodes[colNode].parentIndex; itr = shape->nodes[itr].firstChild; diff --git a/Engine/source/T3D/physics/physicsDebris.h b/Engine/source/T3D/physics/physicsDebris.h index 94c183e27..c58d66626 100644 --- a/Engine/source/T3D/physics/physicsDebris.h +++ b/Engine/source/T3D/physics/physicsDebris.h @@ -33,6 +33,8 @@ #include "T3D/physics/physicsCommon.h" #endif +#include "T3D/assets/ShapeAsset.h" + class TSShapeInstance; class TSShape; @@ -84,8 +86,8 @@ public: /// Is rendererd during shadow passes. bool castShadows; - const char* shapeName; - Resource shape; + DECLARE_SHAPEASSET(PhysicsDebrisData, Shape, onShapeChanged); + DECLARE_SHAPEASSET_SETGET(PhysicsDebrisData, Shape); PhysicsDebrisData(); @@ -95,6 +97,8 @@ public: void packData( BitStream *stream ); void unpackData( BitStream *stream ); + void onShapeChanged() {} + DECLARE_CONOBJECT( PhysicsDebrisData ); }; diff --git a/Engine/source/T3D/physics/physicsShape.cpp b/Engine/source/T3D/physics/physicsShape.cpp index d4e0a3313..6808866ca 100644 --- a/Engine/source/T3D/physics/physicsShape.cpp +++ b/Engine/source/T3D/physics/physicsShape.cpp @@ -66,8 +66,7 @@ ConsoleDocClass( PhysicsShapeData, ); PhysicsShapeData::PhysicsShapeData() - : shapeName( NULL ), - mass( 1.0f ), + : mass( 1.0f ), dynamicFriction( 0.0f ), staticFriction( 0.0f ), restitution( 0.0f ), @@ -79,6 +78,7 @@ PhysicsShapeData::PhysicsShapeData() buoyancyDensity( 0.0f ), simType( SimType_ClientServer ) { + INIT_SHAPEASSET(Shape); } PhysicsShapeData::~PhysicsShapeData() @@ -91,9 +91,8 @@ void PhysicsShapeData::initPersistFields() addGroup("Media"); - addField( "shapeName", TypeShapeFilename, Offset( shapeName, PhysicsShapeData ), - "@brief Path to the .DAE or .DTS file to use for this shape.\n\n" - "Compatable with Live-Asset Reloading. "); + INITPERSISTFIELD_SHAPEASSET(Shape, PhysicsShapeData, "@brief Shape asset to be used with this physics object.\n\n" + "Compatable with Live-Asset Reloading. ") addField( "debris", TYPEID< SimObjectRef >(), Offset( debris, PhysicsShapeData ), "@brief Name of a PhysicsDebrisData to spawn when this shape is destroyed (optional)." ); @@ -181,7 +180,7 @@ void PhysicsShapeData::packData( BitStream *stream ) { Parent::packData( stream ); - stream->writeString( shapeName ); + PACKDATA_SHAPEASSET(Shape); stream->write( mass ); stream->write( dynamicFriction ); @@ -205,7 +204,7 @@ void PhysicsShapeData::unpackData( BitStream *stream ) { Parent::unpackData(stream); - shapeName = stream->readSTString(); + UNPACKDATA_SHAPEASSET(Shape); stream->read( &mass ); stream->read( &dynamicFriction ); @@ -242,28 +241,28 @@ void PhysicsShapeData::onRemove() void PhysicsShapeData::_onResourceChanged( const Torque::Path &path ) { - if ( path != Path( shapeName ) ) + if (mShapeAsset.isNull()) return; + if ( path != Path(mShapeAsset->getShapeFilePath()) ) + return; + + _setShape(getShape()); + // Reload the changed shape. - Resource reloadShape; PhysicsCollisionRef reloadcolShape; - reloadShape = ResourceManager::get().load( shapeName ); - if ( !bool(reloadShape) ) + if ( !mShape ) { Con::warnf( ConsoleLogEntry::General, "PhysicsShapeData::_onResourceChanged: Could not reload %s.", path.getFileName().c_str() ); return; } // Reload the collision shape. - reloadcolShape = reloadShape->buildColShape( false, Point3F::One ); + reloadcolShape = mShape->buildColShape( false, Point3F::One ); - if ( bool(reloadShape) && bool(reloadcolShape)) - { - shape = reloadShape; + if ( bool(reloadcolShape)) colShape = reloadcolShape; - } mReloadSignal.trigger(); } @@ -283,35 +282,33 @@ bool PhysicsShapeData::preload( bool server, String &errorBuffer ) bool shapeError = false; - if (shapeName && shapeName[0]) + if (mShapeAsset.notNull()) { - // Resolve shapename - shape = ResourceManager::get().load(shapeName); - if (bool(shape) == false) + if (bool(mShape) == false) { - errorBuffer = String::ToString("PhysicsShapeData: Couldn't load shape \"%s\"", shapeName); + errorBuffer = String::ToString("PhysicsShapeData: Couldn't load shape \"%s\"", mShapeAssetId); return false; } - if (!server && !shape->preloadMaterialList(shape.getPath()) && NetConnection::filesWereDownloaded()) + if (!server && !mShape->preloadMaterialList(mShape.getPath()) && NetConnection::filesWereDownloaded()) shapeError = true; } // Prepare the shared physics collision shape. - if ( !colShape && shape ) + if ( !colShape && mShape) { - colShape = shape->buildColShape( false, Point3F::One ); + colShape = mShape->buildColShape( false, Point3F::One ); // If we got here and didn't get a collision shape then // we need to fail... can't have a shape without collision. if ( !colShape ) { //no collision so we create a simple box collision shape from the shapes bounds and alert the user - Con::warnf( "PhysicsShapeData::preload - No collision found for shape '%s', auto-creating one", shapeName ); - Point3F halfWidth = shape->mBounds.getExtents() * 0.5f; + Con::warnf( "PhysicsShapeData::preload - No collision found for shape '%s', auto-creating one", mShapeAssetId); + Point3F halfWidth = mShape->mBounds.getExtents() * 0.5f; colShape = PHYSICSMGR->createCollision(); MatrixF centerXfm(true); - centerXfm.setPosition(shape->mBounds.getCenter()); + centerXfm.setPosition(mShape->mBounds.getCenter()); colShape->addBox(halfWidth, centerXfm); return true; } @@ -703,11 +700,11 @@ bool PhysicsShape::_createShape() mAmbientSeq = -1; PhysicsShapeData *db = getDataBlock(); - if ( !db || !db->shape) + if ( !db || !db->mShape) return false; // Set the world box. - mObjBox = db->shape->mBounds; + mObjBox = db->mShape->mBounds; resetWorldBox(); // If this is the server and its a client only simulation @@ -721,11 +718,11 @@ bool PhysicsShape::_createShape() } // Create the shape instance. - mShapeInst = new TSShapeInstance( db->shape, isClientObject() ); + mShapeInst = new TSShapeInstance( db->mShape, isClientObject() ); if ( isClientObject() ) { - mAmbientSeq = db->shape->findSequence( "ambient" ); + mAmbientSeq = db->mShape->findSequence( "ambient" ); _initAmbient(); } @@ -1207,4 +1204,4 @@ DefineEngineMethod(PhysicsShape, applyForce, void, (Point3F force), , "@note This value is ignored on physics shapes that are not dynamic. Wakes up the dynamic physics shape if it is sleeping.\n") { object->applyForce( force ); -} \ No newline at end of file +} diff --git a/Engine/source/T3D/physics/physicsShape.h b/Engine/source/T3D/physics/physicsShape.h index 92092df64..a80d85afc 100644 --- a/Engine/source/T3D/physics/physicsShape.h +++ b/Engine/source/T3D/physics/physicsShape.h @@ -42,6 +42,8 @@ #include "console/simObjectRef.h" #endif +#include "T3D/assets/ShapeAsset.h" + class TSShapeInstance; class PhysicsBody; class PhysicsWorld; @@ -72,11 +74,8 @@ public: public: - /// The shape to load. - StringTableEntry shapeName; - - /// The shape resource. - Resource shape; + DECLARE_SHAPEASSET(PhysicsShapeData, Shape, onShapeChanged); + DECLARE_SHAPEASSET_SETGET(PhysicsShapeData, Shape); /// The shared unscaled collision shape. PhysicsCollisionRef colShape; @@ -135,6 +134,8 @@ public: SimObjectRef< PhysicsDebrisData > debris; SimObjectRef< ExplosionData > explosion; SimObjectRef< PhysicsShapeData > destroyedShape; + + void onShapeChanged() {} }; typedef PhysicsShapeData::SimType PhysicsSimType; diff --git a/Engine/source/T3D/player.cpp b/Engine/source/T3D/player.cpp index 43bec8790..5bfc44746 100644 --- a/Engine/source/T3D/player.cpp +++ b/Engine/source/T3D/player.cpp @@ -272,7 +272,7 @@ PlayerData::PlayerData() imageAnimPrefixFP = StringTable->EmptyString(); for (U32 i=0; iEmptyString(); + INIT_SHAPEASSET_ARRAY(ShapeFP, i); mCRCFP[i] = 0; mValidShapeFP[i] = false; } @@ -585,35 +585,34 @@ bool PlayerData::preload(bool server, String &errorStr) { bool shapeError = false; - if (shapeNameFP[i] && shapeNameFP[i][0]) + if (mShapeFPAssetId[i] != StringTable->EmptyString()) { - mShapeFP[i] = ResourceManager::get().load(shapeNameFP[i]); - if (bool(mShapeFP[i]) == false) + if (!mShapeFP[i]) { - errorStr = String::ToString("PlayerData: Couldn't load mounted image %d shape \"%s\"",i,shapeNameFP[i]); + errorStr = String::ToString("PlayerData: Couldn't load mounted image %d shape \"%s\"", i, mShapeFPAssetId[i]); return false; } - if(!server && !mShapeFP[i]->preloadMaterialList(mShapeFP[i].getPath()) && NetConnection::filesWereDownloaded()) + if (!server && !mShapeFP[i]->preloadMaterialList(mShapeFP[i].getPath()) && NetConnection::filesWereDownloaded()) shapeError = true; - if(computeCRC) + if (computeCRC) { - Con::printf("Validation required for mounted image %d shape: %s", i, shapeNameFP[i]); + Con::printf("Validation required for mounted image %d shape: %s", i, mShapeFPAssetId[i]); Torque::FS::FileNodeRef fileRef = Torque::FS::GetFileNode(mShapeFP[i].getPath()); if (!fileRef) { - errorStr = String::ToString("PlayerData: Mounted image %d loading failed, shape \"%s\" is not found.",i,mShapeFP[i].getPath().getFullPath().c_str()); + errorStr = String::ToString("PlayerData: Mounted image %d loading failed, shape \"%s\" is not found.", i, mShapeFP[i].getPath().getFullPath().c_str()); return false; } - if(server) + if (server) mCRCFP[i] = fileRef->getChecksum(); - else if(mCRCFP[i] != fileRef->getChecksum()) + else if (mCRCFP[i] != fileRef->getChecksum()) { - errorStr = String::ToString("PlayerData: Mounted image %d shape \"%s\" does not match version on server.",i,shapeNameFP[i]); + errorStr = String::ToString("PlayerData: Mounted image %d shape \"%s\" does not match version on server.", i, mShapeFPAssetId[i]); return false; } } @@ -1165,9 +1164,13 @@ void PlayerData::initPersistFields() // Mounted images arrays addArray( "Mounted Images", ShapeBase::MaxMountedImages ); - - addField( "shapeNameFP", TypeShapeFilename, Offset(shapeNameFP, PlayerData), ShapeBase::MaxMountedImages, + addProtectedField("shapeNameFP", TypeShapeFilename, Offset(mShapeFPName, PlayerData), &_setShapeFPData, &defaultProtectedGetFn, ShapeBase::MaxMountedImages, "@brief File name of this player's shape that will be used in conjunction with the corresponding mounted image.\n\n" + "These optional parameters correspond to each mounted image slot to indicate a shape that is rendered " + "in addition to the mounted image shape. Typically these are a player's arms (or arm) that is " + "animated along with the mounted image's state animation sequences.\n", AbstractClassRep::FIELD_HideInInspectors); + + INITPERSISTFIELD_SHAPEASSET_ARRAY(ShapeFP, ShapeBase::MaxMountedImages, PlayerData, "@brief File name of this player's shape that will be used in conjunction with the corresponding mounted image.\n\n" "These optional parameters correspond to each mounted image slot to indicate a shape that is rendered " "in addition to the mounted image shape. Typically these are a player's arms (or arm) that is " "animated along with the mounted image's state animation sequences.\n"); @@ -1369,7 +1372,7 @@ void PlayerData::packData(BitStream* stream) stream->writeString(imageAnimPrefixFP); for (U32 i=0; iwriteString(shapeNameFP[i]); + PACKDATA_SHAPEASSET_ARRAY(ShapeFP, i); // computeCRC is handled in ShapeBaseData if (computeCRC) @@ -1549,7 +1552,7 @@ void PlayerData::unpackData(BitStream* stream) imageAnimPrefixFP = stream->readSTString(); for (U32 i=0; ireadSTString(); + UNPACKDATA_SHAPEASSET_ARRAY(ShapeFP, i); // computeCRC is handled in ShapeBaseData if (computeCRC) diff --git a/Engine/source/T3D/player.h b/Engine/source/T3D/player.h index 35667fc40..042f45b37 100644 --- a/Engine/source/T3D/player.h +++ b/Engine/source/T3D/player.h @@ -75,10 +75,11 @@ struct PlayerData: public ShapeBaseData { /// that we don't create a TSThread on the player if we don't /// need to. - StringTableEntry shapeNameFP[ShapeBase::MaxMountedImages]; ///< Used to render with mounted images in first person [optional] + DECLARE_SHAPEASSET_ARRAY(PlayerData, ShapeFP, ShapeBase::MaxMountedImages); ///< Used to render with mounted images in first person [optional] + DECLARE_SHAPEASSET_ARRAY_SETGET(PlayerData, ShapeFP); + StringTableEntry imageAnimPrefixFP; ///< Passed along to mounted images to modify /// animation sequences played in first person. [optional] - Resource mShapeFP[ShapeBase::MaxMountedImages]; ///< First person mounted image shape resources [optional] U32 mCRCFP[ShapeBase::MaxMountedImages]; ///< Computed CRC values for the first person mounted image shapes /// Depends on the ShapeBaseData computeCRC field. bool mValidShapeFP[ShapeBase::MaxMountedImages]; ///< Indicates that there is a valid first person mounted image shape diff --git a/Engine/source/T3D/prefab.cpp b/Engine/source/T3D/prefab.cpp index 37284082e..9c30963c0 100644 --- a/Engine/source/T3D/prefab.cpp +++ b/Engine/source/T3D/prefab.cpp @@ -196,7 +196,7 @@ U32 Prefab::packUpdate( NetConnection *conn, U32 mask, BitStream *stream ) if ( stream->writeFlag( mask & FileMask ) ) { - stream->write( mFilename ); + stream->writeString( mFilename ); } if ( stream->writeFlag( mask & TransformMask ) ) @@ -218,7 +218,7 @@ void Prefab::unpackUpdate(NetConnection *conn, BitStream *stream) // FileMask if ( stream->readFlag() ) { - stream->read( &mFilename ); + mFilename = stream->readSTString(); } // TransformMask @@ -235,9 +235,7 @@ bool Prefab::protectedSetFile( void *object, const char *index, const char *data { Prefab *prefab = static_cast(object); - String file = String( Platform::makeRelativePathName(data, Platform::getMainDotCsDir()) ); - - prefab->setFile( file ); + prefab->setFile( StringTable->insert(Platform::makeRelativePathName(data, Platform::getMainDotCsDir()))); return false; } @@ -336,12 +334,12 @@ void Prefab::_loadFile( bool addFileNotify ) { AssertFatal( isServerObject(), "Prefab-bad" ); - if ( mFilename.isEmpty() ) + if ( mFilename == StringTable->EmptyString()) return; - if ( !Platform::isFile( mFilename ) ) + if ( !Torque::FS::IsScriptFile( mFilename ) ) { - Con::errorf( "Prefab::_loadFile() - file %s was not found.", mFilename.c_str() ); + Con::errorf( "Prefab::_loadFile() - file %s was not found.", mFilename ); return; } @@ -349,19 +347,19 @@ void Prefab::_loadFile( bool addFileNotify ) { Con::errorf( "Prefab::_loadFile - failed loading prefab file (%s). \n" - "File was referenced recursively by both a Parent and Child prefab.", mFilename.c_str() ); + "File was referenced recursively by both a Parent and Child prefab.", mFilename ); return; } sPrefabFileStack.push_back(mFilename); - String command = String::ToString( "exec( \"%s\" );", mFilename.c_str() ); + String command = String::ToString( "exec( \"%s\" );", mFilename ); Con::evaluate( command ); SimGroup *group; if ( !Sim::findObject( Con::getVariable( "$ThisPrefab" ), group ) ) { - Con::errorf( "Prefab::_loadFile() - file %s did not create $ThisPrefab.", mFilename.c_str() ); + Con::errorf( "Prefab::_loadFile() - file %s did not create $ThisPrefab.", mFilename ); return; } @@ -614,4 +612,4 @@ void ExplodePrefabUndoAction::redo() name += "_exploded"; name = Sim::getUniqueName( name ); mGroup->assignName( name ); -} \ No newline at end of file +} diff --git a/Engine/source/T3D/prefab.h b/Engine/source/T3D/prefab.h index 28c4b095a..6ebe88b0a 100644 --- a/Engine/source/T3D/prefab.h +++ b/Engine/source/T3D/prefab.h @@ -122,7 +122,7 @@ protected: protected: /// Prefab file which defines our children objects. - String mFilename; + StringTableEntry mFilename; /// Group which holds all children objects. SimObjectPtr mChildGroup; @@ -168,4 +168,4 @@ protected: }; -#endif // _PREFAB_H_ \ No newline at end of file +#endif // _PREFAB_H_ diff --git a/Engine/source/T3D/projectile.cpp b/Engine/source/T3D/projectile.cpp index e457f6b2d..739daf4a5 100644 --- a/Engine/source/T3D/projectile.cpp +++ b/Engine/source/T3D/projectile.cpp @@ -144,7 +144,7 @@ U32 Projectile::smProjectileWarpTicks = 5; // ProjectileData::ProjectileData() { - projectileShapeName = NULL; + INIT_SHAPEASSET(ProjectileShape); sound = NULL; @@ -197,7 +197,6 @@ ProjectileData::ProjectileData() ProjectileData::ProjectileData(const ProjectileData& other, bool temp_clone) : GameBaseData(other, temp_clone) { - projectileShapeName = other.projectileShapeName; faceViewer = other.faceViewer; // -- always set to false scale = other.scale; velInheritFactor = other.velInheritFactor; @@ -221,7 +220,7 @@ ProjectileData::ProjectileData(const ProjectileData& other, bool temp_clone) : G sound = other.sound; lightDesc = other.lightDesc; lightDescId = other.lightDescId; // -- for pack/unpack of lightDesc ptr - projectileShape = other.projectileShape; // -- TSShape loads using projectileShapeName + CLONE_SHAPEASSET(ProjectileShape);// -- TSShape loads using mProjectileShapeName activateSeq = other.activateSeq; // -- from projectileShape sequence "activate" maintainSeq = other.maintainSeq; // -- from projectileShape sequence "maintain" particleEmitter = other.particleEmitter; @@ -244,8 +243,11 @@ void ProjectileData::initPersistFields() "as the projectile enters or leaves water.\n\n" "@see particleEmitter\n"); - addField("projectileShapeName", TypeShapeFilename, Offset(projectileShapeName, ProjectileData), - "@brief File path to the model of the projectile.\n\n"); + addProtectedField("projectileShapeName", TypeShapeFilename, Offset(mProjectileShapeName, ProjectileData), &_setProjectileShapeData, &defaultProtectedGetFn, + "@brief File path to the model of the projectile.\n\n", AbstractClassRep::FIELD_HideInInspectors); + + INITPERSISTFIELD_SHAPEASSET(ProjectileShape, ProjectileData, "@brief The model of the projectile.\n\n"); + addField("scale", TypePoint3F, Offset(scale, ProjectileData), "@brief Scale to apply to the projectile's size.\n\n" "@note This is applied after SceneObject::scale\n"); @@ -375,22 +377,22 @@ bool ProjectileData::preload(bool server, String &errorStr) Con::errorf(ConsoleLogEntry::General, "ProjectileData::preload: Invalid packet, bad datablockid(lightDesc): %d", lightDescId); } - if (projectileShapeName && projectileShapeName[0] != '\0') + if (mProjectileShapeAssetId != StringTable->EmptyString()) { - projectileShape = ResourceManager::get().load(projectileShapeName); - if (bool(projectileShape) == false) + //If we've got a shapeAsset assigned for our projectile, but we failed to load the shape data itself, report the error + if (!mProjectileShape) { - errorStr = String::ToString("ProjectileData::load: Couldn't load shape \"%s\"", projectileShapeName); + errorStr = String::ToString("ProjectileData::load: Couldn't load shape \"%s\"", mProjectileShapeAssetId); return false; } - activateSeq = projectileShape->findSequence("activate"); - maintainSeq = projectileShape->findSequence("maintain"); - } + else + { + activateSeq = mProjectileShape->findSequence("activate"); + maintainSeq = mProjectileShape->findSequence("maintain"); - if (bool(projectileShape)) // create an instance to preload shape data - { - TSShapeInstance* pDummy = new TSShapeInstance(projectileShape, !server); - delete pDummy; + TSShapeInstance* pDummy = new TSShapeInstance(mProjectileShape, !server); + delete pDummy; + } } return true; @@ -401,7 +403,8 @@ void ProjectileData::packData(BitStream* stream) { Parent::packData(stream); - stream->writeString(projectileShapeName); + PACKDATA_SHAPEASSET(ProjectileShape); + stream->writeFlag(faceViewer); if(stream->writeFlag(scale.x != 1 || scale.y != 1 || scale.z != 1)) { @@ -465,7 +468,7 @@ void ProjectileData::unpackData(BitStream* stream) { Parent::unpackData(stream); - projectileShapeName = stream->readSTString(); + UNPACKDATA_SHAPEASSET(ProjectileShape); faceViewer = stream->readFlag(); if(stream->readFlag()) @@ -786,9 +789,9 @@ bool Projectile::onAdd() } else { - if (bool(mDataBlock->projectileShape)) + if (bool(mDataBlock->mProjectileShape)) { - mProjectileShape = new TSShapeInstance(mDataBlock->projectileShape, isClientObject()); + mProjectileShape = new TSShapeInstance(mDataBlock->mProjectileShape, isClientObject()); if (mDataBlock->activateSeq != -1) { @@ -827,8 +830,8 @@ bool Projectile::onAdd() processAfter(mSourceObject); // Setup our bounding box - if (bool(mDataBlock->projectileShape) == true) - mObjBox = mDataBlock->projectileShape->mBounds; + if (bool(mDataBlock->mProjectileShape) == true) + mObjBox = mDataBlock->mProjectileShape->mBounds; else mObjBox = Box3F(Point3F(0, 0, 0), Point3F(0, 0, 0)); @@ -1509,4 +1512,4 @@ DefineEngineMethod(Projectile, presimulate, void, (F32 seconds), (1.0f), "@note This function is not called if the SimObject::hidden is true.") { object->simulate( seconds ); -} \ No newline at end of file +} diff --git a/Engine/source/T3D/projectile.h b/Engine/source/T3D/projectile.h index f6c3870c1..6209ba531 100644 --- a/Engine/source/T3D/projectile.h +++ b/Engine/source/T3D/projectile.h @@ -44,6 +44,7 @@ #include "lighting/lightInfo.h" #endif +#include "T3D/assets/ShapeAsset.h" class ExplosionData; class SplashData; @@ -69,9 +70,8 @@ protected: bool onAdd(); public: - // variables set in datablock definition: - // Shape related - const char* projectileShapeName; + DECLARE_SHAPEASSET(ProjectileData, ProjectileShape, onShapeChanged); + DECLARE_SHAPEASSET_SETGET(ProjectileData, ProjectileShape); /// Set to true if it is a billboard and want it to always face the viewer, false otherwise bool faceViewer; @@ -121,7 +121,6 @@ public: S32 lightDescId; // variables set on preload: - Resource projectileShape; S32 activateSeq; S32 maintainSeq; @@ -152,6 +151,8 @@ public: public: ProjectileData(const ProjectileData&, bool = false); virtual bool allowSubstitutions() const { return true; } + + void onShapeChanged() {} }; diff --git a/Engine/source/T3D/rigidShape.cpp b/Engine/source/T3D/rigidShape.cpp index 574226bd3..8eeaffb3f 100644 --- a/Engine/source/T3D/rigidShape.cpp +++ b/Engine/source/T3D/rigidShape.cpp @@ -291,7 +291,7 @@ bool RigidShapeData::preload(bool server, String &errorStr) if (!collisionDetails.size() || collisionDetails[0] == -1) { Con::errorf("RigidShapeData::preload failed: Rigid shapes must define a collision-1 detail"); - errorStr = String::ToString("RigidShapeData: Couldn't load shape \"%s\"", mShapeName); + errorStr = String::ToString("RigidShapeData: Couldn't load shape asset \"%s\"", mShapeAsset.getAssetId()); return false; } diff --git a/Engine/source/T3D/sfx/sfxEmitter.cpp b/Engine/source/T3D/sfx/sfxEmitter.cpp index 3e26151c7..e48ca8fee 100644 --- a/Engine/source/T3D/sfx/sfxEmitter.cpp +++ b/Engine/source/T3D/sfx/sfxEmitter.cpp @@ -721,12 +721,12 @@ void SFXEmitter::_update() mLocalProfile.mResource = NULL; mLocalProfile.mBuffer = NULL; - if( !mLocalProfile.mFilename.isEmpty() ) + if( mLocalProfile.mFilename != StringTable->EmptyString() ) { mSource = SFX->createSource( &mLocalProfile, &transform, &velocity ); if( !mSource ) Con::errorf( "SFXEmitter::_update() - failed to create sound for: %s", - mLocalProfile.mFilename.c_str() ); + mLocalProfile.mFilename ); prevState = mPlayOnAdd ? SFXStatusPlaying : prevState; } diff --git a/Engine/source/T3D/shapeBase.cpp b/Engine/source/T3D/shapeBase.cpp index a7ed633b2..c1a814f07 100644 --- a/Engine/source/T3D/shapeBase.cpp +++ b/Engine/source/T3D/shapeBase.cpp @@ -163,7 +163,6 @@ ShapeBaseData::ShapeBaseData() reflectorDesc( NULL ), debris( NULL ), debrisID( 0 ), - debrisShapeName( StringTable->EmptyString() ), explosion( NULL ), explosionID( 0 ), underwaterExplosion( NULL ), @@ -198,7 +197,9 @@ ShapeBaseData::ShapeBaseData() renderWhenDestroyed( true ), inheritEnergyFromMount( false ) { - initShapeAsset(Shape); + INIT_SHAPEASSET(Shape); + INIT_SHAPEASSET(DebrisShape); + dMemset( mountPointNode, -1, sizeof( S32 ) * SceneObject::NumMountPoints ); remap_txr_tags = NULL; remap_buffer = NULL; @@ -213,14 +214,13 @@ ShapeBaseData::ShapeBaseData(const ShapeBaseData& other, bool temp_clone) : Game shadowProjectionDistance = other.shadowProjectionDistance; shadowSphereAdjust = other.shadowSphereAdjust; cloakTexName = other.cloakTexName; - cloneShapeAsset(Shape); + CLONE_SHAPEASSET(Shape); cubeDescName = other.cubeDescName; cubeDescId = other.cubeDescId; reflectorDesc = other.reflectorDesc; debris = other.debris; debrisID = other.debrisID; // -- for pack/unpack of debris ptr - debrisShapeName = other.debrisShapeName; - debrisShape = other.debrisShape; // -- TSShape loaded using debrisShapeName + CLONE_SHAPEASSET(DebrisShape); explosion = other.explosion; explosionID = other.explosionID; // -- for pack/unpack of explosion ptr underwaterExplosion = other.underwaterExplosion; @@ -337,67 +337,28 @@ bool ShapeBaseData::preload(bool server, String &errorStr) "ShapeBaseData::preload: invalid debris data"); } - - if( debrisShapeName && debrisShapeName[0] != '\0' && !bool(debrisShape) ) + if( bool(mDebrisShape)) { - debrisShape = ResourceManager::get().load(debrisShapeName); - if( bool(debrisShape) == false ) - { - errorStr = String::ToString("ShapeBaseData::load: Couldn't load shape \"%s\"", debrisShapeName); - return false; - } - else - { - if(!server && !debrisShape->preloadMaterialList(debrisShape.getPath()) && NetConnection::filesWereDownloaded()) - shapeError = true; - - TSShapeInstance* pDummy = new TSShapeInstance(debrisShape, !server); - delete pDummy; - } + TSShapeInstance* pDummy = new TSShapeInstance(mDebrisShape, !server); + delete pDummy; } } - PersistenceManager *persistMgr; - if (!Sim::findObject("ServerAssetValidator", persistMgr)) Con::errorf("ServerAssetValidator not found!"); - if (server && persistMgr && mShapeAssetId == StringTable->EmptyString()) - { - persistMgr->setDirty(this); - } - //Legacy catch - if (mShapeName != StringTable->EmptyString()) + S32 i; + if (ShapeAsset::getAssetErrCode(mShapeAsset) != ShapeAsset::Failed && ShapeAsset::getAssetErrCode(mShapeAsset) != ShapeAsset::BadFileReference) { - mShapeAssetId = ShapeAsset::getAssetIdByFilename(mShapeName); - } - U32 assetState = ShapeAsset::getAssetById(mShapeAssetId, &mShapeAsset); - if (ShapeAsset::Failed != assetState) - { - //only clear the legacy direct file reference if everything checks out fully - if (assetState == ShapeAsset::Ok) - { - mShapeName = StringTable->EmptyString(); - } - else Con::warnf("Warning: ShapeBaseData::preload-%s", ShapeAsset::getAssetErrstrn(assetState).c_str()); - S32 i; - - // Resolve shapename - mShape = mShapeAsset->getShapeResource(); - if (bool(mShape) == false) - { - errorStr = String::ToString("ShapeBaseData: Couldn't load shape \"%s\"",mShapeName); - return false; - } - if(!server && !mShape->preloadMaterialList(mShape.getPath()) && NetConnection::filesWereDownloaded()) + if (!server && !mShape->preloadMaterialList(mShape.getPath()) && NetConnection::filesWereDownloaded()) shapeError = true; if(computeCRC) { - Con::printf("Validation required for shape: %s", mShapeName); + Con::printf("Validation required for shape asset: %s", mShapeAsset.getAssetId()); - Torque::FS::FileNodeRef fileRef = Torque::FS::GetFileNode(mShape.getPath()); + Torque::FS::FileNodeRef fileRef = Torque::FS::GetFileNode(mShapeAsset->getShapePath()); if (!fileRef) { - errorStr = String::ToString("ShapeBaseData: Couldn't load shape \"%s\"", mShapeName); + errorStr = String::ToString("ShapeBaseData: Couldn't load shape asset \"%s\"", mShapeAsset.getAssetId()); return false; } @@ -405,7 +366,7 @@ bool ShapeBaseData::preload(bool server, String &errorStr) mCRC = fileRef->getChecksum(); else if(mCRC != fileRef->getChecksum()) { - errorStr = String::ToString("Shape \"%s\" does not match version on server.", mShapeName); + errorStr = String::ToString("Shape asset \"%s\" does not match version on server.", mShapeAsset.getAssetId()); return false; } } @@ -427,13 +388,13 @@ bool ShapeBaseData::preload(bool server, String &errorStr) if (!mShape->mBounds.isContained(collisionBounds.last())) { if (!silent_bbox_check) - Con::warnf("Warning: shape %s collision detail %d (Collision-%d) bounds exceed that of shape.", mShapeName, collisionDetails.size() - 1, collisionDetails.last()); + Con::warnf("Warning: shape asset %s collision detail %d (Collision-%d) bounds exceed that of shape.", mShapeAsset.getAssetId(), collisionDetails.size() - 1, collisionDetails.last()); collisionBounds.last() = mShape->mBounds; } else if (collisionBounds.last().isValidBox() == false) { if (!silent_bbox_check) - Con::errorf("Error: shape %s-collision detail %d (Collision-%d) bounds box invalid!", mShapeName, collisionDetails.size() - 1, collisionDetails.last()); + Con::errorf("Error: shape asset %s-collision detail %d (Collision-%d) bounds box invalid!", mShapeAsset.getAssetId(), collisionDetails.size() - 1, collisionDetails.last()); collisionBounds.last() = mShape->mBounds; } @@ -593,11 +554,7 @@ void ShapeBaseData::initPersistFields() addGroup( "Render" ); - addField("shapeAsset", TypeShapeAssetId, Offset(mShapeAssetId, ShapeBaseData), - "The source shape asset."); - - addField( "shapeFile", TypeShapeFilename, Offset(mShapeName, ShapeBaseData), - "The DTS or DAE model to use for this object." ); + INITPERSISTFIELD_SHAPEASSET(Shape, ShapeBaseData, "The source shape asset."); endGroup( "Render" ); @@ -611,8 +568,8 @@ void ShapeBaseData::initPersistFields() "%Debris to generate when this shape is blown up." ); addField( "renderWhenDestroyed", TypeBool, Offset(renderWhenDestroyed, ShapeBaseData), "Whether to render the shape when it is in the \"Destroyed\" damage state." ); - addField( "debrisShapeName", TypeShapeFilename, Offset(debrisShapeName, ShapeBaseData), - "The DTS or DAE model to use for auto-generated breakups. @note may not be functional." ); + + INITPERSISTFIELD_SHAPEASSET(DebrisShape, ShapeBaseData, "The shape asset to use for auto-generated breakups. @note may not be functional."); endGroup( "Destruction" ); @@ -800,8 +757,8 @@ void ShapeBaseData::packData(BitStream* stream) stream->write(shadowProjectionDistance); stream->write(shadowSphereAdjust); - - packShapeAsset(stream); + PACKDATA_SHAPEASSET(Shape); + PACKDATA_SHAPEASSET(DebrisShape); stream->writeString(cloakTexName); if(stream->writeFlag(mass != gShapeBaseDataProto.mass)) @@ -825,7 +782,6 @@ void ShapeBaseData::packData(BitStream* stream) stream->write(cameraMaxFov); stream->writeFlag(cameraCanBank); stream->writeFlag(mountedImagesBank); - stream->writeString( debrisShapeName ); stream->writeFlag(observeThroughObject); @@ -879,8 +835,8 @@ void ShapeBaseData::unpackData(BitStream* stream) stream->read(&shadowProjectionDistance); stream->read(&shadowSphereAdjust); - - unpackShapeAsset(stream); + UNPACKDATA_SHAPEASSET(Shape); + UNPACKDATA_SHAPEASSET(DebrisShape); cloakTexName = stream->readSTString(); if(stream->readFlag()) @@ -930,9 +886,6 @@ void ShapeBaseData::unpackData(BitStream* stream) cameraCanBank = stream->readFlag(); mountedImagesBank = stream->readFlag(); - - debrisShapeName = stream->readSTString(); - observeThroughObject = stream->readFlag(); if( stream->readFlag() ) @@ -2011,13 +1964,13 @@ void ShapeBase::blowUp() TSShapeInstance *debShape = NULL; - if( mDataBlock->debrisShape == NULL ) + if( mDataBlock->mDebrisShape == NULL ) { return; } else { - debShape = new TSShapeInstance( mDataBlock->debrisShape, true); + debShape = new TSShapeInstance( mDataBlock->mDebrisShape, true); } diff --git a/Engine/source/T3D/shapeBase.h b/Engine/source/T3D/shapeBase.h index f3b5d1f4c..4d3286b5c 100644 --- a/Engine/source/T3D/shapeBase.h +++ b/Engine/source/T3D/shapeBase.h @@ -373,8 +373,11 @@ struct ShapeBaseImageData: public GameBaseData { F32 scriptAnimTransitionTime; ///< The amount of time to transition between the previous sequence and new sequence ///< when the script prefix has changed. - StringTableEntry shapeName; ///< Name of shape to render. - StringTableEntry shapeNameFP; ///< Name of shape to render in first person (optional). + DECLARE_SHAPEASSET_ARRAY(ShapeBaseImageData, Shape, MaxShapes); ///< Name of shape to render. + DECLARE_SHAPEASSET_ARRAY_SETGET(ShapeBaseImageData, Shape); + + //DECLARE_SHAPEASSET(ShapeBaseImageData, ShapeFP); ///< Name of shape to render in first person (optional). + //DECLARE_SHAPEASSET_SETGET(ShapeBaseImageData, ShapeFP); StringTableEntry imageAnimPrefix; ///< Passed along to the mounting shape to modify /// animation sequences played in 3rd person. [optional] @@ -407,7 +410,6 @@ struct ShapeBaseImageData: public GameBaseData { /// @name Shape Data /// @{ - Resource shape[MaxShapes]; ///< Shape handle bool shapeIsValid[MaxShapes]; ///< Indicates that the shape has been loaded and is valid U32 mCRC[MaxShapes]; ///< Checksum of shape. @@ -538,7 +540,8 @@ public: F32 shadowProjectionDistance; F32 shadowSphereAdjust; - DECLARE_SHAPEASSET(ShapeBaseData, Shape); + DECLARE_SHAPEASSET(ShapeBaseData, Shape, onShapeChanged); + DECLARE_SHAPEASSET_SETGET(ShapeBaseData, Shape); StringTableEntry cloakTexName; @@ -552,8 +555,9 @@ public: /// @{ DebrisData * debris; S32 debrisID; - StringTableEntry debrisShapeName; - Resource debrisShape; + + DECLARE_SHAPEASSET(ShapeBaseData, DebrisShape, onDebrisChanged); + DECLARE_SHAPEASSET_SETGET(ShapeBaseData, DebrisShape); ExplosionData* explosion; S32 explosionID; @@ -598,8 +602,6 @@ public: /// @name Data initialized on preload /// @{ - - Resource mShape; ///< Shape handle U32 mCRC; bool computeCRC; @@ -672,6 +674,9 @@ public: char* remap_buffer; Vector txr_tag_remappings; bool silent_bbox_check; + + void onShapeChanged() {} + void onDebrisChanged() {} public: ShapeBaseData(const ShapeBaseData&, bool = false); }; diff --git a/Engine/source/T3D/shapeImage.cpp b/Engine/source/T3D/shapeImage.cpp index 8293b24a0..7bd42bea5 100644 --- a/Engine/source/T3D/shapeImage.cpp +++ b/Engine/source/T3D/shapeImage.cpp @@ -191,8 +191,6 @@ ShapeBaseImageData::ShapeBaseImageData() lightRadius = 10.f; lightBrightness = 1.0f; - shapeName = "core/rendering/shapes/noshape.dts"; - shapeNameFP = ""; imageAnimPrefix = ""; imageAnimPrefixFP = ""; fireState = -1; @@ -295,6 +293,8 @@ ShapeBaseImageData::ShapeBaseImageData() isAnimated[i] = false; hasFlash[i] = false; shapeIsValid[i] = false; + + INIT_SHAPEASSET_ARRAY(Shape, i); } shakeCamera = false; @@ -407,6 +407,7 @@ bool ShapeBaseImageData::preload(bool server, String &errorStr) { if (!Parent::preload(server, errorStr)) return false; + bool shapeError = false; // Resolve objects transmitted from server if (!server) { @@ -434,14 +435,12 @@ bool ShapeBaseImageData::preload(bool server, String &errorStr) // Shape 0: Standard image shape // Shape 1: Optional first person image shape - StringTableEntry name; if (i == FirstPersonImageShape) { - if ((useEyeOffset || useEyeNode) && shapeNameFP && shapeNameFP[0]) + if ((useEyeOffset || useEyeNode) && !mShapeAsset[i].isNull()) { // Make use of the first person shape useFirstPersonShape = true; - name = shapeNameFP; } else { @@ -449,27 +448,25 @@ bool ShapeBaseImageData::preload(bool server, String &errorStr) continue; } } - else - { - name = shapeName; - } - if (name && name[0]) { + if (!mShapeAsset[i].isNull()) + { // Resolve shapename - shape[i] = ResourceManager::get().load(name); - if (!bool(shape[i])) { - errorStr = String::ToString("Unable to load shape: %s", name); + mShape[i] = mShapeAsset[i]->getShapeResource(); + + if (!bool(mShape[i])) { + errorStr = String::ToString("Unable to load shape asset: %s", mShapeAsset[i]->getAssetId()); return false; } if(computeCRC) { - Con::printf("Validation required for shape: %s", name); + Con::printf("Validation required for shape asset: %s", mShapeAsset[i]->getAssetId()); - Torque::FS::FileNodeRef fileRef = Torque::FS::GetFileNode(shape[i].getPath()); + Torque::FS::FileNodeRef fileRef = Torque::FS::GetFileNode(mShape[i].getPath()); if (!fileRef) { - errorStr = String::ToString("ShapeBaseImageData: Couldn't load shape \"%s\"",name); + errorStr = String::ToString("ShapeBaseImageData: Couldn't load shape asset\"%s\"", mShapeAsset[i]->getAssetId()); return false; } @@ -479,29 +476,29 @@ bool ShapeBaseImageData::preload(bool server, String &errorStr) } else if(mCRC[i] != fileRef->getChecksum()) { - errorStr = String::ToString("Shape \"%s\" does not match version on server.",name); + errorStr = String::ToString("Shape asset\"%s\" does not match version on server.", mShapeAsset[i]->getAssetId()); return false; } } // Resolve nodes & build mount transform - eyeMountNode[i] = shape[i]->findNode("eyeMount"); - eyeNode[i] = shape[i]->findNode("eye"); + eyeMountNode[i] = mShape[i]->findNode("eyeMount"); + eyeNode[i] = mShape[i]->findNode("eye"); if (eyeNode[i] == -1) eyeNode[i] = eyeMountNode[i]; - ejectNode[i] = shape[i]->findNode("ejectPoint"); - muzzleNode[i] = shape[i]->findNode("muzzlePoint"); - retractNode[i] = shape[i]->findNode("retractionPoint"); + ejectNode[i] = mShape[i]->findNode("ejectPoint"); + muzzleNode[i] = mShape[i]->findNode("muzzlePoint"); + retractNode[i] = mShape[i]->findNode("retractionPoint"); mountTransform[i] = mountOffset; - S32 node = shape[i]->findNode("mountPoint"); + S32 node = mShape[i]->findNode("mountPoint"); if (node != -1) { MatrixF total(1); do { MatrixF nmat; QuatF q; - TSTransform::setMatrix(shape[i]->defaultRotations[node].getQuatF(&q),shape[i]->defaultTranslations[node],&nmat); + TSTransform::setMatrix(mShape[i]->defaultRotations[node].getQuatF(&q), mShape[i]->defaultTranslations[node],&nmat); total.mul(nmat); - node = shape[i]->nodes[node].parentIndex; + node = mShape[i]->nodes[node].parentIndex; } while(node != -1); total.inverse(); @@ -514,7 +511,7 @@ bool ShapeBaseImageData::preload(bool server, String &errorStr) for (U32 j = 0; j < MaxStates; j++) { StateData& s = state[j]; if (stateSequence[j] && stateSequence[j][0]) - s.sequence[i] = shape[i]->findSequence(stateSequence[j]); + s.sequence[i] = mShape[i]->findSequence(stateSequence[j]); if (s.sequence[i] != -1) { // This state has an animation sequence @@ -525,7 +522,7 @@ bool ShapeBaseImageData::preload(bool server, String &errorStr) char bufferVis[128]; dStrncpy(bufferVis, stateSequence[j], 100); dStrcat(bufferVis, "_vis", 128); - s.sequenceVis[i] = shape[i]->findSequence(bufferVis); + s.sequenceVis[i] = mShape[i]->findSequence(bufferVis); } if (s.sequenceVis[i] != -1) { @@ -537,13 +534,13 @@ bool ShapeBaseImageData::preload(bool server, String &errorStr) s.ignoreLoadedForReady = stateIgnoreLoadedForReady[j]; if (stateEmitterNode[j] && stateEmitterNode[j][0]) - s.emitterNode[i] = shape[i]->findNode(stateEmitterNode[j]); + s.emitterNode[i] = mShape[i]->findNode(stateEmitterNode[j]); if (s.emitterNode[i] == -1) s.emitterNode[i] = muzzleNode[i]; } - ambientSequence[i] = shape[i]->findSequence("ambient"); - spinSequence[i] = shape[i]->findSequence("spin"); + ambientSequence[i] = mShape[i]->findSequence("ambient"); + spinSequence[i] = mShape[i]->findSequence("spin"); shapeIsValid[i] = true; } @@ -567,7 +564,7 @@ bool ShapeBaseImageData::preload(bool server, String &errorStr) { if( shapeIsValid[i] ) { - TSShapeInstance* pDummy = new TSShapeInstance(shape[i], !server); + TSShapeInstance* pDummy = new TSShapeInstance(mShape[i], !server); delete pDummy; } } @@ -590,19 +587,9 @@ void ShapeBaseImageData::initPersistFields() addField( "emap", TypeBool, Offset(emap, ShapeBaseImageData), "@brief Whether to enable environment mapping on this Image.\n\n" ); - addField( "shapeFile", TypeShapeFilename, Offset(shapeName, ShapeBaseImageData), - "@brief The DTS or DAE model to use for this Image.\n\n" ); + INITPERSISTFIELD_SHAPEASSET_ARRAY(Shape, MaxShapes, ShapeBaseImageData, "The shape asset to use for this image in the third person") - addField( "shapeFileFP", TypeShapeFilename, Offset(shapeNameFP, ShapeBaseImageData), - "@brief The DTS or DAE model to use for this Image when in first person.\n\n" - "This is an optional parameter that also requires either eyeOffset or useEyeNode " - "to be set. If none of these conditions is met then shapeFile will be used " - "for all cases.\n\n" - "Typically you set a first person image for a weapon that " - "includes the player's arms attached to it for animating while firing, " - "reloading, etc. This is typical of many FPS games." - "@see eyeOffset\n" - "@see useEyeNode\n"); + //addProtectedField("shapeFileFP", TypeShapeFilename, Offset(mShapeName[1], ShapeBaseImageData), _setShapeData, defaultProtectedGetFn, "deprecated alias for ShapeFPFile/Asset", AbstractClassRep::FIELD_HideInInspectors); addField( "imageAnimPrefix", TypeCaseString, Offset(imageAnimPrefix, ShapeBaseImageData), "@brief Passed along to the mounting shape to modify animation sequences played in third person. [optional]\n\n" ); @@ -987,8 +974,10 @@ void ShapeBaseImageData::packData(BitStream* stream) } } - stream->writeString(shapeName); // shape 0 for normal use - stream->writeString(shapeNameFP); // shape 1 for first person use (optional) + for (U32 j = 0; j < MaxShapes; ++j) + { + PACKDATA_SHAPEASSET_ARRAY(Shape, j); // shape 0 for normal use, shape 1 for first person use (optional) + } stream->writeString(imageAnimPrefix); stream->writeString(imageAnimPrefixFP); @@ -1169,8 +1158,10 @@ void ShapeBaseImageData::unpackData(BitStream* stream) } } - shapeName = stream->readSTString(); // shape 0 for normal use - shapeNameFP = stream->readSTString(); // shape 1 for first person use (optional) + for (U32 j = 0; j < MaxShapes; ++j) + { + UNPACKDATA_SHAPEASSET_ARRAY(Shape, j); // shape 0 for normal use, shape 1 for first person use (optional) + } imageAnimPrefix = stream->readSTString(); imageAnimPrefixFP = stream->readSTString(); @@ -2128,7 +2119,7 @@ S32 ShapeBase::getNodeIndex(U32 imageSlot,StringTableEntry nodeName) { MountedImage& image = mMountedImageList[imageSlot]; if (image.dataBlock) - return image.dataBlock->shape[getImageShapeIndex(image)]->findNode(nodeName); + return image.dataBlock->mShape[getImageShapeIndex(image)]->findNode(nodeName); else return -1; } @@ -2318,7 +2309,7 @@ void ShapeBase::setImage( U32 imageSlot, for (U32 i=0; ishapeIsValid[i]) - image.shapeInstance[i] = new TSShapeInstance(image.dataBlock->shape[i], isClientObject()); + image.shapeInstance[i] = new TSShapeInstance(image.dataBlock->mShape[i], isClientObject()); } if (isClientObject()) diff --git a/Engine/source/T3D/tsStatic.cpp b/Engine/source/T3D/tsStatic.cpp index 8a066dd2d..2ed98a265 100644 --- a/Engine/source/T3D/tsStatic.cpp +++ b/Engine/source/T3D/tsStatic.cpp @@ -114,7 +114,6 @@ TSStatic::TSStatic() mTypeMask |= StaticObjectType | StaticShapeObjectType; - mShapeName = ""; mShapeInstance = NULL; mPlayAmbient = true; @@ -150,8 +149,7 @@ TSStatic::TSStatic() mAnimOffset = 0.0f; mAnimSpeed = 1.0f; - mShapeAsset = StringTable->EmptyString(); - mShapeAssetId = StringTable->EmptyString(); + INIT_SHAPEASSET(Shape); } TSStatic::~TSStatic() @@ -184,13 +182,11 @@ void TSStatic::initPersistFields() "Percent Animation Speed."); addGroup("Shape"); - addProtectedField("shapeAsset", TypeShapeAssetId, Offset(mShapeAssetId, TSStatic), - &TSStatic::_setShapeAsset, &defaultProtectedGetFn, - "The source shape asset."); + INITPERSISTFIELD_SHAPEASSET(Shape, TSStatic, "Model to use for this TSStatic"); addProtectedField("shapeName", TypeShapeFilename, Offset(mShapeName, TSStatic), - &TSStatic::_setShapeName, &defaultProtectedGetFn, - "%Path and filename of the model file (.DTS, .DAE) to use for this TSStatic. Legacy field. Any loose files assigned here will attempt to be auto-imported in as an asset."); + &TSStatic::_setShapeData, &defaultProtectedGetFn, + "%Path and filename of the model file (.DTS, .DAE) to use for this TSStatic. Legacy field. Any loose files assigned here will attempt to be auto-imported in as an asset.", AbstractClassRep::FIELD_HideInInspectors); endGroup("Shape"); @@ -287,50 +283,6 @@ void TSStatic::consoleInit() Con::addVariable("$pref::staticObjectUnfadeableSize", TypeF32, &TSStatic::smStaticObjectUnfadeableSize, "Size of object where if the bounds is at or bigger than this, it will be ignored in the $pref::useStaticObjectFade logic. Useful for very large, distance-important objects.\n"); } -bool TSStatic::_setShapeAsset(void* obj, const char* index, const char* data) -{ - TSStatic* ts = static_cast(obj);// ->setFile(FileName(data)); - - ts->mShapeAssetId = StringTable->insert(data); - - return ts->setShapeAsset(ts->mShapeAssetId); -} - -bool TSStatic::_setShapeName(void* obj, const char* index, const char* data) -{ - TSStatic* ts = static_cast(obj);// ->setFile(FileName(data)); - - StringTableEntry assetId = ShapeAsset::getAssetIdByFilename(StringTable->insert(data)); - if (assetId != StringTable->EmptyString()) - { - //Special exception case. If we've defaulted to the 'no shape' mesh, don't save it out, we'll retain the original ids/paths so it doesn't break - //the TSStatic - if (ts->setShapeAsset(assetId)) - { - if (assetId == StringTable->insert("Core_Rendering:noShape")) - { - ts->mShapeName = data; - ts->mShapeAssetId = StringTable->EmptyString(); - - return true; - } - else - { - ts->mShapeAssetId = assetId; - ts->mShapeName = StringTable->EmptyString(); - - return false; - } - } - } - else - { - ts->mShapeAsset = StringTable->EmptyString(); - } - - return true; -} - bool TSStatic::_setFieldSkin(void* object, const char* index, const char* data) { TSStatic* ts = static_cast(object); @@ -425,34 +377,6 @@ bool TSStatic::onAdd() return true; } -bool TSStatic::setShapeAsset(const StringTableEntry shapeAssetId) -{ - if (!mShapeAsset.isNull()) - { - mShapeAsset->getChangedSignal().remove(this, &TSStatic::_onAssetChanged); - } - - if (ShapeAsset::getAssetById(shapeAssetId, &mShapeAsset)) - { - //Special exception case. If we've defaulted to the 'no shape' mesh, don't save it out, we'll retain the original ids/paths so it doesn't break - //the TSStatic - if (mShapeAsset.getAssetId() != StringTable->insert("Core_Rendering:noshape")) - { - mShapeName = StringTable->EmptyString(); - - mShapeAsset->getChangedSignal().notify(this, &TSStatic::_onAssetChanged); - } - - _createShape(); - - setMaskBits(-1); - - return true; - } - - return false; -} - bool TSStatic::_createShape() { // Cleanup before we create. @@ -674,9 +598,6 @@ void TSStatic::onRemove() if (isClientObject()) mCubeReflector.unregisterReflector(); - if(!mShapeAsset.isNull()) - mShapeAsset->getChangedSignal().remove(this, &TSStatic::_onAssetChanged); - Parent::onRemove(); } @@ -689,7 +610,7 @@ void TSStatic::_onResourceChanged(const Torque::Path& path) _updateShouldTick(); } -void TSStatic::_onAssetChanged() +void TSStatic::onShapeChanged() { _createShape(); _updateShouldTick(); @@ -1037,8 +958,7 @@ U32 TSStatic::packUpdate(NetConnection* con, U32 mask, BitStream* stream) if (stream->writeFlag(mask & AdvancedStaticOptionsMask)) { - stream->writeString(mShapeAsset.getAssetId()); - stream->writeString(mShapeName); + PACK_SHAPEASSET(con, Shape); stream->write((U32)mDecalType); @@ -1153,11 +1073,7 @@ void TSStatic::unpackUpdate(NetConnection* con, BitStream* stream) if (stream->readFlag()) // AdvancedStaticOptionsMask { - char buffer[256]; - stream->readString(buffer); - setShapeAsset(StringTable->insert(buffer)); - - mShapeName = stream->readSTString(); + UNPACK_SHAPEASSET(con, Shape); stream->read((U32*)&mDecalType); @@ -1676,7 +1592,7 @@ void TSStatic::updateMaterials() String path; if (mShapeAsset->isAssetValid()) - path = mShapeAsset->getShapeFilename(); + path = mShapeAsset->getShapeFileName(); else path = mShapeName; @@ -1709,9 +1625,8 @@ void TSStatic::updateMaterials() void TSStatic::getUtilizedAssets(Vector* usedAssetsList) { - if(!mShapeAsset.isNull() && mShapeAsset->getAssetId() != StringTable->insert("Core_Rendering:noShape")) + if(!mShapeAsset.isNull() && mShapeAsset->getAssetId() != ShapeAsset::smNoShapeAssetFallback) usedAssetsList->push_back_unique(mShapeAsset->getAssetId()); - } //------------------------------------------------------------------------ @@ -1874,7 +1789,7 @@ DefineEngineMethod(TSStatic, changeMaterial, void, (const char* mapTo, Material* return; } - TSMaterialList* shapeMaterialList = object->getShape()->materialList; + TSMaterialList* shapeMaterialList = object->getShapeResource()->materialList; // Check the mapTo name exists for this shape S32 matIndex = shapeMaterialList->getMaterialNameList().find_next(String(mapTo)); @@ -1914,7 +1829,7 @@ DefineEngineMethod(TSStatic, getModelFile, const char*, (), , "@endtsexample\n" ) { - return object->getShapeFileName(); + return object->getShape(); } void TSStatic::set_special_typing() diff --git a/Engine/source/T3D/tsStatic.h b/Engine/source/T3D/tsStatic.h index 57316a9d9..1c82671cb 100644 --- a/Engine/source/T3D/tsStatic.h +++ b/Engine/source/T3D/tsStatic.h @@ -163,8 +163,6 @@ protected: 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(); @@ -172,7 +170,7 @@ protected: void _renderNormals(ObjectRenderInst* ri, SceneRenderState* state, BaseMatInstance* overrideMat); void _onResourceChanged(const Torque::Path& path); - void _onAssetChanged(); + void onShapeChanged(); // ProcessObject virtual void processTick(const Move* move); @@ -193,16 +191,14 @@ protected: Convex* mConvexList; - StringTableEntry mShapeName; + DECLARE_SHAPEASSET(TSStatic, Shape, onShapeChanged); + DECLARE_SHAPEASSET_NET_SETGET(TSStatic, Shape, AdvancedStaticOptionsMask); + U32 mShapeHash; - Resource mShape; Vector mCollisionDetails; Vector mLOSDetails; TSShapeInstance* mShapeInstance; - AssetPtr mShapeAsset; - StringTableEntry mShapeAssetId; - NetStringHandle mSkinNameHandle; String mAppliedSkinName; @@ -242,8 +238,6 @@ public: DECLARE_CONOBJECT(TSStatic); static void initPersistFields(); static void consoleInit(); - static bool _setShapeAsset(void* obj, const char* index, const char* data); - static bool _setShapeName(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); @@ -268,10 +262,6 @@ public: bool allowPlayerStep() const { return mAllowPlayerStep; } - Resource getShape() const { return mShape; } - StringTableEntry getShapeFileName() { return mShapeName; } - void setShapeFileName(StringTableEntry shapeName) { mShapeName = shapeName; } - TSShapeInstance* getShapeInstance() const { return mShapeInstance; } U32 getNumDetails(); diff --git a/Engine/source/T3D/vehicles/vehicle.cpp b/Engine/source/T3D/vehicles/vehicle.cpp index 5a537cd76..c673cd3b7 100644 --- a/Engine/source/T3D/vehicles/vehicle.cpp +++ b/Engine/source/T3D/vehicles/vehicle.cpp @@ -208,7 +208,7 @@ bool VehicleData::preload(bool server, String &errorStr) if (!collisionDetails.size() || collisionDetails[0] == -1) { Con::errorf("VehicleData::preload failed: Vehicle models must define a collision-1 detail"); - errorStr = String::ToString("VehicleData: Couldn't load shape \"%s\"", mShapeName); + errorStr = String::ToString("VehicleData: Couldn't load shape asset \"%s\"", mShapeAsset.getAssetId()); return false; } diff --git a/Engine/source/T3D/vehicles/wheeledVehicle.cpp b/Engine/source/T3D/vehicles/wheeledVehicle.cpp index 7374c51d1..36a355cdb 100644 --- a/Engine/source/T3D/vehicles/wheeledVehicle.cpp +++ b/Engine/source/T3D/vehicles/wheeledVehicle.cpp @@ -75,8 +75,8 @@ ConsoleDocClass( WheeledVehicleTire, WheeledVehicleTire::WheeledVehicleTire() { - shape = 0; - shapeName = ""; + INIT_SHAPEASSET(Shape); + staticFriction = 1; kineticFriction = 0.5f; restitution = 1; @@ -94,21 +94,17 @@ bool WheeledVehicleTire::preload(bool server, String &errorStr) { // Load up the tire shape. ShapeBase has an option to force a // CRC check, this is left out here, but could be easily added. - if (shapeName && shapeName[0]) + if (!mShape) + { + errorStr = String::ToString("WheeledVehicleTire: Couldn't load shape \"%s\"", mShapeAssetId); + return false; + } + else { - - // Load up the shape resource - shape = ResourceManager::get().load(shapeName); - if (!bool(shape)) - { - errorStr = String::ToString("WheeledVehicleTire: Couldn't load shape \"%s\"",shapeName); - return false; - } - // Determinw wheel radius from the shape's bounding box. // The tire should be built with it's hub axis along the // object's Y axis. - radius = shape->mBounds.len_z() / 2; + radius = mShape->mBounds.len_z() / 2; } return true; @@ -116,8 +112,8 @@ bool WheeledVehicleTire::preload(bool server, String &errorStr) void WheeledVehicleTire::initPersistFields() { - addField( "shapeFile",TypeShapeFilename,Offset(shapeName,WheeledVehicleTire), - "The path to the shape to use for the wheel." ); + INITPERSISTFIELD_SHAPEASSET(Shape, WheeledVehicleTire, "The shape to use for the wheel."); + addField( "mass", TypeF32, Offset(mass, WheeledVehicleTire), "The mass of the wheel.\nCurrently unused." ); addField( "radius", TypeF32, Offset(radius, WheeledVehicleTire), @@ -181,7 +177,8 @@ void WheeledVehicleTire::packData(BitStream* stream) { Parent::packData(stream); - stream->writeString(shapeName); + PACKDATA_SHAPEASSET(Shape); + stream->write(mass); stream->write(staticFriction); stream->write(kineticFriction); @@ -199,7 +196,8 @@ void WheeledVehicleTire::unpackData(BitStream* stream) { Parent::unpackData(stream); - shapeName = stream->readSTString(); + UNPACKDATA_SHAPEASSET(Shape); + stream->read(&mass); stream->read(&staticFriction); stream->read(&kineticFriction); @@ -1542,8 +1540,8 @@ void WheeledVehicle::unpackUpdate(NetConnection *con, BitStream *stream) // Create an instance of the tire for rendering delete wheel->shapeInstance; - wheel->shapeInstance = (wheel->tire->shape == NULL) ? 0: - new TSShapeInstance(wheel->tire->shape); + wheel->shapeInstance = (wheel->tire->mShape == NULL) ? 0: + new TSShapeInstance(wheel->tire->mShape); } } } diff --git a/Engine/source/T3D/vehicles/wheeledVehicle.h b/Engine/source/T3D/vehicles/wheeledVehicle.h index 8efc03104..b096670ca 100644 --- a/Engine/source/T3D/vehicles/wheeledVehicle.h +++ b/Engine/source/T3D/vehicles/wheeledVehicle.h @@ -31,6 +31,8 @@ #include "collision/clippedPolyList.h" #endif +#include "T3D/assets/ShapeAsset.h" + class ParticleEmitter; class ParticleEmitterData; @@ -41,8 +43,8 @@ struct WheeledVehicleTire: public SimDataBlock { typedef SimDataBlock Parent; - // - StringTableEntry shapeName;// Max shape to render + DECLARE_SHAPEASSET(WheeledVehicleTire, Shape, onShapeChanged); + DECLARE_SHAPEASSET_SETGET(WheeledVehicleTire, Shape); // Physical properties F32 mass; // Mass of the whole wheel @@ -62,7 +64,6 @@ struct WheeledVehicleTire: public SimDataBlock F32 longitudinalRelaxation; // Shape information initialized in the preload - Resource shape; // The loaded shape F32 radius; // Tire radius // @@ -72,6 +73,8 @@ struct WheeledVehicleTire: public SimDataBlock bool preload(bool, String &errorStr); virtual void packData(BitStream* stream); virtual void unpackData(BitStream* stream); + + void onShapeChanged() {} }; diff --git a/Engine/source/afx/ce/afxStaticShape.h b/Engine/source/afx/ce/afxStaticShape.h index d7c69fd6f..d58ce4a0a 100644 --- a/Engine/source/afx/ce/afxStaticShape.h +++ b/Engine/source/afx/ce/afxStaticShape.h @@ -86,7 +86,7 @@ public: virtual U32 packUpdate(NetConnection*, U32, BitStream*); virtual void unpackUpdate(NetConnection*, BitStream*); - const char* getShapeFileName() const { return mDataBlock->mShapeName; } + const char* getShapeFileName() const { return mDataBlock->mShapeAsset->getShapeFileName(); } void setVisibility(bool flag) { mIs_visible = flag; } DECLARE_CONOBJECT(afxStaticShape); diff --git a/Engine/source/afx/util/afxParticlePool_T3D.cpp b/Engine/source/afx/util/afxParticlePool_T3D.cpp index d6c4847f9..c8cc7c9ed 100644 --- a/Engine/source/afx/util/afxParticlePool_T3D.cpp +++ b/Engine/source/afx/util/afxParticlePool_T3D.cpp @@ -146,7 +146,7 @@ void afxParticlePool::pool_renderObject_Normal(RenderPassManager *renderManager, if (main_emitter_data->textureHandle) ri->diffuseTex = &*(main_emitter_data->textureHandle); else - ri->diffuseTex = &*(main_emitter_data->particleDataBlocks[0]->textureHandle); + ri->diffuseTex = &*(main_emitter_data->particleDataBlocks[0]->getTextureResource()); ri->softnessDistance = main_emitter_data->softnessDistance; @@ -277,7 +277,7 @@ void afxParticlePool::pool_renderObject_TwoPass(RenderPassManager *renderManager //if (main_emitter_data->textureHandle) // ri->diffuseTex = &*(main_emitter_data->textureHandle); //else - ri->diffuseTex = &*(main_emitter_data->particleDataBlocks[0]->textureExtHandle); + ri->diffuseTex = &*(main_emitter_data->particleDataBlocks[0]->getTextureExtResource()); F32 save_sort_dist = ri->sortDistSq; @@ -481,7 +481,7 @@ void afxParticlePool::pool_renderObject_TwoPass(RenderPassManager *renderManager if (main_emitter_data->textureHandle) ri->diffuseTex = &*(main_emitter_data->textureHandle); else - ri->diffuseTex = &*(main_emitter_data->particleDataBlocks[0]->textureHandle); + ri->diffuseTex = &*(main_emitter_data->particleDataBlocks[0]->getTextureResource()); ri->softnessDistance = main_emitter_data->softnessDistance; diff --git a/Engine/source/assets/assetBase.cpp b/Engine/source/assets/assetBase.cpp index 14bc3026e..bdd7072fd 100644 --- a/Engine/source/assets/assetBase.cpp +++ b/Engine/source/assets/assetBase.cpp @@ -76,6 +76,7 @@ mAssetInitialized(false) mInternalName = StringTable->EmptyString(); mClassName = StringTable->EmptyString(); mSuperClassName = StringTable->EmptyString(); + mLoadedState = AssetErrCode::NotLoaded; } //----------------------------------------------------------------------------- @@ -315,6 +316,32 @@ S32 AssetBase::getAssetDependencyFieldCount(const char* pFieldName) //----------------------------------------------------------------------------- +StringTableEntry AssetBase::getAssetDependencyField(const char* pFieldName, S32 index) +{ + SimFieldDictionary* fieldDictionary = getFieldDictionary(); + for (SimFieldDictionaryIterator itr(fieldDictionary); *itr; ++itr) + { + SimFieldDictionary::Entry* entry = *itr; + + String slotName = String(entry->slotName); + + if (slotName.startsWith(pFieldName)) + { + S32 trailingNum; + String::GetTrailingNumber(slotName.c_str(), trailingNum); + + if (trailingNum == index) + { + return StringTable->insert(String(entry->value).replace(ASSET_ID_FIELD_PREFIX, "").c_str()); + } + } + } + + return StringTable->EmptyString(); +} + +//----------------------------------------------------------------------------- + void AssetBase::clearAssetDependencyFields(const char* pFieldName) { SimFieldDictionary* fieldDictionary = getFieldDictionary(); @@ -340,7 +367,7 @@ void AssetBase::addAssetDependencyField(const char* pFieldName, const char* pAss dSprintf(depSlotName, sizeof(depSlotName), "%s%d", pFieldName, existingFieldCount); char depValue[255]; - dSprintf(depValue, sizeof(depValue), "@Asset=%s", pAssetId); + dSprintf(depValue, sizeof(depValue), "%s=%s", ASSET_ID_SIGNATURE, pAssetId); setDataField(StringTable->insert(depSlotName), NULL, StringTable->insert(depValue)); } diff --git a/Engine/source/assets/assetBase.h b/Engine/source/assets/assetBase.h index b6480f0b1..352efa1f1 100644 --- a/Engine/source/assets/assetBase.h +++ b/Engine/source/assets/assetBase.h @@ -66,6 +66,7 @@ protected: bool mAssetInitialized; AssetDefinition* mpAssetDefinition; U32 mAcquireReferenceCount; + U32 mLoadedState; public: enum AssetErrCode @@ -87,7 +88,7 @@ public: if (errCode > AssetErrCode::Extended) return "undefined error"; return mErrCodeStrings[errCode]; }; - + U32 getStatus() { return mLoadedState; }; AssetBase(); virtual ~AssetBase(); @@ -124,6 +125,7 @@ public: void refreshAsset(void); S32 getAssetDependencyFieldCount(const char* pFieldName); + StringTableEntry getAssetDependencyField(const char* pFieldName, S32 index = 0); void clearAssetDependencyFields(const char* pFieldName); void addAssetDependencyField(const char* pFieldName, const char* pAssetId); @@ -167,5 +169,10 @@ private: void setOwned(AssetManager* pAssetManager, AssetDefinition* pAssetDefinition); }; +//helper macro for stitching string and non string values togeather sans quotes +#define assetText(x,suff) #x#suff +#define macroText(x) #x +#define assetDoc(x,suff) "@brief "#x" "#suff + #endif // _ASSET_BASE_H_ diff --git a/Engine/source/assets/assetBase_ScriptBinding.h b/Engine/source/assets/assetBase_ScriptBinding.h index fd1c9baa8..f326f6711 100644 --- a/Engine/source/assets/assetBase_ScriptBinding.h +++ b/Engine/source/assets/assetBase_ScriptBinding.h @@ -50,6 +50,15 @@ DefineEngineMethod(AssetBase, getAssetDependencyFieldCount, S32, (const char* pF return object->getAssetDependencyFieldCount(pFieldName); } +DefineEngineMethod(AssetBase, getAssetDependencyField, const char*, (const char* pFieldName, S32 index), ("", 0), + "Gets an asset dependency field to the asset definition at a given index.\n" + "@param fieldName The name of the field.\n" + "@param index The index of the field to look up in the event there are multiple dependency fields. Defaults to 0" + "@return The assetID assigned to the given dependency field.\n") +{ + return object->getAssetDependencyField(pFieldName, index); +} + DefineEngineMethod(AssetBase, clearAssetDependencyFields, void, (const char* pFieldName), (""), "Clears any asset dependency fields matching the name provided.\n" "@param fieldName The name of the fields to be cleared") @@ -71,3 +80,15 @@ DefineEngineMethod(AssetBase, saveAsset, bool, (), , { return object->saveAsset(); } + +DefineEngineMethod(AssetBase, getStatus, S32, (), , "get status")\ +{ + return object->getStatus(); +} + +DefineEngineMethod(AssetBase, getStatusString, const char*, (), , + "Returns the load status of the asset.\n" + "@return What status code the asset had after being loaded.\n") +{ + return object->getAssetErrstrn(object->getStatus()); +} diff --git a/Engine/source/cinterface/c_simobjectInterface.cpp b/Engine/source/cinterface/c_simobjectInterface.cpp index 1c687af28..0464b97a5 100644 --- a/Engine/source/cinterface/c_simobjectInterface.cpp +++ b/Engine/source/cinterface/c_simobjectInterface.cpp @@ -53,7 +53,7 @@ DefineNewEngineMethod(SimObject, InspectPreApply, void, (), , "") object->inspectPreApply(); } -DefineNewEngineMethod(SimObject, InspectPostApply, void, (), , "") +DefineEngineMethod(SimObject, InspectPostApply, void, (), , "") { object->inspectPostApply(); } diff --git a/Engine/source/console/consoleFunctions.cpp b/Engine/source/console/consoleFunctions.cpp index 797678d93..6dd1f1902 100644 --- a/Engine/source/console/consoleFunctions.cpp +++ b/Engine/source/console/consoleFunctions.cpp @@ -2801,3 +2801,11 @@ DefineEngineFunction( getMaxDynamicVerts, S32, (),, { return GFX_MAX_DYNAMIC_VERTS / 2; } + +DefineEngineFunction( getStringHash, S32, (const char* _inString, bool _sensitive), ("", true), "generate a hash from a string. foramt is (string, casesensitive). defaults to true") +{ + if (_sensitive) + return S32(String::String(_inString).getHashCaseSensitive()); + else + return S32(String::String(_inString).getHashCaseInsensitive()); +} diff --git a/Engine/source/console/consoleTypes.cpp b/Engine/source/console/consoleTypes.cpp index e43473476..beaffe6c8 100644 --- a/Engine/source/console/consoleTypes.cpp +++ b/Engine/source/console/consoleTypes.cpp @@ -159,7 +159,7 @@ ConsoleProcessData( TypeFilename ) //----------------------------------------------------------------------------- // TypeStringFilename //----------------------------------------------------------------------------- -ConsolePrepType( filename, TypeStringFilename, String ) +ConsolePrepType( filename, TypeStringFilename, const char* ) ConsoleSetType( TypeStringFilename ) { @@ -177,7 +177,7 @@ ConsoleSetType( TypeStringFilename ) return; } - *((String*)dptr) = String(buffer); + *((const char**)dptr) = StringTable->insert(buffer); } else Con::printf("(TypeStringFilename) Cannot set multiple args to a single filename."); @@ -185,7 +185,7 @@ ConsoleSetType( TypeStringFilename ) ConsoleGetType( TypeStringFilename ) { - return *((String*)dptr); + return *((const char**)(dptr)); } ConsoleProcessData( TypeStringFilename ) @@ -204,7 +204,7 @@ ConsoleProcessData( TypeStringFilename ) //----------------------------------------------------------------------------- // TypePrefabFilename //----------------------------------------------------------------------------- -ConsolePrepType( filename, TypePrefabFilename, String ) +ConsolePrepType( filename, TypePrefabFilename, const char* ) ConsoleSetType( TypePrefabFilename ) { @@ -213,7 +213,7 @@ ConsoleSetType( TypePrefabFilename ) ConsoleGetType( TypePrefabFilename ) { - return *((String*)dptr); + return *((const char**)(dptr)); } ConsoleProcessData( TypePrefabFilename ) @@ -232,16 +232,16 @@ ConsoleProcessData( TypePrefabFilename ) //----------------------------------------------------------------------------- // TypeImageFilename //----------------------------------------------------------------------------- -ConsolePrepType( filename, TypeImageFilename, String ) +ConsolePrepType( filename, TypeImageFilename, const char* ) ConsoleSetType( TypeImageFilename ) { - Con::setData(TypeStringFilename, dptr, 0, argc, argv, tbl, flag); + Con::setData(TypeFilename, dptr, 0, argc, argv, tbl, flag); } ConsoleGetType( TypeImageFilename ) { - return *((String*)dptr); + return *((const char**)(dptr)); } ConsoleProcessData( TypeImageFilename ) @@ -281,6 +281,33 @@ ConsoleProcessData( TypeShapeFilename ) } } +//----------------------------------------------------------------------------- +// TypeSoundFilename +//----------------------------------------------------------------------------- +ConsolePrepType(filename, TypeSoundFilename, const char*) + +ConsoleSetType(TypeSoundFilename) +{ + Con::setData(TypeFilename, dptr, 0, argc, argv, tbl, flag); +} + +ConsoleGetType(TypeSoundFilename) +{ + return *((const char **)(dptr)); +} + +ConsoleProcessData(TypeSoundFilename) +{ + if (Con::expandScriptFilename(buffer, bufferSz, data)) + return buffer; + else + { + Con::warnf("(TypeSoundFilename) illegal filename detected: %s", data); + return data; + } +} + + //----------------------------------------------------------------------------- // TypeS8 //----------------------------------------------------------------------------- @@ -797,20 +824,17 @@ ConsoleSetType( TypeParticleParameterString ) // TypeMaterialName //----------------------------------------------------------------------------- -ConsoleType(string, TypeMaterialName, String, "") +ConsoleType(string, TypeMaterialName, const char*, "") ConsoleGetType( TypeMaterialName ) { - const String *theString = static_cast(dptr); - return theString->c_str(); + return* ((const char**)(dptr)); } ConsoleSetType( TypeMaterialName ) { - String *theString = static_cast(dptr); - if(argc == 1) - *theString = argv[0]; + *((const char**)dptr) = StringTable->insert(argv[0]); else Con::printf("(TypeMaterialName) Cannot set multiple args to a single string."); } @@ -860,20 +884,17 @@ ConsoleSetType( TypeTerrainMaterialName ) // TypeCubemapName //----------------------------------------------------------------------------- -ConsoleType(string, TypeCubemapName, String, "") +ConsoleType(string, TypeCubemapName, const char*, "") ConsoleGetType( TypeCubemapName ) { - const String *theString = static_cast(dptr); - return theString->c_str(); + return*((const char**)(dptr)); } ConsoleSetType( TypeCubemapName ) { - String *theString = static_cast(dptr); - if(argc == 1) - *theString = argv[0]; + *((const char**)dptr) = StringTable->insert(argv[0]); else Con::printf("(TypeCubemapName) Cannot set multiple args to a single string."); } diff --git a/Engine/source/console/consoleTypes.h b/Engine/source/console/consoleTypes.h index a5da7661e..646ffb450 100644 --- a/Engine/source/console/consoleTypes.h +++ b/Engine/source/console/consoleTypes.h @@ -73,7 +73,7 @@ DefineConsoleType( TypeCaseString, const char * ) DefineConsoleType( TypeRealString, String ) DefineConsoleType( TypeCommand, String ) DefineConsoleType( TypeFilename, const char * ) -DefineConsoleType( TypeStringFilename, String ) +DefineConsoleType( TypeStringFilename, const char*) DefineConsoleType(TypeRotationF, RotationF) @@ -87,22 +87,27 @@ DefineUnmappedConsoleType( TypePID, SimPersistID* ); /// TypeImageFilename is equivalent to TypeStringFilename in its usage, /// it exists for the benefit of GuiInspector, which will provide a custom /// InspectorField for this type that can display a texture preview. -DefineConsoleType( TypeImageFilename, String ) +DefineConsoleType( TypeImageFilename, const char* ) /// TypePrefabFilename is equivalent to TypeStringFilename in its usage, /// it exists for the benefit of GuiInspector, which will provide a /// custom InspectorField for this type. -DefineConsoleType( TypePrefabFilename, String ) +DefineConsoleType( TypePrefabFilename, const char*) /// TypeShapeFilename is equivalent to TypeStringFilename in its usage, /// it exists for the benefit of GuiInspector, which will provide a /// custom InspectorField for this type. -DefineConsoleType( TypeShapeFilename, String ) +DefineConsoleType( TypeShapeFilename, const char* ) + +/// TypeSoundFilename is exactly the same as TypeShapeFilename +/// it exists for the benefit of GuiInspector, which will provide a +/// custom InspectorField for this type. +DefineConsoleType(TypeSoundFilename, const char*) /// TypeMaterialName is equivalent to TypeRealString in its usage, /// it exists for the benefit of GuiInspector, which will provide a /// custom InspectorField for this type. -DefineConsoleType( TypeMaterialName, String ) +DefineConsoleType( TypeMaterialName, const char*) /// TypeTerrainMaterialIndex is equivalent to TypeS32 in its usage, /// it exists for the benefit of GuiInspector, which will provide a @@ -116,7 +121,7 @@ DefineConsoleType( TypeTerrainMaterialName, const char * ) /// TypeCubemapName is equivalent to TypeRealString in its usage, /// but the Inspector will provide a drop-down list of CubemapData objects. -DefineConsoleType( TypeCubemapName, String ) +DefineConsoleType( TypeCubemapName, const char*) DefineConsoleType( TypeParticleParameterString, const char * ) diff --git a/Engine/source/console/fileSystemFunctions.cpp b/Engine/source/console/fileSystemFunctions.cpp index fd114b71d..eea26a984 100644 --- a/Engine/source/console/fileSystemFunctions.cpp +++ b/Engine/source/console/fileSystemFunctions.cpp @@ -398,6 +398,21 @@ DefineEngineFunction(isFile, bool, ( const char* fileName ),, return Torque::FS::IsFile(givenPath); } +DefineEngineFunction(isScriptFile, bool, (const char* fileName), , + "@brief Determines if the specified file exists or not\n\n" + + "@param fileName The path to the file.\n" + "@return Returns true if the file was found.\n" + + "@ingroup FileSystem") +{ + String cleanfilename(Torque::Path::CleanSeparators(fileName)); + Con::expandScriptFilename(sgScriptFilenameBuffer, sizeof(sgScriptFilenameBuffer), cleanfilename.c_str()); + + Torque::Path givenPath(Torque::Path::CompressPath(sgScriptFilenameBuffer)); + return Torque::FS::IsScriptFile(givenPath.getFullPath()); +} + DefineEngineFunction( IsDirectory, bool, ( const char* directory ),, "@brief Determines if a specified directory exists or not\n\n" @@ -565,6 +580,27 @@ DefineEngineFunction( fileCreatedTime, String, ( const char* fileName ),, return buffer; } +DefineEngineFunction(compareFileTimes, S32, (const char* fileA, const char* fileB), ("", ""), + "@brief Compares 2 files' modified file times." + + "@param fileName Name and path of first file to compare\n" + "@param fileName Name and path of second file to compare\n" + "@return S32. If value is 1, then fileA is newer. If value is -1, then fileB is newer. If value is 0, they are equal.\n" + "@ingroup FileSystem") +{ + Con::expandScriptFilename(sgScriptFilenameBuffer, sizeof(sgScriptFilenameBuffer), fileA); + + FileTime fileATime = { 0 }; + Platform::getFileTimes(sgScriptFilenameBuffer, NULL, &fileATime); + + Con::expandScriptFilename(sgScriptFilenameBuffer, sizeof(sgScriptFilenameBuffer), fileB); + + FileTime fileBTime = { 0 }; + Platform::getFileTimes(sgScriptFilenameBuffer, NULL, &fileBTime); + + return Platform::compareFileTimes(fileATime, fileBTime); +} + DefineEngineFunction(fileDelete, bool, ( const char* path ),, "@brief Delete a file from the hard drive\n\n" diff --git a/Engine/source/console/persistenceManager.cpp b/Engine/source/console/persistenceManager.cpp index bdf848843..b7dfb97f5 100644 --- a/Engine/source/console/persistenceManager.cpp +++ b/Engine/source/console/persistenceManager.cpp @@ -1254,17 +1254,7 @@ PersistenceManager::ParsedObject* PersistenceManager::writeNewObject(SimObject* dynamic_cast(object)) dclToken = "singleton"; else if( dynamic_cast< SimDataBlock* >( object ) ) - { - SimDataBlock* db = static_cast(object); - - if( db->isClientOnly() ) - { - if( db->getName() && db->getName()[ 0 ] ) - dclToken = "singleton"; - } - else - dclToken = "datablock"; - } + dclToken = "datablock"; char newLine[ 4096 ]; dMemset(newLine, 0, sizeof( newLine)); @@ -1416,17 +1406,25 @@ void PersistenceManager::updateObject(SimObject* object, ParsedObject* parentObj { // TODO: This should be wrapped in a helper method... probably. // Detect and collapse relative path information - if (f->type == TypeFilename || - f->type == TypeStringFilename || - f->type == TypeImageFilename || - f->type == TypePrefabFilename || - f->type == TypeShapeFilename) + if (f->type == TypeFilename || + f->type == TypeStringFilename || + f->type == TypeImageFilename || + f->type == TypePrefabFilename || + f->type == TypeShapeFilename || + f->type == TypeSoundFilename ) { char fnBuf[1024]; Con::collapseScriptFilename(fnBuf, 1024, value); updateToken(prop.valueLine, prop.valuePosition, prop.endPosition - prop.valuePosition, fnBuf, true); } + else if (f->type == TypeCommand || f->type == TypeString || f->type == TypeRealString) + { + char cmdBuf[1024]; + expandEscape(cmdBuf, value); + + updateToken(prop.valueLine, prop.valuePosition, prop.endPosition - prop.valuePosition, cmdBuf, true); + } else updateToken(prop.valueLine, prop.valuePosition, prop.endPosition - prop.valuePosition, value, true); } @@ -1495,17 +1493,25 @@ void PersistenceManager::updateObject(SimObject* object, ParsedObject* parentObj { // TODO: This should be wrapped in a helper method... probably. // Detect and collapse relative path information - if (f->type == TypeFilename || + if (f->type == TypeFilename || f->type == TypeStringFilename || - f->type == TypeImageFilename || + f->type == TypeImageFilename || f->type == TypePrefabFilename || - f->type == TypeShapeFilename) + f->type == TypeShapeFilename || + f->type == TypeSoundFilename ) { char fnBuf[1024]; Con::collapseScriptFilename(fnBuf, 1024, value); newLines.push_back(createNewProperty(f->pFieldname, fnBuf, f->elementCount > 1, j)); } + else if (f->type == TypeCommand) + { + char cmdBuf[1024]; + expandEscape(cmdBuf, value); + + newLines.push_back(createNewProperty(f->pFieldname, cmdBuf, f->elementCount > 1, j)); + } else newLines.push_back(createNewProperty(f->pFieldname, value, f->elementCount > 1, j)); } diff --git a/Engine/source/console/simObject.cpp b/Engine/source/console/simObject.cpp index ea0da309c..e85047545 100644 --- a/Engine/source/console/simObject.cpp +++ b/Engine/source/console/simObject.cpp @@ -339,11 +339,12 @@ void SimObject::writeFields(Stream &stream, U32 tabStop) // detect and collapse relative path information char fnBuf[1024]; - if (f->type == TypeFilename || + if (f->type == TypeFilename || f->type == TypeStringFilename || - f->type == TypeImageFilename || + f->type == TypeImageFilename || f->type == TypePrefabFilename || - f->type == TypeShapeFilename) + f->type == TypeShapeFilename || + f->type == TypeSoundFilename ) { Con::collapseScriptFilename(fnBuf, 1024, val); val = fnBuf; @@ -919,7 +920,15 @@ void SimObject::assignFieldsFrom(SimObject *parent) dMemset( bufferSecure, 0, 2048 ); dMemcpy( bufferSecure, szBuffer, dStrlen( szBuffer ) ); - if((*f->setDataFn)( this, NULL, bufferSecure ) ) + //If we have an index worth mentioning, process it for pass-along as well to ensure we set stuff correctly + char* elementIdxBuffer = nullptr; + if (f->elementCount > 1) + { + elementIdxBuffer = Con::getArgBuffer(256); + dSprintf(elementIdxBuffer, 256, "%i", j); + } + + if((*f->setDataFn)( this, elementIdxBuffer, bufferSecure ) ) Con::setData(f->type, (void *) (((const char *)this) + f->offset), j, 1, &fieldVal, f->table); if (f->networkMask != 0) @@ -3176,6 +3185,31 @@ DefineEngineMethod( SimObject, getField, const char*, ( S32 index ),, return ""; } +DefineEngineFunction(getClassHierarchy, const char*, (const char* name), , + "Returns the inheritance hierarchy for a given class.") +{ + AbstractClassRep* pRep = AbstractClassRep::findClassRep(name); + if (!pRep) + { + //Con::errorf("%s does not exist", name); + return StringTable->EmptyString(); + } + + StringBuilder buffer; + + while (pRep != NULL) + { + StringTableEntry className = pRep->getClassName(); + buffer.append(className); + buffer.append(" "); + pRep = pRep->getParentClass(); + } + + String result = buffer.end().trim(); + //Con::printf("getClassHierarchy for %s=%s", name, result.c_str()); + return Con::getReturnBuffer(result.c_str()); + +} //----------------------------------------------------------------------------- #ifdef TORQUE_DEBUG diff --git a/Engine/source/core/fileObject.cpp b/Engine/source/core/fileObject.cpp index dc6ff5cf4..1305074c9 100644 --- a/Engine/source/core/fileObject.cpp +++ b/Engine/source/core/fileObject.cpp @@ -177,7 +177,7 @@ const U8 *FileObject::readLine() return mFileBuffer + tokPos; } -void FileObject::peekLine( U8* line, S32 length ) +void FileObject::peekLine( S32 peekLineOffset, U8* line, S32 length ) { if(!mFileBuffer) { @@ -189,6 +189,31 @@ void FileObject::peekLine( U8* line, S32 length ) // we can't modify the file buffer. S32 i = 0; U32 tokPos = mCurPos; + S32 lineOffset = 0; + + //Lets push our tokPos up until we've offset the requested number of lines + while (lineOffset < peekLineOffset && tokPos <= mBufferSize) + { + if (mFileBuffer[tokPos] == '\r') + { + tokPos++; + if (mFileBuffer[tokPos] == '\n') + tokPos++; + lineOffset++; + continue; + } + + if (mFileBuffer[tokPos] == '\n') + { + tokPos++; + lineOffset++; + continue; + } + + tokPos++; + } + + //now peek that line, then return the results while( ( tokPos != mBufferSize ) && ( mFileBuffer[tokPos] != '\r' ) && ( mFileBuffer[tokPos] != '\n' ) && ( i < ( length - 1 ) ) ) line[i++] = mFileBuffer[tokPos++]; @@ -317,7 +342,7 @@ DefineEngineMethod( FileObject, readLine, const char*, (),, return (const char *) object->readLine(); } -DefineEngineMethod( FileObject, peekLine, const char*, (),, +DefineEngineMethod( FileObject, peekLine, const char*, (S32 peekOffset), (0), "@brief Read a line from the file without moving the stream position.\n\n" "Emphasis on *line*, as in you cannot parse individual characters or chunks of data. " @@ -345,7 +370,7 @@ DefineEngineMethod( FileObject, peekLine, const char*, (),, { static const U32 bufSize = 512; char *line = Con::getReturnBuffer( bufSize ); - object->peekLine( (U8*)line, bufSize ); + object->peekLine(peekOffset, (U8*)line, bufSize ); return line; } diff --git a/Engine/source/core/fileObject.h b/Engine/source/core/fileObject.h index ca2952a4f..64559e7db 100644 --- a/Engine/source/core/fileObject.h +++ b/Engine/source/core/fileObject.h @@ -46,7 +46,7 @@ public: bool readMemory(const char *fileName); const U8 *buffer() { return mFileBuffer; } const U8 *readLine(); - void peekLine(U8 *line, S32 length); + void peekLine(S32 peekLineOffset, U8 *line, S32 length); bool isEOF(); void writeLine(const U8 *line); void close(); diff --git a/Engine/source/core/stream/bitStream.cpp b/Engine/source/core/stream/bitStream.cpp index c5ec18de5..eb86c6860 100644 --- a/Engine/source/core/stream/bitStream.cpp +++ b/Engine/source/core/stream/bitStream.cpp @@ -344,22 +344,52 @@ void BitStream::writeInt(S32 val, S32 bitCount) void BitStream::writeFloat(F32 f, S32 bitCount) { - writeInt((S32)(f * ((1 << bitCount) - 1)), bitCount); + auto maxInt = (1U << bitCount) - 1; + U32 i; + if (f < POINT_EPSILON) + { + // Special case: <= 0 serializes to 0 + i = 0.0f; + } + else if (f == 0.5) + { + // Special case: 0.5 serializes to maxInt / 2 + 1 + i = maxInt / 2 + 1; + } + else if (f > (1.0f- POINT_EPSILON)) + { + // Special case: >= 1 serializes to maxInt + i = maxInt; + } + else + { + // Serialize normally but round the number + i = static_cast(roundf(f * maxInt)); + } + writeInt(i, bitCount); } F32 BitStream::readFloat(S32 bitCount) { - return readInt(bitCount) / F32((1 << bitCount) - 1); + auto maxInt = (1U << bitCount) - 1; + auto i = static_cast(readInt(bitCount)); + if (i == 0) + return 0; + if (i == maxInt / 2 + 1) + return 0.5; + if (i == maxInt) + return 1; + return i / static_cast(maxInt); } void BitStream::writeSignedFloat(F32 f, S32 bitCount) { - writeInt((S32)(((f + 1) * .5) * ((1 << bitCount) - 1)), bitCount); + writeFloat((f + 1) / 2, bitCount); } F32 BitStream::readSignedFloat(S32 bitCount) { - return readInt(bitCount) * 2 / F32((1 << bitCount) - 1) - 1.0f; + return readFloat(bitCount) * 2 - 1; } void BitStream::writeSignedInt(S32 value, S32 bitCount) diff --git a/Engine/source/core/volume.cpp b/Engine/source/core/volume.cpp index aec3052db..d056ee331 100644 --- a/Engine/source/core/volume.cpp +++ b/Engine/source/core/volume.cpp @@ -1074,6 +1074,18 @@ bool IsFile(const Path &path) return sgMountSystem.isFile(path); } +bool IsScriptFile(const char* pFilePath) +{ + return (sgMountSystem.isFile(pFilePath) + || sgMountSystem.isFile(pFilePath + String(".dso")) + || sgMountSystem.isFile(pFilePath + String(".mis")) + || sgMountSystem.isFile(pFilePath + String(".mis.dso")) + || sgMountSystem.isFile(pFilePath + String(".gui")) + || sgMountSystem.isFile(pFilePath + String(".gui.dso")) + || sgMountSystem.isFile(pFilePath + String("." TORQUE_SCRIPT_EXTENSION)) + || sgMountSystem.isFile(pFilePath + String("." TORQUE_SCRIPT_EXTENSION) + String(".dso"))); +} + bool IsDirectory(const Path &path) { return sgMountSystem.isDirectory(path); diff --git a/Engine/source/core/volume.h b/Engine/source/core/volume.h index 25a2d33c4..18112322f 100644 --- a/Engine/source/core/volume.h +++ b/Engine/source/core/volume.h @@ -550,6 +550,7 @@ bool CreatePath(const Path &path); bool IsReadOnly(const Path &path); bool IsDirectory(const Path &path); bool IsFile(const Path &path); +bool IsScriptFile(const char* pFilePath); bool VerifyWriteAccess(const Path &path); /// This returns a unique file path from the components diff --git a/Engine/source/environment/VolumetricFog.cpp b/Engine/source/environment/VolumetricFog.cpp index 9623e197b..b602d87ac 100644 --- a/Engine/source/environment/VolumetricFog.cpp +++ b/Engine/source/environment/VolumetricFog.cpp @@ -124,7 +124,6 @@ VolumetricFog::VolumetricFog() mLightRayMod = 1.0f; mOldLightRayStrength = 0.1f; - mShapeName = ""; mShapeLoaded = false; mMinDisplaySize = 10.0f; mFadeSize = 0.0f; @@ -132,15 +131,14 @@ VolumetricFog::VolumetricFog() mNumDetailLevels = 0; det_size.clear(); - mTextureName = ""; mIsTextured = false; mStrength = 0.5f; mTexTiles = 1.0f; mSpeed1.set(0.5f, 0.0f); mSpeed2.set(0.1f, 0.1f); - mShapeAsset = StringTable->EmptyString(); - mShapeAssetId = StringTable->EmptyString(); + INIT_SHAPEASSET(Shape); + INIT_IMAGEASSET(Texture); } VolumetricFog::~VolumetricFog() @@ -168,11 +166,8 @@ VolumetricFog::~VolumetricFog() void VolumetricFog::initPersistFields() { addGroup("VolumetricFogData"); - addProtectedField("shapeAsset", TypeShapeAssetPtr, Offset(mShapeAsset, VolumetricFog), - &VolumetricFog::_setShapeAsset, &defaultProtectedGetFn, "The source shape asset."); - addField("shapeName", TypeShapeFilename, Offset(mShapeName, VolumetricFog), - "Path and filename of the model file (.DTS, .DAE) to use for this Volume.", AbstractClassRep::FieldFlags::FIELD_HideInInspectors ); + INITPERSISTFIELD_SHAPEASSET(Shape, VolumetricFog, "The source shape asset."); addField("FogColor", TypeColorI, Offset(mFogColor, VolumetricFog), "Fog color RGBA (Alpha is ignored)"); @@ -187,8 +182,8 @@ void VolumetricFog::initPersistFields() endGroup("VolumetricFogData"); addGroup("VolumetricFogModulation"); - addField("texture", TypeImageFilename, Offset(mTextureName, VolumetricFog), - "A texture which contains Fogdensity modulator in the red channel and color with 1-green channel. No texture disables modulation."); + INITPERSISTFIELD_IMAGEASSET(Texture, VolumetricFog, "A texture which contains Fogdensity modulator in the red channel and color with 1-green channel. No texture disables modulation."); + addField("tiles", TypeF32, Offset(mTexTiles, VolumetricFog), "How many times the texture is mapped to the object."); addField("modStrength", TypeF32, Offset(mStrength, VolumetricFog), @@ -356,40 +351,15 @@ bool VolumetricFog::LoadShape() { GFXPrimitiveType GFXdrawTypes[] = { GFXTriangleList, GFXTriangleStrip }; - Resource mShape; - if (mShapeAssetId != StringTable->EmptyString()) + if (mShapeAsset.isNull()) { - 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("VolumetricFog::LoadShape() - No shape name! Volumetric Fog will not be rendered!"); - return false; - } - - // Load shape, server side only reads bounds and radius - mShape = ResourceManager::get().load(mShapeName); + Con::errorf("[VolumetricFog] Failed to load shape asset."); + return false; } - if (bool(mShape) == false) + if (!mShape) { - Con::errorf("VolumetricFog::LoadShape() - Unable to load shape: %s", mShapeName); + Con::errorf("VolumetricFog::_createShape() - Shape Asset had no valid shape!"); return false; } @@ -573,7 +543,7 @@ U32 VolumetricFog::packUpdate(NetConnection *con, U32 mask, BitStream *stream) stream->write(mFogDensity); if (stream->writeFlag(mask & FogModulationMask)) { - stream->write(mTextureName); + PACK_IMAGEASSET(con, Texture); mTexTiles = mFabs(mTexTiles); stream->write(mTexTiles); stream->write(mStrength); @@ -597,27 +567,20 @@ U32 VolumetricFog::packUpdate(NetConnection *con, U32 mask, BitStream *stream) } if (stream->writeFlag(mask & FogShapeMask)) { - stream->writeString(mShapeAssetId); - stream->writeString(mShapeName); + PACK_SHAPEASSET(con, Shape); mathWrite(*stream, getTransform()); mathWrite(*stream, getScale()); - Resource mShape; - - if (mShapeAssetId != StringTable->EmptyString()) + if (mShapeAsset.notNull()) { - mShape = mShapeAsset->getShapeResource(); + mObjBox = mShapeAsset->getShapeResource()->mBounds; + mRadius = mShapeAsset->getShapeResource()->mRadius; } - else if (mShapeName && mShapeName[0] != '\0') + else { - mShape = ResourceManager::get().load(mShapeName); - } - - if (bool(mShape) == false) return retMask; + } - mObjBox = mShape->mBounds; - mRadius = mShape->mRadius; resetWorldBox(); mObjSize = mWorldBox.getGreatestDiagonalLength(); mObjScale = getScale(); @@ -632,7 +595,7 @@ void VolumetricFog::unpackUpdate(NetConnection *con, BitStream *stream) MatrixF mat; VectorF scale; VectorF mOldScale = getScale(); - String oldTextureName = mTextureName; + StringTableEntry oldTextureName = mTextureAssetId; StringTableEntry oldShapeAsset = mShapeAssetId; StringTableEntry oldShape = mShapeName; @@ -650,7 +613,7 @@ void VolumetricFog::unpackUpdate(NetConnection *con, BitStream *stream) } if (stream->readFlag())// Fog Modulation { - stream->read(&mTextureName); + UNPACK_IMAGEASSET(con, Texture); stream->read(&mTexTiles); mTexTiles = mFabs(mTexTiles); stream->read(&mStrength); @@ -660,9 +623,9 @@ void VolumetricFog::unpackUpdate(NetConnection *con, BitStream *stream) if (isProperlyAdded()) { - if (oldTextureName != mTextureName) + if (oldTextureName != mTextureAssetId) InitTexture(); - if (oldTextureName.isNotEmpty() && mTextureName.isEmpty()) + if (oldTextureName != StringTable->EmptyString() && mTextureAssetId == StringTable->EmptyString()) { mIsTextured = false; mTexture.free(); @@ -704,11 +667,8 @@ void VolumetricFog::unpackUpdate(NetConnection *con, BitStream *stream) } if (stream->readFlag())//Fog shape { - char buffer[256]; - stream->readString(buffer); - mShapeAssetId = StringTable->insert(buffer); + UNPACK_SHAPEASSET(con, Shape); - mShapeName = stream->readSTString(); mathRead(*stream, &mat); mathRead(*stream, &scale); if (strcmp(oldShapeAsset, mShapeAssetId) != 0 || strcmp(oldShape, mShapeName) != 0) @@ -1255,8 +1215,8 @@ void VolumetricFog::InitTexture() { mIsTextured = false; - if (mTextureName.isNotEmpty()) - mTexture.set(mTextureName, &GFXStaticTextureSRGBProfile, "VolumetricFogMod"); + if (mTextureAsset.isNull()) + return; if (!mTexture.isNull()) { diff --git a/Engine/source/environment/VolumetricFog.h b/Engine/source/environment/VolumetricFog.h index 1b2361610..1a4abaca3 100644 --- a/Engine/source/environment/VolumetricFog.h +++ b/Engine/source/environment/VolumetricFog.h @@ -83,6 +83,9 @@ class VolumetricFog : public SceneObject Vector *piArray; Vector *indices; }; + + DECLARE_SHAPEASSET(VolumetricFog, Shape, onShapeChanged); + DECLARE_SHAPEASSET_NET_SETGET(VolumetricFog, Shape, FogShapeMask); protected: // Rendertargets; @@ -91,9 +94,6 @@ class VolumetricFog : public SceneObject NamedTexTargetRef mDepthBufferTarget; NamedTexTargetRef mFrontBufferTarget; - // Fog Modulation texture - GFXTexHandle mTexture; - // Shaders GFXShaderRef mShader; GFXShaderRef mDeferredShader; @@ -143,10 +143,7 @@ class VolumetricFog : public SceneObject GFXPrimitiveBufferHandle mPB; // Fog volume data; - AssetPtr mShapeAsset; - StringTableEntry mShapeAssetId; - - StringTableEntry mShapeName; + ColorI mFogColor; F32 mFogDensity; bool mIgnoreWater; @@ -165,7 +162,9 @@ class VolumetricFog : public SceneObject F32 mInvScale; // Fog Modulation data - String mTextureName; + DECLARE_IMAGEASSET(VolumetricFog, Texture, onImageChanged, GFXStaticTextureSRGBProfile); + DECLARE_IMAGEASSET_NET_SETGET(VolumetricFog, Texture, FogModulationMask); + bool mIsTextured; F32 mTexTiles; F32 mStrength; @@ -221,6 +220,8 @@ class VolumetricFog : public SceneObject void _leaveFog(ShapeBase *control); static bool _setShapeAsset(void* obj, const char* index, const char* data); + + void onImageChanged() {} public: // Public methods @@ -248,6 +249,8 @@ class VolumetricFog : public SceneObject bool isInsideFog(); bool setShapeAsset(const StringTableEntry shapeAssetId); + + void onShapeChanged() {} DECLARE_CONOBJECT(VolumetricFog); diff --git a/Engine/source/environment/basicClouds.cpp b/Engine/source/environment/basicClouds.cpp index ef3728848..defd8fc41 100644 --- a/Engine/source/environment/basicClouds.cpp +++ b/Engine/source/environment/basicClouds.cpp @@ -173,8 +173,7 @@ void BasicClouds::initPersistFields() addField( "layerEnabled", TypeBool, Offset( mLayerEnabled, BasicClouds ), TEX_COUNT, "Enable or disable rendering of this layer." ); - addField( "texture", TypeImageFilename, Offset( mTexName, BasicClouds ), TEX_COUNT, - "Texture for this layer." ); + INITPERSISTFIELD_IMAGEASSET_ARRAY(Texture, TEX_COUNT, BasicClouds, "Texture for this layer."); addField( "texScale", TypeF32, Offset( mTexScale, BasicClouds ), TEX_COUNT, "Texture repeat for this layer." ); @@ -216,7 +215,7 @@ U32 BasicClouds::packUpdate( NetConnection *conn, U32 mask, BitStream *stream ) { stream->writeFlag( mLayerEnabled[i] ); - stream->write( mTexName[i] ); + PACK_IMAGEASSET_ARRAY(conn, Texture, i); stream->write( mTexScale[i] ); mathWrite( *stream, mTexDirection[i] ); @@ -237,7 +236,7 @@ void BasicClouds::unpackUpdate( NetConnection *conn, BitStream *stream ) { mLayerEnabled[i] = stream->readFlag(); - stream->read( &mTexName[i] ); + UNPACK_IMAGEASSET_ARRAY(conn, Texture, i); stream->read( &mTexScale[i] ); mathRead( *stream, &mTexDirection[i] ); @@ -340,11 +339,7 @@ void BasicClouds::_initTexture() continue; } - if ( mTexName[i].isNotEmpty() ) - mTexture[i].set( mTexName[i], &GFXStaticTextureSRGBProfile, "BasicClouds" ); - - if ( mTexture[i].isNull() ) - mTexture[i].set( GFXTextureManager::getWarningTexturePath(), &GFXStaticTextureSRGBProfile, "BasicClouds" ); + _setTexture(getTexture(i), i); } } diff --git a/Engine/source/environment/basicClouds.h b/Engine/source/environment/basicClouds.h index adb15139c..03b31af19 100644 --- a/Engine/source/environment/basicClouds.h +++ b/Engine/source/environment/basicClouds.h @@ -42,6 +42,8 @@ #include "gfx/gfxShader.h" #endif +#include "T3D/assets/ImageAsset.h" + class BaseMatInstance; @@ -91,7 +93,8 @@ protected: static U32 smVertCount; static U32 smTriangleCount; - GFXTexHandle mTexture[TEX_COUNT]; + DECLARE_IMAGEASSET_ARRAY(BasicClouds, Texture, GFXStaticTextureSRGBProfile, TEX_COUNT); + DECLARE_IMAGEASSET_ARRAY_NET_SETGET(BasicClouds, Texture, -1); GFXStateBlockRef mStateblock; @@ -111,7 +114,6 @@ protected: // Fields... bool mLayerEnabled[TEX_COUNT]; - String mTexName[TEX_COUNT]; F32 mTexScale[TEX_COUNT]; Point2F mTexDirection[TEX_COUNT]; F32 mTexSpeed[TEX_COUNT]; diff --git a/Engine/source/environment/cloudLayer.cpp b/Engine/source/environment/cloudLayer.cpp index f29dec3e9..01e55dc6e 100644 --- a/Engine/source/environment/cloudLayer.cpp +++ b/Engine/source/environment/cloudLayer.cpp @@ -38,6 +38,8 @@ #include "lighting/lightInfo.h" #include "math/mathIO.h" +#include "sim/netConnection.h" + ConsoleDocClass( CloudLayer, "@brief A layer of clouds which change shape over time and are affected by scene lighting.\n\n" @@ -110,6 +112,8 @@ CloudLayer::CloudLayer() mTexOffset[0] = mTexOffset[1] = mTexOffset[2] = Point2F::Zero; mHeight = 4.0f; + + INIT_IMAGEASSET(Texture); } IMPLEMENT_CO_NETOBJECT_V1( CloudLayer ); @@ -127,9 +131,10 @@ bool CloudLayer::onAdd() addToScene(); + LOAD_IMAGEASSET(Texture); + if ( isClientObject() ) { - _initTexture(); _initBuffers(); // Find ShaderData @@ -186,11 +191,10 @@ void CloudLayer::onRemove() void CloudLayer::initPersistFields() { - addGroup( "CloudLayer" ); - - addField( "texture", TypeImageFilename, Offset( mTextureName, CloudLayer ), - "An RGBA texture which should contain normals and opacity (density)." ); + addGroup( "CloudLayer" ); + INITPERSISTFIELD_IMAGEASSET(Texture, CloudLayer, "An RGBA texture which should contain normals and opacity (density)."); + addArray( "Textures", TEX_COUNT ); addField( "texScale", TypeF32, Offset( mTexScale, CloudLayer ), TEX_COUNT, @@ -238,7 +242,7 @@ U32 CloudLayer::packUpdate( NetConnection *conn, U32 mask, BitStream *stream ) { U32 retMask = Parent::packUpdate( conn, mask, stream ); - stream->write( mTextureName ); + PACK_IMAGEASSET(conn, Texture); for ( U32 i = 0; i < TEX_COUNT; i++ ) { @@ -260,8 +264,10 @@ void CloudLayer::unpackUpdate( NetConnection *conn, BitStream *stream ) { Parent::unpackUpdate( conn, stream ); - String oldTextureName = mTextureName; - stream->read( &mTextureName ); + UNPACK_IMAGEASSET(conn, Texture); + + if(mTextureAssetId != StringTable->EmptyString()) + mTextureAsset = mTextureAssetId; for ( U32 i = 0; i < TEX_COUNT; i++ ) { @@ -283,8 +289,6 @@ void CloudLayer::unpackUpdate( NetConnection *conn, BitStream *stream ) if ( isProperlyAdded() ) { - if ( ( oldTextureName != mTextureName ) || ( ( oldCoverage == 0.0f ) != ( mCoverage == 0.0f ) ) ) - _initTexture(); if ( oldHeight != mHeight ) _initBuffers(); } @@ -330,6 +334,9 @@ void CloudLayer::renderObject( ObjectRenderInst *ri, SceneRenderState *state, Ba { GFXTransformSaver saver; + if (!mTextureAsset || !mTextureAsset->isAssetValid()) + return; + const Point3F &camPos = state->getCameraPosition(); MatrixF xfm(true); xfm.setPosition(camPos); @@ -378,7 +385,7 @@ void CloudLayer::renderObject( ObjectRenderInst *ri, SceneRenderState *state, Ba mShaderConsts->setSafe( mExposureSC, mExposure ); - GFX->setTexture( mNormalHeightMapSC->getSamplerRegister(), mTexture ); + GFX->setTexture( mNormalHeightMapSC->getSamplerRegister(), getTextureResource()); GFX->setVertexBuffer( mVB ); GFX->setPrimitiveBuffer( mPB ); @@ -389,21 +396,6 @@ void CloudLayer::renderObject( ObjectRenderInst *ri, SceneRenderState *state, Ba // CloudLayer Internal Methods.... -void CloudLayer::_initTexture() -{ - if ( mCoverage <= 0.0f ) - { - mTexture = NULL; - return; - } - - if ( mTextureName.isNotEmpty() ) - mTexture.set( mTextureName, &GFXNormalMapProfile, "CloudLayer" ); - - if ( mTexture.isNull() ) - mTexture.set( GFXTextureManager::getWarningTexturePath(), &GFXNormalMapProfile, "CloudLayer" ); -} - void CloudLayer::_initBuffers() { // Vertex Buffer... diff --git a/Engine/source/environment/cloudLayer.h b/Engine/source/environment/cloudLayer.h index 96c98cf8a..82e152dfb 100644 --- a/Engine/source/environment/cloudLayer.h +++ b/Engine/source/environment/cloudLayer.h @@ -39,6 +39,8 @@ #include "materials/matInstance.h" #endif +#include "T3D/assets/ImageAsset.h" + GFXDeclareVertexFormat( GFXCloudVertex ) { Point3F point; @@ -81,9 +83,10 @@ public: void prepRenderImage( SceneRenderState *state ); void renderObject( ObjectRenderInst *ri, SceneRenderState *state, BaseMatInstance *mi ); + void onImageChanged() {} + protected: - void _initTexture(); void _initBuffers(); protected: @@ -93,7 +96,8 @@ protected: static U32 smVertCount; static U32 smTriangleCount; - GFXTexHandle mTexture; + DECLARE_IMAGEASSET(CloudLayer, Texture, onImageChanged, GFXStaticTextureSRGBProfile); + DECLARE_IMAGEASSET_NET_SETGET(CloudLayer, Texture, CloudLayerMask); GFXShaderRef mShader; @@ -120,7 +124,6 @@ protected: // Fields... - String mTextureName; F32 mTexScale[TEX_COUNT]; Point2F mTexDirection[TEX_COUNT]; F32 mTexSpeed[TEX_COUNT]; diff --git a/Engine/source/environment/decalRoad.cpp b/Engine/source/environment/decalRoad.cpp index a50792faa..e1d9a27ee 100644 --- a/Engine/source/environment/decalRoad.cpp +++ b/Engine/source/environment/decalRoad.cpp @@ -277,8 +277,6 @@ DecalRoad::DecalRoad() mTextureLength( 5.0f ), mRenderPriority( 10 ), mLoadRenderData( true ), - mMaterial( NULL ), - mMatInst( NULL ), mTriangleCount(0), mVertCount(0), mUpdateEventId( -1 ), @@ -289,7 +287,9 @@ DecalRoad::DecalRoad() mTypeMask |= StaticObjectType | StaticShapeObjectType; mNetFlags.set(Ghostable); - initMaterialAsset(Material); + INIT_MATERIALASSET(Material); + + mMaterialInst = nullptr; } DecalRoad::~DecalRoad() @@ -305,8 +305,7 @@ void DecalRoad::initPersistFields() { addGroup( "DecalRoad" ); - addProtectedField("materialAsset", TypeMaterialAssetId, Offset(mMaterialAssetId, DecalRoad), &DecalRoad::_setMaterialAsset, &defaultProtectedGetFn, "Material Asset used for rendering."); - addProtectedField( "material", TypeMaterialName, Offset( mMaterialName, DecalRoad ), &DecalRoad::_setMaterialName, &defaultProtectedGetFn, "Material used for rendering." ); + INITPERSISTFIELD_MATERIALASSET(Material, DecalRoad, "Material used for rendering."); addProtectedField( "textureLength", TypeF32, Offset( mTextureLength, DecalRoad ), &DecalRoad::ptSetTextureLength, &defaultProtectedGetFn, "The length in meters of textures mapped to the DecalRoad" ); @@ -398,7 +397,7 @@ bool DecalRoad::onAdd() void DecalRoad::onRemove() { - SAFE_DELETE( mMatInst ); + SAFE_DELETE( mMaterialInst ); TerrainBlock::smUpdateSignal.remove( this, &DecalRoad::_onTerrainChanged ); @@ -492,7 +491,7 @@ U32 DecalRoad::packUpdate(NetConnection * con, U32 mask, BitStream * stream) if ( stream->writeFlag( mask & DecalRoadMask ) ) { // Write Texture Name. - packMaterialAsset(con, Material); + PACK_MATERIALASSET(con, Material); stream->write( mBreakAngle ); @@ -581,7 +580,7 @@ void DecalRoad::unpackUpdate( NetConnection *con, BitStream *stream ) // DecalRoadMask if ( stream->readFlag() ) { - unpackMaterialAsset(con, Material); + UNPACK_MATERIALASSET(con, Material); if (isProperlyAdded()) _initMaterial(); @@ -685,13 +684,13 @@ void DecalRoad::prepRenderImage( SceneRenderState* state ) if ( mNodes.size() <= 1 || mBatches.size() == 0 || - !mMatInst || + !mMaterialInst || state->isShadowPass() ) return; // If we don't have a material instance after the override then // we can skip rendering all together. - BaseMatInstance *matInst = state->getOverrideMaterial( mMatInst ); + BaseMatInstance *matInst = state->getOverrideMaterial(mMaterialInst); if ( !matInst ) return; @@ -1045,12 +1044,14 @@ bool DecalRoad::addNodeFromField( void *object, const char *index, const char *d void DecalRoad::_initMaterial() { + _setMaterial(getMaterial()); + if (mMaterialAsset.notNull()) { - if (mMatInst && String(mMaterialAsset->getMaterialDefinitionName()).equal(mMatInst->getMaterial()->getName(), String::NoCase)) + if (mMaterialInst && String(mMaterialAsset->getMaterialDefinitionName()).equal(mMaterialInst->getMaterial()->getName(), String::NoCase)) return; - SAFE_DELETE(mMatInst); + SAFE_DELETE(mMaterialInst); Material* tMat = nullptr; @@ -1060,22 +1061,22 @@ void DecalRoad::_initMaterial() mMaterial = tMat; if (mMaterial) - mMatInst = mMaterial->createMatInstance(); + mMaterialInst = mMaterial->createMatInstance(); else - mMatInst = MATMGR->createMatInstance("WarningMaterial"); + mMaterialInst = MATMGR->createMatInstance("WarningMaterial"); - if (!mMatInst) + if (!mMaterialInst) Con::errorf("DecalRoad::_initMaterial - no Material called '%s'", mMaterialAsset->getMaterialDefinitionName()); } - if (!mMatInst) + if (!mMaterialInst) return; GFXStateBlockDesc desc; desc.setZReadWrite( true, false ); - mMatInst->addStateBlockDesc( desc ); + mMaterialInst->addStateBlockDesc( desc ); - mMatInst->init( MATMGR->getDefaultFeatures(), getGFXVertexFormat() ); + mMaterialInst->init( MATMGR->getDefaultFeatures(), getGFXVertexFormat() ); } void DecalRoad::_debugRender( ObjectRenderInst *ri, SceneRenderState *state, BaseMatInstance* ) diff --git a/Engine/source/environment/decalRoad.h b/Engine/source/environment/decalRoad.h index 771aa5975..7934d7889 100644 --- a/Engine/source/environment/decalRoad.h +++ b/Engine/source/environment/decalRoad.h @@ -240,7 +240,11 @@ protected: U32 mSegmentsPerBatch; F32 mTextureLength; - DECLARE_NET_MATERIALASSET(DecalRoad, Material, DecalRoadMask); + BaseMatInstance* mMaterialInst; + + DECLARE_MATERIALASSET(DecalRoad, Material); + DECLARE_MATERIALASSET_NET_SETGET(DecalRoad, Material, DecalRoadMask); + U32 mRenderPriority; // Static ConsoleVars for editor @@ -261,9 +265,6 @@ protected: RoadBatchVector mBatches; bool mLoadRenderData; - - SimObjectPtr mMaterial; - BaseMatInstance *mMatInst; GFXVertexBufferHandle mVB; GFXPrimitiveBufferHandle mPB; diff --git a/Engine/source/environment/editors/guiMeshRoadEditorCtrl.cpp b/Engine/source/environment/editors/guiMeshRoadEditorCtrl.cpp index b9bb74c1c..b0812f738 100644 --- a/Engine/source/environment/editors/guiMeshRoadEditorCtrl.cpp +++ b/Engine/source/environment/editors/guiMeshRoadEditorCtrl.cpp @@ -97,6 +97,10 @@ GuiMeshRoadEditorCtrl::GuiMeshRoadEditorCtrl() mHoverNodeColor( 255,255,255,255 ), mHasCopied( false ) { + INIT_MATERIALASSET(TopMaterial); + INIT_MATERIALASSET(BottomMaterial); + INIT_MATERIALASSET(SideMaterial); + mTopMaterialAssetId = Con::getVariable("$MeshRoadEditor::defaultTopMaterialAsset"); mBottomMaterialAssetId = Con::getVariable("$MeshRoadEditor::defaultBottomMaterialAsset"); mSideMaterialAssetId = Con::getVariable("$MeshRoadEditor::defaultSideMaterialAsset"); @@ -205,10 +209,6 @@ bool GuiMeshRoadEditorCtrl::onAdd() desc.zEnable = true; mZEnableSB = GFX->createStateBlock(desc); - bindMaterialAsset(TopMaterial); - bindMaterialAsset(BottomMaterial); - bindMaterialAsset(SideMaterial); - return true; } @@ -222,9 +222,9 @@ void GuiMeshRoadEditorCtrl::initPersistFields() addField( "HoverNodeColor", TypeColorI, Offset( mHoverNodeColor, GuiMeshRoadEditorCtrl ) ); addField( "isDirty", TypeBool, Offset( mIsDirty, GuiMeshRoadEditorCtrl ) ); - addField("topMaterial", TypeMaterialAssetId, Offset(mTopMaterialAssetId, GuiMeshRoadEditorCtrl), "Default Material used by the Mesh Road Editor on upper surface road creation."); - addField("bottomMaterial", TypeMaterialAssetId, Offset(mBottomMaterialAssetId, GuiMeshRoadEditorCtrl), "Default Material used by the Mesh Road Editor on bottom surface road creation."); - addField("sideMaterial", TypeMaterialAssetId, Offset(mSideMaterialAssetId, GuiMeshRoadEditorCtrl), "Default Material used by the Mesh Road Editor on side surface road creation."); + INITPERSISTFIELD_MATERIALASSET(TopMaterial, GuiMeshRoadEditorCtrl, "Default Material used by the Mesh Road Editor on upper surface road creation."); + INITPERSISTFIELD_MATERIALASSET(BottomMaterial, GuiMeshRoadEditorCtrl, "Default Material used by the Mesh Road Editor on bottom surface road creation."); + INITPERSISTFIELD_MATERIALASSET(SideMaterial, GuiMeshRoadEditorCtrl, "Default Material used by the Mesh Road Editor on side surface road creation."); //addField( "MoveNodeCursor", TYPEID< SimObject >(), Offset( mMoveNodeCursor, GuiMeshRoadEditorCtrl) ); //addField( "AddNodeCursor", TYPEID< SimObject >(), Offset( mAddNodeCursor, GuiMeshRoadEditorCtrl) ); @@ -627,11 +627,11 @@ void GuiMeshRoadEditorCtrl::on3DMouseDown(const Gui3DMouseEvent & event) MeshRoad *newRoad = new MeshRoad; if(mTopMaterialAsset.notNull()) - newRoad->setTopMaterialAssetId(mTopMaterialAssetId); + newRoad->_setTopMaterial(mTopMaterialAssetId); if (mBottomMaterialAsset.notNull()) - newRoad->setBottomMaterialAssetId(mBottomMaterialAssetId); + newRoad->_setBottomMaterial(mBottomMaterialAssetId); if (mSideMaterialAsset.notNull()) - newRoad->setSideMaterialAssetId(mSideMaterialAssetId); + newRoad->_setSideMaterial(mSideMaterialAssetId); newRoad->registerObject(); diff --git a/Engine/source/environment/editors/guiMeshRoadEditorCtrl.h b/Engine/source/environment/editors/guiMeshRoadEditorCtrl.h index ab3d132b6..95cffeab0 100644 --- a/Engine/source/environment/editors/guiMeshRoadEditorCtrl.h +++ b/Engine/source/environment/editors/guiMeshRoadEditorCtrl.h @@ -159,13 +159,14 @@ class GuiMeshRoadEditorCtrl : public EditTSCtrl bool mHasCopied; public: - StringTableEntry mTopMaterialAssetId; - StringTableEntry mBottomMaterialAssetId; - StringTableEntry mSideMaterialAssetId; + DECLARE_MATERIALASSET(GuiMeshRoadEditorCtrl, TopMaterial); + DECLARE_MATERIALASSET_SETGET(GuiMeshRoadEditorCtrl, TopMaterial); - AssetPtr mTopMaterialAsset; - AssetPtr mBottomMaterialAsset; - AssetPtr mSideMaterialAsset; + DECLARE_MATERIALASSET(GuiMeshRoadEditorCtrl, BottomMaterial); + DECLARE_MATERIALASSET_SETGET(GuiMeshRoadEditorCtrl, BottomMaterial); + + DECLARE_MATERIALASSET(GuiMeshRoadEditorCtrl, SideMaterial); + DECLARE_MATERIALASSET_SETGET(GuiMeshRoadEditorCtrl, SideMaterial); }; class GuiMeshRoadEditorUndoAction : public UndoAction diff --git a/Engine/source/environment/editors/guiRoadEditorCtrl.cpp b/Engine/source/environment/editors/guiRoadEditorCtrl.cpp index 487b35a24..3f111a80e 100644 --- a/Engine/source/environment/editors/guiRoadEditorCtrl.cpp +++ b/Engine/source/environment/editors/guiRoadEditorCtrl.cpp @@ -108,7 +108,7 @@ void GuiRoadEditorUndoAction::undo() nodes.merge( road->mNodes ); // Restore the Road properties saved in the UndoAction - road->setMaterialAssetId(materialAssetId); + road->_setMaterial(materialAssetId); road->mBreakAngle = breakAngle; road->mSegmentsPerBatch = segmentsPerBatch; road->mTextureLength = textureLength; @@ -153,8 +153,6 @@ bool GuiRoadEditorCtrl::onAdd() mZDisableSB = GFX->createStateBlock(desc); - bindMaterialAsset(Material); - return true; } @@ -166,7 +164,7 @@ void GuiRoadEditorCtrl::initPersistFields() addField( "HoverNodeColor", TypeColorI, Offset( mHoverNodeColor, GuiRoadEditorCtrl ) ); addField( "isDirty", TypeBool, Offset( mIsDirty, GuiRoadEditorCtrl ) ); - addField("material", TypeMaterialAssetId, Offset(mMaterialAssetId, GuiRoadEditorCtrl), "Default Material used by the Road Editor on road creation."); + INITPERSISTFIELD_MATERIALASSET(Material, GuiRoadEditorCtrl, "Default Material used by the Road Editor on road creation."); //addField( "MoveNodeCursor", TYPEID< SimObject >(), Offset( mMoveNodeCursor, GuiRoadEditorCtrl) ); //addField( "AddNodeCursor", TYPEID< SimObject >(), Offset( mAddNodeCursor, GuiRoadEditorCtrl) ); @@ -409,7 +407,7 @@ void GuiRoadEditorCtrl::on3DMouseDown(const Gui3DMouseEvent & event) DecalRoad *newRoad = new DecalRoad; if (mMaterialAsset.notNull()) - newRoad->setMaterialAssetId(mMaterialAssetId); + newRoad->_setMaterial(mMaterialAssetId); newRoad->registerObject(); diff --git a/Engine/source/environment/editors/guiRoadEditorCtrl.h b/Engine/source/environment/editors/guiRoadEditorCtrl.h index 570f63fc2..5e076aa68 100644 --- a/Engine/source/environment/editors/guiRoadEditorCtrl.h +++ b/Engine/source/environment/editors/guiRoadEditorCtrl.h @@ -103,8 +103,9 @@ class GuiRoadEditorCtrl : public EditTSCtrl public: - StringTableEntry mMaterialAssetId; - AssetPtr mMaterialAsset; + DECLARE_MATERIALASSET(GuiRoadEditorCtrl, Material); + DECLARE_MATERIALASSET_SETGET(GuiRoadEditorCtrl, Material); + protected: void _drawRoadSpline( DecalRoad *road, const ColorI &color ); diff --git a/Engine/source/environment/meshRoad.cpp b/Engine/source/environment/meshRoad.cpp index e162e8cf5..f27d2d84a 100644 --- a/Engine/source/environment/meshRoad.cpp +++ b/Engine/source/environment/meshRoad.cpp @@ -920,9 +920,9 @@ MeshRoad::MeshRoad() mTriangleCount[i] = 0; } - initMaterialAsset(TopMaterial); - initMaterialAsset(BottomMaterial); - initMaterialAsset(SideMaterial); + INIT_MATERIALASSET(TopMaterial); + INIT_MATERIALASSET(BottomMaterial); + INIT_MATERIALASSET(SideMaterial); mSideProfile.mRoad = this; } @@ -937,14 +937,9 @@ void MeshRoad::initPersistFields() { addGroup( "MeshRoad" ); - addProtectedField("TopMaterial", TypeMaterialName, Offset(mTopMaterialName, MeshRoad), MeshRoad::_setTopMaterialName, & defaultProtectedGetFn, "Material for the upper surface of the road.", AbstractClassRep::FIELD_HideInInspectors); \ - addProtectedField("TopMaterialAsset", TypeMaterialAssetId, Offset(mTopMaterialAssetId, MeshRoad), MeshRoad::_setTopMaterialAsset, & defaultProtectedGetFn, "Material for the upper surface of the road."); - - addProtectedField("BottomMaterial", TypeMaterialName, Offset(mBottomMaterialName, MeshRoad), MeshRoad::_setBottomMaterialName, & defaultProtectedGetFn, "Material for the bottom surface of the road.", AbstractClassRep::FIELD_HideInInspectors); \ - addProtectedField("BottomMaterialAsset", TypeMaterialAssetId, Offset(mBottomMaterialAssetId, MeshRoad), MeshRoad::_setBottomMaterialAsset, & defaultProtectedGetFn, "Material for the bottom surface of the road."); - - addProtectedField("SideMaterial", TypeMaterialName, Offset(mSideMaterialName, MeshRoad), MeshRoad::_setSideMaterialName, & defaultProtectedGetFn, "Material for the left, right, front, and back surfaces of the road.", AbstractClassRep::FIELD_HideInInspectors); \ - addProtectedField("SideMaterialAsset", TypeMaterialAssetId, Offset(mSideMaterialAssetId, MeshRoad), MeshRoad::_setSideMaterialAsset, & defaultProtectedGetFn, "Material for the left, right, front, and back surfaces of the road."); + INITPERSISTFIELD_MATERIALASSET(TopMaterial, MeshRoad, "Material for the upper surface of the road."); + INITPERSISTFIELD_MATERIALASSET(BottomMaterial, MeshRoad, "Material for the bottom surface of the road."); + INITPERSISTFIELD_MATERIALASSET(SideMaterial, MeshRoad, "Material for the side surface of the road."); addField( "textureLength", TypeF32, Offset( mTextureLength, MeshRoad ), "The length in meters of textures mapped to the MeshRoad." ); @@ -1421,9 +1416,9 @@ U32 MeshRoad::packUpdate(NetConnection * con, U32 mask, BitStream * stream) stream->writeAffineTransform( mObjToWorld ); // Write Materials - packMaterialAsset(con, TopMaterial); - packMaterialAsset(con, BottomMaterial); - packMaterialAsset(con, SideMaterial); + PACK_MATERIALASSET(con, TopMaterial); + PACK_MATERIALASSET(con, BottomMaterial); + PACK_MATERIALASSET(con, SideMaterial); stream->write( mTextureLength ); stream->write( mBreakAngle ); @@ -1520,9 +1515,9 @@ void MeshRoad::unpackUpdate(NetConnection * con, BitStream * stream) stream->readAffineTransform(&ObjectMatrix); Parent::setTransform(ObjectMatrix); - unpackMaterialAsset(con, TopMaterial); - unpackMaterialAsset(con, BottomMaterial); - unpackMaterialAsset(con, SideMaterial); + UNPACK_MATERIALASSET(con, TopMaterial); + UNPACK_MATERIALASSET(con, BottomMaterial); + UNPACK_MATERIALASSET(con, SideMaterial); if ( isProperlyAdded() ) _initMaterial(); diff --git a/Engine/source/environment/meshRoad.h b/Engine/source/environment/meshRoad.h index 2a6f97607..718a015cd 100644 --- a/Engine/source/environment/meshRoad.h +++ b/Engine/source/environment/meshRoad.h @@ -621,9 +621,14 @@ protected: GFXVertexBufferHandle mVB[SurfaceCount]; GFXPrimitiveBufferHandle mPB[SurfaceCount]; - DECLARE_NET_MATERIALASSET(MeshRoad, TopMaterial, MeshRoadMask); - DECLARE_NET_MATERIALASSET(MeshRoad, BottomMaterial, MeshRoadMask); - DECLARE_NET_MATERIALASSET(MeshRoad, SideMaterial, MeshRoadMask); + DECLARE_MATERIALASSET(MeshRoad, TopMaterial); + DECLARE_MATERIALASSET_NET_SETGET(MeshRoad, TopMaterial, MeshRoadMask); + + DECLARE_MATERIALASSET(MeshRoad, BottomMaterial); + DECLARE_MATERIALASSET_NET_SETGET(MeshRoad, BottomMaterial, MeshRoadMask); + + DECLARE_MATERIALASSET(MeshRoad, SideMaterial); + DECLARE_MATERIALASSET_NET_SETGET(MeshRoad, SideMaterial, MeshRoadMask); //String mMaterialName[SurfaceCount]; SimObjectPtr mMaterial[SurfaceCount]; diff --git a/Engine/source/environment/scatterSky.cpp b/Engine/source/environment/scatterSky.cpp index a9ae50cf0..cd447e56c 100644 --- a/Engine/source/environment/scatterSky.cpp +++ b/Engine/source/environment/scatterSky.cpp @@ -165,8 +165,11 @@ ScatterSky::ScatterSky() mNightColor.set( 0.0196078f, 0.0117647f, 0.109804f, 1.0f ); mNightFogColor = mNightColor; mUseNightCubemap = false; + mNightCubemapName = StringTable->EmptyString(); mSunSize = 1.0f; + INIT_MATERIALASSET(MoonMat); + mMoonMatInst = NULL; mNetFlags.set( Ghostable | ScopeAlways ); @@ -407,8 +410,7 @@ void ScatterSky::initPersistFields() addField( "moonEnabled", TypeBool, Offset( mMoonEnabled, ScatterSky ), "Enable or disable rendering of the moon sprite during night." ); - addField( "moonMat", TypeMaterialName, Offset( mMoonMatName, ScatterSky ), - "Material for the moon sprite." ); + INITPERSISTFIELD_MATERIALASSET(MoonMat, ScatterSky, "Material for the moon sprite."); addField( "moonScale", TypeF32, Offset( mMoonScale, ScatterSky ), "Controls size the moon sprite renders, specified as a fractional amount of the screen height." ); @@ -500,11 +502,13 @@ U32 ScatterSky::packUpdate(NetConnection *con, U32 mask, BitStream *stream) } stream->writeFlag( mMoonEnabled ); - stream->write( mMoonMatName ); + + PACK_MATERIALASSET(con, MoonMat); + stream->write( mMoonScale ); stream->write( mMoonTint ); stream->writeFlag( mUseNightCubemap ); - stream->write( mNightCubemapName ); + stream->writeString( mNightCubemapName ); stream->write( mMoonAzimuth ); stream->write( mMoonElevation ); @@ -612,11 +616,13 @@ void ScatterSky::unpackUpdate(NetConnection *con, BitStream *stream) mFlareData = NULL; mMoonEnabled = stream->readFlag(); - stream->read( &mMoonMatName ); + + UNPACK_MATERIALASSET(con, MoonMat); + stream->read( &mMoonScale ); stream->read( &mMoonTint ); mUseNightCubemap = stream->readFlag(); - stream->read( &mNightCubemapName ); + mNightCubemapName = stream->readSTString(); stream->read( &mMoonAzimuth ); stream->read( &mMoonElevation ); @@ -832,8 +838,10 @@ void ScatterSky::_initMoon() if ( mMoonMatInst ) SAFE_DELETE( mMoonMatInst ); - if ( mMoonMatName.isNotEmpty() ) - mMoonMatInst = MATMGR->createMatInstance( mMoonMatName, MATMGR->getDefaultFeatures(), getGFXVertexFormat() ); + if (mMoonMatAsset.notNull()) + { + mMoonMatInst = MATMGR->createMatInstance(mMoonMatAsset->getMaterialDefinitionName(), MATMGR->getDefaultFeatures(), getGFXVertexFormat()); + } } void ScatterSky::_initCurves() diff --git a/Engine/source/environment/scatterSky.h b/Engine/source/environment/scatterSky.h index dc3aecc52..2657aa6b8 100644 --- a/Engine/source/environment/scatterSky.h +++ b/Engine/source/environment/scatterSky.h @@ -51,6 +51,8 @@ #include "math/util/tResponseCurve.h" #endif +#include "T3D/assets/MaterialAsset.h" + class LightInfo; class SphereMesh; class TimeOfDay; @@ -208,13 +210,16 @@ protected: F32 mFlareScale; bool mMoonEnabled; - String mMoonMatName; + + DECLARE_MATERIALASSET(ScatterSky, MoonMat); + DECLARE_MATERIALASSET_NET_SETGET(ScatterSky, MoonMat, UpdateMask); + BaseMatInstance *mMoonMatInst; F32 mMoonScale; LinearColorF mMoonTint; VectorF mMoonLightDir; CubemapData *mNightCubemap; - String mNightCubemapName; + StringTableEntry mNightCubemapName; bool mUseNightCubemap; MatrixSet *mMatrixSet; diff --git a/Engine/source/environment/skyBox.cpp b/Engine/source/environment/skyBox.cpp index 492265d20..057de94aa 100644 --- a/Engine/source/environment/skyBox.cpp +++ b/Engine/source/environment/skyBox.cpp @@ -56,7 +56,7 @@ SkyBox::SkyBox() mTypeMask |= EnvironmentObjectType | StaticObjectType; mNetFlags.set(Ghostable | ScopeAlways); - mMatName = ""; + INIT_MATERIALASSET(Material); mMatInstance = NULL; mIsVBDirty = false; @@ -116,8 +116,7 @@ void SkyBox::initPersistFields() { addGroup( "Sky Box" ); - addField( "material", TypeMaterialName, Offset( mMatName, SkyBox ), - "The name of a cubemap material for the sky box." ); + INITPERSISTFIELD_MATERIALASSET(Material, SkyBox, "The name of a cubemap material for the sky box."); addField( "drawBottom", TypeBool, Offset( mDrawBottom, SkyBox ), "If false the bottom of the skybox is not rendered." ); @@ -139,8 +138,9 @@ void SkyBox::inspectPostApply() U32 SkyBox::packUpdate( NetConnection *conn, U32 mask, BitStream *stream ) { U32 retMask = Parent::packUpdate( conn, mask, stream ); - - stream->write( mMatName ); + + PACK_MATERIALASSET(conn, Material); + stream->writeFlag( mDrawBottom ); stream->write( mFogBandHeight ); @@ -151,11 +151,10 @@ void SkyBox::unpackUpdate( NetConnection *conn, BitStream *stream ) { Parent::unpackUpdate( conn, stream ); - String tmpString( "" ); - stream->read( &tmpString ); - if ( !tmpString.equal( mMatName, String::NoCase ) ) + StringTableEntry oldMatName = getMaterial(); + UNPACK_MATERIALASSET(conn, Material); + if (oldMatName != getMaterial()) { - mMatName = tmpString; _updateMaterial(); } @@ -620,16 +619,15 @@ void SkyBox::_initMaterial() void SkyBox::_updateMaterial() { - if ( mMatName.isEmpty() ) - return; - - Material *pMat = NULL; - if ( !Sim::findObject( mMatName, pMat ) ) - Con::printf( "SkyBox::_updateMaterial, failed to find Material of name %s!", mMatName.c_str() ); - else if ( isProperlyAdded() ) + if (!getMaterialResource().isValid()) { - mMaterial = pMat; - _initMaterial(); + //If our materialDef isn't valid, try setting it + _setMaterial(getMaterial()); + } + + if (getMaterialResource().isValid()) + { + _initMaterial(); } } diff --git a/Engine/source/environment/skyBox.h b/Engine/source/environment/skyBox.h index 466b3e05e..38c2b0ac7 100644 --- a/Engine/source/environment/skyBox.h +++ b/Engine/source/environment/skyBox.h @@ -47,6 +47,8 @@ #include "gfx/gfxPrimitiveBuffer.h" #endif +#include "T3D/assets/MaterialAsset.h" + GFXDeclareVertexFormat( GFXSkyVertex ) { @@ -98,13 +100,13 @@ public: protected: - // Material - String mMatName; + // Material + DECLARE_MATERIALASSET(SkyBox, Material); + DECLARE_MATERIALASSET_NET_SETGET(SkyBox, Material, -1); + BaseMatInstance *mMatInstance; SkyMatParams mMatParamHandle; - SimObjectPtr mMaterial; - GFXVertexBufferHandle mVB; GFXVertexBufferHandle mFogBandVB; diff --git a/Engine/source/environment/sun.cpp b/Engine/source/environment/sun.cpp index 82cb88dee..42062a78b 100644 --- a/Engine/source/environment/sun.cpp +++ b/Engine/source/environment/sun.cpp @@ -90,6 +90,8 @@ Sun::Sun() mCoronaUseLightColor = true; mCoronaMatInst = NULL; + INIT_MATERIALASSET(CoronaMaterial); + mMatrixSet = reinterpret_cast(dMalloc_aligned(sizeof(MatrixSet), 16)); constructInPlace(mMatrixSet); @@ -177,8 +179,7 @@ void Sun::initPersistFields() addField( "coronaEnabled", TypeBool, Offset( mCoronaEnabled, Sun ), "Enable or disable rendering of the corona sprite." ); - addField( "coronaMaterial", TypeMaterialName, Offset( mCoronaMatName, Sun ), - "Texture for the corona sprite." ); + INITPERSISTFIELD_MATERIALASSET(CoronaMaterial, Sun, "Material for the corona sprite."); addField( "coronaScale", TypeF32, Offset( mCoronaScale, Sun ), "Controls size the corona sprite renders, specified as a fractional amount of the screen height." ); @@ -238,7 +239,9 @@ U32 Sun::packUpdate(NetConnection *conn, U32 mask, BitStream *stream ) } stream->writeFlag( mCoronaEnabled ); - stream->write( mCoronaMatName ); + + PACK_MATERIALASSET(conn, CoronaMaterial); + stream->write( mCoronaScale ); stream->write( mCoronaTint ); stream->writeFlag( mCoronaUseLightColor ); @@ -282,7 +285,9 @@ void Sun::unpackUpdate( NetConnection *conn, BitStream *stream ) mFlareData = NULL; mCoronaEnabled = stream->readFlag(); - stream->read( &mCoronaMatName ); + + UNPACK_MATERIALASSET(conn, CoronaMaterial); + stream->read( &mCoronaScale ); stream->read( &mCoronaTint ); mCoronaUseLightColor = stream->readFlag(); @@ -446,8 +451,10 @@ void Sun::_initCorona() SAFE_DELETE( mCoronaMatInst ); - if ( mCoronaMatName.isNotEmpty() ) - mCoronaMatInst = MATMGR->createMatInstance( mCoronaMatName, MATMGR->getDefaultFeatures(), getGFXVertexFormat() ); + if (mCoronaMaterialAsset.notNull()) + { + mCoronaMatInst = MATMGR->createMatInstance(mCoronaMaterialAsset->getMaterialDefinitionName(), MATMGR->getDefaultFeatures(), getGFXVertexFormat()); + } } void Sun::_renderCorona( ObjectRenderInst *ri, SceneRenderState *state, BaseMatInstance *overrideMat ) diff --git a/Engine/source/environment/sun.h b/Engine/source/environment/sun.h index 503526fab..9d11c0ed1 100644 --- a/Engine/source/environment/sun.h +++ b/Engine/source/environment/sun.h @@ -36,6 +36,8 @@ #include "T3D/lightFlareData.h" #endif +#include "T3D/assets/MaterialAsset.h" + class TimeOfDay; class MatrixSet; @@ -75,7 +77,10 @@ protected: F32 mFlareScale; bool mCoronaEnabled; - String mCoronaMatName; + + DECLARE_MATERIALASSET(Sun, CoronaMaterial); + DECLARE_MATERIALASSET_NET_SETGET(Sun, CoronaMaterial, UpdateMask); + BaseMatInstance *mCoronaMatInst; MatrixSet *mMatrixSet; F32 mCoronaScale; diff --git a/Engine/source/environment/waterObject.cpp b/Engine/source/environment/waterObject.cpp index 1d3da4aeb..2a2cf86ce 100644 --- a/Engine/source/environment/waterObject.cpp +++ b/Engine/source/environment/waterObject.cpp @@ -259,6 +259,12 @@ WaterObject::WaterObject() mMatrixSet = reinterpret_cast(dMalloc_aligned(sizeof(MatrixSet), 16)); constructInPlace(mMatrixSet); + + INIT_IMAGEASSET(RippleTex); + INIT_IMAGEASSET(FoamTex); + INIT_IMAGEASSET(DepthGradientTex); + + mCubemapName = StringTable->EmptyString(); } WaterObject::~WaterObject() @@ -292,8 +298,8 @@ void WaterObject::initPersistFields() addField( "overallWaveMagnitude", TypeF32, Offset( mOverallWaveMagnitude, WaterObject ), "Master variable affecting entire body" " of water's undulation" ); - - addField( "rippleTex", TypeImageFilename, Offset( mRippleTexName, WaterObject ), "Normal map used to simulate small surface ripples" ); + + INITPERSISTFIELD_IMAGEASSET(RippleTex, WaterObject, "Normal map used to simulate small surface ripples"); addArray( "Ripples (texture animation)", MAX_WAVES ); @@ -307,7 +313,7 @@ void WaterObject::initPersistFields() addField( "overallRippleMagnitude", TypeF32, Offset( mOverallRippleMagnitude, WaterObject ), "Master variable affecting entire surface"); - addField( "foamTex", TypeImageFilename, Offset( mFoamTexName, WaterObject ), "Diffuse texture for foam in shallow water (advanced lighting only)" ); + INITPERSISTFIELD_IMAGEASSET(FoamTex, WaterObject, "Diffuse texture for foam in shallow water (advanced lighting only)"); addArray( "Foam", MAX_FOAM ); @@ -358,8 +364,9 @@ void WaterObject::initPersistFields() endGroup( "Underwater Fogging" ); addGroup( "Misc" ); - - addField( "depthGradientTex", TypeImageFilename, Offset( mDepthGradientTexName, WaterObject ), "1D texture defining the base water color by depth" ); + + INITPERSISTFIELD_IMAGEASSET(DepthGradientTex, WaterObject, "1D texture defining the base water color by depth"); + addField( "depthGradientMax", TypeF32, Offset( mDepthGradientMax, WaterObject ), "Depth in world units, the max range of the color gradient texture." ); endGroup( "Misc" ); @@ -539,10 +546,11 @@ U32 WaterObject::packUpdate( NetConnection * conn, U32 mask, BitStream *stream ) if ( stream->writeFlag( mask & TextureMask ) ) { - stream->write( mRippleTexName ); - stream->write( mDepthGradientTexName ); - stream->write( mFoamTexName ); - stream->write( mCubemapName ); + PACK_IMAGEASSET(conn, RippleTex); + PACK_IMAGEASSET(conn, DepthGradientTex); + PACK_IMAGEASSET(conn, FoamTex); + + stream->writeString( mCubemapName ); } if( stream->writeFlag( mask & SoundMask ) ) @@ -660,10 +668,11 @@ void WaterObject::unpackUpdate( NetConnection * conn, BitStream *stream ) // TextureMask if ( stream->readFlag() ) { - stream->read( &mRippleTexName ); - stream->read( &mDepthGradientTexName ); - stream->read( &mFoamTexName ); - stream->read( &mCubemapName ); + UNPACK_IMAGEASSET(conn, RippleTex); + UNPACK_IMAGEASSET(conn, DepthGradientTex); + UNPACK_IMAGEASSET(conn, FoamTex); + + mCubemapName = stream->readSTString(); if ( isProperlyAdded() ) initTextures(); @@ -1161,25 +1170,10 @@ bool WaterObject::initMaterial( S32 idx ) void WaterObject::initTextures() { - if ( mRippleTexName.isNotEmpty() ) - mRippleTex.set( mRippleTexName, &GFXStaticTextureProfile, "WaterObject::mRippleTex" ); - if ( mRippleTex.isNull() ) - mRippleTex.set( GFXTextureManager::getWarningTexturePath(), &GFXStaticTextureProfile, "WaterObject::mRippleTex" ); - - if ( mDepthGradientTexName.isNotEmpty() ) - mDepthGradientTex.set( mDepthGradientTexName, &GFXStaticTextureSRGBProfile, "WaterObject::mDepthGradientTex" ); - if ( mDepthGradientTex.isNull() ) - mDepthGradientTex.set( GFXTextureManager::getWarningTexturePath(), &GFXStaticTextureSRGBProfile, "WaterObject::mDepthGradientTex" ); - if ( mNamedDepthGradTex.isRegistered() ) mNamedDepthGradTex.setTexture( mDepthGradientTex ); - if ( mFoamTexName.isNotEmpty() ) - mFoamTex.set( mFoamTexName, &GFXStaticTextureSRGBProfile, "WaterObject::mFoamTex" ); - if ( mFoamTex.isNull() ) - mFoamTex.set( GFXTextureManager::getWarningTexturePath(), &GFXStaticTextureSRGBProfile, "WaterObject::mFoamTex" ); - - if ( mCubemapName.isNotEmpty() ) + if ( mCubemapName != StringTable->EmptyString() ) Sim::findObject( mCubemapName, mCubemap ); if ( mCubemap ) mCubemap->createMap(); diff --git a/Engine/source/environment/waterObject.h b/Engine/source/environment/waterObject.h index 94862e4c6..7a9e9b5d4 100644 --- a/Engine/source/environment/waterObject.h +++ b/Engine/source/environment/waterObject.h @@ -45,6 +45,8 @@ #include "materials/matTextureTarget.h" #endif +#include "T3D/assets/ImageAsset.h" + GFXDeclareVertexFormat( GFXWaterVertex ) { Point3F point; @@ -200,6 +202,10 @@ protected: /// Callback used internally when smDisableTrueReflections changes. void _onDisableTrueRelfections(); + void onRippleTexChanged() {} + void onFoamTexChanged() {} + void onDepthGradientTexChanged() {} + protected: static bool _setFullReflect( void *object, const char *index, const char *data ); @@ -266,10 +272,14 @@ protected: F32 mDepthGradientMax; // Other textures - String mRippleTexName; - String mFoamTexName; - String mCubemapName; - String mDepthGradientTexName; + DECLARE_IMAGEASSET(WaterObject, RippleTex, onRippleTexChanged, GFXStaticTextureProfile); + DECLARE_IMAGEASSET_NET_SETGET(WaterObject, RippleTex, TextureMask); + DECLARE_IMAGEASSET(WaterObject, FoamTex, onFoamTexChanged, GFXStaticTextureSRGBProfile); + DECLARE_IMAGEASSET_NET_SETGET(WaterObject, FoamTex, TextureMask); + DECLARE_IMAGEASSET(WaterObject, DepthGradientTex, onDepthGradientTexChanged, GFXStaticTextureSRGBProfile); + DECLARE_IMAGEASSET_NET_SETGET(WaterObject, DepthGradientTex, TextureMask); + + StringTableEntry mCubemapName; // Sound SFXAmbience* mSoundAmbience; @@ -309,9 +319,6 @@ protected: WaterMatParams mMatParamHandles[NumMatTypes]; bool mUnderwater; GFXStateBlockRef mUnderwaterSB; - GFXTexHandle mRippleTex; - GFXTexHandle mDepthGradientTex; - GFXTexHandle mFoamTex; CubemapData *mCubemap; MatrixSet *mMatrixSet; NamedTexTarget mNamedDepthGradTex; diff --git a/Engine/source/forest/forest.cpp b/Engine/source/forest/forest.cpp index dd675480a..ce4a4186c 100644 --- a/Engine/source/forest/forest.cpp +++ b/Engine/source/forest/forest.cpp @@ -46,6 +46,8 @@ /// For frame signal #include "gui/core/guiCanvas.h" +#include "T3D/assets/LevelAsset.h" + extern bool gEditingMission; @@ -333,18 +335,23 @@ void Forest::createNewFile() mData = NULL; // We need to construct a default file name - String missionName( Con::getVariable( "$Client::MissionFile" ) ); - String levelDirectory( Con::getVariable( "$pref::Directories::Level" ) ); - if ( levelDirectory.isEmpty() ) - { - levelDirectory = "levels"; - } - missionName.replace( "tools/levels", levelDirectory ); - missionName = Platform::makeRelativePathName(missionName, Platform::getMainDotCsDir()); + String levelAssetId(Con::getVariable("$Client::LevelAsset")); + + LevelAsset* levelAsset; + if (!Sim::findObject(levelAssetId.c_str(), levelAsset)) + { + Con::errorf("Forest::createNewFile() - Unable to find current level's LevelAsset. Unable to construct forest filePath"); + return; + } + + Torque::Path basePath(levelAsset->getForestPath() ); + + //If we didn't already define a forestfile to work with, just base it off our filename + if (basePath.isEmpty()) + basePath = levelAsset->getLevelPath(); - Torque::Path basePath( missionName ); String fileName = Torque::FS::MakeUniquePath( basePath.getPath(), basePath.getFileName(), "forest" ); - mDataFileName = StringTable->insert( fileName ); + mDataFileName = StringTable->insert( fileName.c_str() ); ForestData *file = new ForestData; file->write( mDataFileName ); diff --git a/Engine/source/forest/forestItem.cpp b/Engine/source/forest/forestItem.cpp index c1298b025..11d514b34 100644 --- a/Engine/source/forest/forestItem.cpp +++ b/Engine/source/forest/forestItem.cpp @@ -41,7 +41,6 @@ SimSet* ForestItemData::smSet = NULL; ForestItemData::ForestItemData() : mNeedPreload( true ), - mShapeFile( NULL ), mRadius( 1 ), mCollidable( true ), mWindScale( 0.0f ), @@ -54,6 +53,7 @@ ForestItemData::ForestItemData() mTightnessCoefficient( 0.4f ), mDampingCoefficient( 0.7f ) { + INIT_SHAPEASSET(Shape); } void ForestItemData::initPersistFields() @@ -61,9 +61,11 @@ void ForestItemData::initPersistFields() Parent::initPersistFields(); addGroup( "Media" ); + + INITPERSISTFIELD_SHAPEASSET(Shape, ForestItemData, "Shape asset for this item type"); - addField( "shapeFile", TypeShapeFilename, Offset( mShapeFile, ForestItemData ), - "Shape file for this item type" ); + addProtectedField( "shapeFile", TypeShapeFilename, Offset( mShapeName, ForestItemData ), &_setShapeData, &defaultProtectedGetFn, + "Shape file for this item type", AbstractClassRep::FIELD_HideInInspectors ); addField( "collidable", TypeBool, Offset( mCollidable, ForestItemData ), "Can other objects or spacial queries hit items of this type." ); @@ -162,7 +164,7 @@ void ForestItemData::packData(BitStream* stream) stream->write( localName ); - stream->writeString(mShapeFile); + PACKDATA_SHAPEASSET(Shape); stream->writeFlag( mCollidable ); @@ -190,8 +192,7 @@ void ForestItemData::unpackData(BitStream* stream) char readBuffer[1024]; - stream->readString(readBuffer); - mShapeFile = StringTable->insert(readBuffer); + UNPACKDATA_SHAPEASSET(Shape); mCollidable = stream->readFlag(); diff --git a/Engine/source/forest/forestItem.h b/Engine/source/forest/forestItem.h index c5a0fe374..0c7eb0697 100644 --- a/Engine/source/forest/forestItem.h +++ b/Engine/source/forest/forestItem.h @@ -33,6 +33,7 @@ #include "console/dynamicTypes.h" #endif +#include "T3D/assets/ShapeAsset.h" class ForestItem; class ForestCellBatch; @@ -61,8 +62,8 @@ protected: public: - /// Shape file for this item type. - StringTableEntry mShapeFile; + DECLARE_SHAPEASSET(ForestItemData, Shape, onShapeChanged); + DECLARE_SHAPEASSET_SETGET(ForestItemData, Shape); /// This is the radius used during placement to ensure /// the element isn't crowded up against other trees. @@ -141,6 +142,8 @@ public: static ReloadSignal theSignal; return theSignal; } + + void onShapeChanged() {} }; typedef Vector ForestItemDataVector; diff --git a/Engine/source/forest/ts/tsForestItemData.cpp b/Engine/source/forest/ts/tsForestItemData.cpp index 5caf9387d..29c67899e 100644 --- a/Engine/source/forest/ts/tsForestItemData.cpp +++ b/Engine/source/forest/ts/tsForestItemData.cpp @@ -99,7 +99,8 @@ void TSForestItemData::inspectPostApply() void TSForestItemData::_onResourceChanged( const Torque::Path &path ) { - if ( path != Path( mShapeFile ) ) + if (mShapeAsset.isNull()) return; + if ( path != Path(mShapeAsset->getShapeFilePath()) ) return; SAFE_DELETE( mShapeInstance ); @@ -110,12 +111,15 @@ void TSForestItemData::_onResourceChanged( const Torque::Path &path ) void TSForestItemData::_loadShape() { - mShape = ResourceManager::get().load(mShapeFile); + if (mShapeAsset.isNull()) return; + + _setShape(mShapeAssetId); + if ( !(bool)mShape ) return; if ( mIsClientObject && - !mShape->preloadMaterialList( mShapeFile ) ) + !mShape->preloadMaterialList(mShapeAsset->getShapeFilePath()) ) return; // Lets add an autobillboard detail if don't have one. @@ -153,13 +157,14 @@ TSShapeInstance* TSForestItemData::_getShapeInstance() const void TSForestItemData::_checkLastDetail() { + if (mShapeAsset.isNull()) return; const S32 dl = mShape->mSmallestVisibleDL; const TSDetail *detail = &mShape->details[dl]; // TODO: Expose some real parameters to the datablock maybe? if ( detail->subShapeNum != -1 ) { - mShape->addImposter( mShapeFile, 10, 4, 0, 0, 256, 0, 0 ); + mShape->addImposter(mShapeAsset->getShapeFilePath(), 10, 4, 0, 0, 256, 0, 0 ); // HACK: If i don't do this it crashes! while ( mShape->detailCollisionAccelerators.size() < mShape->details.size() ) diff --git a/Engine/source/forest/ts/tsForestItemData.h b/Engine/source/forest/ts/tsForestItemData.h index 089da98d5..a46c51684 100644 --- a/Engine/source/forest/ts/tsForestItemData.h +++ b/Engine/source/forest/ts/tsForestItemData.h @@ -49,8 +49,6 @@ protected: // This is setup during forest creation. mutable TSShapeInstance *mShapeInstance; - Resource mShape; - Vector mCollisionDetails; Vector mLOSDetails; diff --git a/Engine/source/gfx/bitmap/gBitmap.cpp b/Engine/source/gfx/bitmap/gBitmap.cpp index a31e81faf..33c1c700c 100644 --- a/Engine/source/gfx/bitmap/gBitmap.cpp +++ b/Engine/source/gfx/bitmap/gBitmap.cpp @@ -1360,3 +1360,55 @@ DefineEngineFunction( getBitmapInfo, String, ( const char *filename ),, image->getBytesPerPixel(), image->getFormat()); } + +DefineEngineFunction(saveScaledImage, bool, (const char* bitmapSource, const char* bitmapDest, S32 resolutionSize), ("", "", 512), + "Returns image info in the following format: width TAB height TAB bytesPerPixel TAB format. " + "It will return an empty string if the file is not found.\n" + "@ingroup Rendering\n") +{ + Resource image = GBitmap::load(bitmapSource); + if (!image) + return false; + + Torque::Path sourcePath = Torque::Path(bitmapSource); + + /*if (String("dds").equal(sourcePath.getExtension(), String::NoCase)) + { + dds = DDSFile::load(correctPath, scalePower); + if (dds != NULL) + { + if (!dds->decompressToGBitmap(image)) + { + delete image; + image = NULL; + return false; + } + } + }*/ + + image->extrudeMipLevels(); + + U32 mipCount = image->getNumMipLevels(); + U32 targetMips = mFloor(mLog2((F32)resolutionSize)) + 1; + + if (mipCount > targetMips) + { + image->chopTopMips(mipCount - targetMips); + } + + // Open up the file on disk. + FileStream fs; + if (!fs.open(bitmapDest, Torque::FS::File::Write)) + { + Con::errorf("saveScaledImage() - Failed to open output file '%s'!", bitmapDest); + return false; + } + else + { + image->writeBitmap("png", fs); + + fs.close(); + } + + return true; +} diff --git a/Engine/source/gfx/gfxDevice.h b/Engine/source/gfx/gfxDevice.h index 8c022115a..1e2b68bab 100644 --- a/Engine/source/gfx/gfxDevice.h +++ b/Engine/source/gfx/gfxDevice.h @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- - +#pragma once #ifndef _GFXDEVICE_H_ #define _GFXDEVICE_H_ diff --git a/Engine/source/gfx/gfxTextureProfile.h b/Engine/source/gfx/gfxTextureProfile.h index 2fd866ab5..46f2b690b 100644 --- a/Engine/source/gfx/gfxTextureProfile.h +++ b/Engine/source/gfx/gfxTextureProfile.h @@ -19,6 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- +#pragma once #ifndef _GFXTEXTUREPROFILE_H_ #define _GFXTEXTUREPROFILE_H_ diff --git a/Engine/source/gfx/sim/cubemapData.cpp b/Engine/source/gfx/sim/cubemapData.cpp index 02927073e..a6833de5c 100644 --- a/Engine/source/gfx/sim/cubemapData.cpp +++ b/Engine/source/gfx/sim/cubemapData.cpp @@ -41,6 +41,13 @@ IMPLEMENT_CONOBJECT( CubemapData ); CubemapData::CubemapData() { mCubemap = NULL; + + for (U32 i = 0; i < 6; i++) + { + INIT_IMAGEASSET_ARRAY(CubeMapFace, i); + } + + INIT_IMAGEASSET(CubeMap); } CubemapData::~CubemapData() @@ -69,7 +76,7 @@ ConsoleDocClass( CubemapData, void CubemapData::initPersistFields() { - addField( "cubeFace", TypeStringFilename, Offset(mCubeFaceFile, CubemapData), 6, + addProtectedField( "cubeFace", TypeStringFilename, Offset(mCubeMapFaceName, CubemapData), _setCubeMapFaceData, defaultProtectedGetFn, 6, "@brief The 6 cubemap face textures for a static cubemap.\n\n" "They are in the following order:\n" " - cubeFace[0] is -X\n" @@ -77,11 +84,18 @@ void CubemapData::initPersistFields() " - cubeFace[2] is -Z\n" " - cubeFace[3] is +Z\n" " - cubeFace[4] is -Y\n" - " - cubeFace[5] is +Y\n" ); + " - cubeFace[5] is +Y\n", AbstractClassRep::FIELD_HideInInspectors ); - addField("cubeMap", TypeStringFilename, Offset(mCubeMapFile, CubemapData), - "@brief Cubemap dds file.\n\n"); + INITPERSISTFIELD_IMAGEASSET_ARRAY(CubeMapFace, 6, CubemapData, "@brief The 6 cubemap face textures for a static cubemap.\n\n" + "They are in the following order:\n" + " - cubeFace[0] is -X\n" + " - cubeFace[1] is +X\n" + " - cubeFace[2] is -Z\n" + " - cubeFace[3] is +Z\n" + " - cubeFace[4] is -Y\n" + " - cubeFace[5] is +Y\n"); + INITPERSISTFIELD_IMAGEASSET(CubeMap, CubemapData, "@brief Cubemap dds Image Asset.\n\n"); } bool CubemapData::onAdd() @@ -101,22 +115,19 @@ void CubemapData::createMap() { bool initSuccess = true; //check mCubeMapFile first - if (!mCubeMapFile.isEmpty()) + if (getCubeMap() != StringTable->EmptyString()) { - mCubemap = TEXMGR->createCubemap(mCubeMapFile); + mCubemap = TEXMGR->createCubemap(getCubeMap()); return; } else { for (U32 i = 0; i < 6; i++) { - if (!mCubeFaceFile[i].isEmpty()) + if (!_setCubeMapFace(getCubeMapFace(i), i)) { - if (!mCubeFace[i].set(mCubeFaceFile[i], &GFXStaticTextureSRGBProfile, avar("%s() - mCubeFace[%d] (line %d)", __FUNCTION__, i, __LINE__))) - { - Con::errorf("CubemapData::createMap - Failed to load texture '%s'", mCubeFaceFile[i].c_str()); - initSuccess = false; - } + Con::errorf("CubemapData::createMap - Failed to load texture '%s'", getCubeMapFace(i)); + initSuccess = false; } } } @@ -124,8 +135,9 @@ void CubemapData::createMap() if( initSuccess ) { mCubemap = GFX->createCubemap(); - if (mCubeFace == NULL || mCubeFace->isNull()) return; - mCubemap->initStatic( mCubeFace ); + if (mCubeMapFace == NULL || mCubeMapFace->isNull()) + return; + mCubemap->initStatic(mCubeMapFace); } } } @@ -137,20 +149,17 @@ void CubemapData::updateFaces() for( U32 i=0; i<6; i++ ) { //check mCubeMapFile first - if (!mCubeMapFile.isEmpty()) + if (getCubeMap() != StringTable->EmptyString()) { - mCubemap = TEXMGR->createCubemap(mCubeMapFile); + mCubemap = TEXMGR->createCubemap(getCubeMap()); return; } else { - if (!mCubeFaceFile[i].isEmpty()) + if (!_setCubeMapFace(getCubeMapFace(i), i)) { - if (!mCubeFace[i].set(mCubeFaceFile[i], &GFXStaticTextureSRGBProfile, avar("%s() - mCubeFace[%d] (line %d)", __FUNCTION__, i, __LINE__))) - { - initSuccess = false; - Con::errorf("CubemapData::createMap - Failed to load texture '%s'", mCubeFaceFile[i].c_str()); - } + Con::errorf("CubemapData::createMap - Failed to load texture '%s'", getCubeMapFace(i)); + initSuccess = false; } } } @@ -160,13 +169,13 @@ void CubemapData::updateFaces() mCubemap = NULL; mCubemap = GFX->createCubemap(); - mCubemap->initStatic( mCubeFace ); + mCubemap->initStatic( mCubeMapFace ); } } void CubemapData::setCubemapFile(FileName newCubemapFile) { - mCubeMapFile = newCubemapFile; + mCubeMapName = newCubemapFile; } void CubemapData::setCubeFaceFile(U32 index, FileName newFaceFile) @@ -174,7 +183,7 @@ void CubemapData::setCubeFaceFile(U32 index, FileName newFaceFile) if (index >= 6) return; - mCubeFaceFile[index] = newFaceFile; + mCubeMapFaceName[index] = newFaceFile; } void CubemapData::setCubeFaceTexture(U32 index, GFXTexHandle newFaceTexture) @@ -182,7 +191,7 @@ void CubemapData::setCubeFaceTexture(U32 index, GFXTexHandle newFaceTexture) if (index >= 6) return; - mCubeFace[index] = newFaceTexture; + mCubeMapFace[index] = newFaceTexture; } DefineEngineMethod( CubemapData, updateFaces, void, (),, diff --git a/Engine/source/gfx/sim/cubemapData.h b/Engine/source/gfx/sim/cubemapData.h index ba2edbcf9..7ec2e0fb5 100644 --- a/Engine/source/gfx/sim/cubemapData.h +++ b/Engine/source/gfx/sim/cubemapData.h @@ -39,6 +39,7 @@ #include "scene/sceneManager.h" #endif +#include "T3D/assets/ImageAsset.h" /// A script interface for creating static or dynamic cubemaps. class CubemapData : public SimObject @@ -69,15 +70,19 @@ public: void setCubeFaceTexture(U32 index, GFXTexHandle newFaceTexture); - GFXTexHandle* getCubeMapFace(U32 faceIdx) { return &mCubeFace[faceIdx]; } + GFXTexHandle* getCubeFaceTexture(U32 faceIdx) { return &mCubeMapFace[faceIdx]; } protected: - FileName mCubeMapFile; - FileName mCubeFaceFile[6]; - GFXTexHandle mCubeFace[6]; + DECLARE_IMAGEASSET(CubemapData, CubeMap, onCubemapChanged, GFXStaticTextureSRGBProfile); + DECLARE_IMAGEASSET_SETGET(CubemapData, CubeMap); + + DECLARE_IMAGEASSET_ARRAY(CubemapData, CubeMapFace, GFXStaticTextureSRGBProfile, 6); + DECLARE_IMAGEASSET_ARRAY_SETGET(CubemapData, CubeMapFace); GFXTexHandle mDepthBuff; GFXTextureTargetRef mRenderTarget; + + void onCubemapChanged() {} }; #endif // CUBEMAPDATA diff --git a/Engine/source/gfx/video/theoraTextureObject.cpp b/Engine/source/gfx/video/theoraTextureObject.cpp index e83314870..d75692ac5 100644 --- a/Engine/source/gfx/video/theoraTextureObject.cpp +++ b/Engine/source/gfx/video/theoraTextureObject.cpp @@ -133,7 +133,7 @@ bool TheoraTextureObject::onAdd() if( !Parent::onAdd() ) return false; - if( mFilename.isEmpty() ) + if( mFilename == StringTable->EmptyString()) { Con::errorf( "TheoraTextureObject::onAdd - 'filename' must be set" ); return false; @@ -171,11 +171,11 @@ void TheoraTextureObject::onRemove() void TheoraTextureObject::play() { - if( mTheoraTexture.getFilename().isEmpty() || mTheoraTexture.getFilename() != mFilename ) + if( mTheoraTexture.getFilename().isEmpty() || mTheoraTexture.getFilename() != String(mFilename) ) { if( !mTheoraTexture.setFile( mFilename, mSFXDescription ) ) { - Con::errorf( "TheoraTextureObject::play - Could not load video '%s'", mFilename.c_str() ); + Con::errorf( "TheoraTextureObject::play - Could not load video '%s'", mFilename ); return; } } diff --git a/Engine/source/gfx/video/theoraTextureObject.h b/Engine/source/gfx/video/theoraTextureObject.h index 98095cd28..74d7f066c 100644 --- a/Engine/source/gfx/video/theoraTextureObject.h +++ b/Engine/source/gfx/video/theoraTextureObject.h @@ -54,7 +54,7 @@ protected: bool mLoop; /// The Theora file we should play. - String mFilename; + StringTableEntry mFilename; /// Name for the NamedTexTarget. String mTexTargetName; diff --git a/Engine/source/gui/buttons/guiBitmapButtonCtrl.cpp b/Engine/source/gui/buttons/guiBitmapButtonCtrl.cpp index 2e9b6d0aa..91088b2a4 100644 --- a/Engine/source/gui/buttons/guiBitmapButtonCtrl.cpp +++ b/Engine/source/gui/buttons/guiBitmapButtonCtrl.cpp @@ -30,6 +30,9 @@ #include "gui/core/guiDefaultControlRender.h" #include "gfx/gfxDrawUtil.h" #include "gfx/gfxTextureManager.h" +#include "gui/editor/inspector/group.h" +#include "gui/editor/inspector/field.h" +#include "gui/editor/guiInspector.h" ImplementEnumType( GuiBitmapMode, @@ -125,6 +128,8 @@ GuiBitmapButtonCtrl::GuiBitmapButtonCtrl() mUseStates = true; setExtent( 140, 30 ); mMasked = false; + + INIT_IMAGEASSET(Bitmap); } //----------------------------------------------------------------------------- @@ -132,13 +137,12 @@ GuiBitmapButtonCtrl::GuiBitmapButtonCtrl() void GuiBitmapButtonCtrl::initPersistFields() { addGroup( "Bitmap" ); - - addProtectedField( "bitmap", TypeStringFilename, Offset( mBitmapName, GuiBitmapButtonCtrl ), - &_setBitmap, &defaultProtectedGetFn, - "Texture file to display on this button.\n" + + INITPERSISTFIELD_IMAGEASSET(Bitmap, GuiBitmapButtonCtrl, "Texture file to display on this button.\n" "If useStates is false, this will be the file that renders on the control. Otherwise, this will " "specify the default texture name to which the various state and modifier suffixes are appended " - "to find the per-state and per-modifier (if enabled) textures." ); + "to find the per-state and per-modifier (if enabled) textures."); + addField( "bitmapMode", TYPEID< BitmapMode >(), Offset( mBitmapMode, GuiBitmapButtonCtrl ), "Behavior for fitting the bitmap to the control extents.\n" "If set to 'Stretched', the bitmap will be stretched both verticall and horizontally to fit inside " @@ -173,7 +177,7 @@ bool GuiBitmapButtonCtrl::onWake() return false; setActive( true ); - setBitmap( mBitmapName ); + setBitmap( getBitmap() ); return true; } @@ -205,22 +209,22 @@ bool GuiBitmapButtonCtrl::_setAutoFitExtents( void *object, const char *index, c //----------------------------------------------------------------------------- -bool GuiBitmapButtonCtrl::_setBitmap( void *object, const char *index, const char *data ) +/*bool GuiBitmapButtonCtrl::_setBitmap(void* object, const char* index, const char* data) { GuiBitmapButtonCtrl* ctrl = reinterpret_cast< GuiBitmapButtonCtrl* >( object ); - ctrl->setBitmap( data ); + ctrl->setBitmap( StringTable->insert(data) ); return false; -} +}*/ //----------------------------------------------------------------------------- // Legacy method. Can just assign to bitmap field. -DefineEngineMethod( GuiBitmapButtonCtrl, setBitmap, void, ( const char* path ),, +/*DefineEngineMethod(GuiBitmapButtonCtrl, setBitmap, void, (const char* path), , "Set the bitmap to show on the button.\n" "@param path Path to the texture file in any of the supported formats.\n" ) { - object->setBitmap( path ); -} + object->setBitmap( StringTable->insert(path) ); +}*/ //----------------------------------------------------------------------------- @@ -253,7 +257,7 @@ void GuiBitmapButtonCtrl::inspectPostApply() } } - setBitmap( path.getFullPath() ); + setBitmap( StringTable->insert(path.getFullPath().c_str()) ); // if the extent is set to (0,0) in the gui editor and appy hit, this control will // set it's extent to be exactly the size of the normal bitmap (if present) @@ -275,17 +279,17 @@ void GuiBitmapButtonCtrl::setAutoFitExtents( bool state ) //----------------------------------------------------------------------------- -void GuiBitmapButtonCtrl::setBitmap( const String& name ) +void GuiBitmapButtonCtrl::setBitmap( StringTableEntry name ) { PROFILE_SCOPE( GuiBitmapButtonCtrl_setBitmap ); - mBitmapName = name; + _setBitmap(name); if( !isAwake() ) return; - if( !mBitmapName.isEmpty() ) + if( mBitmapAsset.notNull()) { - if( dStricmp( mBitmapName, "texhandle" ) != 0 ) + if( dStricmp( getBitmap(), "texhandle" ) != 0 ) { const U32 count = mUseModifiers ? NumModifiers : 1; for( U32 i = 0; i < count; ++ i ) @@ -298,39 +302,110 @@ void GuiBitmapButtonCtrl::setBitmap( const String& name ) "_shift" }; - static String s_n = "_n"; - static String s_d = "_d"; - static String s_h = "_h"; - static String s_i = "_i"; + static String s_n[2] = { "_n", "_n_image" }; + static String s_d[2] = { "_d", "_d_image" }; + static String s_h[2] = { "_h", "_h_image" }; + static String s_i[2] = { "_i", "_i_image" }; + + String baseName = mBitmapAssetId; + + //strip any pre-assigned suffix, just in case + baseName = baseName.replace("_n_image", ""); + baseName = baseName.replace("_n", ""); - String baseName = mBitmapName; if( mUseModifiers ) baseName += modifiers[ i ]; - mTextures[ i ].mTextureNormal = GFXTexHandle( baseName, &GFXDefaultGUIProfile, avar("%s() - mTextureNormal (line %d)", __FUNCTION__, __LINE__)); + mTextures[ i ].mTextureNormal = GFXTexHandle( mBitmapAsset->getImagePath(), &GFXDefaultGUIProfile, avar("%s() - mTextureNormal (line %d)", __FUNCTION__, __LINE__)); if( mUseStates ) { - if( !mTextures[ i ].mTextureNormal ) - mTextures[ i ].mTextureNormal = GFXTexHandle( baseName + s_n, &GFXDefaultGUIProfile, avar("%s() - mTextureNormal (line %d)", __FUNCTION__, __LINE__)); - - mTextures[ i ].mTextureHilight = GFXTexHandle( baseName + s_h, &GFXDefaultGUIProfile, avar("%s() - mTextureHighlight (line %d)", __FUNCTION__, __LINE__)); + //normal lookup + StringTableEntry lookupName; + for (U32 s = 0; s < 2; s++) + { + if (!mTextures[i].mTextureNormal) + { + lookupName = StringTable->insert(String(baseName + s_n[s]).c_str()); + if (AssetDatabase.isDeclaredAsset(lookupName)) + { + mTextures[i].mTextureNormalAssetId = lookupName; + mTextures[i].mTextureNormalAsset = mTextures[i].mTextureNormalAssetId; + } + + if (mTextures[i].mTextureNormalAsset.notNull() && mTextures[i].mTextureNormalAsset->getStatus() == AssetBase::Ok) + { + mTextures[i].mTextureNormal = GFXTexHandle(mTextures[i].mTextureNormalAsset->getImagePath(), &GFXDefaultGUIProfile, avar("%s() - mTextureNormal (line %d)", __FUNCTION__, __LINE__)); + break; + } + } + } + + //Hilight lookup + for (U32 s = 0; s < 2; s++) + { + lookupName = StringTable->insert(String(baseName + s_h[s]).c_str()); + if (AssetDatabase.isDeclaredAsset(lookupName)) + { + mTextures[i].mTextureHilightAssetId = lookupName; + mTextures[i].mTextureHilightAsset = mTextures[i].mTextureHilightAssetId; + } + + if (mTextures[i].mTextureHilightAsset.notNull() && mTextures[i].mTextureHilightAsset->getStatus() == AssetBase::Ok) + { + mTextures[i].mTextureHilight = GFXTexHandle(mTextures[i].mTextureHilightAsset->getImagePath(), &GFXDefaultGUIProfile, avar("%s() - mTextureHighlight (line %d)", __FUNCTION__, __LINE__)); + break; + } + } + if( !mTextures[ i ].mTextureHilight ) mTextures[ i ].mTextureHilight = mTextures[ i ].mTextureNormal; - - mTextures[ i ].mTextureDepressed = GFXTexHandle( baseName + s_d, &GFXDefaultGUIProfile, avar("%s() - mTextureDepressed (line %d)", __FUNCTION__, __LINE__)); + + //Depressed lookup + for (U32 s = 0; s < 2; s++) + { + lookupName = StringTable->insert(String(baseName + s_d[s]).c_str()); + if (AssetDatabase.isDeclaredAsset(lookupName)) + { + mTextures[i].mTextureDepressedAssetId = lookupName; + mTextures[i].mTextureDepressedAsset = mTextures[i].mTextureDepressedAssetId; + } + + if (mTextures[i].mTextureDepressedAsset.notNull() && mTextures[i].mTextureDepressedAsset->getStatus() == AssetBase::Ok) + { + mTextures[i].mTextureDepressed = GFXTexHandle(mTextures[i].mTextureDepressedAsset->getImagePath(), &GFXDefaultGUIProfile, avar("%s() - mTextureDepressed (line %d)", __FUNCTION__, __LINE__)); + break; + } + } + if( !mTextures[ i ].mTextureDepressed ) mTextures[ i ].mTextureDepressed = mTextures[ i ].mTextureHilight; - mTextures[ i ].mTextureInactive = GFXTexHandle( baseName + s_i, &GFXDefaultGUIProfile, avar("%s() - mTextureInactive (line %d)", __FUNCTION__, __LINE__)); + //Depressed lookup + for (U32 s = 0; s < 2; s++) + { + lookupName = StringTable->insert(String(baseName + s_i[s]).c_str()); + if (AssetDatabase.isDeclaredAsset(lookupName)) + { + mTextures[i].mTextureInactiveAssetId = lookupName; + mTextures[i].mTextureInactiveAsset = mTextures[i].mTextureInactiveAssetId; + } + + if (mTextures[i].mTextureInactiveAsset.notNull() && mTextures[i].mTextureInactiveAsset->getStatus() == AssetBase::Ok) + { + mTextures[i].mTextureInactive = GFXTexHandle(mTextures[i].mTextureInactiveAsset->getImagePath(), &GFXDefaultGUIProfile, avar("%s() - mTextureInactive (line %d)", __FUNCTION__, __LINE__)); + break; + } + } + if( !mTextures[ i ].mTextureInactive ) mTextures[ i ].mTextureInactive = mTextures[ i ].mTextureNormal; } if( i == 0 && mTextures[ i ].mTextureNormal.isNull() && mTextures[ i ].mTextureHilight.isNull() && mTextures[ i ].mTextureDepressed.isNull() && mTextures[ i ].mTextureInactive.isNull() ) { - Con::warnf( "GuiBitmapButtonCtrl::setBitmap - Unable to load texture: %s", mBitmapName.c_str() ); - this->setBitmap( GFXTextureManager::getUnavailableTexturePath() ); + Con::warnf( "GuiBitmapButtonCtrl::setBitmap - Unable to load texture: %s", mBitmapName ); + this->setBitmap( StringTable->insert(GFXTextureManager::getUnavailableTexturePath().c_str()) ); return; } } @@ -375,7 +450,7 @@ void GuiBitmapButtonCtrl::setBitmapHandles(GFXTexHandle normal, GFXTexHandle hig if (mTextures[ i ].mTextureNormal.isNull() && mTextures[ i ].mTextureHilight.isNull() && mTextures[ i ].mTextureDepressed.isNull() && mTextures[ i ].mTextureInactive.isNull()) { Con::warnf("GuiBitmapButtonCtrl::setBitmapHandles() - Invalid texture handles"); - setBitmap( GFXTextureManager::getUnavailableTexturePath() ); + setBitmap( StringTable->insert(GFXTextureManager::getUnavailableTexturePath().c_str()) ); return; } @@ -591,4 +666,6 @@ bool GuiBitmapButtonCtrl::pointInControl(const Point2I& parentCoordPoint) } else return Parent::pointInControl(parentCoordPoint); -} \ No newline at end of file +} + +DEF_IMAGEASSET_BINDS(GuiBitmapButtonCtrl, Bitmap); diff --git a/Engine/source/gui/buttons/guiBitmapButtonCtrl.h b/Engine/source/gui/buttons/guiBitmapButtonCtrl.h index 2a9d464e7..59e7825f1 100644 --- a/Engine/source/gui/buttons/guiBitmapButtonCtrl.h +++ b/Engine/source/gui/buttons/guiBitmapButtonCtrl.h @@ -84,15 +84,23 @@ class GuiBitmapButtonCtrl : public GuiButtonCtrl struct Textures { /// Texture for normal state. + StringTableEntry mTextureNormalAssetId; + AssetPtr mTextureNormalAsset; GFXTexHandle mTextureNormal; /// Texture for highlight state. + StringTableEntry mTextureHilightAssetId; + AssetPtr mTextureHilightAsset; GFXTexHandle mTextureHilight; /// Texture for depressed state. + StringTableEntry mTextureDepressedAssetId; + AssetPtr mTextureDepressedAsset; GFXTexHandle mTextureDepressed; /// Texture for inactive state. + StringTableEntry mTextureInactiveAssetId; + AssetPtr mTextureInactiveAsset; GFXTexHandle mTextureInactive; }; @@ -110,8 +118,8 @@ class GuiBitmapButtonCtrl : public GuiButtonCtrl /// BitmapMode mBitmapMode; - /// File name for bitmap. - String mBitmapName; + DECLARE_IMAGEASSET(GuiBitmapButtonCtrl, Bitmap, onBitmapChange, GFXDefaultGUIProfile); + DECLARE_IMAGEASSET_SETGET(GuiBitmapButtonCtrl, Bitmap); /// alpha masking bool mMasked; @@ -122,7 +130,7 @@ class GuiBitmapButtonCtrl : public GuiButtonCtrl virtual void renderButton( GFXTexHandle &texture, const Point2I& offset, const RectI& updateRect ); static bool _setAutoFitExtents( void *object, const char *index, const char *data ); - static bool _setBitmap( void *object, const char *index, const char *data ); + //static bool _setBitmap( void *object, const char *index, const char *data ); State getState() const { @@ -149,12 +157,14 @@ class GuiBitmapButtonCtrl : public GuiButtonCtrl /// @} + void onBitmapChange() {} + public: GuiBitmapButtonCtrl(); void setAutoFitExtents( bool state ); - void setBitmap( const String& name ); + void setBitmap( StringTableEntry name ); void setBitmapHandles( GFXTexHandle normal, GFXTexHandle highlighted, GFXTexHandle depressed, GFXTexHandle inactive ); //Parent methods diff --git a/Engine/source/gui/buttons/guiCheckBoxCtrl.cpp b/Engine/source/gui/buttons/guiCheckBoxCtrl.cpp index d927552d0..b7b47b57c 100644 --- a/Engine/source/gui/buttons/guiCheckBoxCtrl.cpp +++ b/Engine/source/gui/buttons/guiCheckBoxCtrl.cpp @@ -134,7 +134,7 @@ void GuiCheckBoxCtrl::onRender(Point2I offset, const RectI &updateRect) } xOffset = mProfile->mBitmapArrayRects[0].extent.x + 2 + mIndent; S32 y = (getHeight() - mProfile->mBitmapArrayRects[0].extent.y) / 2; - GFX->getDrawUtil()->drawBitmapSR(mProfile->mTextureObject, offset + Point2I(mIndent, y), mProfile->mBitmapArrayRects[index]); + GFX->getDrawUtil()->drawBitmapSR(mProfile->getBitmapResource(), offset + Point2I(mIndent, y), mProfile->mBitmapArrayRects[index]); } if(mButtonText[0] != '\0') diff --git a/Engine/source/gui/buttons/guiIconButtonCtrl.cpp b/Engine/source/gui/buttons/guiIconButtonCtrl.cpp index 6084f64f1..c0fb939ff 100644 --- a/Engine/source/gui/buttons/guiIconButtonCtrl.cpp +++ b/Engine/source/gui/buttons/guiIconButtonCtrl.cpp @@ -85,7 +85,7 @@ ConsoleDocClass( GuiIconButtonCtrl, GuiIconButtonCtrl::GuiIconButtonCtrl() { - mBitmapName = StringTable->EmptyString(); + INIT_IMAGEASSET(Bitmap); mTextLocation = TextLocLeft; mIconLocation = IconLocLeft; mTextMargin = 4; @@ -94,9 +94,6 @@ GuiIconButtonCtrl::GuiIconButtonCtrl() mFitBitmapToButton = false; mMakeIconSquare = false; - mErrorBitmapName = StringTable->EmptyString(); - mErrorTextureHandle = NULL; - mAutoSize = false; setExtent(140, 30); @@ -125,7 +122,10 @@ EndImplementEnumType; void GuiIconButtonCtrl::initPersistFields() { addField( "buttonMargin", TypePoint2I, Offset( mButtonMargin, GuiIconButtonCtrl ),"Margin area around the button.\n"); - addField( "iconBitmap", TypeFilename, Offset( mBitmapName, GuiIconButtonCtrl ),"Bitmap file for the icon to display on the button.\n"); + + addProtectedField( "iconBitmap", TypeImageFilename, Offset( mBitmapName, GuiIconButtonCtrl ), &_setBitmapData, &defaultProtectedGetFn, "Bitmap file for the icon to display on the button.\n", AbstractClassRep::FIELD_HideInInspectors); + INITPERSISTFIELD_IMAGEASSET(Bitmap, GuiIconButtonCtrl, "Bitmap file for the icon to display on the button.\n"); + addField( "iconLocation", TYPEID< IconLocation >(), Offset( mIconLocation, GuiIconButtonCtrl ),"Where to place the icon on the control. Options are 0 (None), 1 (Left), 2 (Right), 3 (Center).\n"); addField( "sizeIconToButton", TypeBool, Offset( mFitBitmapToButton, GuiIconButtonCtrl ),"If true, the icon will be scaled to be the same size as the button.\n"); addField( "makeIconSquare", TypeBool, Offset( mMakeIconSquare, GuiIconButtonCtrl ),"If true, will make sure the icon is square.\n"); @@ -152,7 +152,6 @@ bool GuiIconButtonCtrl::onWake() void GuiIconButtonCtrl::onSleep() { - mTextureNormal = NULL; Parent::onSleep(); } @@ -176,8 +175,8 @@ bool GuiIconButtonCtrl::resize(const Point2I &newPosition, const Point2I &newExt if ( mIconLocation != IconLocNone ) { - autoExtent.y = mTextureNormal.getHeight() + mButtonMargin.y * 2; - autoExtent.x = mTextureNormal.getWidth() + mButtonMargin.x * 2; + autoExtent.y = mBitmap.getHeight() + mButtonMargin.y * 2; + autoExtent.x = mBitmap.getWidth() + mButtonMargin.x * 2; } if ( mTextLocation != TextLocNone && mButtonText && mButtonText[0] ) @@ -201,18 +200,10 @@ bool GuiIconButtonCtrl::resize(const Point2I &newPosition, const Point2I &newExt void GuiIconButtonCtrl::setBitmap(const char *name) { - mBitmapName = Platform::makeRelativePathName(name, NULL); if(!isAwake()) return; - if (*mBitmapName) - { - mTextureNormal = GFXTexHandle(mBitmapName, &GFXTexturePersistentSRGBProfile, avar("%s() - mTextureNormal (line %d)", __FUNCTION__, __LINE__) ); - } - else - { - mTextureNormal = NULL; - } + _setBitmap(getBitmap()); // So that extent is recalculated if autoSize is set. resize( getPosition(), getExtent() ); @@ -279,7 +270,7 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect ) RectI iconRect( 0, 0, 0, 0 ); // Render the icon - if ( mTextureNormal && mIconLocation != GuiIconButtonCtrl::IconLocNone ) + if ( mBitmap && mIconLocation != GuiIconButtonCtrl::IconLocNone ) { // Render the normal bitmap drawer->clearBitmapModulation(); @@ -287,7 +278,7 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect ) // Maintain the bitmap size or fill the button? if ( !mFitBitmapToButton ) { - Point2I textureSize( mTextureNormal->getWidth(), mTextureNormal->getHeight() ); + Point2I textureSize(mBitmap->getWidth(), mBitmap->getHeight() ); iconRect.set( offset + mButtonMargin, textureSize ); if ( mIconLocation == IconLocRight ) @@ -306,7 +297,7 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect ) iconRect.point.y = offset.y + ( getHeight() - textureSize.y ) / 2; } - drawer->drawBitmapStretch( mTextureNormal, iconRect ); + drawer->drawBitmapStretch(mBitmap, iconRect ); } else @@ -322,7 +313,7 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect ) iconRect.extent.x = iconRect.extent.y; } - drawer->drawBitmapStretch( mTextureNormal, iconRect ); + drawer->drawBitmapStretch( mBitmap, iconRect ); } } @@ -339,7 +330,7 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect ) if ( mTextLocation == TextLocRight ) { Point2I start( mTextMargin, ( getHeight() - mProfile->mFont->getHeight() ) / 2 ); - if ( mTextureNormal && mIconLocation != IconLocNone ) + if (mBitmap && mIconLocation != IconLocNone ) { start.x = iconRect.extent.x + mButtonMargin.x + mTextMargin; } @@ -357,7 +348,7 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect ) if ( mTextLocation == TextLocCenter ) { Point2I start; - if ( mTextureNormal && mIconLocation == IconLocLeft ) + if (mBitmap && mIconLocation == IconLocLeft ) { start.set( ( getWidth() - textWidth - iconRect.extent.x ) / 2 + iconRect.extent.x, ( getHeight() - mProfile->mFont->getHeight() ) / 2 ); @@ -421,19 +412,4 @@ void GuiIconButtonCtrl::renderBitmapArray(RectI &bounds, S32 state) } } -DefineEngineMethod( GuiIconButtonCtrl, setBitmap, void, (const char* buttonFilename),, - "@brief Set the bitmap to use for the button portion of this control.\n\n" - "@param buttonFilename Filename for the image\n" - "@tsexample\n" - "// Define the button filename\n" - "%buttonFilename = \"pearlButton\";\n\n" - "// Inform the GuiIconButtonCtrl control to update its main button graphic to the defined bitmap\n" - "%thisGuiIconButtonCtrl.setBitmap(%buttonFilename);\n" - "@endtsexample\n\n" - "@see GuiControl\n" - "@see GuiButtonCtrl\n\n") -{ - char* argBuffer = Con::getArgBuffer( 512 ); - Platform::makeFullPathName( buttonFilename, argBuffer, 512 ); - object->setBitmap( argBuffer ); -} +DEF_IMAGEASSET_BINDS(GuiIconButtonCtrl, Bitmap); diff --git a/Engine/source/gui/buttons/guiIconButtonCtrl.h b/Engine/source/gui/buttons/guiIconButtonCtrl.h index 9767e7257..d2cf0b9bd 100644 --- a/Engine/source/gui/buttons/guiIconButtonCtrl.h +++ b/Engine/source/gui/buttons/guiIconButtonCtrl.h @@ -30,6 +30,7 @@ #include "gfx/gfxTextureManager.h" #endif +#include "T3D/assets/ImageAsset.h" /// The GuiIconButtonCtrl draws an icon and text caption within a normal /// button control with several layout options. @@ -41,8 +42,9 @@ private: protected: - StringTableEntry mBitmapName; - GFXTexHandle mTextureNormal; + DECLARE_IMAGEASSET(GuiIconButtonCtrl, Bitmap, onImageChanged, GFXTexturePersistentSRGBProfile); + DECLARE_IMAGEASSET_SETGET(GuiIconButtonCtrl, Bitmap); + S32 mIconLocation; S32 mTextLocation; S32 mTextMargin; @@ -57,10 +59,6 @@ protected: /// Calculate extent based on icon size, text width, and layout options. bool mAutoSize; - // Optional bitmap to be displayed when the proper bitmap cannot be found - StringTableEntry mErrorBitmapName; - GFXTexHandle mErrorTextureHandle; - void renderButton( Point2I &offset, const RectI& updateRect); enum @@ -114,6 +112,8 @@ public: void setErrorBitmap(const char *name); void onRender(Point2I offset, const RectI &updateRect); + + void onImageChanged() {} }; typedef GuiIconButtonCtrl::TextLocation GuiIconButtonTextLocation; diff --git a/Engine/source/gui/buttons/guiToolboxButtonCtrl.cpp b/Engine/source/gui/buttons/guiToolboxButtonCtrl.cpp index c3e7cf8a2..3f1b26f0c 100644 --- a/Engine/source/gui/buttons/guiToolboxButtonCtrl.cpp +++ b/Engine/source/gui/buttons/guiToolboxButtonCtrl.cpp @@ -43,9 +43,10 @@ ConsoleDocClass( GuiToolboxButtonCtrl, //------------------------------------- GuiToolboxButtonCtrl::GuiToolboxButtonCtrl() { - mNormalBitmapName = StringTable->EmptyString(); - mLoweredBitmapName = StringTable->insert("sceneeditor/client/images/buttondown"); - mHoverBitmapName = StringTable->insert("sceneeditor/client/images/buttonup"); + INIT_IMAGEASSET(NormalBitmap); + INIT_IMAGEASSET(LoweredBitmap); + INIT_IMAGEASSET(HoverBitmap); + setMinExtent(Point2I(16,16)); setExtent(48, 48); mButtonType = ButtonTypeRadio; @@ -57,9 +58,10 @@ GuiToolboxButtonCtrl::GuiToolboxButtonCtrl() //------------------------------------- void GuiToolboxButtonCtrl::initPersistFields() { - addField("normalBitmap", TypeFilename, Offset(mNormalBitmapName, GuiToolboxButtonCtrl)); - addField("loweredBitmap", TypeFilename, Offset(mLoweredBitmapName, GuiToolboxButtonCtrl)); - addField("hoverBitmap", TypeFilename, Offset(mHoverBitmapName, GuiToolboxButtonCtrl)); + INITPERSISTFIELD_IMAGEASSET(NormalBitmap, GuiToolboxButtonCtrl, ""); + INITPERSISTFIELD_IMAGEASSET(LoweredBitmap, GuiToolboxButtonCtrl, ""); + INITPERSISTFIELD_IMAGEASSET(HoverBitmap, GuiToolboxButtonCtrl, ""); + Parent::initPersistFields(); } @@ -72,9 +74,9 @@ bool GuiToolboxButtonCtrl::onWake() setActive( true ); - setNormalBitmap( mNormalBitmapName ); - setLoweredBitmap( mLoweredBitmapName ); - setHoverBitmap( mHoverBitmapName ); + setNormalBitmap( getNormalBitmap() ); + setLoweredBitmap( getLoweredBitmap() ); + setHoverBitmap( getHoverBitmap() ); return true; } @@ -83,30 +85,9 @@ bool GuiToolboxButtonCtrl::onWake() //------------------------------------- void GuiToolboxButtonCtrl::onSleep() { - mTextureNormal = NULL; - mTextureLowered = NULL; - mTextureHover = NULL; Parent::onSleep(); } - -//------------------------------------- - -DefineEngineMethod( GuiToolboxButtonCtrl, setNormalBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is active") -{ - object->setNormalBitmap(name); -} - -DefineEngineMethod( GuiToolboxButtonCtrl, setLoweredBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is disabled") -{ - object->setLoweredBitmap(name); -} - -DefineEngineMethod( GuiToolboxButtonCtrl, setHoverBitmap, void, ( const char * name ), , "( filepath name ) sets the bitmap that shows when the button is disabled") -{ - object->setHoverBitmap(name); -} - //------------------------------------- void GuiToolboxButtonCtrl::inspectPostApply() { @@ -114,9 +95,9 @@ void GuiToolboxButtonCtrl::inspectPostApply() // set it's extent to be exactly the size of the normal bitmap (if present) Parent::inspectPostApply(); - if ((getWidth() == 0) && (getHeight() == 0) && mTextureNormal) + if ((getWidth() == 0) && (getHeight() == 0) && mNormalBitmap) { - setExtent( mTextureNormal->getWidth(), mTextureNormal->getHeight()); + setExtent(mNormalBitmap->getWidth(), mNormalBitmap->getHeight()); } } @@ -124,46 +105,31 @@ void GuiToolboxButtonCtrl::inspectPostApply() //------------------------------------- void GuiToolboxButtonCtrl::setNormalBitmap( StringTableEntry bitmapName ) { - mNormalBitmapName = StringTable->insert( bitmapName ); + _setNormalBitmap(bitmapName); if(!isAwake()) return; - - if ( *mNormalBitmapName ) - mTextureNormal = GFXTexHandle( mNormalBitmapName, &GFXTexturePersistentSRGBProfile, avar("%s() - mTextureNormal (line %d)", __FUNCTION__, __LINE__) ); - else - mTextureNormal = NULL; setUpdate(); } void GuiToolboxButtonCtrl::setLoweredBitmap( StringTableEntry bitmapName ) { - mLoweredBitmapName = StringTable->insert( bitmapName ); + _setLoweredBitmap(bitmapName); if(!isAwake()) return; - - if ( *mLoweredBitmapName ) - mTextureLowered = GFXTexHandle( mLoweredBitmapName, &GFXTexturePersistentSRGBProfile, avar("%s() - mTextureLowered (line %d)", __FUNCTION__, __LINE__) ); - else - mTextureLowered = NULL; setUpdate(); } void GuiToolboxButtonCtrl::setHoverBitmap( StringTableEntry bitmapName ) { - mHoverBitmapName = StringTable->insert( bitmapName ); + _setHoverBitmap(bitmapName); if(!isAwake()) return; - if ( *mHoverBitmapName ) - mTextureHover = GFXTexHandle( mHoverBitmapName, &GFXTexturePersistentSRGBProfile, avar("%s() - mTextureHover (line %d)", __FUNCTION__, __LINE__) ); - else - mTextureHover = NULL; - setUpdate(); } @@ -177,15 +143,15 @@ void GuiToolboxButtonCtrl::onRender(Point2I offset, const RectI& updateRect) { RectI r(offset, getExtent()); if ( mDepressed || mStateOn ) - renderStateRect( mTextureLowered , r ); + renderStateRect( mLoweredBitmap , r ); else if ( mMouseOver ) - renderStateRect( mTextureHover , r ); + renderStateRect( mHoverBitmap , r ); } // Now render the image - if( mTextureNormal ) + if( mNormalBitmap ) { - renderButton( mTextureNormal, offset, updateRect ); + renderButton(mNormalBitmap, offset, updateRect ); return; } @@ -226,3 +192,7 @@ void GuiToolboxButtonCtrl::renderButton(GFXTexHandle &texture, Point2I &offset, renderChildControls( offset, updateRect); } } + +DEF_IMAGEASSET_BINDS(GuiToolboxButtonCtrl, NormalBitmap); +DEF_IMAGEASSET_BINDS(GuiToolboxButtonCtrl, LoweredBitmap); +DEF_IMAGEASSET_BINDS(GuiToolboxButtonCtrl, HoverBitmap); diff --git a/Engine/source/gui/buttons/guiToolboxButtonCtrl.h b/Engine/source/gui/buttons/guiToolboxButtonCtrl.h index f90cdfa87..ec2b56711 100644 --- a/Engine/source/gui/buttons/guiToolboxButtonCtrl.h +++ b/Engine/source/gui/buttons/guiToolboxButtonCtrl.h @@ -30,23 +30,29 @@ #include "gfx/gfxTextureManager.h" #endif +#include "T3D/assets/ImageAsset.h" + class GuiToolboxButtonCtrl : public GuiButtonCtrl { private: typedef GuiButtonCtrl Parent; protected: - StringTableEntry mNormalBitmapName; - StringTableEntry mLoweredBitmapName; - StringTableEntry mHoverBitmapName; - GFXTexHandle mTextureNormal; - GFXTexHandle mTextureLowered; - GFXTexHandle mTextureHover; + DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, NormalBitmap, onNormalImageChanged, GFXTexturePersistentSRGBProfile); + DECLARE_IMAGEASSET_SETGET(GuiToolboxButtonCtrl, NormalBitmap); + DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, LoweredBitmap, onLoweredImageChanged, GFXTexturePersistentSRGBProfile); + DECLARE_IMAGEASSET_SETGET(GuiToolboxButtonCtrl, LoweredBitmap); + DECLARE_IMAGEASSET(GuiToolboxButtonCtrl, HoverBitmap, onHoverImageChanged, GFXTexturePersistentSRGBProfile); + DECLARE_IMAGEASSET_SETGET(GuiToolboxButtonCtrl, HoverBitmap); void renderButton(GFXTexHandle &texture, Point2I &offset, const RectI& updateRect); void renderStateRect( GFXTexHandle &texture, const RectI& rect ); + void onNormalImageChanged() {} + void onLoweredImageChanged() {} + void onHoverImageChanged() {} + public: DECLARE_CONOBJECT(GuiToolboxButtonCtrl); GuiToolboxButtonCtrl(); diff --git a/Engine/source/gui/containers/guiFormCtrl.cpp b/Engine/source/gui/containers/guiFormCtrl.cpp index 4cbb7ffa9..9397d4be7 100644 --- a/Engine/source/gui/containers/guiFormCtrl.cpp +++ b/Engine/source/gui/containers/guiFormCtrl.cpp @@ -276,7 +276,7 @@ void GuiFormCtrl::onRender(Point2I offset, const RectI &updateRect) Point2I barOffset(barStart, barTop); // Draw the start of the bar... - GFX->getDrawUtil()->drawBitmapStretchSR(mProfile->mTextureObject ,RectI(barOffset, mProfile->mBitmapArrayRects[2].extent), mProfile->mBitmapArrayRects[2] ); + GFX->getDrawUtil()->drawBitmapStretchSR(mProfile->getBitmapResource(),RectI(barOffset, mProfile->mBitmapArrayRects[2].extent), mProfile->mBitmapArrayRects[2] ); // Now draw the middle... barOffset.x += mProfile->mBitmapArrayRects[2].extent.x; @@ -290,7 +290,7 @@ void GuiFormCtrl::onRender(Point2I offset, const RectI &updateRect) foo.inset(1,0); GFX->getDrawUtil()->drawBitmapStretchSR( - mProfile->mTextureObject, + mProfile->getBitmapResource(), RectI(barOffset, Point2I(barMiddleSize, mProfile->mBitmapArrayRects[3].extent.y)), foo ); @@ -299,7 +299,7 @@ void GuiFormCtrl::onRender(Point2I offset, const RectI &updateRect) // And the end barOffset.x += barMiddleSize; - GFX->getDrawUtil()->drawBitmapStretchSR( mProfile->mTextureObject, RectI(barOffset, mProfile->mBitmapArrayRects[4].extent), + GFX->getDrawUtil()->drawBitmapStretchSR( mProfile->getBitmapResource(), RectI(barOffset, mProfile->mBitmapArrayRects[4].extent), mProfile->mBitmapArrayRects[4]); GFX->getDrawUtil()->setBitmapModulation((mMouseOver ? mProfile->mFontColorHL : mProfile->mFontColor)); diff --git a/Engine/source/gui/containers/guiPaneCtrl.cpp b/Engine/source/gui/containers/guiPaneCtrl.cpp index 4d2ae5e61..f658c59f8 100644 --- a/Engine/source/gui/containers/guiPaneCtrl.cpp +++ b/Engine/source/gui/containers/guiPaneCtrl.cpp @@ -192,7 +192,7 @@ void GuiPaneControl::onRender(Point2I offset, const RectI &updateRect) GFX->getDrawUtil()->clearBitmapModulation(); GFX->getDrawUtil()->drawBitmapStretchSR( - mProfile->mTextureObject, + mProfile->getBitmapResource(), RectI(offset, mProfile->mBitmapArrayRects[idx].extent), mProfile->mBitmapArrayRects[idx] ); @@ -225,7 +225,7 @@ void GuiPaneControl::onRender(Point2I offset, const RectI &updateRect) // Draw the start of the bar... GFX->getDrawUtil()->drawBitmapStretchSR( - mProfile->mTextureObject, + mProfile->getBitmapResource(), RectI(barOffset, mProfile->mBitmapArrayRects[2].extent), mProfile->mBitmapArrayRects[2] ); @@ -242,7 +242,7 @@ void GuiPaneControl::onRender(Point2I offset, const RectI &updateRect) foo.inset(1,0); GFX->getDrawUtil()->drawBitmapStretchSR( - mProfile->mTextureObject, + mProfile->getBitmapResource(), RectI(barOffset, Point2I(barMiddleSize, mProfile->mBitmapArrayRects[3].extent.y)), foo ); @@ -252,7 +252,7 @@ void GuiPaneControl::onRender(Point2I offset, const RectI &updateRect) barOffset.x += barMiddleSize; GFX->getDrawUtil()->drawBitmapStretchSR( - mProfile->mTextureObject, + mProfile->getBitmapResource(), RectI(barOffset, mProfile->mBitmapArrayRects[4].extent), mProfile->mBitmapArrayRects[4] ); diff --git a/Engine/source/gui/containers/guiScrollCtrl.cpp b/Engine/source/gui/containers/guiScrollCtrl.cpp index a52a5816e..43e2da663 100644 --- a/Engine/source/gui/containers/guiScrollCtrl.cpp +++ b/Engine/source/gui/containers/guiScrollCtrl.cpp @@ -147,7 +147,7 @@ bool GuiScrollCtrl::onWake() if (! Parent::onWake()) return false; - mTextureObject = mProfile->mTextureObject; + mTextureObject = mProfile->getBitmapResource(); if (mTextureObject && (mProfile->constructBitmapArray() >= BmpStates * BmpCount)) { mBitmapBounds = mProfile->mBitmapArrayRects.address(); diff --git a/Engine/source/gui/containers/guiWindowCtrl.cpp b/Engine/source/gui/containers/guiWindowCtrl.cpp index 17000909b..74a155b9b 100644 --- a/Engine/source/gui/containers/guiWindowCtrl.cpp +++ b/Engine/source/gui/containers/guiWindowCtrl.cpp @@ -678,7 +678,6 @@ bool GuiWindowCtrl::onWake() return false; //get the texture for the close, minimize, and maximize buttons - mTextureObject = mProfile->mTextureObject; bool result = mProfile->constructBitmapArray() >= NumBitmaps; if( !result ) { @@ -686,6 +685,8 @@ bool GuiWindowCtrl::onWake() return false; } + mTextureObject = mProfile->getBitmapResource(); + mBitmapBounds = mProfile->mBitmapArrayRects.address(); S32 buttonHeight = mBitmapBounds[BmpStates * BmpClose].extent.y; diff --git a/Engine/source/gui/controls/guiAnimBitmapCtrl.cpp b/Engine/source/gui/controls/guiAnimBitmapCtrl.cpp index 26ce32376..8500cd9b7 100644 --- a/Engine/source/gui/controls/guiAnimBitmapCtrl.cpp +++ b/Engine/source/gui/controls/guiAnimBitmapCtrl.cpp @@ -212,7 +212,7 @@ bool guiAnimBitmapCtrl::ptSetFrameRanges(void *object, const char *index, const void guiAnimBitmapCtrl::onRender(Point2I offset, const RectI &updateRect) { - if (mTextureObject) + if (mBitmap) { if (mFrameTime->getElapsedMs() > 1000 / mFramesPerSec) //fps to msfp conversion { @@ -271,7 +271,7 @@ void guiAnimBitmapCtrl::onRender(Point2I offset, const RectI &updateRect) GFX->getDrawUtil()->clearBitmapModulation(); GFX->getDrawUtil()->setBitmapModulation(mColor); - GFXTextureObject* texture = mTextureObject; + GFXTextureObject* texture = mBitmap; Point2I modifiedSRC = Point2I(texture->mBitmapSize.x / mAnimTexTiling.x, texture->mBitmapSize.y / mAnimTexTiling.y); RectI srcRegion; @@ -285,7 +285,7 @@ void guiAnimBitmapCtrl::onRender(Point2I offset, const RectI &updateRect) GFX->getDrawUtil()->drawBitmapStretchSR(texture, updateRect, srcRegion, GFXBitmapFlip_None, GFXTextureFilterLinear, false); } - if (mProfile->mBorder || !mTextureObject) + if (mProfile->mBorder || !mBitmap) { RectI rect(offset, getExtent()); GFX->getDrawUtil()->drawRect(rect, mProfile->mBorderColor); diff --git a/Engine/source/gui/controls/guiBitmapBarCtrl.cpp b/Engine/source/gui/controls/guiBitmapBarCtrl.cpp index 006309027..5a2e480fb 100644 --- a/Engine/source/gui/controls/guiBitmapBarCtrl.cpp +++ b/Engine/source/gui/controls/guiBitmapBarCtrl.cpp @@ -55,12 +55,12 @@ void GuiBitmapBarCtrl::initPersistFields() void GuiBitmapBarCtrl::onRender(Point2I offset, const RectI &updateRect) { - if (mTextureObject) + if (mBitmap) { GFX->getDrawUtil()->clearBitmapModulation(); GFX->getDrawUtil()->setBitmapModulation(mColor); F32 pct = (mPercent / 100.0); - GFXTextureObject* texture = mTextureObject; + GFXTextureObject* texture = mBitmap; Point2I modifiedSRC; modifiedSRC.x = mVertical ? (F32)texture->mBitmapSize.x : (F32)(texture->mBitmapSize.x*pct); modifiedSRC.y = mVertical ? (F32)(texture->mBitmapSize.y*pct) : (F32)texture->mBitmapSize.y; @@ -91,7 +91,7 @@ void GuiBitmapBarCtrl::onRender(Point2I offset, const RectI &updateRect) GFX->getDrawUtil()->drawBitmapStretchSR(texture, destRegion, srcRegion, GFXBitmapFlip_None, GFXTextureFilterLinear, false); } - if (mProfile->mBorder || !mTextureObject) + if (mProfile->mBorder || !mBitmap) { RectI rect(offset, getExtent()); GFX->getDrawUtil()->drawRect(rect, mProfile->mBorderColor); diff --git a/Engine/source/gui/controls/guiBitmapBorderCtrl.cpp b/Engine/source/gui/controls/guiBitmapBorderCtrl.cpp index 9feb3c4ef..d9f7c1c5f 100644 --- a/Engine/source/gui/controls/guiBitmapBorderCtrl.cpp +++ b/Engine/source/gui/controls/guiBitmapBorderCtrl.cpp @@ -111,7 +111,7 @@ bool GuiBitmapBorderCtrl::onWake() //get the texture for the close, minimize, and maximize buttons mBitmapBounds = NULL; - mTextureObject = mProfile->mTextureObject; + mTextureObject = mProfile->getBitmapResource(); if( mProfile->constructBitmapArray() >= NumBitmaps ) mBitmapBounds = mProfile->mBitmapArrayRects.address(); else diff --git a/Engine/source/gui/controls/guiBitmapCtrl.cpp b/Engine/source/gui/controls/guiBitmapCtrl.cpp index 855b78900..1b158d435 100644 --- a/Engine/source/gui/controls/guiBitmapCtrl.cpp +++ b/Engine/source/gui/controls/guiBitmapCtrl.cpp @@ -56,11 +56,11 @@ ConsoleDocClass( GuiBitmapCtrl, ); GuiBitmapCtrl::GuiBitmapCtrl(void) - : mBitmapName(), - mStartPoint( 0, 0 ), + : mStartPoint( 0, 0 ), mColor(ColorI::WHITE), mWrap( false ) -{ +{ + INIT_IMAGEASSET(Bitmap); } bool GuiBitmapCtrl::setBitmapName( void *object, const char *index, const char *data ) @@ -78,10 +78,8 @@ bool GuiBitmapCtrl::setBitmapName( void *object, const char *index, const char * void GuiBitmapCtrl::initPersistFields() { addGroup( "Bitmap" ); - - addProtectedField( "bitmap", TypeImageFilename, Offset( mBitmapName, GuiBitmapCtrl ), - &setBitmapName, &defaultProtectedGetFn, - "The bitmap file to display in the control."); + + INITPERSISTFIELD_IMAGEASSET(Bitmap, GuiBitmapCtrl, The bitmap file to display in the control); addField("color", TypeColorI, Offset(mColor, GuiBitmapCtrl),"color mul"); addField( "wrap", TypeBool, Offset( mWrap, GuiBitmapCtrl ), "If true, the bitmap is tiled inside the control rather than stretched to fit." ); @@ -96,14 +94,15 @@ bool GuiBitmapCtrl::onWake() if (! Parent::onWake()) return false; setActive(true); - setBitmap(mBitmapName); + + setBitmap(getBitmap()); return true; } void GuiBitmapCtrl::onSleep() { - if ( !mBitmapName.equal("texhandle", String::NoCase) ) - mTextureObject = NULL; + if ( mBitmapName != StringTable->insert("texhandle") ) + mBitmap = NULL; Parent::onSleep(); } @@ -115,32 +114,24 @@ void GuiBitmapCtrl::inspectPostApply() // set it's extent to be exactly the size of the bitmap (if present) Parent::inspectPostApply(); - if (!mWrap && (getExtent().x == 0) && (getExtent().y == 0) && mTextureObject) + if (!mWrap && (getExtent().x == 0) && (getExtent().y == 0) && mBitmap) { - setExtent( mTextureObject->getWidth(), mTextureObject->getHeight()); + setExtent( mBitmap->getWidth(), mBitmap->getHeight()); } } void GuiBitmapCtrl::setBitmap( const char *name, bool resize ) { - mBitmapName = name; if ( !isAwake() ) return; - if ( mBitmapName.isNotEmpty() ) - { - if ( !mBitmapName.equal("texhandle", String::NoCase) ) - mTextureObject.set( mBitmapName, &GFXDefaultGUIProfile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__) ); + _setBitmap(StringTable->insert(name)); - // Resize the control to fit the bitmap - if ( mTextureObject && resize ) - { - setExtent( mTextureObject->getWidth(), mTextureObject->getHeight() ); - updateSizing(); - } + if (mBitmap && resize) + { + setExtent(mBitmap->getWidth(), mBitmap->getHeight()); + updateSizing(); } - else - mTextureObject = NULL; setUpdate(); } @@ -156,21 +147,21 @@ void GuiBitmapCtrl::updateSizing() void GuiBitmapCtrl::setBitmapHandle(GFXTexHandle handle, bool resize) { - mTextureObject = handle; + mBitmap = handle; mBitmapName = String("texhandle"); // Resize the control to fit the bitmap if (resize) { - setExtent(mTextureObject->getWidth(), mTextureObject->getHeight()); + setExtent(mBitmap->getWidth(), mBitmap->getHeight()); updateSizing(); } } void GuiBitmapCtrl::onRender(Point2I offset, const RectI &updateRect) { - if (mTextureObject) + if (mBitmap) { GFX->getDrawUtil()->clearBitmapModulation(); GFX->getDrawUtil()->setBitmapModulation(mColor); @@ -180,7 +171,7 @@ void GuiBitmapCtrl::onRender(Point2I offset, const RectI &updateRect) // not tile correctly when rendered with GFX->drawBitmapTile(). The non POT // bitmap will be padded by the hardware, and we'll see lots of slack // in the texture. So... lets do what we must: draw each repeat by itself: - GFXTextureObject* texture = mTextureObject; + GFXTextureObject* texture = mBitmap; RectI srcRegion; RectI dstRegion; F32 xdone = ((F32)getExtent().x/(F32)texture->mBitmapSize.x)+1; @@ -203,11 +194,11 @@ void GuiBitmapCtrl::onRender(Point2I offset, const RectI &updateRect) else { RectI rect(offset, getExtent()); - GFX->getDrawUtil()->drawBitmapStretch(mTextureObject, rect, GFXBitmapFlip_None, GFXTextureFilterLinear, false); + GFX->getDrawUtil()->drawBitmapStretch(mBitmap, rect, GFXBitmapFlip_None, GFXTextureFilterLinear, false); } } - if (mProfile->mBorder || !mTextureObject) + if (mProfile->mBorder || !mBitmap) { RectI rect(offset.x, offset.y, getExtent().x, getExtent().y); GFX->getDrawUtil()->drawRect(rect, mProfile->mBorderColor); @@ -218,10 +209,10 @@ void GuiBitmapCtrl::onRender(Point2I offset, const RectI &updateRect) void GuiBitmapCtrl::setValue(S32 x, S32 y) { - if (mTextureObject) + if (mBitmap) { - x += mTextureObject->getWidth() / 2; - y += mTextureObject->getHeight() / 2; + x += mBitmap->getWidth() / 2; + y += mBitmap->getHeight() / 2; } while (x < 0) x += 256; @@ -270,6 +261,13 @@ DefineEngineMethod( GuiBitmapCtrl, setBitmap, void, ( const char * fileRoot, boo object->setBitmap(filename, resize ); } +DefineEngineMethod(GuiBitmapCtrl, getBitmap, const char*, (),, + "Gets the current bitmap set for this control.\n\n" + "@hide") +{ + return object->getBitmap(); +} + DefineEngineMethod( GuiBitmapCtrl, setNamedTexture, bool, (String namedtexture),, "@brief Set a texture as the image.\n\n" "@param namedtexture The name of the texture (NamedTexTarget).\n" diff --git a/Engine/source/gui/controls/guiBitmapCtrl.h b/Engine/source/gui/controls/guiBitmapCtrl.h index 27e3ddf85..05f4ca047 100644 --- a/Engine/source/gui/controls/guiBitmapCtrl.h +++ b/Engine/source/gui/controls/guiBitmapCtrl.h @@ -27,6 +27,7 @@ #include "gui/core/guiControl.h" #endif +#include "T3D/assets/ImageAsset.h" /// Renders a bitmap. class GuiBitmapCtrl : public GuiControl { @@ -38,11 +39,9 @@ class GuiBitmapCtrl : public GuiControl /// Name of the bitmap file. If this is 'texhandle' the bitmap is not loaded /// from a file but rather set explicitly on the control. - String mBitmapName; - - /// Loaded texture. - GFXTexHandle mTextureObject; - + DECLARE_IMAGEASSET(GuiBitmapCtrl, Bitmap, onImageChanged, GFXDefaultGUIProfile); + DECLARE_IMAGEASSET_SETGET(GuiBitmapCtrl, Bitmap); + Point2I mStartPoint; ColorI mColor; @@ -52,6 +51,8 @@ class GuiBitmapCtrl : public GuiControl static bool setBitmapName( void *object, const char *index, const char *data ); static const char *getBitmapName( void *obj, const char *data ); + void onImageChanged() {} + public: GuiBitmapCtrl(); @@ -72,7 +73,7 @@ class GuiBitmapCtrl : public GuiControl DECLARE_CONOBJECT( GuiBitmapCtrl ); DECLARE_CATEGORY( "Gui Images" ); - DECLARE_DESCRIPTION( "A control that displays a single, static image from a file.\n" + DECLARE_DESCRIPTION( "A control that displays a single, static image from a file.n" "The bitmap can either be tiled or stretched inside the control." ); }; diff --git a/Engine/source/gui/controls/guiGameListMenuCtrl.cpp b/Engine/source/gui/controls/guiGameListMenuCtrl.cpp index ece9535e5..787c697f9 100644 --- a/Engine/source/gui/controls/guiGameListMenuCtrl.cpp +++ b/Engine/source/gui/controls/guiGameListMenuCtrl.cpp @@ -129,14 +129,14 @@ void GuiGameListMenuCtrl::onRender(Point2I offset, const RectI &updateRect) // render the row bitmap drawUtil->clearBitmapModulation(); - drawUtil->drawBitmapStretchSR(profile->mTextureObject, RectI(currentOffset, rowExtent), profile->getBitmapArrayRect(buttonTextureIndex)); + drawUtil->drawBitmapStretchSR(profile->mBitmap, RectI(currentOffset, rowExtent), profile->getBitmapArrayRect(buttonTextureIndex)); // render the row icon if it has one if ((iconIndex != NO_ICON) && profileHasIcons && (!profile->getBitmapArrayRect((U32)iconIndex).extent.isZero())) { iconIndex += Profile::TEX_FIRST_ICON; drawUtil->clearBitmapModulation(); - drawUtil->drawBitmapStretchSR(profile->mTextureObject, RectI(currentOffset + iconOffset, iconExtent), profile->getBitmapArrayRect(iconIndex)); + drawUtil->drawBitmapStretchSR(profile->mBitmap, RectI(currentOffset + iconOffset, iconExtent), profile->getBitmapArrayRect(iconIndex)); } // render the row text @@ -204,7 +204,7 @@ void GuiGameListMenuCtrl::onRenderListOption(Row* row, Point2I currentOffset) arrowOffset.y = currentOffset.y + arrowOffsetY; drawer->clearBitmapModulation(); - drawer->drawBitmapStretchSR(profile->mTextureObject, RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex)); + drawer->drawBitmapStretchSR(profile->getBitmapResource(), RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex)); // render the right arrow bool arrowOnR = (isRowSelected || isRowHighlighted) && (row->mWrapOptions || (row->mSelectedOption < row->mOptions.size() - 1)); @@ -213,7 +213,7 @@ void GuiGameListMenuCtrl::onRenderListOption(Row* row, Point2I currentOffset) arrowOffset.y = currentOffset.y + arrowOffsetY; drawer->clearBitmapModulation(); - drawer->drawBitmapStretchSR(profile->mTextureObject, RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex)); + drawer->drawBitmapStretchSR(profile->getBitmapResource(), RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex)); } // get the appropriate font color @@ -1633,8 +1633,7 @@ bool GuiGameListMenuProfile::onAdd() // We can't call enforceConstraints() here because incRefCount initializes // some of the things to enforce. Do a basic sanity check here instead. - - if( !mBitmapName || !dStrlen(mBitmapName) ) + if(mBitmapAsset.isNull()) { Con::errorf( "GuiGameListMenuProfile: %s can't be created without a bitmap. Please add a 'Bitmap' property to the object definition.", getName() ); return false; diff --git a/Engine/source/gui/controls/guiGameListOptionsCtrl.cpp b/Engine/source/gui/controls/guiGameListOptionsCtrl.cpp index 5ddfd74da..cd5be7955 100644 --- a/Engine/source/gui/controls/guiGameListOptionsCtrl.cpp +++ b/Engine/source/gui/controls/guiGameListOptionsCtrl.cpp @@ -111,7 +111,7 @@ void GuiGameListOptionsCtrl::onRender(Point2I offset, const RectI &updateRect) arrowOffset.y = currentOffset.y + arrowOffsetY; drawer->clearBitmapModulation(); - drawer->drawBitmapStretchSR(profile->mTextureObject, RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex)); + drawer->drawBitmapStretchSR(profile->getBitmapResource(), RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex)); // render the right arrow bool arrowOnR = (isRowSelected || isRowHighlighted) && (myRow->mWrapOptions || (myRow->mSelectedOption < myRow->mOptions.size() - 1)); @@ -120,7 +120,7 @@ void GuiGameListOptionsCtrl::onRender(Point2I offset, const RectI &updateRect) arrowOffset.y = currentOffset.y + arrowOffsetY; drawer->clearBitmapModulation(); - drawer->drawBitmapStretchSR(profile->mTextureObject, RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex)); + drawer->drawBitmapStretchSR(profile->getBitmapResource(), RectI(arrowOffset, arrowExtent), profile->getBitmapArrayRect((U32)iconIndex)); } // get the appropriate font color diff --git a/Engine/source/gui/controls/guiMaterialCtrl.cpp b/Engine/source/gui/controls/guiMaterialCtrl.cpp index d6e5cf833..34c0243a9 100644 --- a/Engine/source/gui/controls/guiMaterialCtrl.cpp +++ b/Engine/source/gui/controls/guiMaterialCtrl.cpp @@ -45,12 +45,14 @@ ConsoleDocClass( GuiMaterialCtrl, GuiMaterialCtrl::GuiMaterialCtrl() : mMaterialInst( NULL ) { + INIT_MATERIALASSET(Material); } void GuiMaterialCtrl::initPersistFields() { addGroup( "Material" ); - addProtectedField( "materialName", TypeStringFilename, Offset( mMaterialName, GuiMaterialCtrl ), &GuiMaterialCtrl::_setMaterial, &defaultProtectedGetFn, "" ); + INITPERSISTFIELD_MATERIALASSET(Material, GuiMaterialCtrl, ""); + addProtectedField( "materialName", TypeStringFilename, Offset( mMaterialName, GuiMaterialCtrl ), &GuiMaterialCtrl::_setMaterialData, &defaultProtectedGetFn, "", AbstractClassRep::FIELD_HideInInspectors ); endGroup( "Material" ); Parent::initPersistFields(); @@ -62,7 +64,7 @@ bool GuiMaterialCtrl::onWake() return false; setActive( true ); - setMaterial( mMaterialName ); + setMaterial( getMaterial() ); return true; } @@ -85,10 +87,11 @@ bool GuiMaterialCtrl::_setMaterial( void *object, const char *index, const char bool GuiMaterialCtrl::setMaterial( const String &materialName ) { SAFE_DELETE( mMaterialInst ); - mMaterialName = materialName; - if ( mMaterialName.isNotEmpty() && isAwake() ) - mMaterialInst = MATMGR->createMatInstance( mMaterialName, getGFXVertexFormat() ); + _setMaterial(StringTable->insert(materialName.c_str())); + + if ( getMaterial() != StringTable->EmptyString() && isAwake() ) + mMaterialInst = MATMGR->createMatInstance( getMaterial(), getGFXVertexFormat() ); return true; } diff --git a/Engine/source/gui/controls/guiMaterialCtrl.h b/Engine/source/gui/controls/guiMaterialCtrl.h index 6e8bc5df5..bafbdf0eb 100644 --- a/Engine/source/gui/controls/guiMaterialCtrl.h +++ b/Engine/source/gui/controls/guiMaterialCtrl.h @@ -27,6 +27,8 @@ #include "gui/containers/guiContainer.h" #endif +#include "T3D/assets/MaterialAsset.h" + class BaseMatInstance; @@ -38,7 +40,8 @@ private: protected: - String mMaterialName; + DECLARE_MATERIALASSET(GuiMaterialCtrl, Material); + DECLARE_MATERIALASSET_SETGET(GuiMaterialCtrl, Material); BaseMatInstance *mMaterialInst; diff --git a/Engine/source/gui/controls/guiPopUpCtrl.cpp b/Engine/source/gui/controls/guiPopUpCtrl.cpp index f78e08999..c18b10c75 100644 --- a/Engine/source/gui/controls/guiPopUpCtrl.cpp +++ b/Engine/source/gui/controls/guiPopUpCtrl.cpp @@ -277,7 +277,10 @@ GuiPopUpMenuCtrl::GuiPopUpMenuCtrl(void) mRenderScrollInNA = false; // Added mBackgroundCancel = false; // Added mReverseTextList = false; // Added - Don't reverse text list if displaying up - mBitmapName = StringTable->EmptyString(); // Added + + INIT_IMAGEASSET_ARRAY(Bitmap, 0); + INIT_IMAGEASSET_ARRAY(Bitmap, 1); + mBitmapBounds.set(16, 16); // Added mIdMax = -1; mBackground = NULL; @@ -297,12 +300,24 @@ void GuiPopUpMenuCtrl::initPersistFields(void) addField("maxPopupHeight", TypeS32, Offset(mMaxPopupHeight, GuiPopUpMenuCtrl)); addField("sbUsesNAColor", TypeBool, Offset(mRenderScrollInNA, GuiPopUpMenuCtrl)); addField("reverseTextList", TypeBool, Offset(mReverseTextList, GuiPopUpMenuCtrl)); - addField("bitmap", TypeFilename, Offset(mBitmapName, GuiPopUpMenuCtrl)); + + addProtectedField("bitmap", TypeImageFilename, Offset(mBitmapName, GuiPopUpMenuCtrl), _setBitmaps, defaultProtectedGetFn, ""); + addProtectedField("bitmapAsset", TypeImageAssetId, Offset(mBitmapAssetId, GuiPopUpMenuCtrl), _setBitmaps, defaultProtectedGetFn, ""); + addField("bitmapBounds", TypePoint2I, Offset(mBitmapBounds, GuiPopUpMenuCtrl)); Parent::initPersistFields(); } +bool GuiPopUpMenuCtrl::_setBitmaps(void* obj, const char* index, const char* data) +{ + bool ret = false; + GuiPopUpMenuCtrl* object = static_cast(obj); + + object->setBitmap(data); + return true; +} + //------------------------------------------------------------------------------ DefineEngineMethod( GuiPopUpMenuCtrl, add, void, (const char * name, S32 idNum, U32 scheme), ("", -1, 0), "(string name, int idNum, int scheme=0)") { @@ -459,7 +474,7 @@ bool GuiPopUpMenuCtrl::onWake() return false; // Set the bitmap for the popup. - setBitmap( mBitmapName ); + setBitmap(getBitmap(Normal)); // Now update the Form Control's bitmap array, and possibly the child's too mProfile->constructBitmapArray(); @@ -483,8 +498,6 @@ bool GuiPopUpMenuCtrl::onAdd() //------------------------------------------------------------------------------ void GuiPopUpMenuCtrl::onSleep() { - mTextureNormal = NULL; // Added - mTextureDepressed = NULL; // Added Parent::onSleep(); closePopUp(); // Tests in function. } @@ -562,30 +575,30 @@ static S32 QSORT_CALLBACK idCompare(const void *a,const void *b) // Added void GuiPopUpMenuCtrl::setBitmap( const char *name ) { - mBitmapName = StringTable->insert( name ); - if ( !isAwake() ) - return; + StringTableEntry bitmapName = StringTable->insert(name); - if ( *mBitmapName ) + if ( bitmapName != StringTable->EmptyString() ) { char buffer[1024]; char *p; - dStrcpy(buffer, name, 1024); + dStrcpy(buffer, bitmapName, 1024); p = buffer + dStrlen(buffer); S32 pLen = 1024 - dStrlen(buffer); dStrcpy(p, "_n", pLen); - mTextureNormal = GFXTexHandle( (StringTableEntry)buffer, &GFXDefaultGUIProfile, avar("%s() - mTextureNormal (line %d)", __FUNCTION__, __LINE__) ); + + _setBitmap((StringTableEntry)buffer, Normal); dStrcpy(p, "_d", pLen); - mTextureDepressed = GFXTexHandle( (StringTableEntry)buffer, &GFXDefaultGUIProfile, avar("%s() - mTextureDepressed (line %d)", __FUNCTION__, __LINE__) ); - if ( !mTextureDepressed ) - mTextureDepressed = mTextureNormal; + _setBitmap((StringTableEntry)buffer, Depressed); + + if ( !mBitmap[Depressed] ) + mBitmap[Depressed] = mBitmap[Normal]; } else { - mTextureNormal = NULL; - mTextureDepressed = NULL; + _setBitmap(StringTable->EmptyString(), Normal); + _setBitmap(StringTable->EmptyString(), Depressed); } setUpdate(); } @@ -879,17 +892,17 @@ void GuiPopUpMenuCtrl::onRender( Point2I offset, const RectI &updateRect ) } // Draw a bitmap over the background? - if ( mTextureDepressed ) + if ( mBitmap[Depressed] ) { RectI rect(offset, mBitmapBounds); drawUtil->clearBitmapModulation(); - drawUtil->drawBitmapStretch( mTextureDepressed, rect ); + drawUtil->drawBitmapStretch( mBitmap[Depressed], rect ); } - else if ( mTextureNormal ) + else if ( mBitmap[Normal] ) { RectI rect(offset, mBitmapBounds); drawUtil->clearBitmapModulation(); - drawUtil->drawBitmapStretch( mTextureNormal, rect ); + drawUtil->drawBitmapStretch( mBitmap[Normal], rect ); } // Do we render a bitmap border or lines? @@ -923,11 +936,11 @@ void GuiPopUpMenuCtrl::onRender( Point2I offset, const RectI &updateRect ) } // Draw a bitmap over the background? - if ( mTextureNormal ) + if ( mBitmap[Normal] ) { RectI rect( offset, mBitmapBounds ); drawUtil->clearBitmapModulation(); - drawUtil->drawBitmapStretch( mTextureNormal, rect ); + drawUtil->drawBitmapStretch( mBitmap[Normal], rect ); } // Do we render a bitmap border or lines? @@ -953,11 +966,11 @@ void GuiPopUpMenuCtrl::onRender( Point2I offset, const RectI &updateRect ) } // Draw a bitmap over the background? - if ( mTextureNormal ) + if ( mBitmap[Normal] ) { RectI rect(offset, mBitmapBounds); drawUtil->clearBitmapModulation(); - drawUtil->drawBitmapStretch( mTextureNormal, rect ); + drawUtil->drawBitmapStretch( mBitmap[Normal], rect ); } // Do we render a bitmap border or lines? diff --git a/Engine/source/gui/controls/guiPopUpCtrl.h b/Engine/source/gui/controls/guiPopUpCtrl.h index 741fc523a..4ebc31794 100644 --- a/Engine/source/gui/controls/guiPopUpCtrl.h +++ b/Engine/source/gui/controls/guiPopUpCtrl.h @@ -38,6 +38,8 @@ #ifndef _GUISCROLLCTRL_H_ #include "gui/containers/guiScrollCtrl.h" #endif + +#include "T3D/assets/ImageAsset.h" class GuiPopUpMenuCtrl; class GuiPopupTextListCtrl; @@ -115,15 +117,26 @@ protected: bool mMouseOver; // Added bool mRenderScrollInNA; // Added bool mReverseTextList; // Added - Should we reverse the text list if we display up? - StringTableEntry mBitmapName; // Added + + enum BitmapModes + { + Normal, + Depressed, + + NumBitmapModes = 2 + }; + + DECLARE_IMAGEASSET_ARRAY(GuiPopUpMenuCtrl, Bitmap, GFXDefaultGUIProfile, NumBitmapModes); + DECLARE_IMAGEASSET_ARRAY_SETGET(GuiPopUpMenuCtrl, Bitmap); + Point2I mBitmapBounds; // Added - GFXTexHandle mTextureNormal; // Added - GFXTexHandle mTextureDepressed; // Added S32 mIdMax; virtual void addChildren(); virtual void repositionPopup(); + static bool _setBitmaps(void* obj, const char* index, const char* data); + public: GuiPopUpMenuCtrl(void); ~GuiPopUpMenuCtrl(); diff --git a/Engine/source/gui/controls/guiPopUpCtrlEx.cpp b/Engine/source/gui/controls/guiPopUpCtrlEx.cpp index 703d085d0..5cbd1e3bc 100644 --- a/Engine/source/gui/controls/guiPopUpCtrlEx.cpp +++ b/Engine/source/gui/controls/guiPopUpCtrlEx.cpp @@ -328,7 +328,10 @@ GuiPopUpMenuCtrlEx::GuiPopUpMenuCtrlEx(void) mRenderScrollInNA = false; // Added mBackgroundCancel = false; // Added mReverseTextList = false; // Added - Don't reverse text list if displaying up - mBitmapName = StringTable->EmptyString(); // Added + + INIT_IMAGEASSET_ARRAY(Bitmap, Normal); + INIT_IMAGEASSET_ARRAY(Bitmap, Depressed); + mBitmapBounds.set(16, 16); // Added mHotTrackItems = false; mIdMax = -1; @@ -349,7 +352,10 @@ void GuiPopUpMenuCtrlEx::initPersistFields(void) addField("maxPopupHeight", TypeS32, Offset(mMaxPopupHeight, GuiPopUpMenuCtrlEx), "Length of menu when it extends"); addField("sbUsesNAColor", TypeBool, Offset(mRenderScrollInNA, GuiPopUpMenuCtrlEx), "Deprecated" "@internal"); addField("reverseTextList", TypeBool, Offset(mReverseTextList, GuiPopUpMenuCtrlEx), "Reverses text list if popup extends up, instead of down"); - addField("bitmap", TypeFilename, Offset(mBitmapName, GuiPopUpMenuCtrlEx), "File name of bitmap to use"); + + addProtectedField("bitmap", TypeImageFilename, Offset(mBitmapName, GuiPopUpMenuCtrlEx), _setBitmaps, &defaultProtectedGetFn, "File name of bitmap to use"); + addProtectedField("bitmapAsset", TypeImageAssetId, Offset(mBitmapAssetId, GuiPopUpMenuCtrlEx), _setBitmaps, &defaultProtectedGetFn, "Name of bitmap asset to use"); + addField("bitmapBounds", TypePoint2I, Offset(mBitmapBounds, GuiPopUpMenuCtrlEx), "Boundaries of bitmap displayed"); addField("hotTrackCallback", TypeBool, Offset(mHotTrackItems, GuiPopUpMenuCtrlEx), "Whether to provide a 'onHotTrackItem' callback when a list item is hovered over"); @@ -357,6 +363,15 @@ void GuiPopUpMenuCtrlEx::initPersistFields(void) Parent::initPersistFields(); } +bool GuiPopUpMenuCtrlEx::_setBitmaps(void* obj, const char* index, const char* data) +{ + bool ret = false; + GuiPopUpMenuCtrlEx* object = static_cast(obj); + + object->setBitmap(data); + return true; +} + //------------------------------------------------------------------------------ ConsoleDocFragment _GuiPopUpMenuCtrlExAdd( "@brief Adds an entry to the list\n\n" @@ -664,7 +679,7 @@ bool GuiPopUpMenuCtrlEx::onWake() return false; // Set the bitmap for the popup. - setBitmap( mBitmapName ); + setBitmap(getBitmap(Normal)); // Now update the Form Control's bitmap array, and possibly the child's too mProfile->constructBitmapArray(); @@ -688,8 +703,6 @@ bool GuiPopUpMenuCtrlEx::onAdd() //------------------------------------------------------------------------------ void GuiPopUpMenuCtrlEx::onSleep() { - mTextureNormal = NULL; // Added - mTextureDepressed = NULL; // Added Parent::onSleep(); closePopUp(); // Tests in function. } @@ -767,30 +780,30 @@ static S32 QSORT_CALLBACK idCompare(const void *a,const void *b) // Added void GuiPopUpMenuCtrlEx::setBitmap(const char *name) { - mBitmapName = StringTable->insert( name ); - if ( !isAwake() ) - return; + StringTableEntry bitmapName = StringTable->insert(name); - if ( *mBitmapName ) + if (bitmapName != StringTable->EmptyString()) { char buffer[1024]; - char *p; - dStrcpy(buffer, name, 1024); + char* p; + dStrcpy(buffer, bitmapName, 1024); p = buffer + dStrlen(buffer); S32 pLen = 1024 - dStrlen(buffer); dStrcpy(p, "_n", pLen); - mTextureNormal = GFXTexHandle( (StringTableEntry)buffer, &GFXDefaultGUIProfile, avar("%s() - mTextureNormal (line %d)", __FUNCTION__, __LINE__) ); + + _setBitmap((StringTableEntry)buffer, Normal); dStrcpy(p, "_d", pLen); - mTextureDepressed = GFXTexHandle( (StringTableEntry)buffer, &GFXDefaultGUIProfile, avar("%s() - mTextureDepressed (line %d)", __FUNCTION__, __LINE__) ); - if ( !mTextureDepressed ) - mTextureDepressed = mTextureNormal; + _setBitmap((StringTableEntry)buffer, Depressed); + + if (!mBitmap[Depressed]) + mBitmap[Depressed] = mBitmap[Normal]; } else { - mTextureNormal = NULL; - mTextureDepressed = NULL; + _setBitmap(StringTable->EmptyString(), Normal); + _setBitmap(StringTable->EmptyString(), Depressed); } setUpdate(); } @@ -1061,17 +1074,17 @@ void GuiPopUpMenuCtrlEx::onRender(Point2I offset, const RectI &updateRect) } // Draw a bitmap over the background? - if ( mTextureDepressed ) + if ( mBitmap[Depressed] ) { RectI rect(offset, mBitmapBounds); drawUtil->clearBitmapModulation(); - drawUtil->drawBitmapStretch( mTextureDepressed, rect ); + drawUtil->drawBitmapStretch(mBitmap[Depressed], rect ); } - else if ( mTextureNormal ) + else if (mBitmap[Normal]) { RectI rect(offset, mBitmapBounds); drawUtil->clearBitmapModulation(); - drawUtil->drawBitmapStretch( mTextureNormal, rect ); + drawUtil->drawBitmapStretch(mBitmap[Normal], rect ); } // Do we render a bitmap border or lines? @@ -1105,11 +1118,11 @@ void GuiPopUpMenuCtrlEx::onRender(Point2I offset, const RectI &updateRect) } // Draw a bitmap over the background? - if ( mTextureNormal ) + if (mBitmap[Normal]) { RectI rect( offset, mBitmapBounds ); drawUtil->clearBitmapModulation(); - drawUtil->drawBitmapStretch( mTextureNormal, rect ); + drawUtil->drawBitmapStretch(mBitmap[Normal], rect ); } // Do we render a bitmap border or lines? @@ -1135,11 +1148,11 @@ void GuiPopUpMenuCtrlEx::onRender(Point2I offset, const RectI &updateRect) } // Draw a bitmap over the background? - if ( mTextureNormal ) + if (mBitmap[Normal]) { RectI rect(offset, mBitmapBounds); drawUtil->clearBitmapModulation(); - drawUtil->drawBitmapStretch( mTextureNormal, rect ); + drawUtil->drawBitmapStretch(mBitmap[Normal], rect ); } // Do we render a bitmap border or lines? diff --git a/Engine/source/gui/controls/guiPopUpCtrlEx.h b/Engine/source/gui/controls/guiPopUpCtrlEx.h index 04fa7b813..fe5f1c20b 100644 --- a/Engine/source/gui/controls/guiPopUpCtrlEx.h +++ b/Engine/source/gui/controls/guiPopUpCtrlEx.h @@ -38,6 +38,8 @@ class GuiPopUpMenuCtrlEx; class GuiPopupTextListCtrlEx; +#include "T3D/assets/ImageAsset.h" + class GuiPopUpBackgroundCtrlEx : public GuiControl { protected: @@ -116,15 +118,27 @@ class GuiPopUpMenuCtrlEx : public GuiTextCtrl bool mRenderScrollInNA; // Added bool mReverseTextList; // Added - Should we reverse the text list if we display up? bool mHotTrackItems; - StringTableEntry mBitmapName; // Added + + enum BitmapModes + { + Normal, + Depressed, + + NumBitmapModes = 2 + }; + + DECLARE_IMAGEASSET_ARRAY(GuiPopUpMenuCtrlEx, Bitmap, GFXDefaultGUIProfile, NumBitmapModes); + DECLARE_IMAGEASSET_ARRAY_SETGET(GuiPopUpMenuCtrlEx, Bitmap, NumBitmapModes); + Point2I mBitmapBounds; // Added - GFXTexHandle mTextureNormal; // Added - GFXTexHandle mTextureDepressed; // Added + S32 mIdMax; virtual void addChildren(); virtual void repositionPopup(); + static bool _setBitmaps(void* obj, const char* index, const char* data); + public: GuiPopUpMenuCtrlEx(void); ~GuiPopUpMenuCtrlEx(); diff --git a/Engine/source/gui/controls/guiSliderCtrl.cpp b/Engine/source/gui/controls/guiSliderCtrl.cpp index 3b2090427..9b7354d6d 100644 --- a/Engine/source/gui/controls/guiSliderCtrl.cpp +++ b/Engine/source/gui/controls/guiSliderCtrl.cpp @@ -427,9 +427,9 @@ void GuiSliderCtrl::onRender(Point2I offset, const RectI &updateRect) drawUtil->clearBitmapModulation(); //left border - drawUtil->drawBitmapSR(mProfile->mTextureObject, Point2I(offset.x,offset.y), mBitmapBounds[SliderLineLeft]); + drawUtil->drawBitmapSR(mProfile->getBitmapResource(), Point2I(offset.x,offset.y), mBitmapBounds[SliderLineLeft]); //right border - drawUtil->drawBitmapSR(mProfile->mTextureObject, Point2I(offset.x + getWidth() - mBitmapBounds[SliderLineRight].extent.x, offset.y), mBitmapBounds[SliderLineRight]); + drawUtil->drawBitmapSR(mProfile->getBitmapResource(), Point2I(offset.x + getWidth() - mBitmapBounds[SliderLineRight].extent.x, offset.y), mBitmapBounds[SliderLineRight]); //draw our center piece to our slider control's border and stretch it @@ -443,11 +443,11 @@ void GuiSliderCtrl::onRender(Point2I offset, const RectI &updateRect) stretchRect = mBitmapBounds[SliderLineCenter]; stretchRect.inset(1,0); - drawUtil->drawBitmapStretchSR(mProfile->mTextureObject, destRect, stretchRect); + drawUtil->drawBitmapStretchSR(mProfile->getBitmapResource(), destRect, stretchRect); //draw our control slider button thumb.point += pos; - drawUtil->drawBitmapSR(mProfile->mTextureObject,Point2I(thumb.point.x,offset.y ),mBitmapBounds[index]); + drawUtil->drawBitmapSR(mProfile->getBitmapResource(),Point2I(thumb.point.x,offset.y ),mBitmapBounds[index]); } else if (getWidth() >= getHeight()) diff --git a/Engine/source/gui/controls/guiTextEditCtrl.cpp b/Engine/source/gui/controls/guiTextEditCtrl.cpp index 65fd32017..da42f8f27 100644 --- a/Engine/source/gui/controls/guiTextEditCtrl.cpp +++ b/Engine/source/gui/controls/guiTextEditCtrl.cpp @@ -151,6 +151,8 @@ GuiTextEditCtrl::GuiTextEditCtrl() mPasswordMask = StringTable->insert( "*" ); #endif Sim::findObject( "InputDeniedSound", mDeniedSound ); + + mValidateCommand = ""; } GuiTextEditCtrl::~GuiTextEditCtrl() diff --git a/Engine/source/gui/controls/guiTextEditSliderBitmapCtrl.cpp b/Engine/source/gui/controls/guiTextEditSliderBitmapCtrl.cpp index 055b7890f..c80221d73 100644 --- a/Engine/source/gui/controls/guiTextEditSliderBitmapCtrl.cpp +++ b/Engine/source/gui/controls/guiTextEditSliderBitmapCtrl.cpp @@ -109,7 +109,7 @@ void GuiTextEditSliderBitmapCtrl::initPersistFields() addField("range", TypePoint2F, Offset(mRange, GuiTextEditSliderBitmapCtrl), "Maximum vertical and horizontal range to allow in the control.\n"); addField("increment", TypeF32, Offset(mIncAmount, GuiTextEditSliderBitmapCtrl), "How far to increment the slider on each step.\n"); addField("focusOnMouseWheel", TypeBool, Offset(mFocusOnMouseWheel, GuiTextEditSliderBitmapCtrl), "If true, the control will accept giving focus to the user when the mouse wheel is used.\n"); - addField("bitmap", TypeFilename,Offset(mBitmapName, GuiTextEditSliderBitmapCtrl), "Unused" ); + addField("bitmap", TypeFilename,Offset(mBitmapName, GuiTextEditSliderBitmapCtrl), "Unused", AbstractClassRep::FIELD_HideInInspectors ); Parent::initPersistFields(); } @@ -425,14 +425,14 @@ void GuiTextEditSliderBitmapCtrl::onRender(Point2I offset, const RectI &updateRe { // This control needs 4 images in order to render correctly if(mTextAreaHit == ArrowUp) - GFX->getDrawUtil()->drawBitmapStretchSR( mProfile->mTextureObject, RectI(arrowUpStart,arrowUpEnd), mProfile->mBitmapArrayRects[0] ); + GFX->getDrawUtil()->drawBitmapStretchSR( mProfile->mBitmap, RectI(arrowUpStart,arrowUpEnd), mProfile->mBitmapArrayRects[0] ); else - GFX->getDrawUtil()->drawBitmapStretchSR( mProfile->mTextureObject, RectI(arrowUpStart,arrowUpEnd), mProfile->mBitmapArrayRects[1] ); + GFX->getDrawUtil()->drawBitmapStretchSR( mProfile->mBitmap, RectI(arrowUpStart,arrowUpEnd), mProfile->mBitmapArrayRects[1] ); if(mTextAreaHit == ArrowDown) - GFX->getDrawUtil()->drawBitmapStretchSR( mProfile->mTextureObject, RectI(arrowDownStart,arrowDownEnd), mProfile->mBitmapArrayRects[2] ); + GFX->getDrawUtil()->drawBitmapStretchSR( mProfile->mBitmap, RectI(arrowDownStart,arrowDownEnd), mProfile->mBitmapArrayRects[2] ); else - GFX->getDrawUtil()->drawBitmapStretchSR( mProfile->mTextureObject, RectI(arrowDownStart,arrowDownEnd), mProfile->mBitmapArrayRects[3] ); + GFX->getDrawUtil()->drawBitmapStretchSR( mProfile->mBitmap, RectI(arrowDownStart,arrowDownEnd), mProfile->mBitmapArrayRects[3] ); } } diff --git a/Engine/source/gui/controls/guiTreeViewCtrl.cpp b/Engine/source/gui/controls/guiTreeViewCtrl.cpp index 9e0cdc7de..e2804b1f1 100644 --- a/Engine/source/gui/controls/guiTreeViewCtrl.cpp +++ b/Engine/source/gui/controls/guiTreeViewCtrl.cpp @@ -586,8 +586,8 @@ S32 GuiTreeViewCtrl::Item::getDisplayTextWidth(GFont *font) if( bufLen == 0 ) return 0; - // Add space for the string terminator - bufLen++; + // Add space for the string terminator and marker + bufLen += 2; char *buf = (char*)txtAlloc.alloc(bufLen); getDisplayText(bufLen, buf); @@ -3696,7 +3696,7 @@ void GuiTreeViewCtrl::onRenderCell(Point2I offset, Point2I cell, bool, bool ) { drawRect.point.x -= mTabSize; if ( parent->mNext ) - drawer->drawBitmapSR( mProfile->mTextureObject, drawRect.point, mProfile->mBitmapArrayRects[BmpLine] ); + drawer->drawBitmapSR( mProfile->mBitmap, drawRect.point, mProfile->mBitmapArrayRects[BmpLine] ); parent = parent->mParent; } @@ -3707,7 +3707,7 @@ void GuiTreeViewCtrl::onRenderCell(Point2I offset, Point2I cell, bool, bool ) // First, draw the rollover glow, if it's an inner node. if ( item->isParent() && item->mState.test( Item::MouseOverBmp ) ) - drawer->drawBitmapSR( mProfile->mTextureObject, drawRect.point, mProfile->mBitmapArrayRects[BmpGlow] ); + drawer->drawBitmapSR( mProfile->mBitmap, drawRect.point, mProfile->mBitmapArrayRects[BmpGlow] ); // Now, do we draw a treeview-selected item or an item dependent one? S32 newOffset = 0; // This is stored so we can render glow, then update render pos. @@ -3752,7 +3752,7 @@ void GuiTreeViewCtrl::onRenderCell(Point2I offset, Point2I cell, bool, bool ) if( ( bitmap >= 0 ) && ( bitmap < mProfile->mBitmapArrayRects.size() ) ) { if( drawBitmap ) - drawer->drawBitmapSR( mProfile->mTextureObject, drawRect.point, mProfile->mBitmapArrayRects[bitmap] ); + drawer->drawBitmapSR( mProfile->getBitmapResource(), drawRect.point, mProfile->mBitmapArrayRects[bitmap] ); newOffset = mProfile->mBitmapArrayRects[bitmap].extent.x; } diff --git a/Engine/source/gui/core/guiDefaultControlRender.cpp b/Engine/source/gui/core/guiDefaultControlRender.cpp index 451ef1364..f5389968e 100644 --- a/Engine/source/gui/core/guiDefaultControlRender.cpp +++ b/Engine/source/gui/core/guiDefaultControlRender.cpp @@ -173,14 +173,14 @@ void renderBorder( const RectI &bounds, GuiControlProfile *profile ) // Draw all corners first. //top left border - drawer->drawBitmapSR(profile->mTextureObject,Point2I(bounds.point.x,bounds.point.y),mBitmapBounds[BorderTopLeft]); + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I(bounds.point.x,bounds.point.y),mBitmapBounds[BorderTopLeft]); //top right border - drawer->drawBitmapSR(profile->mTextureObject,Point2I(bounds.point.x + bounds.extent.x - mBitmapBounds[BorderTopRight].extent.x,bounds.point.y),mBitmapBounds[BorderTopRight]); + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I(bounds.point.x + bounds.extent.x - mBitmapBounds[BorderTopRight].extent.x,bounds.point.y),mBitmapBounds[BorderTopRight]); //bottom left border - drawer->drawBitmapSR(profile->mTextureObject,Point2I(bounds.point.x,bounds.point.y + bounds.extent.y - mBitmapBounds[BorderBottomLeft].extent.y),mBitmapBounds[BorderBottomLeft]); + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I(bounds.point.x,bounds.point.y + bounds.extent.y - mBitmapBounds[BorderBottomLeft].extent.y),mBitmapBounds[BorderBottomLeft]); //bottom right border - drawer->drawBitmapSR(profile->mTextureObject,Point2I( + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I( bounds.point.x + bounds.extent.x - mBitmapBounds[BorderBottomRight].extent.x, bounds.point.y + bounds.extent.y - mBitmapBounds[BorderBottomRight].extent.y), mBitmapBounds[BorderBottomRight]); @@ -198,7 +198,7 @@ void renderBorder( const RectI &bounds, GuiControlProfile *profile ) stretchRect = mBitmapBounds[BorderTop]; stretchRect.inset(1,0); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); //bottom line stretch destRect.point.x = bounds.point.x + mBitmapBounds[BorderBottomLeft].extent.x; destRect.extent.x = bounds.extent.x - mBitmapBounds[BorderBottomRight].extent.x - mBitmapBounds[BorderBottomLeft].extent.x; @@ -208,7 +208,7 @@ void renderBorder( const RectI &bounds, GuiControlProfile *profile ) stretchRect = mBitmapBounds[BorderBottom]; stretchRect.inset(1,0); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); //left line stretch destRect.point.x = bounds.point.x; destRect.extent.x = mBitmapBounds[BorderLeft].extent.x; @@ -218,7 +218,7 @@ void renderBorder( const RectI &bounds, GuiControlProfile *profile ) stretchRect = mBitmapBounds[BorderLeft]; stretchRect.inset(0,1); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); //right line stretch destRect.point.x = bounds.point.x + bounds.extent.x - mBitmapBounds[BorderRight].extent.x; destRect.extent.x = mBitmapBounds[BorderRight].extent.x; @@ -228,7 +228,7 @@ void renderBorder( const RectI &bounds, GuiControlProfile *profile ) stretchRect = mBitmapBounds[BorderRight]; stretchRect.inset(0,1); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); // End drawing sides and top stretched borders break; @@ -288,14 +288,14 @@ void renderSizableBitmapBordersFilled( const RectI &bounds, S32 baseMultiplier, // Draw all corners first. //top left border - drawer->drawBitmapSR(profile->mTextureObject,Point2I(bounds.point.x,bounds.point.y),mBitmapBounds[borderTopLeft]); + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I(bounds.point.x,bounds.point.y),mBitmapBounds[borderTopLeft]); //top right border - drawer->drawBitmapSR(profile->mTextureObject,Point2I(bounds.point.x + bounds.extent.x - mBitmapBounds[borderTopRight].extent.x,bounds.point.y),mBitmapBounds[borderTopRight]); + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I(bounds.point.x + bounds.extent.x - mBitmapBounds[borderTopRight].extent.x,bounds.point.y),mBitmapBounds[borderTopRight]); //bottom left border - drawer->drawBitmapSR(profile->mTextureObject,Point2I(bounds.point.x,bounds.point.y + bounds.extent.y - mBitmapBounds[borderBottomLeft].extent.y),mBitmapBounds[borderBottomLeft]); + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I(bounds.point.x,bounds.point.y + bounds.extent.y - mBitmapBounds[borderBottomLeft].extent.y),mBitmapBounds[borderBottomLeft]); //bottom right border - drawer->drawBitmapSR(profile->mTextureObject,Point2I( + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I( bounds.point.x + bounds.extent.x - mBitmapBounds[borderBottomRight].extent.x, bounds.point.y + bounds.extent.y - mBitmapBounds[borderBottomRight].extent.y), mBitmapBounds[borderBottomRight]); @@ -313,7 +313,7 @@ void renderSizableBitmapBordersFilled( const RectI &bounds, S32 baseMultiplier, stretchRect = mBitmapBounds[borderTop]; stretchRect.inset(1,0); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); //bottom line stretch destRect.point.x = bounds.point.x + mBitmapBounds[borderBottomLeft].extent.x; destRect.extent.x = bounds.extent.x - mBitmapBounds[borderBottomRight].extent.x - mBitmapBounds[borderBottomLeft].extent.x; @@ -323,7 +323,7 @@ void renderSizableBitmapBordersFilled( const RectI &bounds, S32 baseMultiplier, stretchRect = mBitmapBounds[borderBottom]; stretchRect.inset(1,0); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); //left line stretch destRect.point.x = bounds.point.x; destRect.extent.x = mBitmapBounds[borderLeft].extent.x; @@ -333,7 +333,7 @@ void renderSizableBitmapBordersFilled( const RectI &bounds, S32 baseMultiplier, stretchRect = mBitmapBounds[borderLeft]; stretchRect.inset(0,1); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); //right line stretch destRect.point.x = bounds.point.x + bounds.extent.x - mBitmapBounds[borderRight].extent.x; destRect.extent.x = mBitmapBounds[borderRight].extent.x; @@ -343,7 +343,7 @@ void renderSizableBitmapBordersFilled( const RectI &bounds, S32 baseMultiplier, stretchRect = mBitmapBounds[borderRight]; stretchRect.inset(0,1); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); //fill stretch destRect.point.x = bounds.point.x + mBitmapBounds[borderLeft].extent.x; destRect.extent.x = (bounds.extent.x) - mBitmapBounds[borderLeft].extent.x - mBitmapBounds[borderRight].extent.x; @@ -353,7 +353,7 @@ void renderSizableBitmapBordersFilled( const RectI &bounds, S32 baseMultiplier, stretchRect = mBitmapBounds[fill]; stretchRect.inset(1,1); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); // End drawing sides and top stretched borders } @@ -388,14 +388,14 @@ void renderSizableBitmapBordersFilledIndex( const RectI &bounds, S32 startIndex, // Draw all corners first. //top left border - drawer->drawBitmapSR(profile->mTextureObject,Point2I(bounds.point.x,bounds.point.y),mBitmapBounds[borderTopLeft]); + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I(bounds.point.x,bounds.point.y),mBitmapBounds[borderTopLeft]); //top right border - drawer->drawBitmapSR(profile->mTextureObject,Point2I(bounds.point.x + bounds.extent.x - mBitmapBounds[borderTopRight].extent.x,bounds.point.y),mBitmapBounds[borderTopRight]); + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I(bounds.point.x + bounds.extent.x - mBitmapBounds[borderTopRight].extent.x,bounds.point.y),mBitmapBounds[borderTopRight]); //bottom left border - drawer->drawBitmapSR(profile->mTextureObject,Point2I(bounds.point.x,bounds.point.y + bounds.extent.y - mBitmapBounds[borderBottomLeft].extent.y),mBitmapBounds[borderBottomLeft]); + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I(bounds.point.x,bounds.point.y + bounds.extent.y - mBitmapBounds[borderBottomLeft].extent.y),mBitmapBounds[borderBottomLeft]); //bottom right border - drawer->drawBitmapSR(profile->mTextureObject,Point2I( + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I( bounds.point.x + bounds.extent.x - mBitmapBounds[borderBottomRight].extent.x, bounds.point.y + bounds.extent.y - mBitmapBounds[borderBottomRight].extent.y), mBitmapBounds[borderBottomRight]); @@ -413,7 +413,7 @@ void renderSizableBitmapBordersFilledIndex( const RectI &bounds, S32 startIndex, stretchRect = mBitmapBounds[borderTop]; stretchRect.inset(1,0); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); //bottom line stretch destRect.point.x = bounds.point.x + mBitmapBounds[borderBottomLeft].extent.x; destRect.extent.x = bounds.extent.x - mBitmapBounds[borderBottomRight].extent.x - mBitmapBounds[borderBottomLeft].extent.x; @@ -423,7 +423,7 @@ void renderSizableBitmapBordersFilledIndex( const RectI &bounds, S32 startIndex, stretchRect = mBitmapBounds[borderBottom]; stretchRect.inset(1,0); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); //left line stretch destRect.point.x = bounds.point.x; destRect.extent.x = mBitmapBounds[borderLeft].extent.x; @@ -433,7 +433,7 @@ void renderSizableBitmapBordersFilledIndex( const RectI &bounds, S32 startIndex, stretchRect = mBitmapBounds[borderLeft]; stretchRect.inset(0,1); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); //left line stretch destRect.point.x = bounds.point.x + bounds.extent.x - mBitmapBounds[borderRight].extent.x; destRect.extent.x = mBitmapBounds[borderRight].extent.x; @@ -443,7 +443,7 @@ void renderSizableBitmapBordersFilledIndex( const RectI &bounds, S32 startIndex, stretchRect = mBitmapBounds[borderRight]; stretchRect.inset(0,1); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); //fill stretch destRect.point.x = bounds.point.x + mBitmapBounds[borderLeft].extent.x; destRect.extent.x = (bounds.extent.x) - mBitmapBounds[borderLeft].extent.x - mBitmapBounds[borderRight].extent.x; @@ -453,7 +453,7 @@ void renderSizableBitmapBordersFilledIndex( const RectI &bounds, S32 startIndex, stretchRect = mBitmapBounds[fill]; stretchRect.inset(1,1); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); // End drawing sides and top stretched borders } @@ -484,9 +484,9 @@ void renderFixedBitmapBordersFilled( const RectI &bounds, S32 baseMultiplier, Gu // Draw all corners first. //left border - drawer->drawBitmapSR(profile->mTextureObject,Point2I(bounds.point.x,bounds.point.y),mBitmapBounds[borderLeft]); + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I(bounds.point.x,bounds.point.y),mBitmapBounds[borderLeft]); //right border - drawer->drawBitmapSR(profile->mTextureObject,Point2I(bounds.point.x + bounds.extent.x - mBitmapBounds[borderRight].extent.x,bounds.point.y),mBitmapBounds[borderRight]); + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I(bounds.point.x + bounds.extent.x - mBitmapBounds[borderRight].extent.x,bounds.point.y),mBitmapBounds[borderRight]); // End drawing corners @@ -501,7 +501,7 @@ void renderFixedBitmapBordersFilled( const RectI &bounds, S32 baseMultiplier, Gu stretchRect = mBitmapBounds[fill]; stretchRect.inset(1,0); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); // End drawing fill } @@ -529,9 +529,9 @@ void renderFixedBitmapBordersFilledIndex( const RectI &bounds, S32 startIndex, G // Draw all corners first. //left border - drawer->drawBitmapSR(profile->mTextureObject,Point2I(bounds.point.x,bounds.point.y),mBitmapBounds[borderLeft]); + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I(bounds.point.x,bounds.point.y),mBitmapBounds[borderLeft]); //right border - drawer->drawBitmapSR(profile->mTextureObject,Point2I(bounds.point.x + bounds.extent.x - mBitmapBounds[borderRight].extent.x,bounds.point.y),mBitmapBounds[borderRight]); + drawer->drawBitmapSR(profile->getBitmapResource(),Point2I(bounds.point.x + bounds.extent.x - mBitmapBounds[borderRight].extent.x,bounds.point.y),mBitmapBounds[borderRight]); // End drawing corners @@ -546,7 +546,7 @@ void renderFixedBitmapBordersFilledIndex( const RectI &bounds, S32 startIndex, G stretchRect = mBitmapBounds[fill]; stretchRect.inset(1,0); //draw it - drawer->drawBitmapStretchSR(profile->mTextureObject,destRect,stretchRect); + drawer->drawBitmapStretchSR(profile->getBitmapResource(),destRect,stretchRect); // End drawing fill } diff --git a/Engine/source/gui/core/guiTypes.cpp b/Engine/source/gui/core/guiTypes.cpp index 7ef0ef4ad..59fc8b854 100644 --- a/Engine/source/gui/core/guiTypes.cpp +++ b/Engine/source/gui/core/guiTypes.cpp @@ -78,8 +78,8 @@ GuiCursor::GuiCursor() mHotSpot.set(0,0); mRenderOffset.set(0.0f,0.0f); mExtent.set(1,1); - mTextureObject = NULL; - mBitmapName = StringTable->EmptyString(); + + INIT_IMAGEASSET(Bitmap); } GuiCursor::~GuiCursor() @@ -90,7 +90,9 @@ void GuiCursor::initPersistFields() { addField("hotSpot", TypePoint2I, Offset(mHotSpot, GuiCursor), "The location of the cursor's hot spot (which pixel carries the click)."); addField("renderOffset",TypePoint2F, Offset(mRenderOffset, GuiCursor), "Offset of the bitmap, where 0 signifies left edge of the bitmap, 1, the right. Similarly for the Y-component."); - addField("bitmapName", TypeFilename, Offset(mBitmapName, GuiCursor), "File name of the bitmap for the cursor."); + + addProtectedField("bitmapName", TypeImageFilename, Offset(mBitmapName, GuiCursor), _setBitmapData, &defaultProtectedGetFn, "File name of the bitmap for the cursor."); + INITPERSISTFIELD_IMAGEASSET(Bitmap, GuiCursor, "name of the bitmap for the cursor."); Parent::initPersistFields(); } @@ -111,24 +113,21 @@ void GuiCursor::onRemove() void GuiCursor::render(const Point2I &pos) { - if (!mTextureObject && mBitmapName && mBitmapName[0]) + if (mBitmap) { - mTextureObject.set( mBitmapName, &GFXGuiCursorProfile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__)); - if(!mTextureObject) - return; - mExtent.set(mTextureObject->getWidth(), mTextureObject->getHeight()); + mExtent.set(mBitmap->getWidth(), mBitmap->getHeight()); } // Render the cursor centered according to dimensions of texture - S32 texWidth = mTextureObject.getWidth(); - S32 texHeight = mTextureObject.getHeight(); + S32 texWidth = mBitmap.getWidth(); + S32 texHeight = mBitmap.getHeight(); Point2I renderPos = pos; renderPos.x -= (S32)( texWidth * mRenderOffset.x ); renderPos.y -= (S32)( texHeight * mRenderOffset.y ); GFX->getDrawUtil()->clearBitmapModulation(); - GFX->getDrawUtil()->drawBitmap(mTextureObject, renderPos); + GFX->getDrawUtil()->drawBitmap(mBitmap, renderPos); } //------------------------------------------------------------------------------ @@ -180,33 +179,40 @@ StringTableEntry GuiControlProfile::sFontCacheDirectory = ""; void GuiControlProfile::setBitmapHandle(GFXTexHandle handle) { - mTextureObject = handle; + mBitmap = handle; - mBitmapName = StringTable->insert("texhandle"); + _setBitmap(StringTable->insert("texhandle")); } bool GuiControlProfile::protectedSetBitmap( void *object, const char *index, const char *data ) { GuiControlProfile *profile = static_cast( object ); - profile->mBitmapName = StringTable->insert(data); + profile->_setBitmap(StringTable->insert(data)); if ( !profile->isProperlyAdded() ) - return false; + return true; if( profile->mLoadCount > 0 ) { profile->mBitmapArrayRects.clear(); - profile->mTextureObject = NULL; + profile->mBitmap = nullptr; - //verify the bitmap - if (profile->mBitmapName && profile->mBitmapName[0] && dStricmp(profile->mBitmapName, "texhandle") != 0 && - !profile->mTextureObject.set( profile->mBitmapName, &GFXTexturePersistentProfile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__) )) - Con::errorf("Failed to load profile bitmap (%s)",profile->mBitmapName); + if (profile->getBitmap() != StringTable->EmptyString()) + { + if (profile->mBitmapAsset.notNull() && profile->getBitmap() != StringTable->insert("texHandle")) + { + profile->mBitmap.set(profile->mBitmapAsset->getImagePath(), profile->mBitmapProfile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__)); + } - // If we've got a special border, make sure it's usable. - //if( profile->mBorder == -1 || profile->mBorder == -2 ) - profile->constructBitmapArray(); + //verify the bitmap + if (!profile->mBitmap) + Con::errorf("(%s) - Failed to load profile bitmap (%s)", profile->getName(), profile->getBitmap()); + + // If we've got a special border, make sure it's usable. + //if( profile->mBorder == -1 || profile->mBorder == -2 ) + profile->constructBitmapArray(); + } } return false; @@ -318,9 +324,8 @@ GuiControlProfile::GuiControlProfile(void) : mMouseOverSelected = false; // bitmap members - mBitmapName = NULL; + INIT_IMAGEASSET(Bitmap); mUseBitmapArray = false; - mTextureObject = NULL; // initialized in incLoadCount() mChildrenProfileName = NULL; mChildrenProfile = NULL; @@ -456,10 +461,20 @@ void GuiControlProfile::initPersistFields() endGroup( "Text" ); addGroup( "Misc" ); +#ifdef TORQUE_SHOW_LEGACY_FILE_FIELDS + addProtectedField("bitmap", TypeImageFilename, Offset(mBitmapName, GuiControlProfile), + &GuiControlProfile::protectedSetBitmap, &defaultProtectedGetFn, + "Texture to use for rendering control."); +#else + addProtectedField("bitmap", TypeImageFilename, Offset(mBitmapName, GuiControlProfile), + &GuiControlProfile::protectedSetBitmap, &defaultProtectedGetFn, + "Texture to use for rendering control.", AbstractClassRep::FIELD_HideInInspectors); +#endif - addProtectedField( "bitmap", TypeFilename, Offset(mBitmapName, GuiControlProfile), + addProtectedField("bitmapAsset", TypeImageAssetId, Offset(mBitmapAssetId, GuiControlProfile), &GuiControlProfile::protectedSetBitmap, &defaultProtectedGetFn, - "Texture to use for rendering control." ); + "Texture to use for rendering control."); + addField("hasBitmapArray", TypeBool, Offset(mUseBitmapArray, GuiControlProfile), "If true, 'bitmap' is an array of images." ); @@ -565,20 +580,28 @@ S32 GuiControlProfile::constructBitmapArray() if(mBitmapArrayRects.size()) return mBitmapArrayRects.size(); - if( mTextureObject.isNull() ) - { - if ( !mBitmapName || !mBitmapName[0] || !mTextureObject.set( mBitmapName, &GFXTexturePersistentSRGBProfile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__) )) + if( mBitmap.isNull() ) + { + if (!_setBitmap(getBitmap())) + return 0; + + if (getBitmap() != StringTable->EmptyString() && mBitmapName != StringTable->insert("texhandle")) + { + mBitmap.set(getBitmap(), mBitmapProfile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__)); + } + + if (getBitmap() == StringTable->EmptyString() || mBitmap.isNull()) return 0; } - GBitmap *bmp = mTextureObject->getBitmap(); + GBitmap *bmp = mBitmap->getBitmap(); //get the separator color ColorI sepColor; if ( !bmp || !bmp->getColor( 0, 0, sepColor ) ) { - Con::errorf("Failed to create bitmap array from %s for profile %s - couldn't ascertain seperator color!", mBitmapName, getName()); - AssertFatal( false, avar("Failed to create bitmap array from %s for profile %s - couldn't ascertain seperator color!", mBitmapName, getName())); + Con::errorf("Failed to create bitmap array from %s for profile %s - couldn't ascertain seperator color!", getBitmap(), getName()); + AssertFatal( false, avar("Failed to create bitmap array from %s for profile %s - couldn't ascertain seperator color!", getBitmap(), getName())); return 0; } @@ -654,12 +677,19 @@ void GuiControlProfile::incLoadCount() loadFont(); // + if (getBitmap() != StringTable->EmptyString()) + { + if (mBitmapAsset.notNull() && getBitmap() != StringTable->insert("texHandle")) + { + mBitmap.set(mBitmapAsset->getImagePath(), mBitmapProfile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__)); + } - if (mBitmapName && mBitmapName[0] && dStricmp(mBitmapName, "texhandle") != 0 && - !mTextureObject.set( mBitmapName, &GFXTexturePersistentSRGBProfile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__) )) - Con::errorf("Failed to load profile bitmap (%s)",mBitmapName); + //verify the bitmap + if (!mBitmap) + Con::errorf("(%s) - Failed to load profile bitmap (%s)", getName(), getBitmap()); - constructBitmapArray(); + constructBitmapArray(); + } } mLoadCount ++; @@ -682,8 +712,9 @@ void GuiControlProfile::decLoadCount() getId(), getClassName(), getName(), getInternalName() ); #endif - if( !mBitmapName || !mBitmapName[0] || dStricmp(mBitmapName, "texhandle") != 0 ) - mTextureObject = NULL; + StringTableEntry bitmapName = getBitmap(); + if(bitmapName == StringTable->EmptyString() || bitmapName == StringTable->insert("texhandle")) + mBitmap = NULL; } } @@ -707,6 +738,19 @@ DefineEngineMethod( GuiControlProfile, getStringWidth, S32, (const char* string) return object->mFont->getStrNWidth( string, dStrlen( string ) ); } +DefineEngineMethod(GuiControlProfile, getBitmap, const char*, (), , "get name") +{ + return object->getBitmap(); +} +DefineEngineMethod(GuiControlProfile, getBitmapAsset, const char*, (), , "") +{ + return object->mBitmapAssetId; +} +DefineEngineMethod(GuiControlProfile, setBitmap, bool, (const char* map), , "") +{ + return object->_setBitmap(StringTable->insert(map)); +} + //----------------------------------------------------------------------------- // TypeRectSpacingI //----------------------------------------------------------------------------- diff --git a/Engine/source/gui/core/guiTypes.h b/Engine/source/gui/core/guiTypes.h index 51f33d21b..23fa13246 100644 --- a/Engine/source/gui/core/guiTypes.h +++ b/Engine/source/gui/core/guiTypes.h @@ -36,6 +36,7 @@ #include "console/dynamicTypes.h" #endif +#include "T3D/assets/ImageAsset.h" #include "gfx/gfxDevice.h" #include "platform/input/event.h" @@ -335,16 +336,20 @@ struct ControlSizing }; +GFX_DeclareTextureProfile(GFXGuiCursorProfile); +GFX_DeclareTextureProfile(GFXDefaultGUIProfile); + class GuiCursor : public SimObject { private: typedef SimObject Parent; - StringTableEntry mBitmapName; + + DECLARE_IMAGEASSET(GuiCursor, Bitmap, onImageChanged, GFXGuiCursorProfile); + DECLARE_IMAGEASSET_SETGET(GuiCursor, Bitmap); Point2I mHotSpot; Point2F mRenderOffset; Point2I mExtent; - GFXTexHandle mTextureObject; public: Point2I getHotSpot() { return mHotSpot; } @@ -358,6 +363,8 @@ public: bool onAdd(void); void onRemove(); void render(const Point2I &pos); + + void onImageChanged() {} }; /// A GuiControlProfile is used by every GuiObject and is akin to a @@ -441,9 +448,118 @@ public: Point2I mTextOffset; ///< Text offset for the control // bitmap members - StringTableEntry mBitmapName; ///< Bitmap file name for the bitmap of the control + ///< Bitmap for the bitmap of the control + /// +public: + GFXTexHandle mBitmap = NULL; + StringTableEntry mBitmapName; + StringTableEntry mBitmapAssetId; + AssetPtr mBitmapAsset; + GFXTextureProfile* mBitmapProfile = &GFXTexturePersistentSRGBProfile; +public: + const StringTableEntry getBitmapFile() const { return mBitmapName; } + void setBitmapFile(const FileName& _in) { mBitmapName = StringTable->insert(_in.c_str()); } + const AssetPtr& getBitmapAsset() const { return mBitmapAsset; } + void setBitmapAsset(const AssetPtr& _in) { mBitmapAsset = _in; } + + bool _setBitmap(StringTableEntry _in) + { + if (mBitmapAssetId != _in || mBitmapName != _in) + { + if (mBitmapAsset.notNull()) + { + mBitmapAsset->getChangedSignal().remove(this, &GuiControlProfile::onBitmapChanged); + } + if (_in == StringTable->EmptyString()) + { + mBitmapName = StringTable->EmptyString(); + mBitmapAssetId = StringTable->EmptyString(); + mBitmapAsset = NULL; + mBitmap.free(); + mBitmap = NULL; + return true; + } + else if (_in[0] == '$' || _in[0] == '#') + { + mBitmapName = _in; + mBitmapAssetId = StringTable->EmptyString(); + mBitmapAsset = NULL; + mBitmap.free(); + mBitmap = NULL; + return true; + } + + if (AssetDatabase.isDeclaredAsset(_in)) + { + mBitmapAssetId = _in; + + U32 assetState = ImageAsset::getAssetById(mBitmapAssetId, &mBitmapAsset); + + if (ImageAsset::Ok == assetState) + { + mBitmapName = StringTable->EmptyString(); + } + } + else + { + StringTableEntry assetId = ImageAsset::getAssetIdByFilename(_in); + if (assetId != StringTable->EmptyString()) + { + mBitmapAssetId = assetId; + if (ImageAsset::getAssetById(mBitmapAssetId, &mBitmapAsset) == ImageAsset::Ok) + { + mBitmapName = StringTable->EmptyString(); + } + } + else + { + mBitmapName = _in; + mBitmapAssetId = StringTable->EmptyString(); + mBitmapAsset = NULL; + } + } + } + if (getBitmap() != StringTable->EmptyString() && mBitmapName != StringTable->insert("texhandle")) + { + if (mBitmapAsset.notNull()) + { + mBitmapAsset->getChangedSignal().notify(this, &GuiControlProfile::onBitmapChanged); + } + } + else + { + mBitmap.free(); + mBitmap = NULL; + } + + if (getBitmap() != StringTable->EmptyString() && mBitmapAsset.notNull() && mBitmapAsset->getStatus() != ImageAsset::Ok) + { + Con::errorf("%s(%s)::_set%s() - image asset failure \"%s\" due to [%s]", macroText(className), getName(), macroText(name), _in, ImageAsset::getAssetErrstrn(mBitmapAsset->getStatus()).c_str()); + return false; + } + return true; + } + + const StringTableEntry getBitmap() const + { + if (mBitmapAsset && (mBitmapAsset->getImageFileName() != StringTable->EmptyString())) + return Platform::makeRelativePathName(mBitmapAsset->getImagePath(), Platform::getMainDotCsDir()); + else if (mBitmapAssetId != StringTable->EmptyString()) + return mBitmapAssetId; + else if (mBitmapName != StringTable->EmptyString()) + return StringTable->insert(Platform::makeRelativePathName(mBitmapName, Platform::getMainDotCsDir())); + else + return StringTable->EmptyString(); + } + GFXTexHandle getBitmapResource() + { + return mBitmap; + } + DECLARE_IMAGEASSET_SETGET(GuiControlProfile, Bitmap); + + void onBitmapChanged() {} + bool mUseBitmapArray; ///< Flag to use the bitmap array or to fallback to non-array rendering - GFXTexHandle mTextureObject; Vector mBitmapArrayRects; ///< Used for controls which use an array of bitmaps such as checkboxes // sound members @@ -518,7 +634,4 @@ DefineEnumType( GuiAlignmentType ); typedef FontCharset GuiFontCharset; DefineEnumType( GuiFontCharset ); -GFX_DeclareTextureProfile(GFXGuiCursorProfile); -GFX_DeclareTextureProfile(GFXDefaultGUIProfile); - #endif //_GUITYPES_H diff --git a/Engine/source/gui/editor/guiInspector.h b/Engine/source/gui/editor/guiInspector.h index 0d776ff59..635c3592c 100644 --- a/Engine/source/gui/editor/guiInspector.h +++ b/Engine/source/gui/editor/guiInspector.h @@ -161,7 +161,9 @@ public: void setObjectField( const char *fieldName, const char *data ); - static GuiInspector* findByObject( SimObject *obj ); + static GuiInspector* findByObject( SimObject *obj ); + + void refresh(); protected: @@ -181,8 +183,6 @@ protected: SimObjectPtr mHLField; String mGroupFilters; bool mShowCustomFields; - - void refresh(); }; #endif diff --git a/Engine/source/gui/editor/guiInspectorTypes.cpp b/Engine/source/gui/editor/guiInspectorTypes.cpp index 818df2ba1..4529d6392 100644 --- a/Engine/source/gui/editor/guiInspectorTypes.cpp +++ b/Engine/source/gui/editor/guiInspectorTypes.cpp @@ -220,8 +220,8 @@ GuiControl* GuiInspectorTypeMaterialName::construct(const char* command) mBrowseButton->setField( "Command", szBuffer ); //temporary static button name - char bitmapName[512] = "tools/materialEditor/gui/change-material-btn"; - mBrowseButton->setBitmap( bitmapName ); + char bitmapName[512] = "ToolsModule:change_material_btn_n_image"; + mBrowseButton->setBitmap( StringTable->insert(bitmapName) ); mBrowseButton->setDataField( StringTable->insert("Profile"), NULL, "GuiButtonProfile" ); mBrowseButton->registerObject(); @@ -326,8 +326,8 @@ GuiControl* GuiInspectorTypeTerrainMaterialName::construct(const char* command) mBrowseButton->setField( "Command", szBuffer ); //temporary static button name - char bitmapName[512] = "tools/gui/images/layers-btn"; - mBrowseButton->setBitmap( bitmapName ); + char bitmapName[512] = "ToolsModule:tools/gui/images/layers_btn_n_image"; + mBrowseButton->setBitmap(StringTable->insert(bitmapName) ); mBrowseButton->setDataField( StringTable->insert("Profile"), NULL, "GuiButtonProfile" ); mBrowseButton->registerObject(); @@ -804,8 +804,8 @@ GuiControl* GuiInspectorTypeShapeFilename::constructEditControl() dSprintf(szBuffer, sizeof(szBuffer), "ShapeEditorPlugin.open(%d.getText());", retCtrl->getId()); mShapeEdButton->setField("Command", szBuffer); - char bitmapName[512] = "tools/worldEditor/images/toolbar/shape-editor"; - mShapeEdButton->setBitmap(bitmapName); + char bitmapName[512] = "ToolsModule:shape_editor_n_image"; + mShapeEdButton->setBitmap(StringTable->insert(bitmapName)); mShapeEdButton->setDataField(StringTable->insert("Profile"), NULL, "GuiButtonProfile"); mShapeEdButton->setDataField(StringTable->insert("tooltipprofile"), NULL, "GuiToolTipProfile"); @@ -956,8 +956,8 @@ GuiControl* GuiInspectorTypeRectUV::constructEditControl() mBrowseButton->setField( "Command", szBuffer ); //temporary static button name - char bitmapName[512] = "tools/gui/images/uv-editor-btn"; - mBrowseButton->setBitmap( bitmapName ); + char bitmapName[512] = "ToolsModule:uv_editor_btn_n_image"; + mBrowseButton->setBitmap(StringTable->insert(bitmapName) ); mBrowseButton->setDataField( StringTable->insert("Profile"), NULL, "GuiButtonProfile" ); mBrowseButton->registerObject(); @@ -1544,7 +1544,7 @@ GuiControl* GuiInspectorTypeBitMask32Helper::constructEditControl() mButton->setField( "Command", szBuffer ); mButton->setField( "buttonType", "ToggleButton" ); mButton->setDataField( StringTable->insert("Profile"), NULL, "GuiInspectorButtonProfile" ); - mButton->setBitmap( "tools/gui/images/arrowBtn" ); + mButton->setBitmap(StringTable->insert("ToolsModule:arrowBtn_image") ); mButton->setStateOn( true ); mButton->setExtent( 16, 16 ); mButton->registerObject(); diff --git a/Engine/source/gui/editor/guiMenuBar.cpp b/Engine/source/gui/editor/guiMenuBar.cpp index ec75520c9..7f2b9484f 100644 --- a/Engine/source/gui/editor/guiMenuBar.cpp +++ b/Engine/source/gui/editor/guiMenuBar.cpp @@ -1347,7 +1347,7 @@ void GuiMenuBar::onRender(Point2I offset, const RectI &updateRect) bitmapstart.y = mMenuList[i].bounds.point.y + (mMenuList[i].bounds.extent.y - rect.extent.y) / 2; drawUtil->clearBitmapModulation(); - drawUtil->drawBitmapSR(mProfile->mTextureObject, offset + bitmapstart, rect); + drawUtil->drawBitmapSR(mProfile->getBitmapResource(), offset + bitmapstart, rect); // Should we also draw the text? if (!mMenuList[i].drawBitmapOnly) diff --git a/Engine/source/gui/editor/guiPopupMenuCtrl.cpp b/Engine/source/gui/editor/guiPopupMenuCtrl.cpp index 12570b129..7c63ebe52 100644 --- a/Engine/source/gui/editor/guiPopupMenuCtrl.cpp +++ b/Engine/source/gui/editor/guiPopupMenuCtrl.cpp @@ -142,7 +142,7 @@ void GuiPopupMenuTextListCtrl::onRenderCell(Point2I offset, Point2I cell, bool s Point2I bitPos = Point2I(offset.x + mCellSize.y / 2, offset.y + mCellSize.y / 2); GFX->getDrawUtil()->clearBitmapModulation(); - GFX->getDrawUtil()->drawBitmapSR(mProfile->mTextureObject, bitPos + off, rect); + GFX->getDrawUtil()->drawBitmapSR(mProfile->getBitmapResource(), bitPos + off, rect); } } diff --git a/Engine/source/gui/editor/guiShapeEdPreview.cpp b/Engine/source/gui/editor/guiShapeEdPreview.cpp index 5f8a80279..5ea20ec13 100644 --- a/Engine/source/gui/editor/guiShapeEdPreview.cpp +++ b/Engine/source/gui/editor/guiShapeEdPreview.cpp @@ -35,6 +35,9 @@ #include "gfx/gfxDrawUtil.h" #include "collision/concretePolyList.h" +#include "T3D/assets/ShapeAsset.h" +#include "T3D/assets/ShapeAnimationAsset.h" + #ifdef TORQUE_COLLADA #include "collision/optimizedPolyList.h" #include "ts/collada/colladaUtils.h" @@ -65,6 +68,7 @@ GuiShapeEdPreview::GuiShapeEdPreview() mZoomSpeed ( 1.0f ), mGridDimension( 30, 30 ), mModel( NULL ), + mModelName(StringTable->EmptyString()), mRenderGhost( false ), mRenderNodes( false ), mRenderBounds( false ), @@ -349,6 +353,8 @@ bool GuiShapeEdPreview::setObjectModel(const char* modelName) mThreads.clear(); mActiveThread = -1; + ResourceManager::get().getChangedSignal().remove(this, &GuiShapeEdPreview::_onResourceChanged); + if (modelName && modelName[0]) { Resource model = ResourceManager::get().load( modelName ); @@ -382,11 +388,57 @@ bool GuiShapeEdPreview::setObjectModel(const char* modelName) // the first time recording mLastRenderTime = Platform::getVirtualMilliseconds(); + + mModelName = StringTable->insert(modelName); + + //Now to reflect changes when the model file is changed. + ResourceManager::get().getChangedSignal().notify(this, &GuiShapeEdPreview::_onResourceChanged); + } + else + { + mModelName = StringTable->EmptyString(); } return true; } +bool GuiShapeEdPreview::setObjectShapeAsset(const char* assetId) +{ + SAFE_DELETE(mModel); + unmountAll(); + mThreads.clear(); + mActiveThread = -1; + + StringTableEntry modelName = StringTable->EmptyString(); + if (AssetDatabase.isDeclaredAsset(assetId)) + { + StringTableEntry id = StringTable->insert(assetId); + StringTableEntry assetType = AssetDatabase.getAssetType(id); + if (assetType == StringTable->insert("ShapeAsset")) + { + ShapeAsset* asset = AssetDatabase.acquireAsset(id); + modelName = asset->getShapeFilePath(); + AssetDatabase.releaseAsset(id); + } + else if (assetType == StringTable->insert("ShapeAnimationAsset")) + { + ShapeAnimationAsset* asset = AssetDatabase.acquireAsset(id); + modelName = asset->getAnimationPath(); + AssetDatabase.releaseAsset(id); + } + } + + return setObjectModel(modelName); +} + +void GuiShapeEdPreview::_onResourceChanged(const Torque::Path& path) +{ + if (path != Torque::Path(mModelName)) + return; + + setObjectModel(path.getFullPath()); +} + void GuiShapeEdPreview::addThread() { if ( mModel ) @@ -1697,6 +1749,14 @@ DefineEngineMethod( GuiShapeEdPreview, setModel, bool, ( const char* shapePath ) return object->setObjectModel( shapePath ); } +DefineEngineMethod(GuiShapeEdPreview, setShapeAsset, bool, (const char* shapeAsset), , + "Sets the model to be displayed in this control\n\n" + "@param shapeName Name of the model to display.\n" + "@return True if the model was loaded successfully, false otherwise.\n") +{ + return object->setObjectShapeAsset(shapeAsset); +} + DefineEngineMethod( GuiShapeEdPreview, fitToShape, void, (),, "Adjust the camera position and zoom to fit the shape within the view.\n\n" ) { diff --git a/Engine/source/gui/editor/guiShapeEdPreview.h b/Engine/source/gui/editor/guiShapeEdPreview.h index 248b7be62..ba42d7265 100644 --- a/Engine/source/gui/editor/guiShapeEdPreview.h +++ b/Engine/source/gui/editor/guiShapeEdPreview.h @@ -114,6 +114,7 @@ protected: bool mRenderColMeshes; bool mRenderMounts; TSShapeInstance* mModel; + StringTableEntry mModelName; LightInfo* mFakeSun; EulerF mSunRot; @@ -198,6 +199,9 @@ public: void setCurrentDetail(S32 dl); bool setObjectModel(const char * modelName); + bool setObjectShapeAsset(const char* assetId); + + void _onResourceChanged(const Torque::Path& path); /// @name Threads ///@{ diff --git a/Engine/source/gui/editor/inspector/dynamicField.cpp b/Engine/source/gui/editor/inspector/dynamicField.cpp index 743d5c3b5..cebaa890a 100644 --- a/Engine/source/gui/editor/inspector/dynamicField.cpp +++ b/Engine/source/gui/editor/inspector/dynamicField.cpp @@ -257,7 +257,7 @@ bool GuiInspectorDynamicField::onAdd() mParent->getId() ); // FIXME Hardcoded image - mDeleteButton->setField( "Bitmap", "tools/gui/images/iconDelete" ); + mDeleteButton->setField( "Bitmap", "ToolsModule:iconDelete_image" ); mDeleteButton->setField( "Text", "X" ); mDeleteButton->setField( "Command", szBuffer ); mDeleteButton->setSizing( horizResizeLeft, vertResizeCenter ); diff --git a/Engine/source/gui/editor/inspector/dynamicGroup.cpp b/Engine/source/gui/editor/inspector/dynamicGroup.cpp index f653e9c5c..7b003cefe 100644 --- a/Engine/source/gui/editor/inspector/dynamicGroup.cpp +++ b/Engine/source/gui/editor/inspector/dynamicGroup.cpp @@ -60,7 +60,7 @@ bool GuiInspectorDynamicGroup::createContent() addFieldBtn->setControlProfile( dynamic_cast(profilePtr) ); // FIXME Hardcoded image - addFieldBtn->setBitmap("tools/gui/images/iconAdd.png"); + addFieldBtn->setBitmap(StringTable->insert("ToolsModule:iconAdd_image")); char commandBuf[64]; dSprintf(commandBuf, 64, "%d.addDynamicField();", this->getId()); diff --git a/Engine/source/gui/editor/inspector/variableInspector.cpp b/Engine/source/gui/editor/inspector/variableInspector.cpp index 40e525815..e639cad0f 100644 --- a/Engine/source/gui/editor/inspector/variableInspector.cpp +++ b/Engine/source/gui/editor/inspector/variableInspector.cpp @@ -22,6 +22,9 @@ #include "gui/editor/inspector/variableInspector.h" #include "console/engineAPI.h" +#include "T3D/assets/ShapeAsset.h" +#include "T3D/assets/ImageAsset.h" +#include "T3D/assets/MaterialAsset.h" GuiVariableInspector::GuiVariableInspector() : mAutoUpdate(true) { @@ -180,12 +183,12 @@ void GuiVariableInspector::addField(const char* name, const char* label, const c fieldTypeMask = TypePoint3F; else if (newField.mFieldTypeName == StringTable->insert("vector2")) fieldTypeMask = TypePoint2F; - //else if (fieldType == StringTable->insert("material")) - // fieldTypeMask = TypeMaterialName; + else if (newField.mFieldTypeName == StringTable->insert("material")) + fieldTypeMask = TypeMaterialAssetId; else if (newField.mFieldTypeName == StringTable->insert("image")) - fieldTypeMask = TypeImageFilename; + fieldTypeMask = TypeImageAssetId; else if (newField.mFieldTypeName == StringTable->insert("shape")) - fieldTypeMask = TypeShapeFilename; + fieldTypeMask = TypeShapeAssetId; else if (newField.mFieldTypeName == StringTable->insert("bool")) fieldTypeMask = TypeBool; else if (newField.mFieldTypeName == StringTable->insert("object")) diff --git a/Engine/source/gui/game/guiChunkedBitmapCtrl.cpp b/Engine/source/gui/game/guiChunkedBitmapCtrl.cpp index b4eb118fc..138488f05 100644 --- a/Engine/source/gui/game/guiChunkedBitmapCtrl.cpp +++ b/Engine/source/gui/game/guiChunkedBitmapCtrl.cpp @@ -65,11 +65,12 @@ ConsoleDocClass( GuiChunkedBitmapCtrl, void GuiChunkedBitmapCtrl::initPersistFields() { - addGroup("GuiChunkedBitmapCtrl"); - addField( "bitmap", TypeFilename, Offset( mBitmapName, GuiChunkedBitmapCtrl ), "This is the bitmap to render to the control." ); - addField( "useVariable", TypeBool, Offset( mUseVariable, GuiChunkedBitmapCtrl ), "This decides whether to use the \"bitmap\" file " - "or a bitmap stored in \"variable\""); - addField( "tile", TypeBool, Offset( mTile, GuiChunkedBitmapCtrl ), "This is no longer in use"); + addGroup("GuiChunkedBitmapCtrl"); + INITPERSISTFIELD_IMAGEASSET(Bitmap, GuiChunkedBitmapCtrl, "This is the bitmap to render to the control."); + + addField( "useVariable", TypeBool, Offset( mUseVariable, GuiChunkedBitmapCtrl ), "This decides whether to use the \"bitmap\" file " + "or a bitmap stored in \"variable\""); + addField( "tile", TypeBool, Offset( mTile, GuiChunkedBitmapCtrl ), "This is no longer in use", AbstractClassRep::FIELD_HideInInspectors); endGroup("GuiChunkedBitmapCtrl"); Parent::initPersistFields(); } @@ -86,7 +87,8 @@ DefineEngineMethod( GuiChunkedBitmapCtrl, setBitmap, void, (const char* filename GuiChunkedBitmapCtrl::GuiChunkedBitmapCtrl() { - mBitmapName = StringTable->EmptyString(); + INIT_IMAGEASSET(Bitmap); + mUseVariable = false; mTile = false; } @@ -97,7 +99,8 @@ void GuiChunkedBitmapCtrl::setBitmap(const char *name) if(awake) onSleep(); - mBitmapName = StringTable->insert(name); + _setBitmap(StringTable->insert(name)); + if(awake) onWake(); setUpdate(); @@ -108,14 +111,14 @@ bool GuiChunkedBitmapCtrl::onWake() if(!Parent::onWake()) return false; - if( !mTexHandle + if( !mBitmap && ( ( mBitmapName && mBitmapName[ 0 ] ) || ( mUseVariable && mConsoleVariable && mConsoleVariable[ 0 ] ) ) ) { if ( mUseVariable ) - mTexHandle.set( Con::getVariable( mConsoleVariable ), &GFXDefaultGUIProfile, avar("%s() - mTexHandle (line %d)", __FUNCTION__, __LINE__) ); + mBitmap.set( Con::getVariable( mConsoleVariable ), &GFXDefaultGUIProfile, avar("%s() - mTexHandle (line %d)", __FUNCTION__, __LINE__) ); else - mTexHandle.set( mBitmapName, &GFXDefaultGUIProfile, avar("%s() - mTexHandle (line %d)", __FUNCTION__, __LINE__) ); + mBitmap.set( mBitmapName, &GFXDefaultGUIProfile, avar("%s() - mTexHandle (line %d)", __FUNCTION__, __LINE__) ); } return true; @@ -123,7 +126,6 @@ bool GuiChunkedBitmapCtrl::onWake() void GuiChunkedBitmapCtrl::onSleep() { - mTexHandle = NULL; Parent::onSleep(); } @@ -164,10 +166,10 @@ void GuiChunkedBitmapCtrl::renderRegion(const Point2I &offset, const Point2I &ex void GuiChunkedBitmapCtrl::onRender(Point2I offset, const RectI &updateRect) { - if( mTexHandle ) + if( mBitmap ) { RectI boundsRect( offset, getExtent()); - GFX->getDrawUtil()->drawBitmapStretch( mTexHandle, boundsRect, GFXBitmapFlip_None, GFXTextureFilterLinear ); + GFX->getDrawUtil()->drawBitmapStretch(mBitmap, boundsRect, GFXBitmapFlip_None, GFXTextureFilterLinear ); } renderChildControls(offset, updateRect); diff --git a/Engine/source/gui/game/guiChunkedBitmapCtrl.h b/Engine/source/gui/game/guiChunkedBitmapCtrl.h index 41bc26d19..037eb91f6 100644 --- a/Engine/source/gui/game/guiChunkedBitmapCtrl.h +++ b/Engine/source/gui/game/guiChunkedBitmapCtrl.h @@ -7,6 +7,8 @@ #include "gfx/gfxDrawUtil.h" #include "console/engineAPI.h" +#include "T3D/assets/ImageAsset.h" + class GuiChunkedBitmapCtrl : public GuiControl { private: @@ -14,8 +16,10 @@ private: void renderRegion(const Point2I &offset, const Point2I &extent); protected: - StringTableEntry mBitmapName; - GFXTexHandle mTexHandle; + + DECLARE_IMAGEASSET(GuiChunkedBitmapCtrl, Bitmap, onImageChanged, GFXDefaultGUIProfile); + DECLARE_IMAGEASSET_SETGET(GuiChunkedBitmapCtrl, Bitmap); + bool mUseVariable; bool mTile; @@ -34,4 +38,6 @@ public: void setBitmap(const char *name); void onRender(Point2I offset, const RectI &updateRect); -}; \ No newline at end of file + + void onImageChanged() {} +}; diff --git a/Engine/source/gui/game/guiIdleCamFadeBitmapCtrl.cpp b/Engine/source/gui/game/guiIdleCamFadeBitmapCtrl.cpp index e53d70486..27c53721f 100644 --- a/Engine/source/gui/game/guiIdleCamFadeBitmapCtrl.cpp +++ b/Engine/source/gui/game/guiIdleCamFadeBitmapCtrl.cpp @@ -114,14 +114,14 @@ public: } ColorI color(255,255,255,alpha); - if (mTextureObject) + if (mBitmap) { GFX->getDrawUtil()->setBitmapModulation(color); if(mWrap) { - GFXTextureObject* texture = mTextureObject; + GFXTextureObject* texture = mBitmap; RectI srcRegion; RectI dstRegion; F32 xdone = ((F32)getExtent().x/(F32)texture->mBitmapSize.x)+1; @@ -144,11 +144,11 @@ public: else { RectI rect(offset, getExtent()); - GFX->getDrawUtil()->drawBitmapStretch(mTextureObject, rect); + GFX->getDrawUtil()->drawBitmapStretch(mBitmap, rect); } } - if (mProfile->mBorder || !mTextureObject) + if (mProfile->mBorder || !mBitmap) { RectI rect(offset.x, offset.y, getExtent().x, getExtent().y); ColorI borderCol(mProfile->mBorderColor); diff --git a/Engine/source/gui/game/guiProgressBitmapCtrl.cpp b/Engine/source/gui/game/guiProgressBitmapCtrl.cpp index 1d7d621e7..0d0baa483 100644 --- a/Engine/source/gui/game/guiProgressBitmapCtrl.cpp +++ b/Engine/source/gui/game/guiProgressBitmapCtrl.cpp @@ -119,24 +119,21 @@ ConsoleDocClass( GuiProgressBitmapCtrl, GuiProgressBitmapCtrl::GuiProgressBitmapCtrl() : mProgress( 0.f ), - mBitmapName( StringTable->EmptyString() ), mUseVariable( false ), mTile( false ), mNumberOfBitmaps(0), mDim(0) { + INIT_IMAGEASSET(Bitmap); } //----------------------------------------------------------------------------- void GuiProgressBitmapCtrl::initPersistFields() { - addProtectedField( "bitmap", TypeFilename, Offset( mBitmapName, GuiProgressBitmapCtrl ), - _setBitmap, defaultProtectedGetFn, - "~Path to the bitmap file to use for rendering the progress bar.\n\n" + INITPERSISTFIELD_IMAGEASSET(Bitmap, GuiProgressBitmapCtrl, "Bitmap file to use for rendering the progress bar.\n\n" "If the profile assigned to the control already has a bitmap assigned, this property need not be " - "set in which case the bitmap from the profile is used." - ); + "set in which case the bitmap from the profile is used."); Parent::initPersistFields(); } @@ -149,7 +146,8 @@ void GuiProgressBitmapCtrl::setBitmap( const char* name ) if( awake ) onSleep(); - mBitmapName = StringTable->insert( name ); + _setBitmap(StringTable->insert(name)); + if( awake ) onWake(); @@ -222,14 +220,14 @@ void GuiProgressBitmapCtrl::onRender(Point2I offset, const RectI &updateRect) //drawing stretch bitmap RectI progressRect = ctrlRect; progressRect.extent.x = width; - drawUtil->drawBitmapStretchSR(mProfile->mTextureObject, progressRect, mProfile->mBitmapArrayRects[0]); + drawUtil->drawBitmapStretchSR(mProfile->getBitmapResource(), progressRect, mProfile->mBitmapArrayRects[0]); } } else if(mNumberOfBitmaps >= 3) { //drawing left-end bitmap RectI progressRectLeft(ctrlRect.point.x, ctrlRect.point.y, mDim, mDim); - drawUtil->drawBitmapStretchSR(mProfile->mTextureObject, progressRectLeft, mProfile->mBitmapArrayRects[0]); + drawUtil->drawBitmapStretchSR(mProfile->getBitmapResource(), progressRectLeft, mProfile->mBitmapArrayRects[0]); //draw the progress with image S32 width = (S32)((F32)(getWidth()) * mProgress); @@ -241,11 +239,11 @@ void GuiProgressBitmapCtrl::onRender(Point2I offset, const RectI &updateRect) progressRect.extent.x = (width - mDim - mDim); if (progressRect.extent.x < 0) progressRect.extent.x = 0; - drawUtil->drawBitmapStretchSR(mProfile->mTextureObject, progressRect, mProfile->mBitmapArrayRects[1]); + drawUtil->drawBitmapStretchSR(mProfile->getBitmapResource(), progressRect, mProfile->mBitmapArrayRects[1]); //drawing right-end bitmap RectI progressRectRight(progressRect.point.x + progressRect.extent.x, ctrlRect.point.y, mDim, mDim ); - drawUtil->drawBitmapStretchSR(mProfile->mTextureObject, progressRectRight, mProfile->mBitmapArrayRects[2]); + drawUtil->drawBitmapStretchSR(mProfile->getBitmapResource(), progressRectRight, mProfile->mBitmapArrayRects[2]); } } else diff --git a/Engine/source/gui/game/guiProgressBitmapCtrl.h b/Engine/source/gui/game/guiProgressBitmapCtrl.h index 6b538878a..e391f7b72 100644 --- a/Engine/source/gui/game/guiProgressBitmapCtrl.h +++ b/Engine/source/gui/game/guiProgressBitmapCtrl.h @@ -31,6 +31,7 @@ #include "gui/controls/guiTextCtrl.h" #endif +#include "T3D/assets/ImageAsset.h" //FIXME: WTH is this derived from GuiTextCtrl?? should be a GuiControl @@ -45,7 +46,10 @@ class GuiProgressBitmapCtrl : public GuiTextCtrl protected: F32 mProgress; - StringTableEntry mBitmapName; + + DECLARE_IMAGEASSET(GuiProgressBitmapCtrl, Bitmap, onImageChanged, GFXDefaultGUIProfile); + DECLARE_IMAGEASSET_SETGET(GuiProgressBitmapCtrl, Bitmap); + bool mUseVariable; bool mTile; S32 mNumberOfBitmaps; @@ -57,6 +61,8 @@ class GuiProgressBitmapCtrl : public GuiTextCtrl return false; } + void onImageChanged() {} + public: GuiProgressBitmapCtrl(); diff --git a/Engine/source/gui/theora/guiTheoraCtrl.cpp b/Engine/source/gui/theora/guiTheoraCtrl.cpp index f6d5fd213..31ee289a3 100644 --- a/Engine/source/gui/theora/guiTheoraCtrl.cpp +++ b/Engine/source/gui/theora/guiTheoraCtrl.cpp @@ -129,7 +129,7 @@ void GuiTheoraCtrl::setFile( const String& filename ) void GuiTheoraCtrl::play() { - if( mFilename.isEmpty() ) + if( mFilename == StringTable->EmptyString() ) return; if( !mTheoraTexture.isPlaying() ) diff --git a/Engine/source/gui/theora/guiTheoraCtrl.h b/Engine/source/gui/theora/guiTheoraCtrl.h index 635c515da..9946e442f 100644 --- a/Engine/source/gui/theora/guiTheoraCtrl.h +++ b/Engine/source/gui/theora/guiTheoraCtrl.h @@ -46,7 +46,7 @@ class GuiTheoraCtrl : public GuiControl protected: /// The Theora file we should play. - String mFilename; + StringTableEntry mFilename; /// Theora video player backend. TheoraTexture mTheoraTexture; diff --git a/Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.cpp b/Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.cpp index 84677d2d6..0e494602a 100644 --- a/Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.cpp +++ b/Engine/source/gui/worldEditor/guiConvexShapeEditorCtrl.cpp @@ -84,7 +84,7 @@ GuiConvexEditorCtrl::GuiConvexEditorCtrl() mCtrlDown( false ), mGridSnap(false) { - mMaterialName = StringTable->insert("Grid512_OrangeLines_Mat"); + mMaterialName = StringTable->insert("Prototyping:WallOrange"); } GuiConvexEditorCtrl::~GuiConvexEditorCtrl() @@ -115,7 +115,7 @@ void GuiConvexEditorCtrl::onRemove() void GuiConvexEditorCtrl::initPersistFields() { addField( "isDirty", TypeBool, Offset( mIsDirty, GuiConvexEditorCtrl ) ); - addField( "materialName", TypeString, Offset(mMaterialName, GuiConvexEditorCtrl) ); + addField( "materialName", TypeMaterialAssetId, Offset(mMaterialName, GuiConvexEditorCtrl) ); Parent::initPersistFields(); } @@ -249,13 +249,13 @@ void GuiConvexEditorCtrl::setVisible( bool val ) //Set the texture to a representatory one so we know what's what if (isTrigger) - proxyShape->mMaterialName = "TriggerProxyMaterial"; + proxyShape->mMaterialName = "ToolsModule:TriggerProxyMaterial"; else if (isPortal) - proxyShape->mMaterialName = "PortalProxyMaterial"; + proxyShape->mMaterialName = "ToolsModule:PortalProxyMaterial"; else if (isZone) - proxyShape->mMaterialName = "ZoneProxyMaterial"; + proxyShape->mMaterialName = "ToolsModule:ZoneProxyMaterial"; else if (isOccluder) - proxyShape->mMaterialName = "OccluderProxyMaterial"; + proxyShape->mMaterialName = "ToolsModule:OccluderProxyMaterial"; proxyShape->_updateMaterial(); @@ -529,7 +529,7 @@ void GuiConvexEditorCtrl::on3DMouseDragged(const Gui3DMouseEvent & event) setupShape( newShape ); - newShape->setField("material", mConvexSEL->getMaterialName()); + newShape->_setMaterial(mConvexSEL->getMaterial()); submitUndo( CreateShape, newShape ); @@ -1459,8 +1459,8 @@ bool GuiConvexEditorCtrl::isShapeValid( ConvexShape *shape ) void GuiConvexEditorCtrl::setupShape( ConvexShape *shape ) { - shape->setField( "material", mMaterialName ); shape->registerObject(); + shape->_setMaterial(mMaterialName); updateShape( shape ); Scene* scene = Scene::getRootScene(); @@ -1910,11 +1910,11 @@ const char* GuiConvexEditorCtrl::getSelectedFaceMaterial() if (mConvexSEL->mSurfaceUVs[mFaceSEL].matID == 0) { - return mConvexSEL->mMaterialName; + return mConvexSEL->getMaterial(); } else { - return mConvexSEL->mSurfaceTextures[mConvexSEL->mSurfaceUVs[mFaceSEL].matID - 1].materialName; + return mConvexSEL->mSurfaceTextures[mConvexSEL->mSurfaceUVs[mFaceSEL].matID - 1].getMaterial(); } } @@ -1978,7 +1978,7 @@ void GuiConvexEditorCtrl::setSelectedFaceMaterial(const char* materialName) { for (U32 i = 0; i < mConvexSEL->mSurfaceTextures.size(); i++) { - if (!String::compare(mConvexSEL->mSurfaceTextures[i].materialName, materialName)) + if (!String::compare(mConvexSEL->mSurfaceTextures[i].getMaterial(), materialName)) { //found a match mConvexSEL->mSurfaceUVs[mFaceSEL].matID = i + 1; @@ -1990,7 +1990,7 @@ void GuiConvexEditorCtrl::setSelectedFaceMaterial(const char* materialName) { //add a new one ConvexShape::surfaceMaterial newMat; - newMat.materialName = materialName; + newMat._setMaterial(materialName); mConvexSEL->mSurfaceTextures.push_back(newMat); @@ -2284,9 +2284,10 @@ ConvexEditorTool::EventResult ConvexEditorCreateTool::on3DMouseDown( const Gui3D mNewConvex->setTransform( objMat ); - mNewConvex->setField( "material", Parent::mEditor->mMaterialName ); - mNewConvex->registerObject(); + + mNewConvex->_setMaterial(Parent::mEditor->mMaterialName); + mPlaneSizes.set( 0.1f, 0.1f, 0.1f ); mNewConvex->resizePlanes( mPlaneSizes ); mEditor->updateShape( mNewConvex ); @@ -2509,7 +2510,7 @@ ConvexShape* ConvexEditorCreateTool::extrudeShapeFromFace( ConvexShape *inShape, } //newShape->setField( "material", Parent::mEditor->mMaterialName ); - newShape->setField("material", inShape->getMaterialName()); + newShape->_setMaterial(inShape->getMaterial()); newShape->registerObject(); mEditor->updateShape( newShape ); diff --git a/Engine/source/gui/worldEditor/guiMissionArea.cpp b/Engine/source/gui/worldEditor/guiMissionArea.cpp index 4e67e4d7c..cd9c82ac9 100644 --- a/Engine/source/gui/worldEditor/guiMissionArea.cpp +++ b/Engine/source/gui/worldEditor/guiMissionArea.cpp @@ -59,8 +59,8 @@ ConsoleDocClass( GuiMissionAreaCtrl, GuiMissionAreaCtrl::GuiMissionAreaCtrl() { - mHandleBitmap = StringTable->EmptyString(); - mHandleTexture = NULL; + INIT_IMAGEASSET(HandleBitmap); + mHandleTextureSize = Point2I::Zero; mHandleTextureHalfSize = Point2F::Zero; @@ -89,8 +89,7 @@ void GuiMissionAreaCtrl::initPersistFields() { addField( "squareBitmap", TypeBool, Offset(mSquareBitmap, GuiMissionAreaCtrl)); - addField( "handleBitmap", TypeFilename, Offset( mHandleBitmap, GuiMissionAreaCtrl ), - "Bitmap file for the mission area handles.\n"); + INITPERSISTFIELD_IMAGEASSET(HandleBitmap, GuiMissionAreaCtrl, "Bitmap for the mission area handles.\n"); addField( "missionBoundsColor", TypeColorI, Offset(mMissionBoundsColor, GuiMissionAreaCtrl)); addField( "cameraColor", TypeColorI, Offset(mCameraColor, GuiMissionAreaCtrl)); @@ -114,15 +113,13 @@ bool GuiMissionAreaCtrl::onAdd() desc.setBlend(true, GFXBlendSrcAlpha, GFXBlendInvSrcAlpha); mBlendStateBlock = GFX->createStateBlock( desc ); - if (*mHandleBitmap) + if (!mHandleBitmap.isNull()) { - mHandleTexture = GFXTexHandle( mHandleBitmap, &GFXTexturePersistentSRGBProfile, avar("%s() - mHandleTexture (line %d)", __FUNCTION__, __LINE__) ); - mHandleTextureSize = Point2I( mHandleTexture->getWidth(), mHandleTexture->getHeight() ); + mHandleTextureSize = Point2I(mHandleBitmap->getWidth(), mHandleBitmap->getHeight() ); mHandleTextureHalfSize = Point2F(mHandleTextureSize.x, mHandleTextureSize.y) * 0.5f; } else { - mHandleTexture = NULL; mHandleTextureSize = Point2I::Zero; mHandleTextureHalfSize = Point2F::Zero; } @@ -159,7 +156,7 @@ bool GuiMissionAreaCtrl::onWake() void GuiMissionAreaCtrl::onSleep() { - mTextureObject = NULL; + mBitmap = NULL; mMissionArea = 0; mTerrainBlock = 0; @@ -420,7 +417,7 @@ void GuiMissionAreaCtrl::setArea(const RectI & area) void GuiMissionAreaCtrl::drawHandle(const Point2F & pos) { Point2F pnt(pos.x-mHandleTextureHalfSize.x, pos.y-mHandleTextureHalfSize.y); - GFX->getDrawUtil()->drawBitmap(mHandleTexture, pnt); + GFX->getDrawUtil()->drawBitmap(mHandleBitmap, pnt); } void GuiMissionAreaCtrl::drawHandles(RectI & box) @@ -604,7 +601,7 @@ void GuiMissionAreaCtrl::onRender(Point2I offset, const RectI & updateRect) GFXDrawUtil *drawer = GFX->getDrawUtil(); drawer->clearBitmapModulation(); - drawer->drawBitmapStretch(mTextureObject, rect, GFXBitmapFlip_Y, GFXTextureFilterLinear, false); + drawer->drawBitmapStretch(mBitmap, rect, GFXBitmapFlip_Y, GFXTextureFilterLinear, false); GFX->setStateBlock(mSolidStateBlock); drawer->clearBitmapModulation(); diff --git a/Engine/source/gui/worldEditor/guiMissionArea.h b/Engine/source/gui/worldEditor/guiMissionArea.h index caa0527cb..885f85107 100644 --- a/Engine/source/gui/worldEditor/guiMissionArea.h +++ b/Engine/source/gui/worldEditor/guiMissionArea.h @@ -63,8 +63,9 @@ protected: GFXStateBlockRef mBlendStateBlock; GFXStateBlockRef mSolidStateBlock; - StringTableEntry mHandleBitmap; - GFXTexHandle mHandleTexture; + DECLARE_IMAGEASSET(GuiMissionAreaCtrl, HandleBitmap, onHandleBitmapChanged, GFXTexturePersistentSRGBProfile); + DECLARE_IMAGEASSET_SETGET(GuiMissionAreaCtrl, HandleBitmap); + Point2I mHandleTextureSize; Point2F mHandleTextureHalfSize; @@ -109,6 +110,8 @@ protected: bool testWithinHandle(const Point2I & testPoint, S32 handleX, S32 handleY); S32 getHitHandles(const Point2I & mousePnt, const RectI & box); + void onHandleBitmapChanged() {} + public: GuiMissionAreaCtrl(); virtual ~GuiMissionAreaCtrl(); diff --git a/Engine/source/gui/worldEditor/worldEditor.cpp b/Engine/source/gui/worldEditor/worldEditor.cpp index 1e4a795ce..00ab26c01 100644 --- a/Engine/source/gui/worldEditor/worldEditor.cpp +++ b/Engine/source/gui/worldEditor/worldEditor.cpp @@ -1807,9 +1807,11 @@ WorldEditor::WorldEditor() mRenderPopupBackground = true; mPopupBackgroundColor.set(100,100,100); mPopupTextColor.set(255,255,0); - mSelectHandle = StringTable->insert("tools/worldEditor/images/SelectHandle"); - mDefaultHandle = StringTable->insert("tools/worldEditor/images/DefaultHandle"); - mLockedHandle = StringTable->insert("tools/worldEditor/images/LockedHandle"); + + mSelectHandleAssetId = StringTable->insert("ToolsModule:SelectHandle"); + mDefaultHandleAssetId = StringTable->insert("ToolsModule:DefaultHandle"); + mLockedHandleAssetId = StringTable->insert("ToolsModule:LockedHandle"); + mObjectTextColor.set(255,255,255); mObjectsUseBoxCenter = true; @@ -1894,9 +1896,9 @@ bool WorldEditor::onAdd() // create the default class entry mDefaultClassEntry.mName = 0; mDefaultClassEntry.mIgnoreCollision = false; - mDefaultClassEntry.mDefaultHandle = GFXTexHandle(mDefaultHandle, &GFXStaticTextureSRGBProfile, avar("%s() - mDefaultClassEntry.mDefaultHandle (line %d)", __FUNCTION__, __LINE__)); - mDefaultClassEntry.mSelectHandle = GFXTexHandle(mSelectHandle, &GFXStaticTextureSRGBProfile, avar("%s() - mDefaultClassEntry.mSelectHandle (line %d)", __FUNCTION__, __LINE__)); - mDefaultClassEntry.mLockedHandle = GFXTexHandle(mLockedHandle, &GFXStaticTextureSRGBProfile, avar("%s() - mDefaultClassEntry.mLockedHandle (line %d)", __FUNCTION__, __LINE__)); + mDefaultClassEntry.mDefaultHandle = mDefaultHandle; + mDefaultClassEntry.mSelectHandle = mSelectHandle; + mDefaultClassEntry.mLockedHandle = mLockedHandle; if(!(mDefaultClassEntry.mDefaultHandle && mDefaultClassEntry.mSelectHandle && mDefaultClassEntry.mLockedHandle)) return false; @@ -2826,9 +2828,10 @@ void WorldEditor::initPersistFields() addField( "renderObjText", TypeBool, Offset(mRenderObjText, WorldEditor) ); addField( "renderObjHandle", TypeBool, Offset(mRenderObjHandle, WorldEditor) ); addField( "renderSelectionBox", TypeBool, Offset(mRenderSelectionBox, WorldEditor) ); - addField( "selectHandle", TypeFilename, Offset(mSelectHandle, WorldEditor) ); - addField( "defaultHandle", TypeFilename, Offset(mDefaultHandle, WorldEditor) ); - addField( "lockedHandle", TypeFilename, Offset(mLockedHandle, WorldEditor) ); + + INITPERSISTFIELD_IMAGEASSET(SelectHandle, WorldEditor, ""); + INITPERSISTFIELD_IMAGEASSET(DefaultHandle, WorldEditor, ""); + INITPERSISTFIELD_IMAGEASSET(LockedHandle, WorldEditor, ""); endGroup( "Rendering" ); diff --git a/Engine/source/gui/worldEditor/worldEditor.h b/Engine/source/gui/worldEditor/worldEditor.h index 01c7d396c..e0ecb342f 100644 --- a/Engine/source/gui/worldEditor/worldEditor.h +++ b/Engine/source/gui/worldEditor/worldEditor.h @@ -327,9 +327,14 @@ class WorldEditor : public EditTSCtrl bool mRenderPopupBackground; ColorI mPopupBackgroundColor; ColorI mPopupTextColor; - StringTableEntry mSelectHandle; - StringTableEntry mDefaultHandle; - StringTableEntry mLockedHandle; + + DECLARE_IMAGEASSET(WorldEditor, SelectHandle, onSelectHandleChanged, GFXStaticTextureSRGBProfile); + DECLARE_IMAGEASSET_SETGET(WorldEditor, SelectHandle); + DECLARE_IMAGEASSET(WorldEditor, DefaultHandle, onDefaultHandleChanged, GFXStaticTextureSRGBProfile); + DECLARE_IMAGEASSET_SETGET(WorldEditor, DefaultHandle); + DECLARE_IMAGEASSET(WorldEditor, LockedHandle, onLockedHandleChanged, GFXStaticTextureSRGBProfile); + DECLARE_IMAGEASSET_SETGET(WorldEditor, LockedHandle); + ColorI mObjectTextColor; bool mObjectsUseBoxCenter; ColorI mObjSelectColor; @@ -420,6 +425,10 @@ class WorldEditor : public EditTSCtrl void setEditorTool(EditorTool*); EditorTool* getActiveEditorTool() { return mActiveEditorTool; } + + void onSelectHandleChanged() {} + void onDefaultHandleChanged() {} + void onLockedHandleChanged() {} }; typedef WorldEditor::DropType WorldEditorDropType; diff --git a/Engine/source/lighting/common/projectedShadow.cpp b/Engine/source/lighting/common/projectedShadow.cpp index 2f4657018..2860d71fb 100644 --- a/Engine/source/lighting/common/projectedShadow.cpp +++ b/Engine/source/lighting/common/projectedShadow.cpp @@ -100,7 +100,7 @@ ProjectedShadow::ProjectedShadow( SceneObject *object ) Sim::findObject( "BL_ProjectedShadowMaterial", customMat ); if ( customMat ) { - mDecalData->material = customMat; + mDecalData->mMaterial = customMat; mDecalData->matInst = customMat->createMatInstance(); } else diff --git a/Engine/source/lighting/shadowMap/lightShadowMap.cpp b/Engine/source/lighting/shadowMap/lightShadowMap.cpp index 798d03f2e..3fde1ccbf 100644 --- a/Engine/source/lighting/shadowMap/lightShadowMap.cpp +++ b/Engine/source/lighting/shadowMap/lightShadowMap.cpp @@ -542,6 +542,7 @@ ShadowMapParams::ShadowMapParams( LightInfo *light ) fadeStartDist = 75.0f; lastSplitTerrainOnly = false; mQuery = GFX->createOcclusionQuery(); + cookie = StringTable->EmptyString();; _validate(); } @@ -647,15 +648,15 @@ LightShadowMap* ShadowMapParams::getOrCreateShadowMap() GFXTextureObject* ShadowMapParams::getCookieTex() { - if ( cookie.isNotEmpty() && + if ( hasCookieTex() && ( mCookieTex.isNull() || - cookie != mCookieTex->getPath() ) ) + cookie != StringTable->insert(mCookieTex->getPath().c_str()) ) ) { mCookieTex.set( cookie, &GFXStaticTextureSRGBProfile, "ShadowMapParams::getCookieTex()" ); } - else if ( cookie.isEmpty() ) + else if (!hasCookieTex()) mCookieTex = NULL; return mCookieTex.getPointer(); @@ -663,13 +664,13 @@ GFXTextureObject* ShadowMapParams::getCookieTex() GFXCubemap* ShadowMapParams::getCookieCubeTex() { - if ( cookie.isNotEmpty() && + if ( hasCookieTex() && ( mCookieCubeTex.isNull() || - cookie != mCookieCubeTex->getPath() ) ) + cookie != StringTable->insert(mCookieTex->getPath().c_str())) ) { mCookieCubeTex.set( cookie ); } - else if ( cookie.isEmpty() ) + else if (!hasCookieTex()) mCookieCubeTex = NULL; return mCookieCubeTex.getPointer(); @@ -693,7 +694,7 @@ void ShadowMapParams::packUpdate( BitStream *stream ) const stream->write( texSize ); - stream->write( cookie ); + stream->writeString( cookie ); stream->write( numSplits ); stream->write( logWeight ); @@ -723,7 +724,7 @@ void ShadowMapParams::unpackUpdate( BitStream *stream ) stream->read( &texSize ); - stream->read( &cookie ); + cookie = stream->readSTString(); stream->read( &numSplits ); stream->read( &logWeight ); diff --git a/Engine/source/lighting/shadowMap/lightShadowMap.h b/Engine/source/lighting/shadowMap/lightShadowMap.h index 1e2d3e267..57870ac62 100644 --- a/Engine/source/lighting/shadowMap/lightShadowMap.h +++ b/Engine/source/lighting/shadowMap/lightShadowMap.h @@ -288,7 +288,7 @@ public: LightShadowMap* getOrCreateShadowMap(); - bool hasCookieTex() const { return cookie.isNotEmpty(); } + bool hasCookieTex() const { return cookie != StringTable->EmptyString(); } GFXOcclusionQuery* getOcclusionQuery() const { return mQuery; } @@ -325,7 +325,7 @@ public: U32 texSize; /// - FileName cookie; + StringTableEntry cookie; /// @} diff --git a/Engine/source/materials/materialDefinition.cpp b/Engine/source/materials/materialDefinition.cpp index 14093c17d..987a60f36 100644 --- a/Engine/source/materials/materialDefinition.cpp +++ b/Engine/source/materials/materialDefinition.cpp @@ -37,71 +37,78 @@ #include "core/util/safeDelete.h" #include "T3D/accumulationVolume.h" #include "gui/controls/guiTreeViewCtrl.h" +#include -IMPLEMENT_CONOBJECT( Material ); +IMPLEMENT_CONOBJECT(Material); -ConsoleDocClass( Material, - "@brief A material in Torque 3D is a data structure that describes a surface.\n\n" +ConsoleDocClass(Material, + "@brief A material in Torque 3D is a data structure that describes a surface.\n\n" - "It contains many different types of information for rendering properties. " - "Torque 3D generates shaders from Material definitions. The shaders are compiled " - "at runtime and output into the example/shaders directory. Any errors or warnings " - "generated from compiling the procedurally generated shaders are output to the console " - "as well as the output window in the Visual C IDE.\n\n" + "It contains many different types of information for rendering properties. " + "Torque 3D generates shaders from Material definitions. The shaders are compiled " + "at runtime and output into the example/shaders directory. Any errors or warnings " + "generated from compiling the procedurally generated shaders are output to the console " + "as well as the output window in the Visual C IDE.\n\n" - "@tsexample\n" - "singleton Material(DECAL_scorch)\n" - "{\n" - " baseTex[0] = \"./scorch_decal.png\";\n" - " vertColor[ 0 ] = true;\n\n" - " translucent = true;\n" - " translucentBlendOp = None;\n" - " translucentZWrite = true;\n" - " alphaTest = true;\n" - " alphaRef = 84;\n" - "};\n" - "@endtsexample\n\n" + "@tsexample\n" + "singleton Material(DECAL_scorch)\n" + "{\n" + " baseTex[0] = \"./scorch_decal.png\";\n" + " vertColor[ 0 ] = true;\n\n" + " translucent = true;\n" + " translucentBlendOp = None;\n" + " translucentZWrite = true;\n" + " alphaTest = true;\n" + " alphaRef = 84;\n" + "};\n" + "@endtsexample\n\n" - "@see Rendering\n" - "@see ShaderData\n" + "@see Rendering\n" + "@see ShaderData\n" - "@ingroup GFX\n"); + "@ingroup GFX\n"); -ImplementBitfieldType( MaterialAnimType, +ImplementBitfieldType(MaterialAnimType, "The type of animation effect to apply to this material.\n" "@ingroup GFX\n\n") - { Material::Scroll, "Scroll", "Scroll the material along the X/Y axis.\n" }, - { Material::Rotate, "Rotate" , "Rotate the material around a point.\n"}, - { Material::Wave, "Wave" , "Warps the material with an animation using Sin, Triangle or Square mathematics.\n"}, - { Material::Scale, "Scale", "Scales the material larger and smaller with a pulsing effect.\n" }, - { Material::Sequence, "Sequence", "Enables the material to have multiple frames of animation in its imagemap.\n" } +{ + Material::Scroll, "Scroll", "Scroll the material along the X/Y axis.\n" +}, +{ Material::Rotate, "Rotate" , "Rotate the material around a point.\n" }, +{ Material::Wave, "Wave" , "Warps the material with an animation using Sin, Triangle or Square mathematics.\n" }, +{ Material::Scale, "Scale", "Scales the material larger and smaller with a pulsing effect.\n" }, +{ Material::Sequence, "Sequence", "Enables the material to have multiple frames of animation in its imagemap.\n" } EndImplementBitfieldType; -ImplementEnumType( MaterialBlendOp, +ImplementEnumType(MaterialBlendOp, "The type of graphical blending operation to apply to this material\n" "@ingroup GFX\n\n") - { Material::None, "None", "Disable blending for this material." }, - { Material::Mul, "Mul", "Multiplicative blending." }, - { Material::PreMul, "PreMul", "Premultiplied alpha." }, - { Material::Add, "Add", "Adds the color of the material to the frame buffer with full alpha for each pixel." }, - { Material::AddAlpha, "AddAlpha", "The color is modulated by the alpha channel before being added to the frame buffer." }, - { Material::Sub, "Sub", "Subtractive Blending. Reverses the color model, causing dark colors to have a stronger visual effect." }, - { Material::LerpAlpha, "LerpAlpha", "Linearly interpolates between Material color and frame buffer color based on alpha." } +{ + Material::None, "None", "Disable blending for this material." +}, +{ Material::Mul, "Mul", "Multiplicative blending." }, +{ Material::PreMul, "PreMul", "Premultiplied alpha." }, +{ Material::Add, "Add", "Adds the color of the material to the frame buffer with full alpha for each pixel." }, +{ Material::AddAlpha, "AddAlpha", "The color is modulated by the alpha channel before being added to the frame buffer." }, +{ Material::Sub, "Sub", "Subtractive Blending. Reverses the color model, causing dark colors to have a stronger visual effect." }, +{ Material::LerpAlpha, "LerpAlpha", "Linearly interpolates between Material color and frame buffer color based on alpha." } EndImplementEnumType; -ImplementEnumType( MaterialWaveType, - "When using the Wave material animation, one of these Wave Types will be used to determine the type of wave to display.\n" +ImplementEnumType(MaterialWaveType, + "When using the Wave material animation, one of these Wave Types will be used to determine the type of wave to display.\n" "@ingroup GFX\n") - { Material::Sin, "Sin", "Warps the material along a curved Sin Wave." }, - { Material::Triangle, "Triangle", "Warps the material along a sharp Triangle Wave." }, - { Material::Square, "Square", "Warps the material along a wave which transitions between two oppposite states. As a Square Wave, the transition is quick and sudden." }, -EndImplementEnumType; +{ + Material::Sin, "Sin", "Warps the material along a curved Sin Wave." +}, +{ Material::Triangle, "Triangle", "Warps the material along a sharp Triangle Wave." }, +{ Material::Square, "Square", "Warps the material along a wave which transitions between two oppposite states. As a Square Wave, the transition is quick and sudden." }, + EndImplementEnumType; bool Material::sAllowTextureTargetAssignment = false; -GFXCubemap * Material::GetNormalizeCube() +GFXCubemap* Material::GetNormalizeCube() { - if(smNormalizeCube) + if (smNormalizeCube) return smNormalizeCube; smNormalizeCube = GFX->createCubemap(); smNormalizeCube->initNormalize(64); @@ -113,66 +120,66 @@ GFXCubemapHandle Material::smNormalizeCube; Material::Material() { - for( U32 i=0; i(), Offset( mAccuEnabled, Material ), - &_setAccuEnabled, &defaultProtectedGetFn, MAX_STAGES, "Accumulation texture." ); + addField("glowMul", TypeF32, Offset(mGlowMul, Material), MAX_STAGES, + "glow mask multiplier"); - addField("accuScale", TypeF32, Offset(mAccuScale, Material), MAX_STAGES, - "The scale that is applied to the accu map texture. You can use this to fit the texture to smaller or larger objects."); - - addField("accuDirection", TypeF32, Offset(mAccuDirection, Material), MAX_STAGES, - "The direction of the accumulation. Chose whether you want the accu map to go from top to bottom (ie. snow) or upwards (ie. mold)."); - - addField("accuStrength", TypeF32, Offset(mAccuStrength, Material), MAX_STAGES, - "The strength of the accu map. This changes the transparency of the accu map texture. Make it subtle or add more contrast."); - - addField("accuCoverage", TypeF32, Offset(mAccuCoverage, Material), MAX_STAGES, - "The coverage ratio of the accu map texture. Use this to make the entire shape pick up some of the accu map texture or none at all."); - - addField("accuSpecular", TypeF32, Offset(mAccuSpecular, Material), MAX_STAGES, - "Changes specularity to this value where the accumulated material is present."); + addProtectedField("accuEnabled", TYPEID< bool >(), Offset(mAccuEnabled, Material), + &_setAccuEnabled, &defaultProtectedGetFn, MAX_STAGES, "Accumulation texture."); - addField("isSRGb", TypeBool, Offset(mIsSRGb, Material), MAX_STAGES, - "Substance Designer Workaround."); + addField("accuScale", TypeF32, Offset(mAccuScale, Material), MAX_STAGES, + "The scale that is applied to the accu map texture. You can use this to fit the texture to smaller or larger objects."); - addField("invertRoughness", TypeBool, Offset(mInvertRoughness, Material), MAX_STAGES, - "Treat Roughness as Roughness"); + addField("accuDirection", TypeF32, Offset(mAccuDirection, Material), MAX_STAGES, + "The direction of the accumulation. Chose whether you want the accu map to go from top to bottom (ie. snow) or upwards (ie. mold)."); - addField("roughnessChan", TypeF32, Offset(mRoughnessChan, Material), MAX_STAGES, - "The input channel roughness maps use."); + addField("accuStrength", TypeF32, Offset(mAccuStrength, Material), MAX_STAGES, + "The strength of the accu map. This changes the transparency of the accu map texture. Make it subtle or add more contrast."); - addField("AOChan", TypeF32, Offset(mAOChan, Material), MAX_STAGES, - "The input channel AO maps use."); - addField("metalChan", TypeF32, Offset(mMetalChan, Material), MAX_STAGES, - "The input channel metalness maps use."); + addField("accuCoverage", TypeF32, Offset(mAccuCoverage, Material), MAX_STAGES, + "The coverage ratio of the accu map texture. Use this to make the entire shape pick up some of the accu map texture or none at all."); - addField("glow", TypeBool, Offset(mGlow, Material), MAX_STAGES, - "Enables rendering as glowing."); + addField("accuSpecular", TypeF32, Offset(mAccuSpecular, Material), MAX_STAGES, + "Changes specularity to this value where the accumulated material is present."); - addField( "parallaxScale", TypeF32, Offset(mParallaxScale, Material), MAX_STAGES, - "Enables parallax mapping and defines the scale factor for the parallax effect. Typically " - "this value is less than 0.4 else the effect breaks down." ); - - addField( "useAnisotropic", TypeBool, Offset(mUseAnisotropic, Material), MAX_STAGES, - "Use anisotropic filtering for the textures of this stage." ); - - addField("vertLit", TypeBool, Offset(mVertLit, Material), MAX_STAGES, - "If true the vertex color is used for lighting." ); + addField("isSRGb", TypeBool, Offset(mIsSRGb, Material), MAX_STAGES, + "Substance Designer Workaround."); - addField( "vertColor", TypeBool, Offset( mVertColor, Material ), MAX_STAGES, - "If enabled, vertex colors are premultiplied with diffuse colors." ); + addField("invertRoughness", TypeBool, Offset(mInvertRoughness, Material), MAX_STAGES, + "Treat Roughness as Roughness"); - addField("minnaertConstant", TypeF32, Offset(mMinnaertConstant, Material), MAX_STAGES, - "The Minnaert shading constant value. Must be greater than 0 to enable the effect." ); + addField("roughnessChan", TypeF32, Offset(mRoughnessChan, Material), MAX_STAGES, + "The input channel roughness maps use."); - addField("subSurface", TypeBool, Offset(mSubSurface, Material), MAX_STAGES, - "Enables the subsurface scattering approximation." ); + addField("AOChan", TypeF32, Offset(mAOChan, Material), MAX_STAGES, + "The input channel AO maps use."); + addField("metalChan", TypeF32, Offset(mMetalChan, Material), MAX_STAGES, + "The input channel metalness maps use."); - addField("subSurfaceColor", TypeColorF, Offset(mSubSurfaceColor, Material), MAX_STAGES, - "The color used for the subsurface scattering approximation." ); + addField("glow", TypeBool, Offset(mGlow, Material), MAX_STAGES, + "Enables rendering as glowing."); - addField("subSurfaceRolloff", TypeF32, Offset(mSubSurfaceRolloff, Material), MAX_STAGES, - "The 0 to 1 rolloff factor used in the subsurface scattering approximation." ); + addField("parallaxScale", TypeF32, Offset(mParallaxScale, Material), MAX_STAGES, + "Enables parallax mapping and defines the scale factor for the parallax effect. Typically " + "this value is less than 0.4 else the effect breaks down."); - addField("emissive", TypeBool, Offset(mEmissive, Material), MAX_STAGES, - "Enables emissive lighting for the material." ); + addField("useAnisotropic", TypeBool, Offset(mUseAnisotropic, Material), MAX_STAGES, + "Use anisotropic filtering for the textures of this stage."); - addField("doubleSided", TypeBool, Offset(mDoubleSided, Material), - "Disables backface culling casing surfaces to be double sided. " - "Note that the lighting on the backside will be a mirror of the front " - "side of the surface." ); + addField("vertLit", TypeBool, Offset(mVertLit, Material), MAX_STAGES, + "If true the vertex color is used for lighting."); - addField("animFlags", TYPEID< AnimType >(), Offset(mAnimFlags, Material), MAX_STAGES, - "The types of animation to play on this material." ); + addField("vertColor", TypeBool, Offset(mVertColor, Material), MAX_STAGES, + "If enabled, vertex colors are premultiplied with diffuse colors."); - addField("scrollDir", TypePoint2F, Offset(mScrollDir, Material), MAX_STAGES, - "The scroll direction in UV space when scroll animation is enabled." ); + addField("minnaertConstant", TypeF32, Offset(mMinnaertConstant, Material), MAX_STAGES, + "The Minnaert shading constant value. Must be greater than 0 to enable the effect."); - addField("scrollSpeed", TypeF32, Offset(mScrollSpeed, Material), MAX_STAGES, - "The speed to scroll the texture in UVs per second when scroll animation is enabled." ); + addField("subSurface", TypeBool, Offset(mSubSurface, Material), MAX_STAGES, + "Enables the subsurface scattering approximation."); - addField("rotSpeed", TypeF32, Offset(mRotSpeed, Material), MAX_STAGES, - "The speed to rotate the texture in degrees per second when rotation animation is enabled." ); + addField("subSurfaceColor", TypeColorF, Offset(mSubSurfaceColor, Material), MAX_STAGES, + "The color used for the subsurface scattering approximation."); - addField("rotPivotOffset", TypePoint2F, Offset(mRotPivotOffset, Material), MAX_STAGES, - "The piviot position in UV coordinates to center the rotation animation." ); + addField("subSurfaceRolloff", TypeF32, Offset(mSubSurfaceRolloff, Material), MAX_STAGES, + "The 0 to 1 rolloff factor used in the subsurface scattering approximation."); - addField("waveType", TYPEID< WaveType >(), Offset(mWaveType, Material), MAX_STAGES, - "The type of wave animation to perform when wave animation is enabled." ); + addField("emissive", TypeBool, Offset(mEmissive, Material), MAX_STAGES, + "Enables emissive lighting for the material."); - addField("waveFreq", TypeF32, Offset(mWaveFreq, Material), MAX_STAGES, - "The wave frequency when wave animation is enabled." ); + addField("doubleSided", TypeBool, Offset(mDoubleSided, Material), + "Disables backface culling casing surfaces to be double sided. " + "Note that the lighting on the backside will be a mirror of the front " + "side of the surface."); - addField("waveAmp", TypeF32, Offset(mWaveAmp, Material), MAX_STAGES, - "The wave amplitude when wave animation is enabled." ); + addField("animFlags", TYPEID< AnimType >(), Offset(mAnimFlags, Material), MAX_STAGES, + "The types of animation to play on this material."); - addField("sequenceFramePerSec", TypeF32, Offset(mSeqFramePerSec, Material), MAX_STAGES, - "The number of frames per second for frame based sequence animations if greater than zero." ); + addField("scrollDir", TypePoint2F, Offset(mScrollDir, Material), MAX_STAGES, + "The scroll direction in UV space when scroll animation is enabled."); - addField("sequenceSegmentSize", TypeF32, Offset(mSeqSegSize, Material), MAX_STAGES, - "The size of each frame in UV units for sequence animations." ); + addField("scrollSpeed", TypeF32, Offset(mScrollSpeed, Material), MAX_STAGES, + "The speed to scroll the texture in UVs per second when scroll animation is enabled."); - // Texture atlasing - addField("cellIndex", TypePoint2I, Offset(mCellIndex, Material), MAX_STAGES, - "@internal" ); - addField("cellLayout", TypePoint2I, Offset(mCellLayout, Material), MAX_STAGES, - "@internal"); - addField("cellSize", TypeS32, Offset(mCellSize, Material), MAX_STAGES, - "@internal"); - addField("bumpAtlas", TypeBool, Offset(mNormalMapAtlas, Material), MAX_STAGES, - "@internal"); + addField("rotSpeed", TypeF32, Offset(mRotSpeed, Material), MAX_STAGES, + "The speed to rotate the texture in degrees per second when rotation animation is enabled."); - // For backwards compatibility. - // - // They point at the new 'map' fields, but reads always return - // an empty string and writes only apply if the value is not empty. - // - addProtectedField("baseTex", TypeImageFilename, Offset(mDiffuseMapFilename, Material), - defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES, - "For backwards compatibility.\n@see diffuseMap\n" ); - addProtectedField("detailTex", TypeImageFilename, Offset(mDetailMapFilename, Material), - defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES, - "For backwards compatibility.\n@see detailMap\n"); - addProtectedField("overlayTex", TypeImageFilename, Offset(mOverlayMapFilename, Material), - defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES, - "For backwards compatibility.\n@see overlayMap\n"); - addProtectedField("bumpTex", TypeImageFilename, Offset(mNormalMapFilename, Material), - defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES, - "For backwards compatibility.\n@see normalMap\n"); - addProtectedField("colorMultiply", TypeColorF, Offset(mDiffuse, Material), - defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES, - "For backwards compatibility.\n@see diffuseColor\n"); + addField("rotPivotOffset", TypePoint2F, Offset(mRotPivotOffset, Material), MAX_STAGES, + "The piviot position in UV coordinates to center the rotation animation."); - endArray( "Stages" ); + addField("waveType", TYPEID< WaveType >(), Offset(mWaveType, Material), MAX_STAGES, + "The type of wave animation to perform when wave animation is enabled."); - addField( "castShadows", TypeBool, Offset(mCastShadows, Material), - "If set to false the lighting system will not cast shadows from this material." ); + addField("waveFreq", TypeF32, Offset(mWaveFreq, Material), MAX_STAGES, + "The wave frequency when wave animation is enabled."); - addField("planarReflection", TypeBool, Offset(mPlanarReflection, Material), "@internal" ); + addField("waveAmp", TypeF32, Offset(mWaveAmp, Material), MAX_STAGES, + "The wave amplitude when wave animation is enabled."); + + addField("sequenceFramePerSec", TypeF32, Offset(mSeqFramePerSec, Material), MAX_STAGES, + "The number of frames per second for frame based sequence animations if greater than zero."); + + addField("sequenceSegmentSize", TypeF32, Offset(mSeqSegSize, Material), MAX_STAGES, + "The size of each frame in UV units for sequence animations."); + + // Texture atlasing + addField("cellIndex", TypePoint2I, Offset(mCellIndex, Material), MAX_STAGES, + "@internal"); + addField("cellLayout", TypePoint2I, Offset(mCellLayout, Material), MAX_STAGES, + "@internal"); + addField("cellSize", TypeS32, Offset(mCellSize, Material), MAX_STAGES, + "@internal"); + addField("bumpAtlas", TypeBool, Offset(mNormalMapAtlas, Material), MAX_STAGES, + "@internal"); + + // For backwards compatibility. + // + // They point at the new 'map' fields, but reads always return + // an empty string and writes only apply if the value is not empty. + // + addProtectedField("baseTex", TypeImageFilename, Offset(mDiffuseMapName, Material), + defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES, + "For backwards compatibility.\n@see diffuseMap\n", AbstractClassRep::FIELD_HideInInspectors); + addProtectedField("detailTex", TypeImageFilename, Offset(mDetailMapName, Material), + defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES, + "For backwards compatibility.\n@see detailMap\n", AbstractClassRep::FIELD_HideInInspectors); + addProtectedField("overlayTex", TypeImageFilename, Offset(mOverlayMapName, Material), + defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES, + "For backwards compatibility.\n@see overlayMap\n", AbstractClassRep::FIELD_HideInInspectors); + addProtectedField("bumpTex", TypeImageFilename, Offset(mNormalMapName, Material), + defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES, + "For backwards compatibility.\n@see normalMap\n", AbstractClassRep::FIELD_HideInInspectors); + addProtectedField("colorMultiply", TypeColorF, Offset(mDiffuse, Material), + defaultProtectedSetNotEmptyFn, emptyStringProtectedGetFn, MAX_STAGES, + "For backwards compatibility.\n@see diffuseColor\n", AbstractClassRep::FIELD_HideInInspectors); + + endArray("Stages"); + + addField("castShadows", TypeBool, Offset(mCastShadows, Material), + "If set to false the lighting system will not cast shadows from this material."); + + addField("planarReflection", TypeBool, Offset(mPlanarReflection, Material), "@internal"); addField("translucent", TypeBool, Offset(mTranslucent, Material), - "If true this material is translucent blended." ); + "If true this material is translucent blended."); addField("translucentBlendOp", TYPEID< BlendOp >(), Offset(mTranslucentBlendOp, Material), - "The type of blend operation to use when the material is translucent." ); + "The type of blend operation to use when the material is translucent."); addField("translucentZWrite", TypeBool, Offset(mTranslucentZWrite, Material), - "If enabled and the material is translucent it will write into the depth buffer." ); + "If enabled and the material is translucent it will write into the depth buffer."); addField("alphaTest", TypeBool, Offset(mAlphaTest, Material), - "Enables alpha test when rendering the material.\n@see alphaRef\n" ); + "Enables alpha test when rendering the material.\n@see alphaRef\n"); addField("alphaRef", TypeS32, Offset(mAlphaRef, Material), - "The alpha reference value for alpha testing. Must be between 0 to 255.\n@see alphaTest\n" ); + "The alpha reference value for alpha testing. Must be between 0 to 255.\n@see alphaTest\n"); addField("cubemap", TypeRealString, Offset(mCubemapName, Material), - "The name of a CubemapData for environment mapping." ); + "The name of a CubemapData for environment mapping."); addField("dynamicCubemap", TypeBool, Offset(mDynamicCubemap, Material), - "Enables the material to use the dynamic cubemap from the ShapeBase object its applied to." ); + "Enables the material to use the dynamic cubemap from the ShapeBase object its applied to."); - addGroup( "Behavioral" ); + addGroup("Behavioral"); - addField( "showFootprints", TypeBool, Offset( mShowFootprints, Material ), - "Whether to show player footprint decals on this material.\n\n" - "@see PlayerData::decalData" ); - - addField( "showDust", TypeBool, Offset( mShowDust, Material ), - "Whether to emit dust particles from a shape moving over the material. This is, for example, used by " - "vehicles or players to decide whether to show dust trails." ); - - addField( "effectColor", TypeColorF, Offset( mEffectColor, Material ), NUM_EFFECT_COLOR_STAGES, - "If #showDust is true, this is the set of colors to use for the ParticleData of the dust " - "emitter.\n\n" - "@see ParticleData::colors" ); - - addField( "footstepSoundId", TypeS32, Offset( mFootstepSoundId, Material ), - "What sound to play from the PlayerData sound list when the player walks over the material. -1 (default) to not play any sound.\n" - "\n" - "The IDs are:\n\n" - "- 0: PlayerData::FootSoftSound\n" - "- 1: PlayerData::FootHardSound\n" - "- 2: PlayerData::FootMetalSound\n" - "- 3: PlayerData::FootSnowSound\n" - "- 4: PlayerData::FootShallowSound\n" - "- 5: PlayerData::FootWadingSound\n" - "- 6: PlayerData::FootUnderwaterSound\n" - "- 7: PlayerData::FootBubblesSound\n" - "- 8: PlayerData::movingBubblesSound\n" - "- 9: PlayerData::waterBreathSound\n" - "- 10: PlayerData::impactSoftSound\n" - "- 11: PlayerData::impactHardSound\n" - "- 12: PlayerData::impactMetalSound\n" - "- 13: PlayerData::impactSnowSound\n" - "- 14: PlayerData::impactWaterEasy\n" - "- 15: PlayerData::impactWaterMedium\n" - "- 16: PlayerData::impactWaterHard\n" - "- 17: PlayerData::exitingWater\n" ); - - addField( "customFootstepSound", TypeSFXTrackName, Offset( mFootstepSoundCustom, Material ), - "The sound to play when the player walks over the material. If this is set, it overrides #footstepSoundId. This field is " - "useful for directly assigning custom footstep sounds to materials without having to rely on the PlayerData sound assignment.\n\n" - "@warn Be aware that materials are client-side objects. This means that the SFXTracks assigned to materials must be client-side, too." ); - addField( "impactSoundId", TypeS32, Offset( mImpactSoundId, Material ), - "What sound to play from the PlayerData sound list when the player impacts on the surface with a velocity equal or greater " - "than PlayerData::groundImpactMinSpeed.\n\n" - "For a list of IDs, see #footstepSoundId" ); - addField("ImpactFXIndex", TypeS32, Offset(mImpactFXIndex, Material), - "What FX to play from the PlayerData sound list when the player impacts on the surface with a velocity equal or greater " - "than PlayerData::groundImpactMinSpeed.\n\n" - "For a list of IDs, see #impactFXId"); - addField( "customImpactSound", TypeSFXTrackName, Offset( mImpactSoundCustom, Material ), - "The sound to play when the player impacts on the surface with a velocity equal or greater than PlayerData::groundImpactMinSpeed. " - "If this is set, it overrides #impactSoundId. This field is useful for directly assigning custom impact sounds to materials " - "without having to rely on the PlayerData sound assignment.\n\n" - "@warn Be aware that materials are client-side objects. This means that the SFXTracks assigned to materials must be client-side, too." ); - - //Deactivate these for the moment as they are not used. - - #if 0 - addField( "friction", TypeF32, Offset( mFriction, Material ) ); - addField( "directSoundOcclusion", TypeF32, Offset( mDirectSoundOcclusion, Material ) ); - addField( "reverbSoundOcclusion", TypeF32, Offset( mReverbSoundOcclusion, Material ) ); - #endif + addField("showFootprints", TypeBool, Offset(mShowFootprints, Material), + "Whether to show player footprint decals on this material.\n\n" + "@see PlayerData::decalData"); - endGroup( "Behavioral" ); + addField("showDust", TypeBool, Offset(mShowDust, Material), + "Whether to emit dust particles from a shape moving over the material. This is, for example, used by " + "vehicles or players to decide whether to show dust trails."); + + addField("effectColor", TypeColorF, Offset(mEffectColor, Material), NUM_EFFECT_COLOR_STAGES, + "If #showDust is true, this is the set of colors to use for the ParticleData of the dust " + "emitter.\n\n" + "@see ParticleData::colors"); + + addField("footstepSoundId", TypeS32, Offset(mFootstepSoundId, Material), + "What sound to play from the PlayerData sound list when the player walks over the material. -1 (default) to not play any sound.\n" + "\n" + "The IDs are:\n\n" + "- 0: PlayerData::FootSoftSound\n" + "- 1: PlayerData::FootHardSound\n" + "- 2: PlayerData::FootMetalSound\n" + "- 3: PlayerData::FootSnowSound\n" + "- 4: PlayerData::FootShallowSound\n" + "- 5: PlayerData::FootWadingSound\n" + "- 6: PlayerData::FootUnderwaterSound\n" + "- 7: PlayerData::FootBubblesSound\n" + "- 8: PlayerData::movingBubblesSound\n" + "- 9: PlayerData::waterBreathSound\n" + "- 10: PlayerData::impactSoftSound\n" + "- 11: PlayerData::impactHardSound\n" + "- 12: PlayerData::impactMetalSound\n" + "- 13: PlayerData::impactSnowSound\n" + "- 14: PlayerData::impactWaterEasy\n" + "- 15: PlayerData::impactWaterMedium\n" + "- 16: PlayerData::impactWaterHard\n" + "- 17: PlayerData::exitingWater\n"); + + addField("customFootstepSound", TypeSFXTrackName, Offset(mFootstepSoundCustom, Material), + "The sound to play when the player walks over the material. If this is set, it overrides #footstepSoundId. This field is " + "useful for directly assigning custom footstep sounds to materials without having to rely on the PlayerData sound assignment.\n\n" + "@warn Be aware that materials are client-side objects. This means that the SFXTracks assigned to materials must be client-side, too."); + addField("impactSoundId", TypeS32, Offset(mImpactSoundId, Material), + "What sound to play from the PlayerData sound list when the player impacts on the surface with a velocity equal or greater " + "than PlayerData::groundImpactMinSpeed.\n\n" + "For a list of IDs, see #footstepSoundId"); + addField("ImpactFXIndex", TypeS32, Offset(mImpactFXIndex, Material), + "What FX to play from the PlayerData sound list when the player impacts on the surface with a velocity equal or greater " + "than PlayerData::groundImpactMinSpeed.\n\n" + "For a list of IDs, see #impactFXId"); + addField("customImpactSound", TypeSFXTrackName, Offset(mImpactSoundCustom, Material), + "The sound to play when the player impacts on the surface with a velocity equal or greater than PlayerData::groundImpactMinSpeed. " + "If this is set, it overrides #impactSoundId. This field is useful for directly assigning custom impact sounds to materials " + "without having to rely on the PlayerData sound assignment.\n\n" + "@warn Be aware that materials are client-side objects. This means that the SFXTracks assigned to materials must be client-side, too."); + + //Deactivate these for the moment as they are not used. + +#if 0 + addField("friction", TypeF32, Offset(mFriction, Material)); + addField("directSoundOcclusion", TypeF32, Offset(mDirectSoundOcclusion, Material)); + addField("reverbSoundOcclusion", TypeF32, Offset(mReverbSoundOcclusion, Material)); +#endif + + endGroup("Behavioral"); Parent::initPersistFields(); } -bool Material::writeField( StringTableEntry fieldname, const char *value ) -{ +bool Material::writeField(StringTableEntry fieldname, const char* value) +{ // Never allow the old field names to be written. - if ( fieldname == StringTable->insert("baseTex") || - fieldname == StringTable->insert("detailTex") || - fieldname == StringTable->insert("overlayTex") || - fieldname == StringTable->insert("bumpTex") || - fieldname == StringTable->insert("envTex") || - fieldname == StringTable->insert("colorMultiply") ) + if (fieldname == StringTable->insert("baseTex") || + fieldname == StringTable->insert("detailTex") || + fieldname == StringTable->insert("overlayTex") || + fieldname == StringTable->insert("bumpTex") || + fieldname == StringTable->insert("envTex") || + fieldname == StringTable->insert("colorMultiply")) return false; - return Parent::writeField( fieldname, value ); + return Parent::writeField(fieldname, value); } bool Material::onAdd() @@ -519,40 +526,57 @@ bool Material::onAdd() if (Parent::onAdd() == false) return false; - mCubemapData = dynamic_cast(Sim::findObject( mCubemapName ) ); + mCubemapData = dynamic_cast(Sim::findObject(mCubemapName)); - if( mTranslucentBlendOp >= NumBlendTypes || mTranslucentBlendOp < 0 ) + if (mTranslucentBlendOp >= NumBlendTypes || mTranslucentBlendOp < 0) { - Con::errorf( "Invalid blend op in material: %s", getName() ); + Con::errorf("Invalid blend op in material: %s", getName()); mTranslucentBlendOp = LerpAlpha; } - SimSet *matSet = MATMGR->getMaterialSet(); - if( matSet ) - matSet->addObject( (SimObject*)this ); + SimSet* matSet = MATMGR->getMaterialSet(); + if (matSet) + matSet->addObject((SimObject*)this); // save the current script path for texture lookup later const String scriptFile = Con::getVariable("$Con::File"); // current script file - local materials.tscript - String::SizeType slash = scriptFile.find( '/', scriptFile.length(), String::Right ); - if ( slash != String::NPos ) - mPath = scriptFile.substr( 0, slash + 1 ); + String::SizeType slash = scriptFile.find('/', scriptFile.length(), String::Right); + if (slash != String::NPos) + mPath = scriptFile.substr(0, slash + 1); + + //convert any non-assets we have + /*for (U32 i = 0; i < MAX_STAGES; i++) + { + AUTOCONVERT_IMAGEASSET_ARRAY(DiffuseMap, i); + AUTOCONVERT_IMAGEASSET_ARRAY(OverlayMap, i); + AUTOCONVERT_IMAGEASSET_ARRAY(LightMap, i); + AUTOCONVERT_IMAGEASSET_ARRAY(ToneMap, i); + AUTOCONVERT_IMAGEASSET_ARRAY(DetailMap, i); + AUTOCONVERT_IMAGEASSET_ARRAY(ORMConfigMap, i); + AUTOCONVERT_IMAGEASSET_ARRAY(AOMap, i); + AUTOCONVERT_IMAGEASSET_ARRAY(RoughMap, i); + AUTOCONVERT_IMAGEASSET_ARRAY(MetalMap, i); + AUTOCONVERT_IMAGEASSET_ARRAY(GlowMap, i); + AUTOCONVERT_IMAGEASSET_ARRAY(DetailNormalMap, i); + } //bind any assets we have for (U32 i = 0; i < MAX_STAGES; i++) { - bindMapArraySlot(DiffuseMap, i); - bindMapArraySlot(OverlayMap, i); - bindMapArraySlot(LightMap, i); - bindMapArraySlot(ToneMap, i); - bindMapArraySlot(DetailMap, i); - bindMapArraySlot(ORMConfigMap, i); - bindMapArraySlot(RoughMap, i); - bindMapArraySlot(AOMap, i); - bindMapArraySlot(MetalMap, i); - bindMapArraySlot(GlowMap, i); - bindMapArraySlot(DetailNormalMap, i); - } + LOAD_IMAGEASSET_ARRAY(DiffuseMap, i); + LOAD_IMAGEASSET_ARRAY(OverlayMap, i); + LOAD_IMAGEASSET_ARRAY(LightMap, i); + LOAD_IMAGEASSET_ARRAY(ToneMap, i); + LOAD_IMAGEASSET_ARRAY(DetailMap, i); + LOAD_IMAGEASSET_ARRAY(ORMConfigMap, i); + LOAD_IMAGEASSET_ARRAY(AOMap, i); + LOAD_IMAGEASSET_ARRAY(RoughMap, i); + LOAD_IMAGEASSET_ARRAY(MetalMap, i); + LOAD_IMAGEASSET_ARRAY(GlowMap, i); + LOAD_IMAGEASSET_ARRAY(DetailNormalMap, i); + }*/ + inspectPostApply(); _mapMaterial(); @@ -571,7 +595,7 @@ void Material::inspectPostApply() // Reload the material instances which // use this material. - if ( isProperlyAdded() ) + if (isProperlyAdded()) reload(); } @@ -579,8 +603,8 @@ void Material::inspectPostApply() bool Material::isLightmapped() const { bool ret = false; - for( U32 i=0; iEmptyString() || mToneMapName[i] != StringTable->EmptyString() || mVertLit[i]; return ret; } @@ -604,30 +628,30 @@ void Material::updateTimeBasedParams() void Material::_mapMaterial() { - if( String(getName()).isEmpty() ) + if (String(getName()).isEmpty()) { - Con::warnf( "[Material::mapMaterial] - Cannot map unnamed Material" ); + Con::warnf("[Material::mapMaterial] - Cannot map unnamed Material"); return; } // If mapTo not defined in script, try to use the base texture name instead - if( mMapTo.isEmpty() ) + if (mMapTo.isEmpty()) { - if ( mDiffuseMapFilename[0].isEmpty() && mDiffuseMapAsset->isNull()) + if (mDiffuseMapName[0] == StringTable->EmptyString() && mDiffuseMapAsset->isNull()) return; else { // extract filename from base texture - if ( mDiffuseMapFilename[0].isNotEmpty() ) + if (mDiffuseMapName[0] != StringTable->EmptyString()) { - U32 slashPos = mDiffuseMapFilename[0].find('/',0,String::Right); + U32 slashPos = String(mDiffuseMapName[0]).find('/', 0, String::Right); if (slashPos == String::NPos) // no '/' character, must be no path, just the filename - mMapTo = mDiffuseMapFilename[0]; + mMapTo = mDiffuseMapName[0]; else // use everything after the last slash - mMapTo = mDiffuseMapFilename[0].substr(slashPos+1, mDiffuseMapFilename[0].length() - slashPos - 1); + mMapTo = String(mDiffuseMapName[0]).substr(slashPos + 1, strlen(mDiffuseMapName[0]) - slashPos - 1); } else if (!mDiffuseMapAsset->isNull()) { @@ -637,7 +661,7 @@ void Material::_mapMaterial() } // add mapping - MATMGR->mapMaterial(mMapTo,getName()); + MATMGR->mapMaterial(mMapTo, getName()); } BaseMatInstance* Material::createMatInstance() @@ -647,40 +671,40 @@ BaseMatInstance* Material::createMatInstance() void Material::flush() { - MATMGR->flushInstance( this ); + MATMGR->flushInstance(this); } void Material::reload() { - MATMGR->reInitInstance( this ); + MATMGR->reInitInstance(this); } -void Material::StageData::getFeatureSet( FeatureSet *outFeatures ) const +void Material::StageData::getFeatureSet(FeatureSet* outFeatures) const { TextureTable::ConstIterator iter = mTextures.begin(); - for ( ; iter != mTextures.end(); iter++ ) + for (; iter != mTextures.end(); iter++) { - if ( iter->value.isValid() ) - outFeatures->addFeature( *iter->key ); + if (iter->value.isValid()) + outFeatures->addFeature(*iter->key); } } -DefineEngineMethod( Material, flush, void, (),, - "Flushes all material instances that use this material." ) +DefineEngineMethod(Material, flush, void, (), , + "Flushes all material instances that use this material.") { object->flush(); } -DefineEngineMethod( Material, reload, void, (),, - "Reloads all material instances that use this material." ) +DefineEngineMethod(Material, reload, void, (), , + "Reloads all material instances that use this material.") { object->reload(); } -DefineEngineMethod( Material, dumpInstances, void, (),, - "Dumps a formatted list of the currently allocated material instances for this material to the console." ) +DefineEngineMethod(Material, dumpInstances, void, (), , + "Dumps a formatted list of the currently allocated material instances for this material to the console.") { - MATMGR->dumpMaterialInstances( object ); + MATMGR->dumpMaterialInstances(object); } DefineEngineMethod(Material, getMaterialInstances, void, (GuiTreeViewCtrl* matTree), (nullAsType< GuiTreeViewCtrl*>()), @@ -689,78 +713,78 @@ DefineEngineMethod(Material, getMaterialInstances, void, (GuiTreeViewCtrl* matTr MATMGR->getMaterialInstances(object, matTree); } -DefineEngineMethod( Material, getAnimFlags, const char*, (U32 id), , "" ) +DefineEngineMethod(Material, getAnimFlags, const char*, (U32 id), , "") { - char * animFlags = Con::getReturnBuffer(512); + char* animFlags = Con::getReturnBuffer(512); - if(object->mAnimFlags[ id ] & Material::Scroll) + if (object->mAnimFlags[id] & Material::Scroll) { - if(String::compare( animFlags, "" ) == 0) - dStrcpy( animFlags, "$Scroll", 512 ); + if (String::compare(animFlags, "") == 0) + dStrcpy(animFlags, "$Scroll", 512); } - if(object->mAnimFlags[ id ] & Material::Rotate) + if (object->mAnimFlags[id] & Material::Rotate) { - if(String::compare( animFlags, "" ) == 0) - dStrcpy( animFlags, "$Rotate", 512 ); - else - dStrcat( animFlags, " | $Rotate", 512); + if (String::compare(animFlags, "") == 0) + dStrcpy(animFlags, "$Rotate", 512); + else + dStrcat(animFlags, " | $Rotate", 512); } - if(object->mAnimFlags[ id ] & Material::Wave) + if (object->mAnimFlags[id] & Material::Wave) { - if(String::compare( animFlags, "" ) == 0) - dStrcpy( animFlags, "$Wave", 512 ); - else - dStrcat( animFlags, " | $Wave", 512); + if (String::compare(animFlags, "") == 0) + dStrcpy(animFlags, "$Wave", 512); + else + dStrcat(animFlags, " | $Wave", 512); } - if(object->mAnimFlags[ id ] & Material::Scale) + if (object->mAnimFlags[id] & Material::Scale) { - if(String::compare( animFlags, "" ) == 0) - dStrcpy( animFlags, "$Scale", 512 ); - else - dStrcat( animFlags, " | $Scale", 512); + if (String::compare(animFlags, "") == 0) + dStrcpy(animFlags, "$Scale", 512); + else + dStrcat(animFlags, " | $Scale", 512); } - if(object->mAnimFlags[ id ] & Material::Sequence) + if (object->mAnimFlags[id] & Material::Sequence) { - if(String::compare( animFlags, "" ) == 0) - dStrcpy( animFlags, "$Sequence", 512 ); - else - dStrcat( animFlags, " | $Sequence", 512); + if (String::compare(animFlags, "") == 0) + dStrcpy(animFlags, "$Sequence", 512); + else + dStrcat(animFlags, " | $Sequence", 512); } - return animFlags; + return animFlags; } -DefineEngineMethod(Material, getFilename, const char*, (),, "Get filename of material") +DefineEngineMethod(Material, getFilename, const char*, (), , "Get filename of material") { - SimObject *material = static_cast(object); + SimObject* material = static_cast(object); return material->getFilename(); } -DefineEngineMethod( Material, isAutoGenerated, bool, (),, - "Returns true if this Material was automatically generated by MaterialList::mapMaterials()" ) +DefineEngineMethod(Material, isAutoGenerated, bool, (), , + "Returns true if this Material was automatically generated by MaterialList::mapMaterials()") { return object->isAutoGenerated(); } -DefineEngineMethod( Material, setAutoGenerated, void, (bool isAutoGenerated), , - "setAutoGenerated(bool isAutoGenerated): Set whether or not the Material is autogenerated." ) +DefineEngineMethod(Material, setAutoGenerated, void, (bool isAutoGenerated), , + "setAutoGenerated(bool isAutoGenerated): Set whether or not the Material is autogenerated.") { object->setAutoGenerated(isAutoGenerated); } DefineEngineMethod(Material, getAutogeneratedFile, const char*, (), , "Get filename of autogenerated shader file") { - SimObject *material = static_cast(object); + SimObject* material = static_cast(object); return material->getFilename(); } // Accumulation -bool Material::_setAccuEnabled( void *object, const char *index, const char *data ) +bool Material::_setAccuEnabled(void* object, const char* index, const char* data) { - Material* mat = reinterpret_cast< Material* >( object ); + Material* mat = reinterpret_cast(object); - if ( index ) + if (index) { U32 i = dAtoui(index); mat->mAccuEnabled[i] = dAtob(data); @@ -768,3 +792,21 @@ bool Material::_setAccuEnabled( void *object, const char *index, const char *dat } return true; } +//declare general get, getAsset and set methods +//signatures are: +//using DiffuseMap as an example +//material.getDiffuseMap(%layer); //returns the raw file referenced +//material.getDiffuseMapAsset(%layer); //returns the asset id +//material.setDiffuseMap(%texture, %layer); //tries to set the asset and failing that attempts a flat file reference +DEF_IMAGEASSET_ARRAY_BINDS(Material, DiffuseMap) +DEF_IMAGEASSET_ARRAY_BINDS(Material, OverlayMap); +DEF_IMAGEASSET_ARRAY_BINDS(Material, LightMap); +DEF_IMAGEASSET_ARRAY_BINDS(Material, ToneMap); +DEF_IMAGEASSET_ARRAY_BINDS(Material, DetailMap); +DEF_IMAGEASSET_ARRAY_BINDS(Material, NormalMap); +DEF_IMAGEASSET_ARRAY_BINDS(Material, ORMConfigMap); +DEF_IMAGEASSET_ARRAY_BINDS(Material, RoughMap); +DEF_IMAGEASSET_ARRAY_BINDS(Material, AOMap); +DEF_IMAGEASSET_ARRAY_BINDS(Material, MetalMap); +DEF_IMAGEASSET_ARRAY_BINDS(Material, GlowMap); +DEF_IMAGEASSET_ARRAY_BINDS(Material, DetailNormalMap); diff --git a/Engine/source/materials/materialDefinition.h b/Engine/source/materials/materialDefinition.h index 214f378ec..0e258e2c5 100644 --- a/Engine/source/materials/materialDefinition.h +++ b/Engine/source/materials/materialDefinition.h @@ -23,22 +23,22 @@ #define _MATERIALDEFINITION_H_ #ifndef _BASEMATERIALDEFINITION_H_ - #include "materials/baseMaterialDefinition.h" +#include "materials/baseMaterialDefinition.h" #endif #ifndef _TDICTIONARY_H_ - #include "core/util/tDictionary.h" +#include "core/util/tDictionary.h" #endif #ifndef _GFXTEXTUREHANDLE_H_ - #include "gfx/gfxTextureHandle.h" +#include "gfx/gfxTextureHandle.h" #endif #ifndef _GFXSTRUCTS_H_ - #include "gfx/gfxStructs.h" +#include "gfx/gfxStructs.h" #endif #ifndef _GFXCUBEMAP_H_ - #include "gfx/gfxCubemap.h" +#include "gfx/gfxCubemap.h" #endif #ifndef _DYNAMIC_CONSOLETYPES_H_ - #include "console/dynamicTypes.h" +#include "console/dynamicTypes.h" #endif #ifndef IMAGE_ASSET_H @@ -61,7 +61,7 @@ class Material : public BaseMaterialDefinition { typedef BaseMaterialDefinition Parent; public: - static GFXCubemap *GetNormalizeCube(); + static GFXCubemap* GetNormalizeCube(); //----------------------------------------------------------------------- // Enums @@ -113,8 +113,8 @@ public: { Scroll = 1, Rotate = 2, - Wave = 4, - Scale = 8, + Wave = 4, + Scale = 8, Sequence = 16, }; @@ -130,7 +130,7 @@ public: protected: /// - typedef HashTable TextureTable; + typedef HashTable TextureTable; /// The sparse table of textures by feature index. /// @see getTex @@ -138,39 +138,39 @@ public: TextureTable mTextures; /// The cubemap for this stage. - GFXCubemap *mCubemap; + GFXCubemap* mCubemap; public: StageData() - : mCubemap( NULL ) + : mCubemap(NULL) { } /// Returns the texture object or NULL if there is no /// texture entry for that feature type in the table. - inline GFXTextureObject* getTex( const FeatureType &type ) const + inline GFXTextureObject* getTex(const FeatureType& type) const { - TextureTable::ConstIterator iter = mTextures.find( &type ); - if ( iter == mTextures.end() ) + TextureTable::ConstIterator iter = mTextures.find(&type); + if (iter == mTextures.end()) return NULL; return iter->value.getPointer(); } /// Assigns a texture object by feature type. - inline void setTex( const FeatureType &type, GFXTextureObject *tex ) + inline void setTex(const FeatureType& type, GFXTextureObject* tex) { - if ( !tex ) + if (!tex) { - TextureTable::Iterator iter = mTextures.find( &type ); - if ( iter != mTextures.end() ) - mTextures.erase( iter ); + TextureTable::Iterator iter = mTextures.find(&type); + if (iter != mTextures.end()) + mTextures.erase(iter); return; } - TextureTable::Iterator iter = mTextures.findOrInsert( &type ); + TextureTable::Iterator iter = mTextures.findOrInsert(&type); iter->value = tex; } @@ -181,7 +181,7 @@ public: TextureTable::ConstIterator iter = mTextures.begin(); for (; iter != mTextures.end(); ++iter) { - if ( iter->value.isValid() ) + if (iter->value.isValid()) return true; } @@ -189,13 +189,13 @@ public: } /// Returns the active texture features. - void getFeatureSet( FeatureSet *outFeatures ) const; + void getFeatureSet(FeatureSet* outFeatures) const; /// Returns the stage cubemap. GFXCubemap* getCubemap() const { return mCubemap; } /// Set the stage cubemap. - void setCubemap( GFXCubemap *cubemap ) { mCubemap = cubemap; } + void setCubemap(GFXCubemap* cubemap) { mCubemap = cubemap; } }; @@ -204,27 +204,51 @@ public: //----------------------------------------------------------------------- // Data //----------------------------------------------------------------------- - DECLARE_TEXTUREARRAY(Material, DiffuseMap, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY(Material, DiffuseMap, GFXStaticTextureSRGBProfile, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY_SETGET(Material, DiffuseMap); + bool mDiffuseMapSRGB[MAX_STAGES]; // SRGB diffuse - DECLARE_TEXTUREARRAY(Material, OverlayMap, MAX_STAGES); - DECLARE_TEXTUREARRAY(Material, LightMap, MAX_STAGES);; - DECLARE_TEXTUREARRAY(Material, ToneMap, MAX_STAGES); - DECLARE_TEXTUREARRAY(Material, DetailMap, MAX_STAGES);; - DECLARE_TEXTUREARRAY(Material, NormalMap, MAX_STAGES); - DECLARE_TEXTUREARRAY(Material, ORMConfigMap, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY(Material, OverlayMap, GFXStaticTextureProfile, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY_SETGET(Material, OverlayMap); + + DECLARE_IMAGEASSET_ARRAY(Material, LightMap, GFXStaticTextureProfile, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY_SETGET(Material, LightMap); + + DECLARE_IMAGEASSET_ARRAY(Material, ToneMap, GFXStaticTextureProfile, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY_SETGET(Material, ToneMap); + + DECLARE_IMAGEASSET_ARRAY(Material, DetailMap, GFXStaticTextureProfile, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY_SETGET(Material, DetailMap); + + DECLARE_IMAGEASSET_ARRAY(Material, NormalMap, GFXNormalMapProfile, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY_SETGET(Material, NormalMap); + + DECLARE_IMAGEASSET_ARRAY(Material, ORMConfigMap, GFXStaticTextureProfile, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY_SETGET(Material, ORMConfigMap); + bool mIsSRGb[MAX_STAGES]; - DECLARE_TEXTUREARRAY(Material, RoughMap, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY(Material, RoughMap, GFXStaticTextureProfile, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY_SETGET(Material, RoughMap); + bool mInvertRoughness[MAX_STAGES]; F32 mRoughnessChan[MAX_STAGES]; - DECLARE_TEXTUREARRAY(Material, AOMap, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY(Material, AOMap, GFXStaticTextureProfile, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY_SETGET(Material, AOMap); + F32 mAOChan[MAX_STAGES]; - DECLARE_TEXTUREARRAY(Material, MetalMap, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY(Material, MetalMap, GFXStaticTextureProfile, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY_SETGET(Material, MetalMap); + F32 mMetalChan[MAX_STAGES]; - DECLARE_TEXTUREARRAY(Material, GlowMap, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY(Material, GlowMap, GFXStaticTextureProfile, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY_SETGET(Material, GlowMap); + F32 mGlowMul[MAX_STAGES]; /// A second normal map which repeats at the detail map /// scale and blended with the base normal map. - DECLARE_TEXTUREARRAY(Material, DetailNormalMap, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY(Material, DetailNormalMap, GFXNormalMapProfile, MAX_STAGES); + DECLARE_IMAGEASSET_ARRAY_SETGET(Material, DetailNormalMap); + /// The strength scalar for the detail normal map. F32 mDetailNormalMapStrength[MAX_STAGES]; @@ -239,18 +263,18 @@ public: /// or if it has a texture it is multiplied against /// the diffuse texture color. LinearColorF mDiffuse[MAX_STAGES]; - + F32 mRoughness[MAX_STAGES]; F32 mMetalness[MAX_STAGES]; - + bool mVertLit[MAX_STAGES]; - + /// If true for a stage, vertex colors are multiplied /// against diffuse colors. - bool mVertColor[ MAX_STAGES ]; + bool mVertColor[MAX_STAGES]; + + F32 mParallaxScale[MAX_STAGES]; - F32 mParallaxScale[MAX_STAGES]; - F32 mMinnaertConstant[MAX_STAGES]; bool mSubSurface[MAX_STAGES]; LinearColorF mSubSurfaceColor[MAX_STAGES]; @@ -268,15 +292,15 @@ public: F32 mRotSpeed[MAX_STAGES]; Point2F mRotPivotOffset[MAX_STAGES]; F32 mRotPos[MAX_STAGES]; - + F32 mWavePos[MAX_STAGES]; F32 mWaveFreq[MAX_STAGES]; F32 mWaveAmp[MAX_STAGES]; U32 mWaveType[MAX_STAGES]; - + F32 mSeqFramePerSec[MAX_STAGES]; F32 mSeqSegSize[MAX_STAGES]; - + bool mGlow[MAX_STAGES]; // entire stage glows bool mEmissive[MAX_STAGES]; @@ -305,7 +329,7 @@ public: // Deferred Shading F32 mMatInfoFlags[MAX_STAGES]; - bool mTranslucent; + bool mTranslucent; BlendOp mTranslucentBlendOp; bool mTranslucentZWrite; @@ -329,7 +353,7 @@ public: bool mShowDust; ///< If true, show dust emitters (footpuffs, hover trails, etc) when on surface with this material. Defaults to false. /// Color to use for particle effects and such when located on this material. - LinearColorF mEffectColor[ NUM_EFFECT_COLOR_STAGES ]; + LinearColorF mEffectColor[NUM_EFFECT_COLOR_STAGES]; /// Footstep sound to play when walking on surface with this material. /// Numeric ID of footstep sound defined on player datablock (0 == soft, @@ -352,7 +376,7 @@ public: F32 mReverbSoundOcclusion; ///< Amount of volume occlusion on reverb sounds. ///@} - + String mMapTo; // map Material to this texture name /// @@ -362,7 +386,7 @@ public: /// Allocates and returns a BaseMatInstance for this material. Caller is responsible /// for freeing the instance - virtual BaseMatInstance* createMatInstance(); + virtual BaseMatInstance* createMatInstance(); virtual bool isTranslucent() const { return mTranslucent && mTranslucentBlendOp != Material::None; } virtual bool isAlphatest() const { return mAlphaTest; } virtual bool isDoubleSided() const { return mDoubleSided; } @@ -370,7 +394,7 @@ public: virtual void setAutoGenerated(bool isAutoGenerated) { mAutoGenerated = isAutoGenerated; } virtual bool isLightmapped() const; virtual bool castsShadows() const { return mCastShadows; } - const String &getPath() const { return mPath; } + const String& getPath() const { return mPath; } void flush(); @@ -386,7 +410,7 @@ public: virtual bool onAdd(); virtual void onRemove(); virtual void inspectPostApply(); - virtual bool writeField( StringTableEntry fieldname, const char *value ); + virtual bool writeField(StringTableEntry fieldname, const char* value); // // ConsoleObject interface @@ -394,7 +418,7 @@ public: static void initPersistFields(); // Accumulation - static bool _setAccuEnabled( void *object, const char *index, const char *data ); + static bool _setAccuEnabled(void* object, const char* index, const char* data); DECLARE_CONOBJECT(Material); protected: @@ -420,8 +444,8 @@ typedef Material::AnimType MaterialAnimType; typedef Material::BlendOp MaterialBlendOp; typedef Material::WaveType MaterialWaveType; -DefineBitfieldType( MaterialAnimType ); -DefineEnumType( MaterialBlendOp ); -DefineEnumType( MaterialWaveType ); +DefineBitfieldType(MaterialAnimType); +DefineEnumType(MaterialBlendOp); +DefineEnumType(MaterialWaveType); #endif // _MATERIALDEFINITION_H_ diff --git a/Engine/source/materials/materialList.cpp b/Engine/source/materials/materialList.cpp index f4cdafcd9..34dd104f3 100644 --- a/Engine/source/materials/materialList.cpp +++ b/Engine/source/materials/materialList.cpp @@ -365,7 +365,7 @@ void MaterialList::mapMaterial( U32 i ) newMat->mAutoGenerated = true; // Overwrite diffuseMap in new material - newMat->mDiffuseMapFilename[0] = texHandle->mTextureLookupName; + newMat->_setDiffuseMap(texHandle->mTextureLookupName,0); // Set up some defaults for transparent textures if (texHandle->mHasTransparency) diff --git a/Engine/source/materials/materialManager.cpp b/Engine/source/materials/materialManager.cpp index 96e7c2ba2..376b67a4e 100644 --- a/Engine/source/materials/materialManager.cpp +++ b/Engine/source/materials/materialManager.cpp @@ -227,6 +227,8 @@ BaseMatInstance * MaterialManager::createWarningMatInstance() warnMatInstance->init( getDefaultFeatures(), getGFXVertexFormat() ); } + else + Con::errorf("WarningMaterial Not Found!"); return warnMatInstance; } diff --git a/Engine/source/materials/processedMaterial.cpp b/Engine/source/materials/processedMaterial.cpp index 5a801a982..63150fd94 100644 --- a/Engine/source/materials/processedMaterial.cpp +++ b/Engine/source/materials/processedMaterial.cpp @@ -402,26 +402,27 @@ void ProcessedMaterial::_setStageData() for (i = 0; i < Material::MAX_STAGES; i++) { // DiffuseMap - if (mMaterial->mDiffuseMapFilename[i].isNotEmpty()) + if (mMaterial->mDiffuseMapAsset[i] && !mMaterial->mDiffuseMapAsset[i].isNull()) { - mStages[i].setTex(MFT_DiffuseMap, _createTexture(mMaterial->mDiffuseMapFilename[i], &GFXStaticTextureSRGBProfile)); + mStages[i].setTex(MFT_DiffuseMap, mMaterial->getDiffuseMapResource(i)); + //mStages[i].setTex(MFT_DiffuseMap, _createTexture(mMaterial->getDiffuseMap(i), &GFXStaticTextureSRGBProfile)); if (!mStages[i].getTex(MFT_DiffuseMap)) { - //If we start with a #, we're probably actually attempting to hit a named target and it may not get a hit on the first pass. So we'll - //pass on the error rather than spamming the console - if (!mMaterial->mDiffuseMapFilename[i].startsWith("#")) - mMaterial->logError("Failed to load diffuse map %s for stage %i", _getTexturePath(mMaterial->mDiffuseMapFilename[i]).c_str(), i); - // Load a debug texture to make it clear to the user // that the texture for this stage was missing. mStages[i].setTex(MFT_DiffuseMap, _createTexture(GFXTextureManager::getMissingTexturePath().c_str(), &GFXStaticTextureSRGBProfile)); } } - else if (mMaterial->mDiffuseMapAsset[i] && !mMaterial->mDiffuseMapAsset[i].isNull()) + else if (mMaterial->mDiffuseMapName[i] != StringTable->EmptyString()) { - mStages[i].setTex(MFT_DiffuseMap, mMaterial->mDiffuseMapAsset[i]->getImage(GFXStaticTextureSRGBProfile)); + mStages[i].setTex(MFT_DiffuseMap, _createTexture(mMaterial->mDiffuseMapName[i], &GFXStaticTextureSRGBProfile)); if (!mStages[i].getTex(MFT_DiffuseMap)) { + //If we start with a #, we're probably actually attempting to hit a named target and it may not get a hit on the first pass. So we'll + //pass on the error rather than spamming the console + if (!String(mMaterial->mDiffuseMapName[i]).startsWith("#")) + mMaterial->logError("Failed to load diffuse map %s for stage %i", mMaterial->mDiffuseMapName[i], i); + // Load a debug texture to make it clear to the user // that the texture for this stage was missing. mStages[i].setTex(MFT_DiffuseMap, _createTexture(GFXTextureManager::getMissingTexturePath().c_str(), &GFXStaticTextureSRGBProfile)); @@ -429,85 +430,86 @@ void ProcessedMaterial::_setStageData() } // OverlayMap - if (mMaterial->mOverlayMapFilename[i].isNotEmpty()) + if (mMaterial->getOverlayMap(i) != StringTable->EmptyString()) { - mStages[i].setTex(MFT_OverlayMap, _createTexture(mMaterial->mOverlayMapFilename[i], &GFXStaticTextureSRGBProfile)); + mStages[i].setTex(MFT_OverlayMap, mMaterial->getOverlayMapResource(i)); if (!mStages[i].getTex(MFT_OverlayMap)) - mMaterial->logError("Failed to load overlay map %s for stage %i", _getTexturePath(mMaterial->mOverlayMapFilename[i]).c_str(), i); + mMaterial->logError("Failed to load overlay map %s for stage %i", mMaterial->getOverlayMap(i), i); } // LightMap - if (mMaterial->mLightMapFilename[i].isNotEmpty()) + if (mMaterial->getLightMap(i) != StringTable->EmptyString()) { - mStages[i].setTex(MFT_LightMap, _createTexture(mMaterial->mLightMapFilename[i], &GFXStaticTextureSRGBProfile)); + mStages[i].setTex(MFT_LightMap, mMaterial->getLightMapResource(i)); if (!mStages[i].getTex(MFT_LightMap)) - mMaterial->logError("Failed to load light map %s for stage %i", _getTexturePath(mMaterial->mLightMapFilename[i]).c_str(), i); + mMaterial->logError("Failed to load light map %s for stage %i", mMaterial->getLightMap(i), i); } // ToneMap - if (mMaterial->mToneMapFilename[i].isNotEmpty()) + if (mMaterial->getToneMap(i) != StringTable->EmptyString()) { - mStages[i].setTex(MFT_ToneMap, _createTexture(mMaterial->mToneMapFilename[i], &GFXStaticTextureProfile)); + mStages[i].setTex(MFT_ToneMap, mMaterial->getToneMapResource(i)); if (!mStages[i].getTex(MFT_ToneMap)) - mMaterial->logError("Failed to load tone map %s for stage %i", _getTexturePath(mMaterial->mToneMapFilename[i]).c_str(), i); + mMaterial->logError("Failed to load tone map %s for stage %i", mMaterial->getToneMap(i), i); } // DetailMap - if (mMaterial->mDetailMapFilename[i].isNotEmpty()) + if (mMaterial->getDetailMap(i) != StringTable->EmptyString()) { - mStages[i].setTex(MFT_DetailMap, _createTexture(mMaterial->mDetailMapFilename[i], &GFXStaticTextureProfile)); + mStages[i].setTex(MFT_DetailMap, mMaterial->getDetailMapResource(i)); if (!mStages[i].getTex(MFT_DetailMap)) - mMaterial->logError("Failed to load detail map %s for stage %i", _getTexturePath(mMaterial->mDetailMapFilename[i]).c_str(), i); + mMaterial->logError("Failed to load detail map %s for stage %i", mMaterial->getDetailMap(i), i); } // NormalMap - if (mMaterial->mNormalMapFilename[i].isNotEmpty()) + if (mMaterial->getNormalMap(i) != StringTable->EmptyString()) { - mStages[i].setTex(MFT_NormalMap, _createTexture(mMaterial->mNormalMapFilename[i], &GFXNormalMapProfile)); + mStages[i].setTex(MFT_NormalMap, mMaterial->getNormalMapResource(i)); if (!mStages[i].getTex(MFT_NormalMap)) - mMaterial->logError("Failed to load normal map %s for stage %i", _getTexturePath(mMaterial->mNormalMapFilename[i]).c_str(), i); + mMaterial->logError("Failed to load normal map %s for stage %i", mMaterial->getNormalMap(i), i); } // Detail Normal Map - if (mMaterial->mDetailNormalMapFilename[i].isNotEmpty()) + if (mMaterial->getDetailNormalMap(i) != StringTable->EmptyString()) { - mStages[i].setTex(MFT_DetailNormalMap, _createTexture(mMaterial->mDetailNormalMapFilename[i], &GFXNormalMapProfile)); + mStages[i].setTex(MFT_DetailNormalMap, mMaterial->getDetailNormalMapResource(i)); if (!mStages[i].getTex(MFT_DetailNormalMap)) - mMaterial->logError("Failed to load normal map %s for stage %i", _getTexturePath(mMaterial->mDetailNormalMapFilename[i]).c_str(), i); + mMaterial->logError("Failed to load normal map %s for stage %i", mMaterial->getDetailNormalMap(i), i); } + //depending on creation method this may or may not have been shoved into srgb space eroneously GFXTextureProfile* profile = &GFXStaticTextureProfile; if (mMaterial->mIsSRGb[i]) profile = &GFXStaticTextureSRGBProfile; // ORMConfig - if (mMaterial->mORMConfigMapFilename[i].isNotEmpty()) + if (mMaterial->getORMConfigMap(i) != StringTable->EmptyString()) { - mStages[i].setTex(MFT_OrmMap, _createTexture(mMaterial->mORMConfigMapFilename[i], profile)); + mStages[i].setTex(MFT_OrmMap, _createTexture(mMaterial->getORMConfigMap(i), profile)); if (!mStages[i].getTex(MFT_OrmMap)) - mMaterial->logError("Failed to load PBR Config map %s for stage %i", _getTexturePath(mMaterial->mORMConfigMapFilename[i]).c_str(), i); + mMaterial->logError("Failed to load PBR Config map %s for stage %i", mMaterial->getORMConfigMap(i), i); } else { - if (mMaterial->mRoughMapFilename[i].isNotEmpty() && mMaterial->mMetalMapFilename[i].isNotEmpty()) + if ((mMaterial->getRoughMap(i) != StringTable->EmptyString()) && (mMaterial->getMetalMap(i) != StringTable->EmptyString())) { U32 inputKey[4]; inputKey[0] = mMaterial->mAOChan[i]; inputKey[1] = mMaterial->mRoughnessChan[i]; inputKey[2] = mMaterial->mMetalChan[i]; inputKey[3] = 0; - mStages[i].setTex(MFT_OrmMap, _createCompositeTexture( mMaterial->mAOMapFilename[i], mMaterial->mRoughMapFilename[i], - mMaterial->mMetalMapFilename[i], "", + mStages[i].setTex(MFT_OrmMap, _createCompositeTexture( mMaterial->getAOMap(i), mMaterial->getRoughMap(i), + mMaterial->getMetalMap(i), "", inputKey, profile)); if (!mStages[i].getTex(MFT_OrmMap)) - mMaterial->logError("Failed to load PBR Config map %s for stage %i", _getTexturePath(mMaterial->mORMConfigMapFilename[i]).c_str(), i); + mMaterial->logError("Failed to dynamically create ORM Config map for stage %i", i); } } - if (mMaterial->mGlowMapFilename[i].isNotEmpty()) + if (mMaterial->getGlowMap(i) != StringTable->EmptyString()) { - mStages[i].setTex(MFT_GlowMap, _createTexture(mMaterial->mGlowMapFilename[i], &GFXStaticTextureProfile)); + mStages[i].setTex(MFT_GlowMap, mMaterial->getGlowMapResource(i)); if (!mStages[i].getTex(MFT_GlowMap)) - mMaterial->logError("Failed to load glow map %s for stage %i", _getTexturePath(mMaterial->mGlowMapFilename[i]).c_str(), i); + mMaterial->logError("Failed to load glow map %s for stage %i", mMaterial->getGlowMap(i), i); } } diff --git a/Engine/source/materials/processedShaderMaterial.cpp b/Engine/source/materials/processedShaderMaterial.cpp index 049cb0e87..fc453958f 100644 --- a/Engine/source/materials/processedShaderMaterial.cpp +++ b/Engine/source/materials/processedShaderMaterial.cpp @@ -227,9 +227,9 @@ bool ProcessedShaderMaterial::init( const FeatureSet &features, mInstancingState = new InstancingState(); mInstancingState->setFormat( _getRPD( 0 )->shader->getInstancingFormat(), mVertexFormat ); } - if (mMaterial && mMaterial->mDiffuseMapFilename[0].isNotEmpty() && mMaterial->mDiffuseMapFilename[0].substr(0, 1).equal("#")) + if (mMaterial && mMaterial->mDiffuseMapName[0] != StringTable->EmptyString() && String(mMaterial->mDiffuseMapName[0]).startsWith("#")) { - String texTargetBufferName = mMaterial->mDiffuseMapFilename[0].substr(1, mMaterial->mDiffuseMapFilename[0].length() - 1); + String texTargetBufferName = String(mMaterial->mDiffuseMapName[0]).substr(1, strlen(mMaterial->mDiffuseMapName[0]) - 1); NamedTexTarget *texTarget = NamedTexTarget::find(texTargetBufferName); RenderPassData* rpd = getPass(0); diff --git a/Engine/source/materials/shaderData.h b/Engine/source/materials/shaderData.h index cce62f324..0fb1286bc 100644 --- a/Engine/source/materials/shaderData.h +++ b/Engine/source/materials/shaderData.h @@ -55,13 +55,13 @@ protected: F32 mPixVersion; - FileName mDXVertexShaderName; + StringTableEntry mDXVertexShaderName; - FileName mDXPixelShaderName; + StringTableEntry mDXPixelShaderName; - FileName mOGLVertexShaderName; + StringTableEntry mOGLVertexShaderName; - FileName mOGLPixelShaderName; + StringTableEntry mOGLPixelShaderName; /// A semicolon, tab, or newline delimited string of case /// sensitive defines that are passed to the shader compiler. diff --git a/Engine/source/module/moduleManager_ScriptBinding.h b/Engine/source/module/moduleManager_ScriptBinding.h index 8687dd4b7..042683fad 100644 --- a/Engine/source/module/moduleManager_ScriptBinding.h +++ b/Engine/source/module/moduleManager_ScriptBinding.h @@ -398,7 +398,7 @@ DefineEngineMethod(ModuleManager, removeListener, void, (const char* listenerObj //----------------------------------------------------------------------------- DefineEngineMethod(ModuleManager, ignoreLoadedGroups, void, (bool doIgnore), (false), - "Sets if the Module Manager should ingore laoded groups.\n" + "Sets if the Module Manager should ingore loaded groups.\n" "@param doIgnore Whether we should or should not ignore loaded groups.\n" "@return No return value.\n") { diff --git a/Engine/source/postFx/postEffect.cpp b/Engine/source/postFx/postEffect.cpp index f93af4e5c..a9587c4aa 100644 --- a/Engine/source/postFx/postEffect.cpp +++ b/Engine/source/postFx/postEffect.cpp @@ -505,6 +505,11 @@ PostEffect::PostEffect() dMemset( mActiveTextureViewport, 0, sizeof( RectI ) * NumTextures ); dMemset( mTexSizeSC, 0, sizeof( GFXShaderConstHandle* ) * NumTextures ); dMemset( mRenderTargetParamsSC, 0, sizeof( GFXShaderConstHandle* ) * NumTextures ); + + for (U32 i = 0; i < NumTextures; i++) + { + INIT_IMAGEASSET_ARRAY(Texture, i); + } } PostEffect::~PostEffect() @@ -548,9 +553,8 @@ void PostEffect::initPersistFields() addField( "targetViewport", TYPEID< PFXTargetViewport >(), Offset( mTargetViewport, PostEffect ), "Specifies how the viewport should be set up for a target texture." ); - addField( "texture", TypeImageFilename, Offset( mTexFilename, PostEffect ), NumTextures, - "Input textures to this effect ( samplers ).\n" - "@see PFXTextureIdentifiers" ); + INITPERSISTFIELD_IMAGEASSET_ARRAY(Texture, NumTextures, PostEffect, "Input textures to this effect ( samplers ).\n" + "@see PFXTextureIdentifiers"); addField("textureSRGB", TypeBool, Offset(mTexSRGB, PostEffect), NumTextures, "Set input texture to be sRGB"); @@ -601,23 +605,6 @@ bool PostEffect::onAdd() for( S32 i = 0; i < NumTextures; i++ ) { mTextureType[i] = NormalTextureType; - - String texFilename = mTexFilename[i]; - - // Skip empty stages or ones with variable or target names. - if ( texFilename.isEmpty() || - texFilename[0] == '$' || - texFilename[0] == '#' ) - continue; - - GFXTextureProfile *profile = &PostFxTextureProfile; - if (mTexSRGB[i]) - profile = &PostFxTextureSRGBProfile; - - // Try to load the texture. - bool success = mTextures[i].set( texFilename, &PostFxTextureProfile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ) ); - if (!success) - Con::errorf("Invalid Texture for PostEffect (%s), The Texture '%s' does not exist!", this->getName(), texFilename.c_str()); } // Is the target a named target? @@ -755,25 +742,11 @@ void PostEffect::_setupConstants( const SceneRenderState *state ) mRTSizeSC = mShader->getShaderConstHandle( "$targetSize" ); mOneOverRTSizeSC = mShader->getShaderConstHandle( "$oneOverTargetSize" ); - mTexSizeSC[0] = mShader->getShaderConstHandle( "$texSize0" ); - mTexSizeSC[1] = mShader->getShaderConstHandle( "$texSize1" ); - mTexSizeSC[2] = mShader->getShaderConstHandle( "$texSize2" ); - mTexSizeSC[3] = mShader->getShaderConstHandle( "$texSize3" ); - mTexSizeSC[4] = mShader->getShaderConstHandle( "$texSize4" ); - mTexSizeSC[5] = mShader->getShaderConstHandle( "$texSize5" ); - mTexSizeSC[6] = mShader->getShaderConstHandle( "$texSize6" ); - mTexSizeSC[7] = mShader->getShaderConstHandle( "$texSize7" ); - - mRenderTargetParamsSC[0] = mShader->getShaderConstHandle( "$rtParams0" ); - mRenderTargetParamsSC[1] = mShader->getShaderConstHandle( "$rtParams1" ); - mRenderTargetParamsSC[2] = mShader->getShaderConstHandle( "$rtParams2" ); - mRenderTargetParamsSC[3] = mShader->getShaderConstHandle( "$rtParams3" ); - mRenderTargetParamsSC[4] = mShader->getShaderConstHandle( "$rtParams4" ); - mRenderTargetParamsSC[5] = mShader->getShaderConstHandle( "$rtParams5" ); - mRenderTargetParamsSC[6] = mShader->getShaderConstHandle( "$rtParams6" ); - mRenderTargetParamsSC[7] = mShader->getShaderConstHandle( "$rtParams7" ); - - //mViewportSC = shader->getShaderConstHandle( "$viewport" ); + for (U32 i = 0; i < NumTextures; i++) + { + mTexSizeSC[i] = mShader->getShaderConstHandle(String::ToString("$texSize%d", i)); + mRenderTargetParamsSC[i] = mShader->getShaderConstHandle(String::ToString("$rtParams%d",i)); + } mTargetViewportSC = mShader->getShaderConstHandle( "$targetViewport" ); @@ -1139,7 +1112,7 @@ void PostEffect::_setupConstants( const SceneRenderState *state ) void PostEffect::_setupTexture( U32 stage, GFXTexHandle &inputTex, const RectI *inTexViewport ) { - const String &texFilename = mTexFilename[ stage ]; + const String &texFilename = mTextureName[ stage ]; GFXTexHandle theTex; NamedTexTarget *namedTarget = NULL; @@ -1176,7 +1149,7 @@ void PostEffect::_setupTexture( U32 stage, GFXTexHandle &inputTex, const RectI * } else { - theTex = mTextures[ stage ]; + theTex = mTexture[ stage ]; if ( theTex ) viewport.set( 0, 0, theTex->getWidth(), theTex->getHeight() ); } @@ -1643,8 +1616,8 @@ void PostEffect::reload() void PostEffect::setTexture( U32 index, const String &texFilePath ) { // Set the new texture name. - mTexFilename[index] = texFilePath; - mTextures[index].free(); + mTextureName[index] = texFilePath; + mTexture[index].free(); // Skip empty stages or ones with variable or target names. if ( texFilePath.isEmpty() || @@ -1652,8 +1625,12 @@ void PostEffect::setTexture( U32 index, const String &texFilePath ) texFilePath[0] == '#' ) return; + GFXTextureProfile* profile = &PostFxTextureProfile; + if (mTexSRGB[index]) + profile = &PostFxTextureSRGBProfile; + // Try to load the texture. - mTextures[index].set( texFilePath, &PostFxTextureProfile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ) ); + mTexture[index].set( texFilePath, profile, avar( "%s() - (line %d)", __FUNCTION__, __LINE__ ) ); mTextureType[index] = NormalTextureType; } @@ -1661,15 +1638,15 @@ void PostEffect::setTexture( U32 index, const String &texFilePath ) void PostEffect::setTexture(U32 index, const GFXTexHandle& texHandle) { // Set the new texture name. - mTexFilename[index] = ""; - mTextures[index].free(); + mTextureName[index] = ""; + mTexture[index].free(); // Skip empty stages or ones with variable or target names. if (!texHandle.isValid()) return; // Try to load the texture. - mTextures[index] = texHandle; + mTexture[index] = texHandle; mTextureType[index] = NormalTextureType; } @@ -1850,7 +1827,7 @@ void PostEffect::_checkRequirements() { if (mTextureType[i] == NormalTextureType) { - const String &texFilename = mTexFilename[i]; + const String &texFilename = mTextureName[i]; if (texFilename.isNotEmpty() && texFilename[0] == '#') { diff --git a/Engine/source/postFx/postEffect.h b/Engine/source/postFx/postEffect.h index 5601e431f..287048100 100644 --- a/Engine/source/postFx/postEffect.h +++ b/Engine/source/postFx/postEffect.h @@ -60,6 +60,8 @@ #include "materials/matTextureTarget.h" #endif +#include "T3D/assets/ImageAsset.h" + class GFXStateBlockData; class Frustum; class SceneRenderState; @@ -88,7 +90,9 @@ public: protected: - FileName mTexFilename[NumTextures]; + DECLARE_IMAGEASSET_ARRAY(PostEffect, Texture, PostFxTextureProfile, NumTextures); + DECLARE_IMAGEASSET_ARRAY_SETGET(PostEffect, Texture); + bool mTexSRGB[NumTextures]; enum @@ -98,7 +102,6 @@ protected: CubemapArrayType, } mTextureType[NumTextures]; - GFXTexHandle mTextures[NumTextures]; GFXCubemapHandle mCubemapTextures[NumTextures]; GFXCubemapArrayHandle mCubemapArrayTextures[NumTextures]; diff --git a/Engine/source/postFx/postEffectCommon.h b/Engine/source/postFx/postEffectCommon.h index 52dc33dfc..d99800295 100644 --- a/Engine/source/postFx/postEffectCommon.h +++ b/Engine/source/postFx/postEffectCommon.h @@ -100,6 +100,7 @@ struct PFXFrameState /// GFX_DeclareTextureProfile( PostFxTextureProfile ); +GFX_DeclareTextureProfile( PostFxTextureSRGBProfile ); GFX_DeclareTextureProfile( VRTextureProfile ); diff --git a/Engine/source/postFx/postEffectVis.cpp b/Engine/source/postFx/postEffectVis.cpp index b00ee55ae..5d3d351c0 100644 --- a/Engine/source/postFx/postEffectVis.cpp +++ b/Engine/source/postFx/postEffectVis.cpp @@ -101,7 +101,7 @@ void PostEffectVis::open( PostEffect *pfx ) // Only allocate window/bitmaps for input textures that are actually used. if ( i > Target ) { - if ( pfx->mTexFilename[i-1].isEmpty() ) + if ( pfx->mTextureName[i-1] == StringTable->EmptyString()) { window.window[i] = NULL; window.bmp[i] = NULL; @@ -129,7 +129,7 @@ void PostEffectVis::open( PostEffect *pfx ) bmpCtrl->setSizing( GuiControl::horizResizeWidth, GuiControl::vertResizeHeight ); bmpCtrl->setExtent( 341, 181 ); bmpCtrl->setDataField( StringTable->insert( "wrap" ), NULL, "1" ); - bmpCtrl->setBitmap( "tools/gui/images/transp_grid" ); + bmpCtrl->setBitmap( "ToolsModule:transp_grid_image" ); bmpCtrl->registerObject(); winCtrl->addObject( bmpCtrl ); @@ -273,9 +273,9 @@ void PostEffectVis::onPFXProcessed( PostEffect *pfx ) if ( tex ) - dSprintf( caption, 256, "%s[%i] input%i - %s [ %ix%i ]", name, pfx->getId(), i-1, pfx->mTexFilename[i-1].c_str(), tex->getWidth(), tex->getHeight() ); + dSprintf( caption, 256, "%s[%i] input%i - %s [ %ix%i ]", name, pfx->getId(), i-1, pfx->mTextureName[i-1], tex->getWidth(), tex->getHeight() ); else - dSprintf( caption, 256, "%s[%i] input%i - %s", name, pfx->getId(), i-1, pfx->mTexFilename[i-1].c_str() ); + dSprintf( caption, 256, "%s[%i] input%i - %s", name, pfx->getId(), i-1, pfx->mTextureName[i-1] ); pWinCtrl->setDataField( StringTable->insert("text"), NULL, caption ); } @@ -362,7 +362,7 @@ void PostEffectVis::_setDefaultCaption( VisWindow &vis, U32 texIndex ) else dSprintf( name, 256, "%s", pfx->getName() ); - dSprintf( caption, 256, "%s[%i] input%i - %s [NOT ENABLED]", name, pfx->getId(), texIndex-1, pfx->mTexFilename[texIndex-1].c_str() ); + dSprintf( caption, 256, "%s[%i] input%i - %s [NOT ENABLED]", name, pfx->getId(), texIndex-1, pfx->mTextureName[texIndex-1] ); winCtrl->setDataField( StringTable->insert("text"), NULL, caption ); } diff --git a/Engine/source/renderInstance/renderDeferredMgr.cpp b/Engine/source/renderInstance/renderDeferredMgr.cpp index e8222c224..e598e9140 100644 --- a/Engine/source/renderInstance/renderDeferredMgr.cpp +++ b/Engine/source/renderInstance/renderDeferredMgr.cpp @@ -881,9 +881,10 @@ bool DeferredMatInstance::init( const FeatureSet &features, { bool vaild = Parent::init(features, vertexFormat); - if (mMaterial && mMaterial->mDiffuseMapFilename[0].isNotEmpty() && mMaterial->mDiffuseMapFilename[0].substr(0, 1).equal("#")) + if (mMaterial && mMaterial->getDiffuseMap(0) != StringTable->EmptyString() && String(mMaterial->getDiffuseMap(0)).startsWith("#")) { - String texTargetBufferName = mMaterial->mDiffuseMapFilename[0].substr(1, mMaterial->mDiffuseMapFilename[0].length() - 1); + String difName = mMaterial->getDiffuseMap(0); + String texTargetBufferName = difName.substr(1, difName.length() - 1); NamedTexTarget *texTarget = NamedTexTarget::find(texTargetBufferName); RenderPassData* rpd = getPass(0); diff --git a/Engine/source/sfx/openal/sfxALProvider.cpp b/Engine/source/sfx/openal/sfxALProvider.cpp index 434d4a44c..df4e4f206 100644 --- a/Engine/source/sfx/openal/sfxALProvider.cpp +++ b/Engine/source/sfx/openal/sfxALProvider.cpp @@ -140,8 +140,8 @@ SFXDevice *SFXALProvider::createDevice( const String& deviceName, bool useHardwa ( _findDeviceInfo( deviceName) ); // Do we find one to create? - if ( info ) - return new SFXALDevice( this, mOpenAL, info->name, useHardware, maxBuffers ); + if (info) + return new SFXALDevice(this, mOpenAL, info->name, useHardware, maxBuffers); return NULL; } diff --git a/Engine/source/sfx/sfxProfile.cpp b/Engine/source/sfx/sfxProfile.cpp index d9cc3d56f..1f7c97a2c 100644 --- a/Engine/source/sfx/sfxProfile.cpp +++ b/Engine/source/sfx/sfxProfile.cpp @@ -90,7 +90,7 @@ SFXProfile::SFXProfile() SFXProfile::SFXProfile( SFXDescription* desc, const String& filename, bool preload ) : Parent( desc ), - mFilename( filename ), + mFilename( StringTable->insert(filename.c_str()) ), mPreload( preload ) { } @@ -167,7 +167,7 @@ bool SFXProfile::preload( bool server, String &errorStr ) // Validate the datablock... has nothing to do with mPreload. if( !server && NetConnection::filesWereDownloaded() && - ( mFilename.isEmpty() || !SFXResource::exists( mFilename ) ) ) + ( mFilename == StringTable->EmptyString() || !SFXResource::exists( mFilename ) ) ) return false; return true; @@ -180,10 +180,10 @@ void SFXProfile::packData(BitStream* stream) Parent::packData( stream ); char buffer[256]; - if ( mFilename.isEmpty() ) + if ( mFilename == StringTable->EmptyString()) buffer[0] = 0; else - dStrncpy( buffer, mFilename.c_str(), 256 ); + dStrncpy( buffer, mFilename, 256 ); stream->writeString( buffer ); stream->writeFlag( mPreload ); @@ -263,7 +263,7 @@ void SFXProfile::_onResourceChanged( const Torque::Path& path ) if( mPreload && !mDescription->mIsStreaming ) { if( !_preloadBuffer() ) - Con::errorf( "SFXProfile::_onResourceChanged() - failed to preload '%s'", mFilename.c_str() ); + Con::errorf( "SFXProfile::_onResourceChanged() - failed to preload '%s'", mFilename ); } mChangedSignal.trigger( this ); @@ -283,7 +283,7 @@ bool SFXProfile::_preloadBuffer() Resource& SFXProfile::getResource() { - if( !mResource && !mFilename.isEmpty() ) + if( !mResource && mFilename != StringTable->EmptyString()) mResource = SFXResource::load( mFilename ); return mResource; @@ -317,7 +317,7 @@ SFXBuffer* SFXProfile::_createBuffer() // Try to create through SFXDevie. - if( !mFilename.isEmpty() && SFX ) + if( mFilename != StringTable->EmptyString() && SFX ) { buffer = SFX->_createBuffer( mFilename, mDescription ); if( buffer ) @@ -325,7 +325,7 @@ SFXBuffer* SFXProfile::_createBuffer() #ifdef TORQUE_DEBUG const SFXFormat& format = buffer->getFormat(); Con::printf( "%s SFX: %s (%i channels, %i kHz, %.02f sec, %i kb)", - mDescription->mIsStreaming ? "Streaming" : "Loaded", mFilename.c_str(), + mDescription->mIsStreaming ? "Streaming" : "Loaded", mFilename, format.getChannels(), format.getSamplesPerSecond() / 1000, F32( buffer->getDuration() ) / 1000.0f, diff --git a/Engine/source/sfx/sfxProfile.h b/Engine/source/sfx/sfxProfile.h index ab1a4b1f0..4480e64de 100644 --- a/Engine/source/sfx/sfxProfile.h +++ b/Engine/source/sfx/sfxProfile.h @@ -93,7 +93,7 @@ class SFXProfile : public SFXTrack /// The sound filename. If no extension is specified /// the system will try .wav first then other formats. - String mFilename; + StringTableEntry mFilename; /// If true the sound data will be loaded from /// disk and possibly cached with the active @@ -155,6 +155,10 @@ class SFXProfile : public SFXTrack /// Returns the sound filename. const String& getSoundFileName() const { return mFilename; } + void setSoundFileName(StringTableEntry filename) { mFilename = filename; } + + bool getPreload() const { return mPreload; } + void setPreload(bool preload) { mPreload = preload; } /// @note This has nothing to do with mPreload. /// @see SimDataBlock::preload diff --git a/Engine/source/sfx/sfxTrack.h b/Engine/source/sfx/sfxTrack.h index e30acd007..c0dc8769a 100644 --- a/Engine/source/sfx/sfxTrack.h +++ b/Engine/source/sfx/sfxTrack.h @@ -73,6 +73,7 @@ class SFXTrack : public SimDataBlock /// Returns the description object for this sound profile. SFXDescription* getDescription() const { return mDescription; } + void setDescription(SFXDescription* desc) { mDescription = desc; } /// StringTableEntry getParameter( U32 index ) const diff --git a/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp b/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp index 21755d80c..b6c825864 100644 --- a/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp +++ b/Engine/source/shaderGen/GLSL/shaderFeatureGLSL.cpp @@ -2067,6 +2067,7 @@ RTLightingFeatGLSL::RTLightingFeatGLSL() void RTLightingFeatGLSL::processVert( Vector &componentList, const MaterialFeatureData &fd ) { + if (fd.features[MFT_ImposterVert]) return; MultiLine *meta = new MultiLine; ShaderConnector *connectComp = dynamic_cast( componentList[C_CONNECTOR] ); diff --git a/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp b/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp index 72252177a..bf826fea9 100644 --- a/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp +++ b/Engine/source/shaderGen/HLSL/shaderFeatureHLSL.cpp @@ -2138,10 +2138,11 @@ RTLightingFeatHLSL::RTLightingFeatHLSL() void RTLightingFeatHLSL::processVert( Vector &componentList, const MaterialFeatureData &fd ) { + if (fd.features[MFT_ImposterVert]) return; + MultiLine *meta = new MultiLine; ShaderConnector *connectComp = dynamic_cast( componentList[C_CONNECTOR] ); - getOutWorldToTangent(componentList, meta, fd); // Special case for lighting imposters. We dont have a vert normal and may not // have a normal map. Generate and pass the normal data the pixel shader needs. @@ -2206,6 +2207,7 @@ void RTLightingFeatHLSL::processVert( Vector &componentList, } addOutWsPosition( componentList, fd.features[MFT_UseInstancing], meta ); + getOutWorldToTangent(componentList, meta, fd); output = meta; } @@ -3025,14 +3027,13 @@ void ReflectionProbeFeatHLSL::processVert(Vector& componentLis output = meta; // Also output the worldToTanget transform which // we use to create the world space normal. - getOutWorldToTangent(componentList, meta, fd); + //getOutWorldToTangent(componentList, meta, fd); } void ReflectionProbeFeatHLSL::processPix(Vector &componentList, const MaterialFeatureData &fd) { - // Skip out on realtime lighting if we don't have a normal - // or we're doing some sort of baked lighting. + // Skip out on realtime lighting if we're doing some sort of baked lighting. // // TODO: We can totally detect for this in the material // feature setup... we should move it out of here! diff --git a/Engine/source/terrain/terrCellMaterial.cpp b/Engine/source/terrain/terrCellMaterial.cpp index 41ad84f0d..ff34a65ac 100644 --- a/Engine/source/terrain/terrCellMaterial.cpp +++ b/Engine/source/terrain/terrCellMaterial.cpp @@ -376,11 +376,11 @@ bool TerrainCellMaterial::_initShader(bool deferredMat, // have more than a base texture. if (mat->getDetailSize() <= 0 || mat->getDetailDistance() <= 0 || - mat->getDetailMap().isEmpty()) + mat->getDetailMap() == StringTable->EmptyString()) continue; // check for macro detail texture - if (!(mat->getMacroSize() <= 0 || mat->getMacroDistance() <= 0 || mat->getMacroMap().isEmpty())) + if (!(mat->getMacroSize() <= 0 || mat->getMacroDistance() <= 0 || mat->getMacroMap() == StringTable->EmptyString())) { if (deferredMat) features.addFeature(MFT_isDeferred, featureIndex); @@ -393,7 +393,7 @@ bool TerrainCellMaterial::_initShader(bool deferredMat, if (deferredMat) { - if (!(mat->getORMConfigMap().isEmpty())) + if (!(mat->getORMConfigMap() == StringTable->EmptyString())) { features.addFeature(MFT_TerrainORMMap, featureIndex); } @@ -409,12 +409,11 @@ bool TerrainCellMaterial::_initShader(bool deferredMat, normalMaps.increment(); // Skip normal maps if we need to. - if (!disableNormalMaps && mat->getNormalMap().isNotEmpty()) + if (!disableNormalMaps && mat->getNormalMap() != StringTable->EmptyString()) { features.addFeature(MFT_TerrainNormalMap, featureIndex); - normalMaps.last().set(mat->getNormalMap(), - &GFXNormalMapProfile, "TerrainCellMaterial::_initShader() - NormalMap"); + normalMaps.last() = mat->getNormalMapResource(); GFXFormat normalFmt = normalMaps.last().getFormat(); if (normalFmt == GFXFormatBC3) @@ -644,7 +643,7 @@ bool TerrainCellMaterial::_initShader(bool deferredMat, // have more than a base texture. if (mat->getDetailSize() <= 0 || mat->getDetailDistance() <= 0 || - mat->getDetailMap().isEmpty()) + mat->getDetailMap() == StringTable->EmptyString()) continue; mMaterialInfos[i]->mBlendDepthConst = mShader->getShaderConstHandle(avar("$blendDepth%d", i)); @@ -691,7 +690,7 @@ void TerrainCellMaterial::_updateMaterialConsts( ) // have more than a base texture. if (mat->getDetailSize() <= 0 || mat->getDetailDistance() <= 0 || - mat->getDetailMap().isEmpty()) + mat->getDetailMap() == StringTable->EmptyString()) continue; detailMatCount++; @@ -720,7 +719,7 @@ void TerrainCellMaterial::_updateMaterialConsts( ) // have more than a base texture. if (mat->getDetailSize() <= 0 || mat->getDetailDistance() <= 0 || - mat->getDetailMap().isEmpty()) + mat->getDetailMap() == StringTable->EmptyString()) continue; F32 detailSize = matInfo->mat->getDetailSize(); diff --git a/Engine/source/terrain/terrData.cpp b/Engine/source/terrain/terrData.cpp index 90fd7c2f2..a80e350f0 100644 --- a/Engine/source/terrain/terrData.cpp +++ b/Engine/source/terrain/terrData.cpp @@ -978,8 +978,17 @@ void TerrainBlock::addMaterial( const String &name, U32 insertAt ) { TerrainMaterial *mat = TerrainMaterial::findOrCreate( name ); + StringTableEntry newMatName = StringTable->insert(name.c_str()); + if ( insertAt == -1 ) { + //Check to ensure we're not trying to add one that already exists, as that'd be kinda dumb + for (U32 i = 0; i < mFile->mMaterials.size(); i++) + { + if (mFile->mMaterials[i]->getInternalName() == newMatName) + return; + } + mFile->mMaterials.push_back( mat ); mFile->_initMaterialInstMapping(); @@ -1332,13 +1341,6 @@ U32 TerrainBlock::packUpdate(NetConnection* con, U32 mask, BitStream *stream) if ( stream->writeFlag( mask & TransformMask ) ) mathWrite( *stream, getTransform() ); - if ( stream->writeFlag( mask & FileMask ) ) - { - S32 idasdasdf = getId(); - stream->write(mCRC); - stream->writeString( mTerrainAsset.getAssetId() ); - } - if ( stream->writeFlag( mask & SizeMask ) ) stream->write( mSquareSize ); @@ -1350,6 +1352,12 @@ U32 TerrainBlock::packUpdate(NetConnection* con, U32 mask, BitStream *stream) stream->write( mLightMapSize ); } + if ( stream->writeFlag( mask & FileMask ) ) + { + stream->write(mCRC); + stream->writeString( mTerrainAsset.getAssetId() ); + } + stream->writeFlag( mask & HeightMapChangeMask ); if ( stream->writeFlag( mask & MiscMask ) ) @@ -1374,20 +1382,13 @@ void TerrainBlock::unpackUpdate(NetConnection* con, BitStream *stream) setTransform( mat ); } - if ( stream->readFlag() ) // FileMask - { - stream->read(&mCRC); - - char buffer[256]; - stream->readString(buffer); - bool validAsset = setTerrainAsset(StringTable->insert(buffer)); - } if ( stream->readFlag() ) // SizeMask stream->read( &mSquareSize ); mCastShadows = stream->readFlag(); + bool baseTexSizeChanged = false; if ( stream->readFlag() ) // MaterialMask { U32 baseTexSize; @@ -1395,8 +1396,7 @@ void TerrainBlock::unpackUpdate(NetConnection* con, BitStream *stream) if ( mBaseTexSize != baseTexSize ) { mBaseTexSize = baseTexSize; - if ( isProperlyAdded() ) - _updateBaseTexture( NONE ); + baseTexSizeChanged = true; } U32 lightMapSize; @@ -1412,6 +1412,17 @@ void TerrainBlock::unpackUpdate(NetConnection* con, BitStream *stream) } } + if (stream->readFlag()) // FileMask + { + stream->read(&mCRC); + + char buffer[256]; + stream->readString(buffer); + bool validAsset = setTerrainAsset(StringTable->insert(buffer)); + } + if (baseTexSizeChanged && isProperlyAdded()) + _updateBaseTexture(NONE); + if ( stream->readFlag() && isProperlyAdded() ) // HeightMapChangeMask { _updateBounds(); diff --git a/Engine/source/terrain/terrData.h b/Engine/source/terrain/terrData.h index cfef5c29d..5550ea30e 100644 --- a/Engine/source/terrain/terrData.h +++ b/Engine/source/terrain/terrData.h @@ -124,7 +124,7 @@ protected: U32 mCRC; /// - FileName mTerrFileName; + StringTableEntry mTerrFileName; AssetPtr mTerrainAsset; StringTableEntry mTerrainAssetId; @@ -476,7 +476,7 @@ public: RayInfo *info, bool collideEmpty ); - const FileName& getTerrainFile() const { return mTerrFileName; } + const StringTableEntry getTerrainFile() const { return mTerrFileName; } void postLight(Vector &terrBlocks) {}; diff --git a/Engine/source/terrain/terrFile.cpp b/Engine/source/terrain/terrFile.cpp index d4f320222..2ff9f6333 100644 --- a/Engine/source/terrain/terrFile.cpp +++ b/Engine/source/terrain/terrFile.cpp @@ -259,7 +259,7 @@ void TerrainFile::_initMaterialInstMapping() for( U32 i = 0; i < mMaterials.size(); ++ i ) { - Torque::Path path( mMaterials[ i ]->getDiffuseMap() ); + Torque::Path path( mMaterials[ i ]->getDiffuseMap()); mMaterialInstMapping.push_back( path.getFileName() ); } diff --git a/Engine/source/terrain/terrMaterial.cpp b/Engine/source/terrain/terrMaterial.cpp index 47f0b3190..06b3b27bd 100644 --- a/Engine/source/terrain/terrMaterial.cpp +++ b/Engine/source/terrain/terrMaterial.cpp @@ -73,11 +73,11 @@ TerrainMaterial::TerrainMaterial() mIsSRGB(false), mInvertRoughness(false) { - initMapSlot(DiffuseMap); - initMapSlot(NormalMap); - initMapSlot(DetailMap); - initMapSlot(ORMConfigMap); - initMapSlot(MacroMap); + INIT_IMAGEASSET(DiffuseMap); + INIT_IMAGEASSET(NormalMap); + INIT_IMAGEASSET(DetailMap); + INIT_IMAGEASSET(ORMConfigMap); + INIT_IMAGEASSET(MacroMap); } TerrainMaterial::~TerrainMaterial() @@ -86,10 +86,10 @@ TerrainMaterial::~TerrainMaterial() void TerrainMaterial::initPersistFields() { - scriptBindMapSlot(DiffuseMap, TerrainMaterial,"Base Albedo stretched over the whole map"); + INITPERSISTFIELD_IMAGEASSET(DiffuseMap, TerrainMaterial,"Base Albedo stretched over the whole map"); addField( "diffuseSize", TypeF32, Offset( mDiffuseSize, TerrainMaterial ), "Used to scale the diffuse map to the material square" ); - scriptBindMapSlot(NormalMap, TerrainMaterial,"NormalMap"); + INITPERSISTFIELD_IMAGEASSET(NormalMap, TerrainMaterial,"NormalMap"); addField( "parallaxScale", TypeF32, Offset( mParallaxScale, TerrainMaterial ), "Used to scale the height from the normal map to give some self " "occlusion effect (aka parallax) to the terrain material" ); @@ -99,7 +99,7 @@ void TerrainMaterial::initPersistFields() addField("blendHeightContrast", TypeF32, Offset(mBlendContrast, TerrainMaterial), "A fixed value to add while blending using heightmap-based blending." "Higher numbers = larger blend radius."); - scriptBindMapSlot(DetailMap, TerrainMaterial, "Raises and lowers the RGB result of the Base Albedo up close."); + INITPERSISTFIELD_IMAGEASSET(DetailMap, TerrainMaterial, "Raises and lowers the RGB result of the Base Albedo up close."); addField( "detailSize", TypeF32, Offset( mDetailSize, TerrainMaterial ), "Used to scale the detail map to the material square" ); addField( "detailStrength", TypeF32, Offset( mDetailStrength, TerrainMaterial ), "Exponentially sharpens or lightens the detail map rendering on the material" ); addField( "detailDistance", TypeF32, Offset( mDetailDistance, TerrainMaterial ), "Changes how far camera can see the detail map rendering on the material" ); @@ -107,12 +107,12 @@ void TerrainMaterial::initPersistFields() addField( "useSideProjection", TypeBool, Offset( mSideProjection, TerrainMaterial ),"Makes that terrain material project along the sides of steep " "slopes instead of projected downwards"); - scriptBindMapSlot(ORMConfigMap, TerrainMaterial, "AO|Roughness|metalness map (uses DetailMap UV Coords)"); + INITPERSISTFIELD_IMAGEASSET(ORMConfigMap, TerrainMaterial, "AO|Roughness|metalness map (uses DetailMap UV Coords)"); addField("isSRGB", TypeBool, Offset(mIsSRGB, TerrainMaterial), "Is the PBR Config map's image in sRGB format?"); addField("invertRoughness", TypeBool, Offset(mInvertRoughness, TerrainMaterial), "Should the roughness channel of the PBR Config map be inverted?"); //Macro maps additions - scriptBindMapSlot(MacroMap, TerrainMaterial, "Raises and lowers the RGB result of the Base Albedo at a distance."); + INITPERSISTFIELD_IMAGEASSET(MacroMap, TerrainMaterial, "Raises and lowers the RGB result of the Base Albedo at a distance."); addField( "macroSize", TypeF32, Offset( mMacroSize, TerrainMaterial ), "Used to scale the Macro map to the material square" ); addField( "macroStrength", TypeF32, Offset( mMacroStrength, TerrainMaterial ), "Exponentially sharpens or lightens the Macro map rendering on the material" ); addField( "macroDistance", TypeF32, Offset( mMacroDistance, TerrainMaterial ), "Changes how far camera can see the Macro map rendering on the material" ); @@ -140,13 +140,6 @@ bool TerrainMaterial::onAdd() Con::warnf( "TerrainMaterial::onAdd() - Internal name collision; '%s' already exists!", mInternalName ); } - //bind any assets we have - bindMapSlot(DiffuseMap); - bindMapSlot(NormalMap); - bindMapSlot(DetailMap); - bindMapSlot(ORMConfigMap); - bindMapSlot(MacroMap); - set->addObject( this ); return true; @@ -175,7 +168,7 @@ TerrainMaterial* TerrainMaterial::findOrCreate( const char *nameOrPath ) { mat = new TerrainMaterial(); mat->setInternalName( nameOrPath ); - mat->mDiffuseMapFilename = nameOrPath; + mat->_setDiffuseMap(nameOrPath); mat->registerObject(); Sim::getRootGroup()->addObject( mat ); return mat; @@ -190,12 +183,12 @@ TerrainMaterial* TerrainMaterial::findOrCreate( const char *nameOrPath ) // fallback here just in case it gets "lost". mat = new TerrainMaterial(); mat->setInternalName( "warning_material" ); - mat->mDiffuseMapFilename = GFXTextureManager::getWarningTexturePath(); + mat->_setDiffuseMap(GFXTextureManager::getWarningTexturePath()); mat->mDiffuseSize = 500; - mat->mDetailMapFilename = GFXTextureManager::getWarningTexturePath(); + mat->_setDetailMap(StringTable->EmptyString()); mat->mDetailSize = 5; - mat->mMacroMapFilename = GFXTextureManager::getWarningTexturePath(); - mat->mMacroSize = 200; + mat->_setMacroMap(StringTable->EmptyString()); + mat->mMacroSize = 200; mat->registerObject(); Sim::getRootGroup()->addObject( mat ); @@ -203,3 +196,15 @@ TerrainMaterial* TerrainMaterial::findOrCreate( const char *nameOrPath ) return mat; } + +//declare general get, getAsset and set methods +//signatures are: +//using DiffuseMap as an example +//material.getDiffuseMap(); //returns the raw file referenced +//material.getDiffuseMapAsset(); //returns the asset id +//material.setDiffuseMap(%texture); //tries to set the asset and failing that attempts a flat file reference +DEF_IMAGEASSET_BINDS(TerrainMaterial, DiffuseMap); +DEF_IMAGEASSET_BINDS(TerrainMaterial, NormalMap); +DEF_IMAGEASSET_BINDS(TerrainMaterial, DetailMap); +DEF_IMAGEASSET_BINDS(TerrainMaterial, ORMConfigMap); +DEF_IMAGEASSET_BINDS(TerrainMaterial, MacroMap); diff --git a/Engine/source/terrain/terrMaterial.h b/Engine/source/terrain/terrMaterial.h index 7596714ba..daf111321 100644 --- a/Engine/source/terrain/terrMaterial.h +++ b/Engine/source/terrain/terrMaterial.h @@ -42,17 +42,20 @@ protected: //AssetPtr mDiffuseAsset; - DECLARE_TEXTUREMAP(TerrainMaterial, DiffuseMap); + DECLARE_IMAGEASSET(TerrainMaterial, DiffuseMap, onDiffuseMapChanged, GFXStaticTextureSRGBProfile); + DECLARE_IMAGEASSET_SETGET(TerrainMaterial, DiffuseMap); /// The size of the diffuse base map in meters /// used to generate its texture coordinates. F32 mDiffuseSize; /// - DECLARE_TEXTUREMAP(TerrainMaterial, NormalMap); + DECLARE_IMAGEASSET(TerrainMaterial, NormalMap, onNormalMapChanged, GFXNormalMapProfile); + DECLARE_IMAGEASSET_SETGET(TerrainMaterial, NormalMap); /// - DECLARE_TEXTUREMAP(TerrainMaterial, DetailMap); + DECLARE_IMAGEASSET(TerrainMaterial, DetailMap, onDetailMapChanged, GFXStaticTextureProfile); + DECLARE_IMAGEASSET_SETGET(TerrainMaterial, DetailMap); /// The size of the detail map in meters used /// to generate the texture coordinates for the @@ -66,7 +69,8 @@ protected: F32 mDetailDistance; /// - DECLARE_TEXTUREMAP(TerrainMaterial, ORMConfigMap); + DECLARE_IMAGEASSET(TerrainMaterial, ORMConfigMap, onORMConfigMapChanged, GFXStaticTextureProfile); + DECLARE_IMAGEASSET_SETGET(TerrainMaterial, ORMConfigMap); bool mIsSRGB; bool mInvertRoughness; @@ -77,7 +81,8 @@ protected: /// planes. bool mSideProjection; - DECLARE_TEXTUREMAP(TerrainMaterial, MacroMap); + DECLARE_IMAGEASSET(TerrainMaterial, MacroMap, onMacroMapChanged, GFXStaticTextureProfile); + DECLARE_IMAGEASSET_SETGET(TerrainMaterial, MacroMap); F32 mMacroSize; F32 mMacroStrength; F32 mMacroDistance; @@ -137,6 +142,12 @@ public: bool getInvertRoughness() const { return mInvertRoughness; } + void onDiffuseMapChanged() {} + void onNormalMapChanged() {} + void onDetailMapChanged() {} + void onORMConfigMapChanged() {} + void onMacroMapChanged() {} + }; #endif // _TERRMATERIAL_H_ diff --git a/Engine/source/terrain/terrRender.cpp b/Engine/source/terrain/terrRender.cpp index ee3856eef..0f3cd2a7b 100644 --- a/Engine/source/terrain/terrRender.cpp +++ b/Engine/source/terrain/terrRender.cpp @@ -96,20 +96,19 @@ void TerrainBlock::_updateMaterials() { TerrainMaterial *mat = mFile->mMaterials[i]; - if (mat->getDiffuseMap().isNotEmpty()) + if (mat->getDiffuseMap() != StringTable->EmptyString()) { - mBaseTextures[i].set(mat->getDiffuseMap(), &GFXStaticTextureSRGBProfile, - "TerrainBlock::_updateMaterials() - DiffuseMap"); + mBaseTextures[i] = mat->getDiffuseMapResource(); } else mBaseTextures[ i ] = GFXTexHandle(); // Find the maximum detail distance. - if ( mat->getDetailMap().isNotEmpty() && + if ( mat->getDetailMap() != StringTable->EmptyString() && mat->getDetailDistance() > mMaxDetailDistance ) mMaxDetailDistance = mat->getDetailDistance(); - if ( mat->getMacroMap().isNotEmpty() && + if ( mat->getMacroMap() != StringTable->EmptyString() && mat->getMacroDistance() > mMaxDetailDistance ) mMaxDetailDistance = mat->getMacroDistance(); } @@ -126,17 +125,19 @@ void TerrainBlock::_updateMaterials() for (U32 i = 0; i < mFile->mMaterials.size(); i++) { TerrainMaterial* mat = mFile->mMaterials[i]; + + if (mat->getDetailMap() != StringTable->EmptyString()) + detailTexArray[i] = mat->getDetailMapResource(); + if (mat->getMacroMap() != StringTable->EmptyString()) + macroTexArray[i] = mat->getMacroMapResource(); + if (mat->getNormalMap() != StringTable->EmptyString()) + normalTexArray[i] = mat->getNormalMapResource(); + + //depending on creation method this may or may not have been shoved into srgb space eroneously GFXTextureProfile* profile = &GFXStaticTextureProfile; if (mat->getIsSRGB()) profile = &GFXStaticTextureSRGBProfile; - - if (mat->getDetailMap().isNotEmpty()) - detailTexArray[i] = TEXMGR->createTexture(mat->getDetailMap(), profile); - if (mat->getMacroMap().isNotEmpty()) - macroTexArray[i] = TEXMGR->createTexture(mat->getMacroMap(), profile); - if (mat->getNormalMap().isNotEmpty()) - normalTexArray[i] = TEXMGR->createTexture(mat->getNormalMap(), profile); - if (mat->getORMConfigMap().isNotEmpty()) + if (mat->getORMConfigMap() != StringTable->EmptyString()) ormTexArray[i] = TEXMGR->createTexture(mat->getORMConfigMap(), profile); } diff --git a/Engine/source/ts/assimp/assimpAppMaterial.cpp b/Engine/source/ts/assimp/assimpAppMaterial.cpp index 120c1e51c..cf62d6cbb 100644 --- a/Engine/source/ts/assimp/assimpAppMaterial.cpp +++ b/Engine/source/ts/assimp/assimpAppMaterial.cpp @@ -170,14 +170,14 @@ void AssimpAppMaterial::initMaterial(const Torque::Path& path, Material* mat) co { torquePath = texName.C_Str(); if (!torquePath.isEmpty()) - mat->mDiffuseMapFilename[0] = cleanTextureName(torquePath, cleanFile, path, false); + mat->mDiffuseMapName[0] = cleanTextureName(torquePath, cleanFile, path, false); } if (AI_SUCCESS == mAIMat->Get(AI_MATKEY_TEXTURE(aiTextureType_NORMALS, 0), texName)) { torquePath = texName.C_Str(); if (!torquePath.isEmpty()) - mat->mNormalMapFilename[0] = cleanTextureName(torquePath, cleanFile, path, false); + mat->mNormalMapName[0] = cleanTextureName(torquePath, cleanFile, path, false); } #ifdef TORQUE_PBR_MATERIALS @@ -194,20 +194,20 @@ void AssimpAppMaterial::initMaterial(const Torque::Path& path, Material* mat) co { // If we have either map, fill all three slots if (rmName.isNotEmpty()) { - mat->mRoughMapFilename[0] = cleanTextureName(rmName, cleanFile, path, false); // Roughness + mat->mRoughMapName[0] = cleanTextureName(rmName, cleanFile, path, false); // Roughness mat->mRoughnessChan[0] = 1.0f; mat->mInvertRoughness[0] = (floatVal == 1.0f); - mat->mMetalMapFilename[0] = cleanTextureName(rmName, cleanFile, path, false); // Metallic + mat->mMetalMapName[0] = cleanTextureName(rmName, cleanFile, path, false); // Metallic mat->mMetalChan[0] = 2.0f; } if (aoName.isNotEmpty()) { - mat->mAOMapFilename[0] = cleanTextureName(aoName, cleanFile, path, false); // occlusion + mat->mAOMapName[0] = cleanTextureName(aoName, cleanFile, path, false); // occlusion mat->mAOChan[0] = 0.0f; } else { - mat->mAOMapFilename[0] = cleanTextureName(rmName, cleanFile, path, false); // occlusion + mat->mAOMapName[0] = cleanTextureName(rmName, cleanFile, path, false); // occlusion mat->mAOChan[0] = 0.0f; } } diff --git a/Engine/source/ts/assimp/assimpShapeLoader.cpp b/Engine/source/ts/assimp/assimpShapeLoader.cpp index fccdd13ef..17b0a970b 100644 --- a/Engine/source/ts/assimp/assimpShapeLoader.cpp +++ b/Engine/source/ts/assimp/assimpShapeLoader.cpp @@ -805,7 +805,7 @@ TSShape* assimpLoadShape(const Torque::Path &path) // Allow TSShapeConstructor object to override properties ColladaUtils::getOptions().reset(); - TSShapeConstructor* tscon = TSShapeConstructor::findShapeConstructor(path.getFullPath()); + TSShapeConstructor* tscon = TSShapeConstructor::findShapeConstructorByFilename(path.getFullPath()); if (tscon) { ColladaUtils::getOptions() = tscon->mOptions; diff --git a/Engine/source/ts/collada/colladaAppMaterial.cpp b/Engine/source/ts/collada/colladaAppMaterial.cpp index 40bbb9852..81eafc1e3 100644 --- a/Engine/source/ts/collada/colladaAppMaterial.cpp +++ b/Engine/source/ts/collada/colladaAppMaterial.cpp @@ -208,8 +208,8 @@ Material *ColladaAppMaterial::createMaterial(const Torque::Path& path) const Material *newMat = MATMGR->allocateAndRegister( cleanName, getName() ); Con::setVariable("$Con::File", oldScriptFile); // restore script path - newMat->mDiffuseMapFilename[0] = diffuseMap; - newMat->mNormalMapFilename[0] = normalMap; + newMat->mDiffuseMapName[0] = diffuseMap; + newMat->mNormalMapName[0] = normalMap; newMat->mDiffuse[0] = diffuseColor; newMat->mRoughness[0] = roughness; diff --git a/Engine/source/ts/collada/colladaShapeLoader.cpp b/Engine/source/ts/collada/colladaShapeLoader.cpp index bd6d47255..8021d25f1 100644 --- a/Engine/source/ts/collada/colladaShapeLoader.cpp +++ b/Engine/source/ts/collada/colladaShapeLoader.cpp @@ -497,8 +497,13 @@ void updateMaterialsScript(const Torque::Path &path, bool copyTextures = false) { Material *mat = dynamic_cast( persistMgr.getDirtyList()[iMat].getObject() ); - copySketchupTexture(path, mat->mDiffuseMapFilename[0]); - copySketchupTexture(path, mat->mNormalMapFilename[0]); + String difMapName; + copySketchupTexture(path, difMapName); + mat->mDiffuseMapName[0] = difMapName; + + String normMapName; + copySketchupTexture(path, normMapName); + mat->mNormalMapName[0] = normMapName; } } @@ -688,7 +693,7 @@ TSShape* loadColladaShape(const Torque::Path &path) // Allow TSShapeConstructor object to override properties ColladaUtils::getOptions().reset(); - TSShapeConstructor* tscon = TSShapeConstructor::findShapeConstructor(path.getFullPath()); + TSShapeConstructor* tscon = TSShapeConstructor::findShapeConstructorByFilename(path.getFullPath()); if (tscon) { ColladaUtils::getOptions() = tscon->mOptions; diff --git a/Engine/source/ts/collada/colladaUtils.cpp b/Engine/source/ts/collada/colladaUtils.cpp index 676fa3dc2..578d7275b 100644 --- a/Engine/source/ts/collada/colladaUtils.cpp +++ b/Engine/source/ts/collada/colladaUtils.cpp @@ -1030,8 +1030,8 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const { Torque::Path diffusePath; - if (mat->mDiffuseMapFilename[0].isNotEmpty()) - diffusePath = mat->mDiffuseMapFilename[0]; + if (mat->mDiffuseMapName[0] != StringTable->EmptyString()) + diffusePath = mat->mDiffuseMapName[0]; else diffusePath = String("warningMat"); @@ -1040,8 +1040,8 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const } else { - if (mat->mDiffuseMapFilename[0].isNotEmpty()) - diffuseMap += mat->mDiffuseMapFilename[0]; + if (mat->mDiffuseMapName[0] != StringTable->EmptyString()) + diffuseMap += mat->mDiffuseMapName[0]; else diffuseMap += "warningMat"; } @@ -1316,8 +1316,8 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const { Torque::Path diffusePath; - if (mat->mDiffuseMapFilename[0].isNotEmpty()) - diffusePath = mat->mDiffuseMapFilename[0]; + if (mat->mDiffuseMapName[0] != StringTable->EmptyString()) + diffusePath = mat->mDiffuseMapName[0]; else diffusePath = String("warningMat"); @@ -1326,8 +1326,8 @@ void ColladaUtils::exportColladaMaterials(tinyxml2::XMLElement* rootNode, const } else { - if (mat->mDiffuseMapFilename[0].isNotEmpty()) - diffuseMap += mat->mDiffuseMapFilename[0]; + if (mat->mDiffuseMapName[0] != StringTable->EmptyString()) + diffuseMap += mat->mDiffuseMapName[0]; else diffuseMap += "warningMat"; } diff --git a/Engine/source/ts/tsLastDetail.cpp b/Engine/source/ts/tsLastDetail.cpp index 57710833d..9af2c22fa 100644 --- a/Engine/source/ts/tsLastDetail.cpp +++ b/Engine/source/ts/tsLastDetail.cpp @@ -175,12 +175,12 @@ void TSLastDetail::update( bool forceUpdate ) // comparisons... this might be different if the DAEs have been // deleted from the install. String shapeFile( mCachePath ); - if ( !Platform::isFile( shapeFile ) ) + if ( !Torque::FS::IsFile( shapeFile ) ) { Torque::Path path(shapeFile); path.setExtension("cached.dts"); shapeFile = path.getFullPath(); - if ( !Platform::isFile( shapeFile ) ) + if ( !Torque::FS::IsFile( shapeFile ) ) { Con::errorf( "TSLastDetail::update - '%s' could not be found!", mCachePath.c_str() ); return; @@ -218,8 +218,8 @@ void TSLastDetail::update( bool forceUpdate ) // Setup the material for this imposter. mMaterial = MATMGR->allocateAndRegister( String::EmptyString ); mMaterial->mAutoGenerated = true; - mMaterial->mDiffuseMapFilename[0] = diffuseMapPath; - mMaterial->mNormalMapFilename[0] = _getNormalMapPath(); + mMaterial->_setDiffuseMap(diffuseMapPath,0); + mMaterial->_setNormalMap(_getNormalMapPath(), 0); mMaterial->mImposterLimits.set( (mNumPolarSteps * 2) + 1, mNumEquatorSteps, mPolarAngle, mIncludePoles ); mMaterial->mTranslucent = true; mMaterial->mTranslucentBlendOp = Material::None; diff --git a/Engine/source/ts/tsMesh.cpp b/Engine/source/ts/tsMesh.cpp index 952491193..bce5422c0 100644 --- a/Engine/source/ts/tsMesh.cpp +++ b/Engine/source/ts/tsMesh.cpp @@ -264,7 +264,7 @@ void TSMesh::innerRender( TSMaterialList *materials, const TSRenderState &rdata, // If we don't have a material instance after the overload then // there is nothing to render... skip this primitive. matInst = state->getOverrideMaterial( matInst ); - if ( !matInst || !matInst->isValid()) + if ( !matInst || !matInst->isValid() || !matInst->getMaterial()) continue; // If the material needs lights then gather them diff --git a/Engine/source/ts/tsShapeConstruct.cpp b/Engine/source/ts/tsShapeConstruct.cpp index b5c7fe9a0..232f21895 100644 --- a/Engine/source/ts/tsShapeConstruct.cpp +++ b/Engine/source/ts/tsShapeConstruct.cpp @@ -38,46 +38,52 @@ //#define DEBUG_SPEW -ConsoleDocClass( TSShapeConstructor, +ConsoleDocClass(TSShapeConstructor, "@brief An object used to modify a DTS or COLLADA shape model after it has " "been loaded by Torque\n\n" "@ingroup gameObjects\n" ); -IMPLEMENT_CALLBACK( TSShapeConstructor, onLoad, void, (), (), +IMPLEMENT_CALLBACK(TSShapeConstructor, onLoad, void, (), (), "Called immediately after the DTS or DAE file has been loaded; before the " "shape data is available to any other object (StaticShape, Player etc). This " "is where you should put any post-load commands to modify the shape in-memory " - "such as addNode, renameSequence etc." ) + "such as addNode, renameSequence etc.") -IMPLEMENT_CALLBACK( TSShapeConstructor, onUnload, void, (), (), +IMPLEMENT_CALLBACK(TSShapeConstructor, onUnload, void, (), (), "Called when the DTS or DAE resource is flushed from memory. Not normally " - "required, but may be useful to perform cleanup." ) + "required, but may be useful to perform cleanup.") -ImplementEnumType( TSShapeConstructorUpAxis, +ImplementEnumType(TSShapeConstructorUpAxis, "Axis to use for upwards direction when importing from Collada.\n\n" - "@ingroup TSShapeConstructor" ) - { UPAXISTYPE_X_UP, "X_AXIS" }, - { UPAXISTYPE_Y_UP, "Y_AXIS" }, - { UPAXISTYPE_Z_UP, "Z_AXIS" }, - { UPAXISTYPE_COUNT, "DEFAULT" } + "@ingroup TSShapeConstructor") +{ +UPAXISTYPE_X_UP, "X_AXIS" +}, +{ UPAXISTYPE_Y_UP, "Y_AXIS" }, +{ UPAXISTYPE_Z_UP, "Z_AXIS" }, +{ UPAXISTYPE_COUNT, "DEFAULT" } EndImplementEnumType; -ImplementEnumType( TSShapeConstructorLodType, +ImplementEnumType(TSShapeConstructorLodType, "\n\n" - "@ingroup TSShapeConstructor" ) - { ColladaUtils::ImportOptions::DetectDTS, "DetectDTS" }, - { ColladaUtils::ImportOptions::SingleSize, "SingleSize" }, - { ColladaUtils::ImportOptions::TrailingNumber, "TrailingNumber" }, -EndImplementEnumType; + "@ingroup TSShapeConstructor") +{ + ColladaUtils::ImportOptions::DetectDTS, "DetectDTS" +}, +{ ColladaUtils::ImportOptions::SingleSize, "SingleSize" }, +{ ColladaUtils::ImportOptions::TrailingNumber, "TrailingNumber" }, + EndImplementEnumType; ImplementEnumType(TSShapeConstructorAnimType, "\n\n" - "@ingroup TSShapeConstructor" ) - { ColladaUtils::ImportOptions::FrameCount, "Frames" }, - { ColladaUtils::ImportOptions::Seconds, "Seconds" }, - { ColladaUtils::ImportOptions::Milliseconds, "Milliseconds" }, -EndImplementEnumType; + "@ingroup TSShapeConstructor") +{ + ColladaUtils::ImportOptions::FrameCount, "Frames" +}, +{ ColladaUtils::ImportOptions::Seconds, "Seconds" }, +{ ColladaUtils::ImportOptions::Milliseconds, "Milliseconds" }, + EndImplementEnumType; //----------------------------------------------------------------------------- @@ -86,14 +92,14 @@ String TSShapeConstructor::smCapsuleShapePath("tools/shapes/unit_capsule.dts"); String TSShapeConstructor::smCubeShapePath("tools/shapes/unit_cube.dts"); String TSShapeConstructor::smSphereShapePath("tools/shapes/unit_sphere.dts"); -ResourceRegisterPostLoadSignal< TSShape > TSShapeConstructor::_smAutoLoad( &TSShapeConstructor::_onTSShapeLoaded ); -ResourceRegisterUnloadSignal< TSShape > TSShapeConstructor::_smAutoUnload( &TSShapeConstructor::_onTSShapeUnloaded ); +ResourceRegisterPostLoadSignal< TSShape > TSShapeConstructor::_smAutoLoad(&TSShapeConstructor::_onTSShapeLoaded); +ResourceRegisterUnloadSignal< TSShape > TSShapeConstructor::_smAutoUnload(&TSShapeConstructor::_onTSShapeUnloaded); -void TSShapeConstructor::_onTSShapeLoaded( Resource< TSShape >& resource ) +void TSShapeConstructor::_onTSShapeLoaded(Resource< TSShape >& resource) { - TSShapeConstructor* ctor = findShapeConstructor( resource.getPath().getFullPath() ); - if( ctor ) - ctor->_onLoad( resource ); + TSShapeConstructor* ctor = findShapeConstructorByFilename(resource.getPath().getFullPath()); + if (ctor) + ctor->_onLoad(resource); if (ctor && ctor->mShape && ctor->mShape->needsReinit()) { @@ -101,20 +107,20 @@ void TSShapeConstructor::_onTSShapeLoaded( Resource< TSShape >& resource ) } } -void TSShapeConstructor::_onTSShapeUnloaded( const Torque::Path& path, TSShape* shape ) +void TSShapeConstructor::_onTSShapeUnloaded(const Torque::Path& path, TSShape* shape) { - TSShapeConstructor* ctor = findShapeConstructor( path.getFullPath() ); - if( ctor && ( ctor->getShape() == shape ) ) + TSShapeConstructor* ctor = findShapeConstructorByFilename(path.getFullPath()); + if (ctor && (ctor->getShape() == shape)) ctor->_onUnload(); } // TSShape names are case insensitive -static inline bool namesEqual( const String& nameA, const String& nameB ) +static inline bool namesEqual(const String& nameA, const String& nameB) { - return nameA.equal( nameB, String::NoCase ); + return nameA.equal(nameB, String::NoCase); } -static void SplitSequencePathAndName( String& srcPath, String& srcName ) +static void SplitSequencePathAndName(String& srcPath, String& srcName) { srcName = ""; @@ -132,7 +138,7 @@ static void SplitSequencePathAndName( String& srcPath, String& srcName ) // now 'split' is at the end of the path, and 'split2' is at the start of the sequence name srcName = srcPath.substr(split2); - srcPath = srcPath.erase(split, srcPath.length()-split); + srcPath = srcPath.erase(split, srcPath.length() - split); } } @@ -141,8 +147,11 @@ static void SplitSequencePathAndName( String& srcPath, String& srcName ) IMPLEMENT_CONOBJECT(TSShapeConstructor); TSShapeConstructor::TSShapeConstructor() - : mShapePath(""), mLoadingShape(false) + : mLoadingShape(false) { + mShapeAssetId = StringTable->EmptyString(); + mShapeAsset = StringTable->EmptyString(); + mOptions.upAxis = UPAXISTYPE_COUNT; mOptions.unit = -1.0f; mOptions.lodType = ColladaUtils::ImportOptions::TrailingNumber; @@ -181,37 +190,37 @@ TSShapeConstructor::~TSShapeConstructor() { } -bool TSShapeConstructor::addSequenceFromField( void *obj, const char *index, const char *data ) +bool TSShapeConstructor::addSequenceFromField(void* obj, const char* index, const char* data) { - TSShapeConstructor *pObj = static_cast( obj ); + TSShapeConstructor* pObj = static_cast(obj); - if ( data && data[0] ) - pObj->mSequences.push_back( FileName(data) ); + if (data && data[0]) + pObj->mSequenceAssetIds.push_back(StringTable->insert(data)); return false; } void TSShapeConstructor::initPersistFields() { - addGroup( "Media" ); - addField( "baseShape", TypeStringFilename, Offset(mShapePath, TSShapeConstructor), + addGroup("Media"); + addField("baseShapeAsset", TypeShapeAssetId, Offset(mShapeAssetId, TSShapeConstructor), "Specifies the path to the DTS or DAE file to be operated on by this object.\n" "Since the TSShapeConstructor script must be in the same folder as the DTS or " "DAE file, it is recommended to use a relative path so that the shape and " "script files can be copied to another location without having to modify the " - "path." ); - endGroup( "Media" ); + "path."); + endGroup("Media"); - addGroup( "Collada" ); - addField( "upAxis", TYPEID< domUpAxisType >(), Offset(mOptions.upAxis, TSShapeConstructor), + addGroup("Collada"); + addField("upAxis", TYPEID< domUpAxisType >(), Offset(mOptions.upAxis, TSShapeConstructor), "Override the element in the COLLADA (.dae) file. No effect for DTS files.\n" "Set to one of the following values:\n" "
X_AXIS
Positive X points up. Model will be rotated into Torque's coordinate system (Z up).
" "
Y_AXIS
Positive Y points up. Model will be rotated into Torque's coordinate system (Z up).
" "
Z_AXIS
Positive Z points up. No rotation will be applied to the model.
" - "
DEFAULT
The default value. Use the value in the .dae file (defaults to Z_AXIS if the element is not present).
" ); + "
DEFAULT
The default value. Use the value in the .dae file (defaults to Z_AXIS if the element is not present).
"); - addField( "unit", TypeF32, Offset(mOptions.unit, TSShapeConstructor), + addField("unit", TypeF32, Offset(mOptions.unit, TSShapeConstructor), "Override the element in the COLLADA (.dae) file. No effect for DTS files.\n" "COLLADA (.dae) files usually contain a element that indicates the " "'real world' units that the model is described in. It means you can work " @@ -224,26 +233,26 @@ void TSShapeConstructor::initPersistFields() "and the building scaled down by 0.3048, given them both the correct scale " "relative to each other.
\n" "Omit the field or set to -1 to use the value in the .dae file (1.0 if the " - " element is not present)" ); + " element is not present)"); - addField( "lodType", TYPEID< ColladaUtils::ImportOptions::eLodType >(), Offset(mOptions.lodType, TSShapeConstructor), + addField("lodType", TYPEID< ColladaUtils::ImportOptions::eLodType >(), Offset(mOptions.lodType, TSShapeConstructor), "Control how the COLLADA (.dae) importer interprets LOD in the model. No effect for DTS files.\n" "Set to one of the following values:\n" "
DetectDTS
The default value. Instructs the importer to search for a 'baseXXX->startXXX' node hierarchy at the root level. If found, the importer acts as if ''TrailingNumber'' was set. Otherwise, all geometry is imported at a single detail size.
" "
SingleSize
All geometry is imported at a fixed detail size. Numbers at the end of geometry node's are ignored.
" "
TrailingNumber
Numbers at the end of geometry node's name are interpreted as the detail size (similar to DTS exporting). Geometry instances with the same base name but different trailing number are grouped into the same object.
" - "
DEFAULT
The default value. Use the value in the .dae file (defaults to Z_AXIS if the element is not present).
" ); + "
DEFAULT
The default value. Use the value in the .dae file (defaults to Z_AXIS if the element is not present).
"); - addField( "singleDetailSize", TypeS32, Offset(mOptions.singleDetailSize, TSShapeConstructor), + addField("singleDetailSize", TypeS32, Offset(mOptions.singleDetailSize, TSShapeConstructor), "Sets the detail size when lodType is set to SingleSize. No effect otherwise, and no effect for DTS files.\n" - "@see lodType" ); + "@see lodType"); - addField( "matNamePrefix", TypeRealString, Offset(mOptions.matNamePrefix, TSShapeConstructor), + addField("matNamePrefix", TypeRealString, Offset(mOptions.matNamePrefix, TSShapeConstructor), "Prefix to apply to all material map names in the COLLADA (.dae) file. No effect for DTS files.\n" "This field is useful to avoid material name clashes for exporters that generate generic material " - "names like \"texture0\" or \"material1\"." ); + "names like \"texture0\" or \"material1\"."); - addField( "alwaysImport", TypeRealString, Offset(mOptions.alwaysImport, TSShapeConstructor), + addField("alwaysImport", TypeRealString, Offset(mOptions.alwaysImport, TSShapeConstructor), "TAB separated patterns of nodes to import even if in neverImport list. No effect for DTS files.\n" "Torque allows unwanted nodes in COLLADA (.dae) files to to be ignored " "during import. This field contains a TAB separated list of patterns to " @@ -257,17 +266,17 @@ void TSShapeConstructor::initPersistFields() " alwaysImport = \"mount*\" TAB \"eye\";\n" " neverImport = \"*-PIVOT\";\n" "}\n" - "@endtsexample" ); + "@endtsexample"); - addField( "neverImport", TypeRealString, Offset(mOptions.neverImport, TSShapeConstructor), + addField("neverImport", TypeRealString, Offset(mOptions.neverImport, TSShapeConstructor), "TAB separated patterns of nodes to ignore on loading. No effect for DTS files.\n" "Torque allows unwanted nodes in COLLADA (.dae) files to to be ignored " "during import. This field contains a TAB separated list of patterns to " "match node names. Any node that matches one of the patterns in the list will " "not be imported (unless it matches the alwaysImport list.\n" - "@see alwaysImport" ); + "@see alwaysImport"); - addField( "alwaysImportMesh", TypeRealString, Offset(mOptions.alwaysImportMesh, TSShapeConstructor), + addField("alwaysImportMesh", TypeRealString, Offset(mOptions.alwaysImportMesh, TSShapeConstructor), "TAB separated patterns of meshes to import even if in neverImportMesh list. No effect for DTS files.\n" "Torque allows unwanted meshes in COLLADA (.dae) files to to be ignored " "during import. This field contains a TAB separated list of patterns to " @@ -281,15 +290,15 @@ void TSShapeConstructor::initPersistFields() " alwaysImportMesh = \"body*\" TAB \"armor\" TAB \"bounds\";\n" " neverImportMesh = \"*-dummy\";\n" "}\n" - "@endtsexample" ); + "@endtsexample"); - addField( "neverImportMesh", TypeRealString, Offset(mOptions.neverImportMesh, TSShapeConstructor), + addField("neverImportMesh", TypeRealString, Offset(mOptions.neverImportMesh, TSShapeConstructor), "TAB separated patterns of meshes to ignore on loading. No effect for DTS files.\n" "Torque allows unwanted meshes in COLLADA (.dae) files to to be ignored " "during import. This field contains a TAB separated list of patterns to " "match mesh names. Any mesh that matches one of the patterns in the list will " "not be imported (unless it matches the alwaysImportMesh list.\n" - "@see alwaysImportMesh" ); + "@see alwaysImportMesh"); addField("neverImportMat", TypeRealString, Offset(mOptions.neverImportMat, TSShapeConstructor), "TAB separated patterns of materials to ignore on loading. No effect for DTS files.\n" @@ -298,57 +307,57 @@ void TSShapeConstructor::initPersistFields() "match material names. Any material that matches one of the patterns in the list will " "not be imported"); - addField( "ignoreNodeScale", TypeBool, Offset(mOptions.ignoreNodeScale, TSShapeConstructor), + addField("ignoreNodeScale", TypeBool, Offset(mOptions.ignoreNodeScale, TSShapeConstructor), "Ignore elements inside COLLADA s. No effect for DTS files.\n" "This field is a workaround for certain exporters that generate bad node " - "scaling, and is not usually required." ); + "scaling, and is not usually required."); - addField( "adjustCenter", TypeBool, Offset(mOptions.adjustCenter, TSShapeConstructor), - "Translate COLLADA model on import so the origin is at the center. No effect for DTS files." ); + addField("adjustCenter", TypeBool, Offset(mOptions.adjustCenter, TSShapeConstructor), + "Translate COLLADA model on import so the origin is at the center. No effect for DTS files."); - addField( "adjustFloor", TypeBool, Offset(mOptions.adjustFloor, TSShapeConstructor), + addField("adjustFloor", TypeBool, Offset(mOptions.adjustFloor, TSShapeConstructor), "Translate COLLADA model on import so origin is at the (Z axis) bottom of the model. No effect for DTS files.\n" "This can be used along with adjustCenter to have the origin at the " "center of the bottom of the model.\n" - "@see adjustCenter" ); + "@see adjustCenter"); - addField( "forceUpdateMaterials", TypeBool, Offset(mOptions.forceUpdateMaterials, TSShapeConstructor), + addField("forceUpdateMaterials", TypeBool, Offset(mOptions.forceUpdateMaterials, TSShapeConstructor), "Forces update of the materials." TORQUE_SCRIPT_EXTENSION " file in the same folder as the COLLADA " "(.dae) file, even if Materials already exist. No effect for DTS files.\n" - "Normally only Materials that are not already defined are written to materials." TORQUE_SCRIPT_EXTENSION "." ); + "Normally only Materials that are not already defined are written to materials." TORQUE_SCRIPT_EXTENSION "."); // Fields added for assimp options - addField( "convertLeftHanded", TypeBool, Offset(mOptions.convertLeftHanded, TSShapeConstructor), - "Convert to left handed coordinate system." ); - addField( "calcTangentSpace", TypeBool, Offset(mOptions.calcTangentSpace, TSShapeConstructor), - "Calculate tangents and bitangents, if possible." ); - addField( "genUVCoords", TypeBool, Offset(mOptions.genUVCoords, TSShapeConstructor), - "Convert spherical, cylindrical, box and planar mapping to proper UVs." ); - addField( "transformUVCoords", TypeBool, Offset(mOptions.transformUVCoords, TSShapeConstructor), - "Preprocess UV transformations (scaling, translation ...)." ); - addField( "flipUVCoords", TypeBool, Offset(mOptions.flipUVCoords, TSShapeConstructor), + addField("convertLeftHanded", TypeBool, Offset(mOptions.convertLeftHanded, TSShapeConstructor), + "Convert to left handed coordinate system."); + addField("calcTangentSpace", TypeBool, Offset(mOptions.calcTangentSpace, TSShapeConstructor), + "Calculate tangents and bitangents, if possible."); + addField("genUVCoords", TypeBool, Offset(mOptions.genUVCoords, TSShapeConstructor), + "Convert spherical, cylindrical, box and planar mapping to proper UVs."); + addField("transformUVCoords", TypeBool, Offset(mOptions.transformUVCoords, TSShapeConstructor), + "Preprocess UV transformations (scaling, translation ...)."); + addField("flipUVCoords", TypeBool, Offset(mOptions.flipUVCoords, TSShapeConstructor), "This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.\n" - "Assimp uses TL(0,0):BR(1,1). T3D uses TL(0,1):BR(1,0). This will be needed for most textured models." ); - addField( "findInstances", TypeBool, Offset(mOptions.findInstances, TSShapeConstructor), - "Search for instanced meshes and remove them by references to one master." ); - addField( "limitBoneWeights", TypeBool, Offset(mOptions.limitBoneWeights, TSShapeConstructor), - "Limit bone weights to 4 per vertex." ); - addField( "joinIdenticalVerts", TypeBool, Offset(mOptions.joinIdenticalVerts, TSShapeConstructor), - "Identifies and joins identical vertex data sets within all imported meshes." ); - addField( "reverseWindingOrder", TypeBool, Offset(mOptions.reverseWindingOrder, TSShapeConstructor), - "This step adjusts the output face winding order to be clockwise. The default assimp face winding order is counter clockwise." ); - addField( "invertNormals", TypeBool, Offset(mOptions.invertNormals, TSShapeConstructor), - "Reverse the normal vector direction for all normals." ); - addField( "removeRedundantMats", TypeBool, Offset(mOptions.removeRedundantMats, TSShapeConstructor), - "Removes redundant materials." ); - addField( "animTiming", TYPEID< ColladaUtils::ImportOptions::eAnimTimingType >(), Offset(mOptions.animTiming, TSShapeConstructor), - "How to import timing data as frames, seconds or milliseconds." ); + "Assimp uses TL(0,0):BR(1,1). T3D uses TL(0,1):BR(1,0). This will be needed for most textured models."); + addField("findInstances", TypeBool, Offset(mOptions.findInstances, TSShapeConstructor), + "Search for instanced meshes and remove them by references to one master."); + addField("limitBoneWeights", TypeBool, Offset(mOptions.limitBoneWeights, TSShapeConstructor), + "Limit bone weights to 4 per vertex."); + addField("joinIdenticalVerts", TypeBool, Offset(mOptions.joinIdenticalVerts, TSShapeConstructor), + "Identifies and joins identical vertex data sets within all imported meshes."); + addField("reverseWindingOrder", TypeBool, Offset(mOptions.reverseWindingOrder, TSShapeConstructor), + "This step adjusts the output face winding order to be clockwise. The default assimp face winding order is counter clockwise."); + addField("invertNormals", TypeBool, Offset(mOptions.invertNormals, TSShapeConstructor), + "Reverse the normal vector direction for all normals."); + addField("removeRedundantMats", TypeBool, Offset(mOptions.removeRedundantMats, TSShapeConstructor), + "Removes redundant materials."); + addField("animTiming", TYPEID< ColladaUtils::ImportOptions::eAnimTimingType >(), Offset(mOptions.animTiming, TSShapeConstructor), + "How to import timing data as frames, seconds or milliseconds."); addField("animFPS", TypeS32, Offset(mOptions.animFPS, TSShapeConstructor), "FPS value to use if timing is set in frames and the animations does not have an fps set."); - endGroup( "Collada" ); + endGroup("Collada"); - addGroup( "Sequences" ); - addProtectedField( "sequence", TypeStringFilename, NULL, &addSequenceFromField, &emptyStringProtectedGetFn, + addGroup("Sequences"); + addProtectedField("sequence", TypeStringFilename, NULL, &addSequenceFromField, &emptyStringProtectedGetFn, "Legacy method of adding sequences to a DTS or DAE shape after loading.\n\n" "@tsexample\n" "singleton TSShapeConstructor(MyShapeDae)\n" @@ -358,8 +367,8 @@ void TSShapeConstructor::initPersistFields() " sequence = \"../anims/walk.dae walk\";\n" " sequence = \"../anims/jump.dsq jump\";\n" "}\n" - "@endtsexample" ); - endGroup( "Sequences" ); + "@endtsexample"); + endGroup("Sequences"); Parent::initPersistFields(); } @@ -368,33 +377,51 @@ void TSShapeConstructor::consoleInit() { Parent::consoleInit(); - Con::addVariable( "$pref::TSShapeConstructor::CapsuleShapePath", TypeRealString, &TSShapeConstructor::smCapsuleShapePath, + Con::addVariable("$pref::TSShapeConstructor::CapsuleShapePath", TypeRealString, &TSShapeConstructor::smCapsuleShapePath, "The file path to the capsule shape used by tsMeshFit.\n\n" - "@ingroup MeshFit\n" ); + "@ingroup MeshFit\n"); - Con::addVariable( "$pref::TSShapeConstructor::CubeShapePath", TypeRealString, &TSShapeConstructor::smCubeShapePath, + Con::addVariable("$pref::TSShapeConstructor::CubeShapePath", TypeRealString, &TSShapeConstructor::smCubeShapePath, "The file path to the cube shape used by tsMeshFit.\n\n" - "@ingroup MeshFit\n" ); + "@ingroup MeshFit\n"); - Con::addVariable( "$pref::TSShapeConstructor::SphereShapePath", TypeRealString, &TSShapeConstructor::smSphereShapePath, + Con::addVariable("$pref::TSShapeConstructor::SphereShapePath", TypeRealString, &TSShapeConstructor::smSphereShapePath, "The file path to the sphere shape used by tsMeshFit.\n\n" - "@ingroup MeshFit\n" ); + "@ingroup MeshFit\n"); } -TSShapeConstructor* TSShapeConstructor::findShapeConstructor(const FileName& path) +TSShapeConstructor* TSShapeConstructor::findShapeConstructorByAssetId(StringTableEntry shapeAssetId) { - SimGroup *group; - if (Sim::findObject( "TSShapeConstructorGroup", group )) + SimGroup* group; + if (Sim::findObject("TSShapeConstructorGroup", group)) { // Find the TSShapeConstructor object for the given shape file for (S32 i = 0; i < group->size(); i++) { - TSShapeConstructor* tss = dynamic_cast( group->at(i) ); - FileName shapePath = tss->mShapePath; + TSShapeConstructor* tss = dynamic_cast(group->at(i)); + StringTableEntry targetAssetId = tss->getShapeAssetId(); + + if(targetAssetId == shapeAssetId) + return tss; + } + } + return NULL; +} + +TSShapeConstructor* TSShapeConstructor::findShapeConstructorByFilename(const FileName& path) +{ + SimGroup* group; + if (Sim::findObject("TSShapeConstructorGroup", group)) + { + // Find the TSShapeConstructor object for the given shape file + for (S32 i = 0; i < group->size(); i++) + { + TSShapeConstructor* tss = dynamic_cast(group->at(i)); + FileName shapePath = tss->getShapePath(); char buf[1024]; FileName fullShapePath = String(Platform::makeFullPathName(shapePath, buf, sizeof(buf))); - if (shapePath.equal( path, String::NoCase ) || fullShapePath.equal(path, String::NoCase)) + if (shapePath.equal(path, String::NoCase) || fullShapePath.equal(path, String::NoCase)) return tss; } } @@ -404,25 +431,25 @@ TSShapeConstructor* TSShapeConstructor::findShapeConstructor(const FileName& pat //----------------------------------------------------------------------------- bool TSShapeConstructor::onAdd() { - if ( !Parent::onAdd() ) + if (!Parent::onAdd()) return false; // Prevent multiple objects pointing at the same shape file - TSShapeConstructor* tss = findShapeConstructor( mShapePath ); - if ( tss ) + TSShapeConstructor* tss = findShapeConstructorByAssetId(getShapeAssetId()); + if (tss) { Con::errorf("TSShapeConstructor::onAdd failed: %s is already referenced by " - "another TSShapeConstructor object (%s - %d)", mShapePath.c_str(), + "another TSShapeConstructor object (%s - %d)", getShapeAssetId(), tss->getName(), tss->getId()); return false; } // Add to the TSShapeConstructor group (for lookups) - SimGroup *group; - if ( !Sim::findObject( "TSShapeConstructorGroup", group ) ) + SimGroup* group; + if (!Sim::findObject("TSShapeConstructorGroup", group)) { group = new SimGroup(); - if ( !group->registerObject("TSShapeConstructorGroup") ) + if (!group->registerObject("TSShapeConstructorGroup")) { SAFE_DELETE(group); @@ -430,15 +457,15 @@ bool TSShapeConstructor::onAdd() "TSShapeConstructorGroup"); return false; } - Sim::getRootGroup()->addObject( group ); + Sim::getRootGroup()->addObject(group); } - group->addObject( this ); + group->addObject(this); // This is only here for backwards compatibility! // // If we have no sequences, it may be using the older sequence# syntax. // Check for dynamic fields of that pattern and add them into the sequence vector. - if ( mSequences.empty() ) + /*if (mSequenceAssetIds.empty()) { for ( U32 idx = 0; idx < MaxLegacySequences; idx++ ) { @@ -456,13 +483,17 @@ bool TSShapeConstructor::onAdd() Con::setData( TypeStringFilename, &expanded, 0, 1, &data ); addSequenceFromField( this, NULL, expanded.c_str() ); } - } + }*/ // If an instance of this shape has already been loaded, call onLoad now - Resource shape = ResourceManager::get().find( mShapePath ); + mShapeAsset = mShapeAssetId; + if (mShapeAsset.notNull()) + { + Resource shape = mShapeAsset->getShapeResource(); - if ( shape ) - _onLoad( shape ); + if (shape) + _onLoad(shape); + } if (mShape && mShape->needsReinit()) { @@ -477,29 +508,34 @@ bool TSShapeConstructor::onAdd() void TSShapeConstructor::_onLoad(TSShape* shape) { // Check if we should unload first - if ( mShape ) + if (mShape) _onUnload(); - #ifdef DEBUG_SPEW - Con::printf( "[TSShapeConstructor] attaching to shape '%s'", mShapePath.c_str() ); - #endif +#ifdef DEBUG_SPEW + Con::printf("[TSShapeConstructor] attaching to shape '%s'", getShapePath()); +#endif mShape = shape; mChangeSet.clear(); mLoadingShape = true; // Add sequences defined using field syntax - for ( S32 i = 0; i < mSequences.size(); i++ ) + for (S32 i = 0; i < mSequenceAssetIds.size(); i++) { - if ( mSequences[i].isEmpty() ) + if (mSequenceAssetIds[i] == StringTable->EmptyString()) + continue; + + AssetPtr sequenceAsset = mSequenceAssetIds[i]; + + if (sequenceAsset.isNull()) continue; // Split the sequence path from the target sequence name String destName; - String srcPath( mSequences[i] ); - SplitSequencePathAndName( srcPath, destName ); + String srcPath(sequenceAsset->getAnimationPath()); + SplitSequencePathAndName(srcPath, destName); - addSequence( srcPath, destName ); + addSequence(srcPath, destName); } // Call script function @@ -511,9 +547,9 @@ void TSShapeConstructor::_onLoad(TSShape* shape) void TSShapeConstructor::_onUnload() { - #ifdef DEBUG_SPEW - Con::printf( "[TSShapeConstructor] detaching from '%s'", mShapePath.c_str() ); - #endif +#ifdef DEBUG_SPEW + Con::printf("[TSShapeConstructor] detaching from '%s'", getShapePath()); +#endif onUnload_callback(); @@ -523,28 +559,28 @@ void TSShapeConstructor::_onUnload() //----------------------------------------------------------------------------- // Storage -bool TSShapeConstructor::writeField(StringTableEntry fieldname, const char *value) +bool TSShapeConstructor::writeField(StringTableEntry fieldname, const char* value) { // Ignore the sequence fields (these are written as 'addSequence' commands instead) - if ( dStrnicmp( fieldname, "sequence", 8 ) == 0 ) + if (dStrnicmp(fieldname, "sequence", 8) == 0) return false; - else if ( dStrnicmp( fieldname, "baseShape", 9 ) == 0 ) + else if (dStrnicmp(fieldname, "baseShape", 9) == 0) { // Small hack to only write the base filename (no path) since the // TSShapeConstructor script must be in the same folder as the model, and // then we can easily copy both around without having to change the field - const char* filename = dStrrchr( value, '/' ); - if ( filename > value ) + const char* filename = dStrrchr(value, '/'); + if (filename > value) { - S32 len = dStrlen( filename ); - dMemmove((void*)(value + 1), filename, len ); + S32 len = dStrlen(filename); + dMemmove((void*)(value + 1), filename, len); ((char*)value)[0] = '.'; ((char*)value)[len + 1] = '\0'; } return true; } - return Parent::writeField( fieldname, value ); + return Parent::writeField(fieldname, value); } //----------------------------------------------------------------------------- @@ -556,108 +592,108 @@ bool TSShapeConstructor::writeField(StringTableEntry fieldname, const char *valu // Check that the given index is valid (0 - max-1). If not, generate an // error and return. #define CHECK_INDEX_IN_RANGE(func, index, maxIndex, ret) \ - if ( ( index < 0 ) || ( index >= maxIndex ) ) \ - { \ - Con::errorf( "TSShapeConstructor::" #func ": index out of " \ - "range (0-%d)", maxIndex-1); \ - return ret; \ - } +if ( ( index < 0 ) || ( index >= maxIndex ) ) \ +{ \ +Con::errorf( "TSShapeConstructor::" #func ": index out of " \ +"range (0-%d)", maxIndex-1); \ +return ret; \ +} // Do a node lookup and allow the root node name ("") #define GET_NODE_INDEX_ALLOW_ROOT(func, var, name, ret) \ - S32 var##Index = -1; \ - if (name[0]) \ - { \ - var##Index = mShape->findNode(name); \ - if (var##Index < 0) \ - { \ - Con::errorf( "TSShapeConstructor::" #func ": Could not " \ - "find node '%s'", name); \ - return ret; \ - } \ - } \ - TSShape::Node* var = var##Index < 0 ? NULL : &(mShape->nodes[var##Index]); \ - TORQUE_UNUSED(var##Index); \ - TORQUE_UNUSED(var) +S32 var##Index = -1; \ +if (name[0]) \ +{ \ +var##Index = mShape->findNode(name); \ +if (var##Index < 0) \ +{ \ +Con::errorf( "TSShapeConstructor::" #func ": Could not " \ + "find node '%s'", name); \ +return ret; \ +} \ +} \ +TSShape::Node* var = var##Index < 0 ? NULL : &(mShape->nodes[var##Index]); \ +TORQUE_UNUSED(var##Index); \ +TORQUE_UNUSED(var) // Do a node lookup, root node ("") is not allowed #define GET_NODE_INDEX_NO_ROOT(func, var, name, ret) \ - S32 var##Index = mShape->findNode(name); \ - if (var##Index < 0) \ - { \ - Con::errorf( "TSShapeConstructor::" #func ": Could not find " \ - "node '%s'", name); \ - return ret; \ - } \ - TSShape::Node* var = &(mShape->nodes[var##Index]); \ - TORQUE_UNUSED(var##Index); \ - TORQUE_UNUSED(var) +S32 var##Index = mShape->findNode(name); \ +if (var##Index < 0) \ +{ \ +Con::errorf( "TSShapeConstructor::" #func ": Could not find " \ +"node '%s'", name); \ +return ret; \ +} \ +TSShape::Node* var = &(mShape->nodes[var##Index]); \ +TORQUE_UNUSED(var##Index); \ +TORQUE_UNUSED(var) // Do an object lookup #define GET_OBJECT(func, var, name, ret) \ - S32 var##Index = mShape->findObject(name); \ - if (var##Index < 0) \ - { \ - Con::errorf( "TSShapeConstructor::" #func ": Could not find " \ - "object '%s'", name); \ - return ret; \ - } \ - TSShape::Object* var = &(mShape->objects[var##Index]); \ - TORQUE_UNUSED(var##Index); \ - TORQUE_UNUSED(var) +S32 var##Index = mShape->findObject(name); \ +if (var##Index < 0) \ +{ \ +Con::errorf( "TSShapeConstructor::" #func ": Could not find " \ +"object '%s'", name); \ +return ret; \ +} \ +TSShape::Object* var = &(mShape->objects[var##Index]); \ +TORQUE_UNUSED(var##Index); \ +TORQUE_UNUSED(var) // Do a mesh lookup #define GET_MESH(func, var, name, ret) \ - TSMesh* var = mShape->findMesh(name); \ - if (!var) \ - { \ - Con::errorf( "TSShapeConstructor::" #func ": Could not find " \ - "mesh '%s'", name); \ - return ret; \ - } +TSMesh* var = mShape->findMesh(name); \ +if (!var) \ +{ \ +Con::errorf( "TSShapeConstructor::" #func ": Could not find " \ +"mesh '%s'", name); \ +return ret; \ +} // Do a sequence lookup #define GET_SEQUENCE(func, var, name, ret) \ - S32 var##Index = mShape->findSequence(name); \ - if (var##Index < 0) \ - { \ - Con::errorf( "TSShapeConstructor::" #func ": Could not find " \ - "sequence named '%s'", name); \ - return ret; \ - } \ - TSShape::Sequence* var = &(mShape->sequences[var##Index]); \ - TORQUE_UNUSED(var##Index); \ - TORQUE_UNUSED(var); +S32 var##Index = mShape->findSequence(name); \ +if (var##Index < 0) \ +{ \ +Con::errorf( "TSShapeConstructor::" #func ": Could not find " \ +"sequence named '%s'", name); \ +return ret; \ +} \ +TSShape::Sequence* var = &(mShape->sequences[var##Index]); \ +TORQUE_UNUSED(var##Index); \ +TORQUE_UNUSED(var); //----------------------------------------------------------------------------- // DUMP -DefineTSShapeConstructorMethod( dumpShape, void, ( const char* filename ), ( "" ), - ( filename ),, +DefineTSShapeConstructorMethod(dumpShape, void, (const char* filename), (""), + (filename), , "Dump the shape hierarchy to the console or to a file. Useful for reviewing " "the result of a series of construction commands.\n" "@param filename Destination filename. If not specified, dump to console.\n\n" "@tsexample\n" "%this.dumpShape(); // dump to console\n" "%this.dumpShape( \"./dump.txt\" ); // dump to file\n" - "@endtsexample\n" ) + "@endtsexample\n") { - TSShapeInstance* tsi = new TSShapeInstance( mShape, false ); + TSShapeInstance* tsi = new TSShapeInstance(mShape, false); - if ( dStrEqual( filename, "" ) ) + if (dStrEqual(filename, "")) { // Dump the constructed shape to a memory stream - MemStream* dumpStream = new MemStream( 8192 ); - tsi->dump( *dumpStream ); + MemStream* dumpStream = new MemStream(8192); + tsi->dump(*dumpStream); // Write stream to the console U32 end = dumpStream->getPosition(); - dumpStream->setPosition( 0 ); - while ( dumpStream->getPosition() < end ) + dumpStream->setPosition(0); + while (dumpStream->getPosition() < end) { char line[1024]; - dumpStream->readLine( (U8*)line, sizeof(line) ); - Con::printf( line ); + dumpStream->readLine((U8*)line, sizeof(line)); + Con::printf(line); } delete dumpStream; @@ -666,16 +702,16 @@ DefineTSShapeConstructorMethod( dumpShape, void, ( const char* filename ), ( "" { // Dump constructed shape to file char filenameBuf[1024]; - Con::expandScriptFilename( filenameBuf, sizeof(filenameBuf), filename ); + Con::expandScriptFilename(filenameBuf, sizeof(filenameBuf), filename); FileStream* dumpStream = new FileStream; - if ( dumpStream->open( filenameBuf, Torque::FS::File::Write ) ) + if (dumpStream->open(filenameBuf, Torque::FS::File::Write)) { - tsi->dump( *dumpStream ); + tsi->dump(*dumpStream); dumpStream->close(); } else - Con::errorf( "dumpShape failed: Could not open file '%s' for writing", filenameBuf ); + Con::errorf("dumpShape failed: Could not open file '%s' for writing", filenameBuf); delete dumpStream; } @@ -683,130 +719,130 @@ DefineTSShapeConstructorMethod( dumpShape, void, ( const char* filename ), ( "" delete tsi; }} -DefineTSShapeConstructorMethod( saveShape, void, ( const char* filename ),, - ( filename ),, +DefineTSShapeConstructorMethod(saveShape, void, (const char* filename), , + (filename), , "Save the shape (with all current changes) to a new DTS file.\n" "@param filename Destination filename.\n\n" "@tsexample\n" "%this.saveShape( \"./myShape.dts\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { char filenameBuf[1024]; - Con::expandScriptFilename( filenameBuf, sizeof(filenameBuf), filename ); + Con::expandScriptFilename(filenameBuf, sizeof(filenameBuf), filename); FileStream* dtsStream = new FileStream; - if ( dtsStream->open( filenameBuf, Torque::FS::File::Write ) ) + if (dtsStream->open(filenameBuf, Torque::FS::File::Write)) { - mShape->write( dtsStream ); + mShape->write(dtsStream); dtsStream->close(); } else { - Con::errorf( "saveShape failed: Could not open '%s' for writing", filenameBuf ); + Con::errorf("saveShape failed: Could not open '%s' for writing", filenameBuf); } delete dtsStream; }} -DefineTSShapeConstructorMethod( writeChangeSet, void, (),, - (),, +DefineTSShapeConstructorMethod(writeChangeSet, void, (), , + (), , "Write the current change set to a TSShapeConstructor script file. The " "name of the script file is the same as the model, but with ." TORQUE_SCRIPT_EXTENSION " extension. " - "eg. myShape." TORQUE_SCRIPT_EXTENSION " for myShape.dts or myShape.dae.\n" ) + "eg. myShape." TORQUE_SCRIPT_EXTENSION " for myShape.dts or myShape.dae.\n") { - Torque::Path scriptPath( mShapePath ); + Torque::Path scriptPath(getShapePath()); scriptPath.setExtension(TORQUE_SCRIPT_EXTENSION); // Read current file contents FileObject f; - f.readMemory( scriptPath.getFullPath() ); + f.readMemory(scriptPath.getFullPath()); // Write new file - FileStream *stream; - if ((stream = FileStream::createAndOpen( scriptPath.getFullPath(), Torque::FS::File::Write )) == NULL) + FileStream* stream; + if ((stream = FileStream::createAndOpen(scriptPath.getFullPath(), Torque::FS::File::Write)) == NULL) { - Con::errorf( "Failed to write TSShapeConstructor change set to %s", scriptPath.getFullPath().c_str() ); + Con::errorf("Failed to write TSShapeConstructor change set to %s", scriptPath.getFullPath().c_str()); return; } // Write existing file contents up to the start of the onLoad function - String beginMessage( avar( "function %s::onLoad(%%this)", getName() ) ); - String endMessage( "}" ); + String beginMessage(avar("function %s::onLoad(%%this)", getName())); + String endMessage("}"); - while ( !f.isEOF() ) + while (!f.isEOF()) { - const char* buffer = (const char *) f.readLine(); - if ( !String::compare( buffer, beginMessage )) + const char* buffer = (const char*)f.readLine(); + if (!String::compare(buffer, beginMessage)) break; - stream->writeText( buffer ); - stream->writeText( "\r\n" ); + stream->writeText(buffer); + stream->writeText("\r\n"); } // Write the new contents - if ( f.isEOF() ) - stream->writeText( "\r\n" ); - stream->writeText( beginMessage ); - stream->writeText( "\r\n{\r\n" ); + if (f.isEOF()) + stream->writeText("\r\n"); + stream->writeText(beginMessage); + stream->writeText("\r\n{\r\n"); - mChangeSet.write( mShape, *stream, scriptPath.getPath() ); + mChangeSet.write(mShape, *stream, scriptPath.getPath()); - stream->writeText( endMessage ); - stream->writeText( "\r\n" ); + stream->writeText(endMessage); + stream->writeText("\r\n"); // Now skip the contents of the function - while ( !f.isEOF() ) + while (!f.isEOF()) { - const char* buffer = (const char *) f.readLine(); - if ( !String::compare( buffer, endMessage )) + const char* buffer = (const char*)f.readLine(); + if (!String::compare(buffer, endMessage)) break; } // Write the remainder of the existing file contents - while( !f.isEOF() ) + while (!f.isEOF()) { - const char* buffer = (const char *) f.readLine(); - stream->writeText( buffer ); - stream->writeText( "\r\n" ); + const char* buffer = (const char*)f.readLine(); + stream->writeText(buffer); + stream->writeText("\r\n"); } delete stream; }} -DefineTSShapeConstructorMethod( notifyShapeChanged, void, (),, - (),, +DefineTSShapeConstructorMethod(notifyShapeChanged, void, (), , + (), , "Notify game objects that this shape file has changed, allowing them to update " - "internal data if needed." ) + "internal data if needed.") { - ResourceManager::get().getChangedSignal().trigger( mShapePath ); + ResourceManager::get().getChangedSignal().trigger(getShapePath()); }} //----------------------------------------------------------------------------- // NODES -DefineTSShapeConstructorMethod( getNodeCount, S32, (),, +DefineTSShapeConstructorMethod(getNodeCount, S32, (), , (), 0, "Get the total number of nodes in the shape.\n" "@return the number of nodes in the shape.\n\n" "@tsexample\n" "%count = %this.getNodeCount();\n" - "@endtsexample\n" ) + "@endtsexample\n") { return mShape->nodes.size(); }} -DefineTSShapeConstructorMethod( getNodeIndex, S32, ( const char* name ),, - ( name ), -1, +DefineTSShapeConstructorMethod(getNodeIndex, S32, (const char* name), , + (name), -1, "Get the index of the node.\n" "@param name name of the node to lookup.\n" "@return the index of the named node, or -1 if no such node exists.\n\n" "@tsexample\n" "// get the index of Bip01 Pelvis node in the shape\n" "%index = %this.getNodeIndex( \"Bip01 Pelvis\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - return mShape->findNode( name ); + return mShape->findNode(name); }} -DefineTSShapeConstructorMethod( getNodeName, const char*, ( S32 index ),, - ( index ), "", +DefineTSShapeConstructorMethod(getNodeName, const char*, (S32 index), , + (index), "", "Get the name of the indexed node.\n" "@param index index of the node to lookup (valid range is 0 - getNodeCount()-1).\n" "@return the name of the indexed node, or \"\" if no such node exists.\n\n" @@ -815,42 +851,42 @@ DefineTSShapeConstructorMethod( getNodeName, const char*, ( S32 index ),, "%count = %this.getNodeCount();\n" "for (%i = 0; %i < %count; %i++)\n" " echo(%i SPC %this.getNodeName(%i));\n" - "@endtsexample\n" ) + "@endtsexample\n") { - CHECK_INDEX_IN_RANGE( getNodeName, index, mShape->nodes.size(), "" ); - return mShape->getName( mShape->nodes[index].nameIndex ); + CHECK_INDEX_IN_RANGE(getNodeName, index, mShape->nodes.size(), ""); + return mShape->getName(mShape->nodes[index].nameIndex); }} -DefineTSShapeConstructorMethod( getNodeParentName, const char*, ( const char* name ),, - ( name ), "", +DefineTSShapeConstructorMethod(getNodeParentName, const char*, (const char* name), , + (name), "", "Get the name of the node's parent. If the node has no parent (ie. it is at " "the root level), return an empty string.\n" "@param name name of the node to query.\n" "@return the name of the node's parent, or \"\" if the node is at the root level\n\n" "@tsexample\n" "echo( \"Bip01 Pelvis parent = \" @ %this.getNodeParentName( \"Bip01 Pelvis \") );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_NODE_INDEX_NO_ROOT( getNodeParentName, node, name, "" ); + GET_NODE_INDEX_NO_ROOT(getNodeParentName, node, name, ""); - if ( node->parentIndex < 0 ) + if (node->parentIndex < 0) return ""; else - return mShape->getName( mShape->nodes[node->parentIndex].nameIndex ); + return mShape->getName(mShape->nodes[node->parentIndex].nameIndex); }} -DefineTSShapeConstructorMethod( setNodeParent, bool, ( const char* name, const char* parentName ),, - ( name, parentName ), false, - "Set the parent of a node.\n" - "@param name name of the node to modify\n" - "@param parentName name of the parent node to set (use \"\" to move the node to the root level)\n" - "@return true if successful, false if failed\n\n" - "@tsexample\n" - "%this.setNodeParent( \"Bip01 Pelvis\", \"start01\" );\n" - "@endtsexample\n" ) +DefineTSShapeConstructorMethod(setNodeParent, bool, (const char* name, const char* parentName), , + (name, parentName), false, + "Set the parent of a node.\n" + "@param name name of the node to modify\n" + "@param parentName name of the parent node to set (use \"\" to move the node to the root level)\n" + "@return true if successful, false if failed\n\n" + "@tsexample\n" + "%this.setNodeParent( \"Bip01 Pelvis\", \"start01\" );\n" + "@endtsexample\n") { - GET_NODE_INDEX_NO_ROOT( setNodeParent, node, name, false ); - GET_NODE_INDEX_ALLOW_ROOT( setNodeParent, parent, parentName, false ); + GET_NODE_INDEX_NO_ROOT(setNodeParent, node, name, false); + GET_NODE_INDEX_ALLOW_ROOT(setNodeParent, parent, parentName, false); node->parentIndex = parentIndex; ADD_TO_CHANGE_SET(); @@ -858,24 +894,24 @@ DefineTSShapeConstructorMethod( setNodeParent, bool, ( const char* name, const c return true; }} -DefineTSShapeConstructorMethod( getNodeChildCount, S32, ( const char* name ),, - ( name ), 0, +DefineTSShapeConstructorMethod(getNodeChildCount, S32, (const char* name), , + (name), 0, "Get the number of children of this node.\n" "@param name name of the node to query.\n" "@return the number of child nodes.\n\n" "@tsexample\n" "%count = %this.getNodeChildCount( \"Bip01 Pelvis\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_NODE_INDEX_ALLOW_ROOT( getNodeChildCount, node, name, 0 ); + GET_NODE_INDEX_ALLOW_ROOT(getNodeChildCount, node, name, 0); Vector nodeChildren; - mShape->getNodeChildren( nodeIndex, nodeChildren ); + mShape->getNodeChildren(nodeIndex, nodeChildren); return nodeChildren.size(); }} -DefineTSShapeConstructorMethod( getNodeChildName, const char*, ( const char* name, S32 index ),, - ( name, index ), "", +DefineTSShapeConstructorMethod(getNodeChildName, const char*, (const char* name, S32 index), , + (name, index), "", "Get the name of the indexed child node.\n" "@param name name of the parent node to query.\n" "@param index index of the child node (valid range is 0 - getNodeChildName()-1).\n" @@ -900,35 +936,35 @@ DefineTSShapeConstructorMethod( getNodeChildName, const char*, ( const char* nam " dumpNode( %shape, %name, \"\" );\n" " }\n" "}\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_NODE_INDEX_ALLOW_ROOT( getNodeChildName, node, name, "" ); + GET_NODE_INDEX_ALLOW_ROOT(getNodeChildName, node, name, ""); Vector nodeChildren; - mShape->getNodeChildren( nodeIndex, nodeChildren ); - CHECK_INDEX_IN_RANGE( getNodeChildName, index, nodeChildren.size(), "" ); + mShape->getNodeChildren(nodeIndex, nodeChildren); + CHECK_INDEX_IN_RANGE(getNodeChildName, index, nodeChildren.size(), ""); - return mShape->getName( mShape->nodes[nodeChildren[index]].nameIndex ); + return mShape->getName(mShape->nodes[nodeChildren[index]].nameIndex); }} -DefineTSShapeConstructorMethod( getNodeObjectCount, S32, ( const char* name ),, - ( name ), 0, +DefineTSShapeConstructorMethod(getNodeObjectCount, S32, (const char* name), , + (name), 0, "Get the number of geometry objects attached to this node.\n" "@param name name of the node to query.\n" "@return the number of attached objects.\n\n" "@tsexample\n" "%count = %this.getNodeObjectCount( \"Bip01 Head\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_NODE_INDEX_ALLOW_ROOT( getNodeObjectCount, node, name, 0 ); + GET_NODE_INDEX_ALLOW_ROOT(getNodeObjectCount, node, name, 0); Vector nodeObjects; - mShape->getNodeObjects( nodeIndex, nodeObjects ); + mShape->getNodeObjects(nodeIndex, nodeObjects); return nodeObjects.size(); }} -DefineTSShapeConstructorMethod( getNodeObjectName, const char*, ( const char* name, S32 index ),, - ( name, index ), "", +DefineTSShapeConstructorMethod(getNodeObjectName, const char*, (const char* name, S32 index), , + (name, index), "", "Get the name of the indexed object.\n" "@param name name of the node to query.\n" "@param index index of the object (valid range is 0 - getNodeObjectCount()-1).\n" @@ -938,19 +974,19 @@ DefineTSShapeConstructorMethod( getNodeObjectName, const char*, ( const char* na "%count = %this.getNodeObjectCount( \"Bip01 Head\" );\n" "for ( %i = 0; %i < %count; %i++ )\n" " echo( %this.getNodeObjectName( \"Bip01 Head\", %i ) );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_NODE_INDEX_ALLOW_ROOT( getNodeObjectName, node, name, "" ); + GET_NODE_INDEX_ALLOW_ROOT(getNodeObjectName, node, name, ""); Vector nodeObjects; - mShape->getNodeObjects( nodeIndex, nodeObjects ); - CHECK_INDEX_IN_RANGE( getNodeObjectName, index, nodeObjects.size(), "" ); + mShape->getNodeObjects(nodeIndex, nodeObjects); + CHECK_INDEX_IN_RANGE(getNodeObjectName, index, nodeObjects.size(), ""); - return mShape->getName( mShape->objects[nodeObjects[index]].nameIndex ); + return mShape->getName(mShape->objects[nodeObjects[index]].nameIndex); }} -DefineTSShapeConstructorMethod( getNodeTransform, TransformF, ( const char* name, bool isWorld ), ( false ), - ( name, isWorld ), TransformF::Identity, +DefineTSShapeConstructorMethod(getNodeTransform, TransformF, (const char* name, bool isWorld), (false), + (name, isWorld), TransformF::Identity, "Get the base (ie. not animated) transform of a node.\n" "@param name name of the node to query.\n" "@param isWorld true to get the global transform, false (or omitted) to get " @@ -959,35 +995,35 @@ DefineTSShapeConstructorMethod( getNodeTransform, TransformF, ( const char* name "@tsexample\n" "%ret = %this.getNodeTransform( \"mount0\" );\n" "%this.setNodeTransform( \"mount4\", %ret );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_NODE_INDEX_NO_ROOT( getNodeTransform, node, name, TransformF::Identity ); + GET_NODE_INDEX_NO_ROOT(getNodeTransform, node, name, TransformF::Identity); // Get the node transform Point3F pos; AngAxisF aa; - if ( isWorld ) + if (isWorld) { // World transform MatrixF mat; - mShape->getNodeWorldTransform( nodeIndex, &mat ); + mShape->getNodeWorldTransform(nodeIndex, &mat); pos = mat.getPosition(); - aa.set( mat ); + aa.set(mat); } else { // Local transform pos = mShape->defaultTranslations[nodeIndex]; const Quat16& q16 = mShape->defaultRotations[nodeIndex]; - aa.set( q16.getQuatF() ); + aa.set(q16.getQuatF()); } - return TransformF( pos, aa ); + return TransformF(pos, aa); }} -DefineTSShapeConstructorMethod( setNodeTransform, bool, ( const char* name, TransformF txfm, bool isWorld ), ( false ), - ( name, txfm, isWorld ), false, +DefineTSShapeConstructorMethod(setNodeTransform, bool, (const char* name, TransformF txfm, bool isWorld), (false), + (name, txfm, isWorld), false, "Set the base transform of a node. That is, the transform of the node when " "in the root (not-animated) pose.\n" "@param name name of the node to modify\n" @@ -1000,42 +1036,42 @@ DefineTSShapeConstructorMethod( setNodeTransform, bool, ( const char* name, Tran "%this.setNodeTransform( \"mount0\", \"0 0 1 0 0 1 0\" );\n" "%this.setNodeTransform( \"mount0\", \"0 0 0 0 0 1 1.57\" );\n" "%this.setNodeTransform( \"mount0\", \"1 0 0 0 0 1 0\", true );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_NODE_INDEX_NO_ROOT( setNodeTransform, node, name, false ); + GET_NODE_INDEX_NO_ROOT(setNodeTransform, node, name, false); - Point3F pos( txfm.getPosition() ); - QuatF rot( txfm.getOrientation() ); + Point3F pos(txfm.getPosition()); + QuatF rot(txfm.getOrientation()); - if ( isWorld ) + if (isWorld) { // World transform // Get the node's parent (if any) - if ( node->parentIndex != -1 ) + if (node->parentIndex != -1) { MatrixF mat; - mShape->getNodeWorldTransform( node->parentIndex, &mat ); + mShape->getNodeWorldTransform(node->parentIndex, &mat); // Pre-multiply by inverse of parent's world transform to get // local node transform mat.inverse(); - mat.mul( txfm.getMatrix() ); + mat.mul(txfm.getMatrix()); - rot.set( mat ); + rot.set(mat); pos = mat.getPosition(); } } - if ( !mShape->setNodeTransform( name, pos, rot) ) + if (!mShape->setNodeTransform(name, pos, rot)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( renameNode, bool, ( const char* oldName, const char* newName ),, - ( oldName, newName ), false, +DefineTSShapeConstructorMethod(renameNode, bool, (const char* oldName, const char* newName), , + (oldName, newName), false, "Rename a node.\n" "@note Note that node names must be unique, so this command will fail if " "there is already a node with the desired name\n" @@ -1044,19 +1080,19 @@ DefineTSShapeConstructorMethod( renameNode, bool, ( const char* oldName, const c "@return true if successful, false otherwise\n\n" "@tsexample\n" "%this.renameNode( \"Bip01 L Hand\", \"mount5\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_NODE_INDEX_NO_ROOT( renameNode, node, oldName, false ); + GET_NODE_INDEX_NO_ROOT(renameNode, node, oldName, false); - if ( !mShape->renameNode( oldName, newName ) ) + if (!mShape->renameNode(oldName, newName)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( addNode, bool, ( const char* name, const char* parentName, TransformF txfm, bool isWorld ), ( TransformF::Identity, false ), - ( name, parentName, txfm, isWorld ), false, +DefineTSShapeConstructorMethod(addNode, bool, (const char* name, const char* parentName, TransformF txfm, bool isWorld), (TransformF::Identity, false), + (name, parentName, txfm, isWorld), false, "Add a new node.\n" "@param name name for the new node (must not already exist)\n" "@param parentName name of an existing node to be the parent of the new node. " @@ -1070,41 +1106,41 @@ DefineTSShapeConstructorMethod( addNode, bool, ( const char* name, const char* p "%this.addNode( \"Nose\", \"Bip01 Head\", \"0 2 2 0 0 1 0\" );\n" "%this.addNode( \"myRoot\", \"\", \"0 0 4 0 0 1 1.57\" );\n" "%this.addNode( \"Nodes\", \"Bip01 Head\", \"0 2 0 0 0 1 0\", true );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - Point3F pos( txfm.getPosition() ); - QuatF rot( txfm.getOrientation() ); + Point3F pos(txfm.getPosition()); + QuatF rot(txfm.getOrientation()); - if ( isWorld ) + if (isWorld) { // World transform // Get the node's parent (if any) - S32 parentIndex = mShape->findNode( parentName ); - if ( parentIndex != -1 ) + S32 parentIndex = mShape->findNode(parentName); + if (parentIndex != -1) { MatrixF mat; - mShape->getNodeWorldTransform( parentIndex, &mat ); + mShape->getNodeWorldTransform(parentIndex, &mat); // Pre-multiply by inverse of parent's world transform to get // local node transform mat.inverse(); - mat.mul( txfm.getMatrix() ); + mat.mul(txfm.getMatrix()); - rot.set( mat ); + rot.set(mat); pos = mat.getPosition(); } } - if ( !mShape->addNode( name, parentName, pos, rot ) ) + if (!mShape->addNode(name, parentName, pos, rot)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( removeNode, bool, ( const char* name ),, - ( name ), false, +DefineTSShapeConstructorMethod(removeNode, bool, (const char* name), , + (name), false, "Remove a node from the shape.\n" "The named node is removed from the shape, including from any sequences that " "use the node. Child nodes and objects attached to the node are re-assigned " @@ -1113,11 +1149,11 @@ DefineTSShapeConstructorMethod( removeNode, bool, ( const char* name ),, "@return true if successful, false otherwise.\n\n" "@tsexample\n" "%this.removeNode( \"Nose\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_NODE_INDEX_NO_ROOT( removeNode, node, name, false ); + GET_NODE_INDEX_NO_ROOT(removeNode, node, name, false); - if ( !mShape->removeNode( name ) ) + if (!mShape->removeNode(name)) return false; ADD_TO_CHANGE_SET(); @@ -1127,18 +1163,18 @@ DefineTSShapeConstructorMethod( removeNode, bool, ( const char* name ),, //----------------------------------------------------------------------------- // MATERIALS -DefineTSShapeConstructorMethod( getTargetCount, S32, (),, (), 0, +DefineTSShapeConstructorMethod(getTargetCount, S32, (), , (), 0, "Get the number of materials in the shape.\n" "@return the number of materials in the shape.\n\n" "@tsexample\n" "%count = %this.getTargetCount();\n" - "@endtsexample\n" ) + "@endtsexample\n") { return mShape->getTargetCount(); }} -DefineTSShapeConstructorMethod( getTargetName, const char*, ( S32 index ),, - ( index ), "", +DefineTSShapeConstructorMethod(getTargetName, const char*, (S32 index), , + (index), "", "Get the name of the indexed shape material.\n" "@param index index of the material to get (valid range is 0 - getTargetCount()-1).\n" "@return the name of the indexed material.\n\n" @@ -1146,26 +1182,26 @@ DefineTSShapeConstructorMethod( getTargetName, const char*, ( S32 index ),, "%count = %this.getTargetCount();\n" "for ( %i = 0; %i < %count; %i++ )\n" " echo( \"Target \" @ %i @ \": \" @ %this.getTargetName( %i ) );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - return mShape->getTargetName( index ); + return mShape->getTargetName(index); }} //----------------------------------------------------------------------------- // OBJECTS -DefineTSShapeConstructorMethod( getObjectCount, S32, (),, (), 0, +DefineTSShapeConstructorMethod(getObjectCount, S32, (), , (), 0, "Get the total number of objects in the shape.\n" "@return the number of objects in the shape.\n\n" "@tsexample\n" "%count = %this.getObjectCount();\n" - "@endtsexample\n" ) + "@endtsexample\n") { return mShape->objects.size(); }} -DefineTSShapeConstructorMethod( getObjectName, const char*, ( S32 index ),, - ( index ), "", +DefineTSShapeConstructorMethod(getObjectName, const char*, (S32 index), , + (index), "", "Get the name of the indexed object.\n" "@param index index of the object to get (valid range is 0 - getObjectCount()-1).\n" "@return the name of the indexed object.\n\n" @@ -1174,44 +1210,44 @@ DefineTSShapeConstructorMethod( getObjectName, const char*, ( S32 index ),, "%count = %this.getObjectCount();\n" "for ( %i = 0; %i < %count; %i++ )\n" " echo( %i SPC %this.getObjectName( %i ) );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - CHECK_INDEX_IN_RANGE( getObjectName, index, mShape->objects.size(), "" ); + CHECK_INDEX_IN_RANGE(getObjectName, index, mShape->objects.size(), ""); - return mShape->getName( mShape->objects[index].nameIndex ); + return mShape->getName(mShape->objects[index].nameIndex); }} -DefineTSShapeConstructorMethod( getObjectIndex, S32, ( const char* name ),, - ( name ), -1, +DefineTSShapeConstructorMethod(getObjectIndex, S32, (const char* name), , + (name), -1, "Get the index of the first object with the given name.\n" "@param name name of the object to get.\n" "@return the index of the named object.\n\n" "@tsexample\n" "%index = %this.getObjectIndex( \"Head\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - return mShape->findObject( name ); + return mShape->findObject(name); }} -DefineTSShapeConstructorMethod( getObjectNode, const char*, ( const char* name ),, - ( name ), "", +DefineTSShapeConstructorMethod(getObjectNode, const char*, (const char* name), , + (name), "", "Get the name of the node this object is attached to.\n" "@param name name of the object to get.\n" "@return the name of the attached node, or an empty string if this " "object is not attached to a node (usually the case for skinned meshes).\n\n" "@tsexample\n" "echo( \"Hand is attached to \" @ %this.getObjectNode( \"Hand\" ) );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_OBJECT( getObjectNode, obj, name, 0 ); - if ( obj->nodeIndex < 0 ) + GET_OBJECT(getObjectNode, obj, name, 0); + if (obj->nodeIndex < 0) return ""; else - return mShape->getName( mShape->nodes[obj->nodeIndex].nameIndex ); + return mShape->getName(mShape->nodes[obj->nodeIndex].nameIndex); }} -DefineTSShapeConstructorMethod( setObjectNode, bool, ( const char* objName, const char* nodeName ),, - ( objName, nodeName ), false, +DefineTSShapeConstructorMethod(setObjectNode, bool, (const char* objName, const char* nodeName), , + (objName, nodeName), false, "Set the node an object is attached to.\n" "When the shape is rendered, the object geometry is rendered at the node's " "current transform.\n" @@ -1220,17 +1256,17 @@ DefineTSShapeConstructorMethod( setObjectNode, bool, ( const char* objName, cons "@return true if successful, false otherwise\n\n" "@tsexample\n" "%this.setObjectNode( \"Hand\", \"Bip01 LeftHand\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - if ( !mShape->setObjectNode( objName, nodeName ) ) + if (!mShape->setObjectNode(objName, nodeName)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( renameObject, bool, ( const char* oldName, const char* newName ),, - ( oldName, newName ), false, +DefineTSShapeConstructorMethod(renameObject, bool, (const char* oldName, const char* newName), , + (oldName, newName), false, "Rename an object.\n" "@note Note that object names must be unique, so this command will fail if " "there is already an object with the desired name\n" @@ -1239,17 +1275,17 @@ DefineTSShapeConstructorMethod( renameObject, bool, ( const char* oldName, const "@return true if successful, false otherwise\n\n" "@tsexample\n" "%this.renameObject( \"MyBox\", \"Box\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - if ( !mShape->renameObject( oldName, newName ) ) + if (!mShape->renameObject(oldName, newName)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( removeObject, bool, ( const char* name ),, - ( name ), false, +DefineTSShapeConstructorMethod(removeObject, bool, (const char* name), , + (name), false, "Remove an object (including all meshes for that object) from the shape.\n" "@param name name of the object to remove.\n" "@return true if successful, false otherwise.\n\n" @@ -1258,9 +1294,9 @@ DefineTSShapeConstructorMethod( removeObject, bool, ( const char* name ),, "%count = %this.getObjectCount();\n" "for ( %i = %count-1; %i >= 0; %i-- )\n" " %this.removeObject( %this.getObjectName(%i) );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - if ( !mShape->removeObject( name ) ) + if (!mShape->removeObject(name)) return false; ADD_TO_CHANGE_SET(); @@ -1269,24 +1305,24 @@ DefineTSShapeConstructorMethod( removeObject, bool, ( const char* name ),, //----------------------------------------------------------------------------- // MESHES -DefineTSShapeConstructorMethod( getMeshCount, S32, ( const char* name ),, - ( name ), 0, +DefineTSShapeConstructorMethod(getMeshCount, S32, (const char* name), , + (name), 0, "Get the number of meshes (detail levels) for the specified object.\n" "@param name name of the object to query\n" "@return the number of meshes for this object.\n\n" "@tsexample\n" "%count = %this.getMeshCount( \"SimpleShape\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_OBJECT( getMeshCount, obj, name, 0 ); + GET_OBJECT(getMeshCount, obj, name, 0); Vector objectDetails; - mShape->getObjectDetails( objIndex, objectDetails ); + mShape->getObjectDetails(objIndex, objectDetails); return objectDetails.size(); }} -DefineTSShapeConstructorMethod( getMeshName, const char*, ( const char* name, S32 index ),, - ( name, index ), "", +DefineTSShapeConstructorMethod(getMeshName, const char*, (const char* name, S32 index), , + (name, index), "", "Get the name of the indexed mesh (detail level) for the specified object.\n" "@param name name of the object to query\n" "@param index index of the mesh (valid range is 0 - getMeshCount()-1)\n" @@ -1301,14 +1337,14 @@ DefineTSShapeConstructorMethod( getMeshName, const char*, ( const char* name, S3 " for ( %j = 0; %j < %meshCount; %j++ )\n" " echo( %this.getMeshName( %objName, %j ) );\n" "}\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_OBJECT( getMeshName, obj, name, "" ); + GET_OBJECT(getMeshName, obj, name, ""); Vector objectDetails; mShape->getObjectDetails(objIndex, objectDetails); - CHECK_INDEX_IN_RANGE( getMeshName, index, objectDetails.size(), "" ); + CHECK_INDEX_IN_RANGE(getMeshName, index, objectDetails.size(), ""); static const U32 bufSize = 256; char* returnBuffer = Con::getReturnBuffer(bufSize); @@ -1316,8 +1352,8 @@ DefineTSShapeConstructorMethod( getMeshName, const char*, ( const char* name, S3 return returnBuffer; }} -DefineTSShapeConstructorMethod( getMeshSize, S32, ( const char* name, S32 index ),, - ( name, index ), -1, +DefineTSShapeConstructorMethod(getMeshSize, S32, (const char* name, S32 index), , + (name, index), -1, "Get the detail level size of the indexed mesh for the specified object.\n" "@param name name of the object to query\n" "@param index index of the mesh (valid range is 0 - getMeshCount()-1)\n" @@ -1328,37 +1364,37 @@ DefineTSShapeConstructorMethod( getMeshSize, S32, ( const char* name, S32 index "%count = %this.getMeshCount( %objName );\n" "for ( %i = 0; %i < %count; %i++ )\n" " echo( %this.getMeshSize( %objName, %i ) );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_OBJECT( getMeshName, obj, name, -1 ); + GET_OBJECT(getMeshName, obj, name, -1); Vector objectDetails; - mShape->getObjectDetails( objIndex, objectDetails ); + mShape->getObjectDetails(objIndex, objectDetails); - CHECK_INDEX_IN_RANGE( getMeshName, index, objectDetails.size(), -1 ); + CHECK_INDEX_IN_RANGE(getMeshName, index, objectDetails.size(), -1); return (S32)mShape->details[objectDetails[index]].size; }} -DefineTSShapeConstructorMethod( setMeshSize, bool, ( const char* name, S32 size ),, - ( name, size ), false, +DefineTSShapeConstructorMethod(setMeshSize, bool, (const char* name, S32 size), , + (name, size), false, "Change the detail level size of the named mesh.\n" "@param name full name (object name + current size ) of the mesh to modify\n" "@param size new detail level size\n" "@return true if successful, false otherwise.\n\n" "@tsexample\n" "%this.setMeshSize( \"SimpleShape128\", 64 );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - if ( !mShape->setMeshSize( name, size ) ) + if (!mShape->setMeshSize(name, size)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( getMeshType, const char*, ( const char* name ),, - ( name ), "", +DefineTSShapeConstructorMethod(getMeshType, const char*, (const char* name), , + (name), "", "Get the display type of the mesh.\n" "@param name name of the mesh to query\n" "@return the string returned is one of:" @@ -1367,9 +1403,9 @@ DefineTSShapeConstructorMethod( getMeshType, const char*, ( const char* name ),, "
billboardzaxis
a mesh that always faces the camera in the Z-axis
\n\n" "@tsexample\n" "echo( \"Mesh type is \" @ %this.getMeshType( \"SimpleShape128\" ) );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_MESH( getMeshType, mesh, name, "normal" ); + GET_MESH(getMeshType, mesh, name, "normal"); if (mesh->getFlags(TSMesh::BillboardZAxis)) return "billboardzaxis"; @@ -1379,8 +1415,8 @@ DefineTSShapeConstructorMethod( getMeshType, const char*, ( const char* name ),, return "normal"; }} -DefineTSShapeConstructorMethod( setMeshType, bool, ( const char* name, const char* type ),, - ( name, type ), false, +DefineTSShapeConstructorMethod(setMeshType, bool, (const char* name, const char* type), , + (name, type), false, "Set the display type for the mesh.\n" "@param name full name (object name + detail size) of the mesh to modify\n" "@param type the new type for the mesh: \"normal\", \"billboard\" or \"billboardzaxis\"\n" @@ -1388,19 +1424,19 @@ DefineTSShapeConstructorMethod( setMeshType, bool, ( const char* name, const cha "@tsexample\n" "// set the mesh to be a billboard\n" "%this.setMeshType( \"SimpleShape64\", \"billboard\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_MESH( setMeshType, mesh, name, false ); + GET_MESH(setMeshType, mesh, name, false); // Update the mesh flags - mesh->clearFlags( TSMesh::Billboard | TSMesh::BillboardZAxis ); - if ( dStrEqual( type, "billboard" ) ) - mesh->setFlags( TSMesh::Billboard ); - else if ( dStrEqual( type, "billboardzaxis" ) ) - mesh->setFlags( TSMesh::Billboard | TSMesh::BillboardZAxis ); - else if ( !dStrEqual( type, "normal" ) ) + mesh->clearFlags(TSMesh::Billboard | TSMesh::BillboardZAxis); + if (dStrEqual(type, "billboard")) + mesh->setFlags(TSMesh::Billboard); + else if (dStrEqual(type, "billboardzaxis")) + mesh->setFlags(TSMesh::Billboard | TSMesh::BillboardZAxis); + else if (!dStrEqual(type, "normal")) { - Con::printf( "setMeshType: Unknown mesh type '%s'", type ); + Con::printf("setMeshType: Unknown mesh type '%s'", type); return false; } @@ -1408,28 +1444,28 @@ DefineTSShapeConstructorMethod( setMeshType, bool, ( const char* name, const cha return true; }} -DefineTSShapeConstructorMethod( getMeshMaterial, const char*, ( const char* name ),, - ( name ), "", +DefineTSShapeConstructorMethod(getMeshMaterial, const char*, (const char* name), , + (name), "", "Get the name of the material attached to a mesh. Note that only the first " "material used by the mesh is returned.\n" "@param name full name (object name + detail size) of the mesh to query\n" "@return name of the material attached to the mesh (suitable for use with the Material mapTo field)\n\n" "@tsexample\n" "echo( \"Mesh material is \" @ %this.sgetMeshMaterial( \"SimpleShape128\" ) );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_MESH( getMeshMaterial, mesh, name, "" ); + GET_MESH(getMeshMaterial, mesh, name, ""); // Return the name of the first material attached to this mesh S32 matIndex = mesh->mPrimitives[0].matIndex & TSDrawPrimitive::MaterialMask; if ((matIndex >= 0) && (matIndex < mShape->materialList->size())) - return mShape->materialList->getMaterialName( matIndex ); + return mShape->materialList->getMaterialName(matIndex); else return ""; }} -DefineTSShapeConstructorMethod( setMeshMaterial, bool, ( const char* meshName, const char* matName ),, - ( meshName, matName ), false, +DefineTSShapeConstructorMethod(setMeshMaterial, bool, (const char* meshName, const char* matName), , + (meshName, matName), false, "Set the name of the material attached to the mesh.\n" "@param meshName full name (object name + detail size) of the mesh to modify\n" "@param matName name of the material to attach. This could be the base name of " @@ -1439,108 +1475,108 @@ DefineTSShapeConstructorMethod( setMeshMaterial, bool, ( const char* meshName, c "@tsexample\n" "// set the mesh material\n" "%this.setMeshMaterial( \"SimpleShape128\", \"test_mat\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_MESH( setMeshMaterial, mesh, meshName, false ); + GET_MESH(setMeshMaterial, mesh, meshName, false); // Check if this material is already in the shape S32 matIndex; - for ( matIndex = 0; matIndex < mShape->materialList->size(); matIndex++ ) + for (matIndex = 0; matIndex < mShape->materialList->size(); matIndex++) { - if ( dStrEqual( matName, mShape->materialList->getMaterialName( matIndex ) ) ) + if (dStrEqual(matName, mShape->materialList->getMaterialName(matIndex))) break; } - if ( matIndex == mShape->materialList->size() ) + if (matIndex == mShape->materialList->size()) { // Add a new material to the shape U32 flags = TSMaterialList::S_Wrap | TSMaterialList::T_Wrap; - mShape->materialList->push_back( matName, flags ); + mShape->materialList->push_back(matName, flags); } // Set this material for all primitives in the mesh - for ( S32 i = 0; i < mesh->mPrimitives.size(); i++ ) + for (S32 i = 0; i < mesh->mPrimitives.size(); i++) { - U32 matType = mesh->mPrimitives[i].matIndex & ( TSDrawPrimitive::TypeMask | TSDrawPrimitive::Indexed ); - mesh->mPrimitives[i].matIndex = ( matType | matIndex ); + U32 matType = mesh->mPrimitives[i].matIndex & (TSDrawPrimitive::TypeMask | TSDrawPrimitive::Indexed); + mesh->mPrimitives[i].matIndex = (matType | matIndex); } ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( addMesh, bool, ( const char* meshName, const char* srcShape, const char* srcMesh ),, - ( meshName, srcShape, srcMesh ), false, +DefineTSShapeConstructorMethod(addMesh, bool, (const char* meshName, const char* srcShape, const char* srcMesh), , + (meshName, srcShape, srcMesh), false, "Add geometry from another DTS or DAE shape file into this shape.\n" "Any materials required by the source mesh are also copied into this shape.
\n" "@param meshName full name (object name + detail size) of the new mesh. If " - "no detail size is present at the end of the name, a value of 2 is used.
" - "An underscore before the number at the end of the name will be interpreted as " - "a negative sign. eg. \"MyMesh_4\" will be interpreted as \"MyMesh-4\".\n" + "no detail size is present at the end of the name, a value of 2 is used.
" + "An underscore before the number at the end of the name will be interpreted as " + "a negative sign. eg. \"MyMesh_4\" will be interpreted as \"MyMesh-4\".\n" "@param srcShape name of a shape file (DTS or DAE) that contains the mesh\n" "@param srcMesh the full name (object name + detail size) of the mesh to " - "copy from the DTS/DAE file into this shape" + "copy from the DTS/DAE file into this shape" "@return true if successful, false otherwise\n\n" "@tsexample\n" "%this.addMesh( \"ColMesh-1\", \"./collision.dts\", \"ColMesh\", \"Col-1\" );\n" "%this.addMesh( \"SimpleShape10\", \"./testShape.dae\", \"MyMesh2\", "" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { // Load the shape source file char filenameBuf[1024]; Con::expandScriptFilename(filenameBuf, sizeof(filenameBuf), srcShape); - Resource hSrcShape = ResourceManager::get().load( filenameBuf ); - if ( !bool(hSrcShape) ) + Resource hSrcShape = ResourceManager::get().load(filenameBuf); + if (!bool(hSrcShape)) { - Con::errorf( "addMesh failed: Could not load source shape: '%s'", filenameBuf ); + Con::errorf("addMesh failed: Could not load source shape: '%s'", filenameBuf); return false; } - TSShape* shape = const_cast( (const TSShape*)hSrcShape ); - if ( !mShape->addMesh( shape, srcMesh, meshName ) ) + TSShape* shape = const_cast((const TSShape*)hSrcShape); + if (!mShape->addMesh(shape, srcMesh, meshName)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( removeMesh, bool, ( const char* name ),, - ( name ), false, +DefineTSShapeConstructorMethod(removeMesh, bool, (const char* name), , + (name), false, "Remove a mesh from the shape.\n" "If all geometry is removed from an object, the object is also removed.\n" "@param name full name (object name + detail size) of the mesh to remove\n" "@return true if successful, false otherwise\n\n" "@tsexample\n" "%this.removeMesh( \"SimpleShape128\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - if ( !mShape->removeMesh( name ) ) + if (!mShape->removeMesh(name)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( getBounds, Box3F, (),, +DefineTSShapeConstructorMethod(getBounds, Box3F, (), , (), Box3F::Invalid, "Get the bounding box for the shape.\n" - "@return Bounding box \"minX minY minZ maxX maxY maxZ\"" ) + "@return Bounding box \"minX minY minZ maxX maxY maxZ\"") { return mShape->mBounds; }} -DefineTSShapeConstructorMethod( setBounds, bool, ( Box3F bbox ),, - ( bbox ), false, +DefineTSShapeConstructorMethod(setBounds, bool, (Box3F bbox), , + (bbox), false, "Set the shape bounds to the given bounding box.\n" "@param Bounding box \"minX minY minZ maxX maxY maxZ\"\n" - "@return true if successful, false otherwise\n" ) + "@return true if successful, false otherwise\n") { // Set shape bounds TSShape* shape = mShape; shape->mBounds = bbox; - shape->mBounds.getCenter( &shape->center ); - shape->mRadius = ( shape->mBounds.maxExtents - shape->center ).len(); + shape->mBounds.getCenter(&shape->center); + shape->mRadius = (shape->mBounds.maxExtents - shape->center).len(); shape->tubeRadius = shape->mRadius; ADD_TO_CHANGE_SET(); @@ -1549,15 +1585,15 @@ DefineTSShapeConstructorMethod( setBounds, bool, ( Box3F bbox ),, //----------------------------------------------------------------------------- // DETAILS -DefineTSShapeConstructorMethod( getDetailLevelCount, S32, (),, (), 0, +DefineTSShapeConstructorMethod(getDetailLevelCount, S32, (), , (), 0, "Get the total number of detail levels in the shape.\n" - "@return the number of detail levels in the shape\n" ) + "@return the number of detail levels in the shape\n") { return mShape->details.size(); }} -DefineTSShapeConstructorMethod( getDetailLevelName, const char*, ( S32 index ),, - ( index ), "", +DefineTSShapeConstructorMethod(getDetailLevelName, const char*, (S32 index), , + (index), "", "Get the name of the indexed detail level.\n" "@param index detail level index (valid range is 0 - getDetailLevelCount()-1)\n" "@return the detail level name\n\n" @@ -1566,15 +1602,15 @@ DefineTSShapeConstructorMethod( getDetailLevelName, const char*, ( S32 index ),, "%count = %this.getDetailLevelCount();\n" "for ( %i = 0; %i < %count; %i++ )\n" " echo( %i SPC %this.getDetailLevelName( %i ) );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - CHECK_INDEX_IN_RANGE( getDetailLevelName, index, mShape->details.size(), "" ); + CHECK_INDEX_IN_RANGE(getDetailLevelName, index, mShape->details.size(), ""); return mShape->getName(mShape->details[index].nameIndex); }} -DefineTSShapeConstructorMethod( getDetailLevelSize, S32, ( S32 index),, - ( index ), 0, +DefineTSShapeConstructorMethod(getDetailLevelSize, S32, (S32 index), , + (index), 0, "Get the size of the indexed detail level.\n" "@param index detail level index (valid range is 0 - getDetailLevelCount()-1)\n" "@return the detail level size\n\n" @@ -1583,15 +1619,15 @@ DefineTSShapeConstructorMethod( getDetailLevelSize, S32, ( S32 index),, "%count = %this.getDetailLevelCount();\n" "for ( %i = 0; %i < %count; %i++ )\n" " echo( \"Detail\" @ %i @ \" has size \" @ %this.getDetailLevelSize( %i ) );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - CHECK_INDEX_IN_RANGE( getDetailLevelSize, index, mShape->details.size(), 0 ); + CHECK_INDEX_IN_RANGE(getDetailLevelSize, index, mShape->details.size(), 0); return (S32)mShape->details[index].size; }} -DefineTSShapeConstructorMethod( getDetailLevelIndex, S32, ( S32 size ),, - ( size ), -1, +DefineTSShapeConstructorMethod(getDetailLevelIndex, S32, (S32 size), , + (size), -1, "Get the index of the detail level with a given size.\n" "@param size size of the detail level to lookup\n" "@return index of the detail level with the desired size, or -1 if no such " @@ -1599,13 +1635,13 @@ DefineTSShapeConstructorMethod( getDetailLevelIndex, S32, ( S32 size ),, "@tsexample\n" "if ( %this.getDetailLevelSize( 32 ) == -1 )\n" " echo( \"Error: This shape does not have a detail level at size 32\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - return mShape->findDetailBySize( size ); + return mShape->findDetailBySize(size); }} -DefineTSShapeConstructorMethod( renameDetailLevel, bool, ( const char* oldName, const char* newName ),, - ( oldName, newName ), false, +DefineTSShapeConstructorMethod(renameDetailLevel, bool, (const char* oldName, const char* newName), , + (oldName, newName), false, "Rename a detail level.\n" "@note Note that detail level names must be unique, so this command will " "fail if there is already a detail level with the desired name\n" @@ -1614,33 +1650,33 @@ DefineTSShapeConstructorMethod( renameDetailLevel, bool, ( const char* oldName, "@return true if successful, false otherwise\n\n" "@tsexample\n" "%this.renameDetailLevel( \"detail-1\", \"collision-1\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - if ( !mShape->renameDetail( oldName, newName ) ) + if (!mShape->renameDetail(oldName, newName)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( removeDetailLevel, bool, ( S32 index ),, - ( index ), false, +DefineTSShapeConstructorMethod(removeDetailLevel, bool, (S32 index), , + (index), false, "Remove the detail level (including all meshes in the detail level)\n" "@param size size of the detail level to remove\n" "@return true if successful, false otherwise\n" "@tsexample\n" "%this.removeDetailLevel( 2 );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - if ( !mShape->removeDetail( index ) ) + if (!mShape->removeDetail(index)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( setDetailLevelSize, S32, ( S32 index, S32 newSize ),, - ( index, newSize ), index, +DefineTSShapeConstructorMethod(setDetailLevelSize, S32, (S32 index, S32 newSize), , + (index, newSize), index, "Change the size of a detail level." "@note Note that detail levels are always sorted in decreasing size order, " "so this command may cause detail level indices to change.\n" @@ -1649,50 +1685,50 @@ DefineTSShapeConstructorMethod( setDetailLevelSize, S32, ( S32 index, S32 newSiz "@return new index for this detail level\n\n" "@tsexample\n" "%this.setDetailLevelSize( 2, 256 );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - S32 dl = mShape->setDetailSize( index, newSize ); - if ( dl >= 0 ) + S32 dl = mShape->setDetailSize(index, newSize); + if (dl >= 0) ADD_TO_CHANGE_SET(); return dl; }} -DefineTSShapeConstructorMethod( getImposterDetailLevel, S32, (),, (), -1, +DefineTSShapeConstructorMethod(getImposterDetailLevel, S32, (), , (), -1, "Get the index of the imposter (auto-billboard) detail level (if any).\n" "@return imposter detail level index, or -1 if the shape does not use " - "imposters.\n\n" ) + "imposters.\n\n") { - for ( S32 i = 0; i < mShape->details.size(); i++ ) + for (S32 i = 0; i < mShape->details.size(); i++) { - if ( mShape->details[i].subShapeNum < 0 ) + if (mShape->details[i].subShapeNum < 0) return i; } return -1; }} -DefineTSShapeConstructorMethod( getImposterSettings, const char*, ( S32 index ),, - ( index ), "", +DefineTSShapeConstructorMethod(getImposterSettings, const char*, (S32 index), , + (index), "", "Get the settings used to generate imposters for the indexed detail level.\n" "@param index index of the detail level to query (does not need to be an " "imposter detail level\n" "@return string of the form: \"valid eqSteps pSteps dl dim poles angle\", where:" "
" - "
valid
1 if this detail level generates imposters, 0 otherwise
" - "
eqSteps
number of steps around the equator
" - "
pSteps
number of steps between the poles
" - "
dl
index of the detail level used to generate imposters
" - "
dim
size (in pixels) of each imposter image
" - "
poles
1 to include pole images, 0 otherwise
" - "
angle
angle at which to display pole images
" + "
valid
1 if this detail level generates imposters, 0 otherwise
" + "
eqSteps
number of steps around the equator
" + "
pSteps
number of steps between the poles
" + "
dl
index of the detail level used to generate imposters
" + "
dim
size (in pixels) of each imposter image
" + "
poles
1 to include pole images, 0 otherwise
" + "
angle
angle at which to display pole images
" "
\n\n" "@tsexample\n" "// print the imposter detail level settings\n" "%index = %this.getImposterDetailLevel();\n" "if ( %index != -1 )\n" " echo( \"Imposter settings: \" @ %this.getImposterSettings( %index ) );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - CHECK_INDEX_IN_RANGE( getImposterSettings, index, mShape->details.size(), "" ); + CHECK_INDEX_IN_RANGE(getImposterSettings, index, mShape->details.size(), ""); // Return information about the detail level const TSShape::Detail& det = mShape->details[index]; @@ -1700,19 +1736,19 @@ DefineTSShapeConstructorMethod( getImposterSettings, const char*, ( S32 index ), static const U32 bufSize = 512; char* returnBuffer = Con::getReturnBuffer(bufSize); dSprintf(returnBuffer, bufSize, "%d\t%d\t%d\t%d\t%d\t%d\t%g", - (S32)( det.subShapeNum < 0 ), // isImposter + (S32)(det.subShapeNum < 0), // isImposter det.bbEquatorSteps, det.bbPolarSteps, det.bbDetailLevel, det.bbDimension, det.bbIncludePoles, - det.bbPolarAngle ); + det.bbPolarAngle); return returnBuffer; }} -DefineTSShapeConstructorMethod( addImposter, S32, ( S32 size, S32 equatorSteps, S32 polarSteps, S32 dl, S32 dim, bool includePoles, F32 polarAngle ),, - ( size, equatorSteps, polarSteps, dl, dim, includePoles, polarAngle ), -1, +DefineTSShapeConstructorMethod(addImposter, S32, (S32 size, S32 equatorSteps, S32 polarSteps, S32 dl, S32 dim, bool includePoles, F32 polarAngle), , + (size, equatorSteps, polarSteps, dl, dim, includePoles, polarAngle), -1, "Add (or edit) an imposter detail level to the shape.\n" "If the shape already contains an imposter detail level, this command will " "simply change the imposter settings\n" @@ -1740,20 +1776,20 @@ DefineTSShapeConstructorMethod( addImposter, S32, ( S32 size, S32 equatorSteps, "@tsexample\n" "%this.addImposter( 2, 4, 0, 0, 64, false, 0 );\n" "%this.addImposter( 2, 4, 2, 0, 64, true, 10 ); // this command would edit the existing imposter detail level\n" - "@endtsexample\n" ) + "@endtsexample\n") { // Add the imposter detail level - dl = mShape->addImposter( getShapePath(), size, equatorSteps, polarSteps, dl, dim, includePoles, polarAngle); - if ( dl != -1 ) + dl = mShape->addImposter(getShapePath(), size, equatorSteps, polarSteps, dl, dim, includePoles, polarAngle); + if (dl != -1) ADD_TO_CHANGE_SET(); return dl; }} -DefineTSShapeConstructorMethod( removeImposter, bool, (),, (), false, +DefineTSShapeConstructorMethod(removeImposter, bool, (), , (), false, "() Remove the imposter detail level (if any) from the shape.\n" - "@return true if successful, false otherwise\n\n" ) + "@return true if successful, false otherwise\n\n") { - if ( !mShape->removeImposter() ) + if (!mShape->removeImposter()) return false; ADD_TO_CHANGE_SET(); @@ -1762,15 +1798,15 @@ DefineTSShapeConstructorMethod( removeImposter, bool, (),, (), false, //----------------------------------------------------------------------------- // SEQUENCES -DefineTSShapeConstructorMethod( getSequenceCount, S32, (),, (), 0, +DefineTSShapeConstructorMethod(getSequenceCount, S32, (), , (), 0, "Get the total number of sequences in the shape.\n" - "@return the number of sequences in the shape\n\n" ) + "@return the number of sequences in the shape\n\n") { return mShape->sequences.size(); }} -DefineTSShapeConstructorMethod( getSequenceIndex, S32, ( const char* name),, - ( name ), -1, +DefineTSShapeConstructorMethod(getSequenceIndex, S32, (const char* name), , + (name), -1, "Find the index of the sequence with the given name.\n" "@param name name of the sequence to lookup\n" "@return index of the sequence with matching name, or -1 if not found\n\n" @@ -1778,13 +1814,13 @@ DefineTSShapeConstructorMethod( getSequenceIndex, S32, ( const char* name),, "// Check if a given sequence exists in the shape\n" "if ( %this.getSequenceIndex( \"walk\" ) == -1 )\n" " echo( \"Could not find 'walk' sequence\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - return mShape->findSequence( name ); + return mShape->findSequence(name); }} -DefineTSShapeConstructorMethod( getSequenceName, const char*, ( S32 index ),, - ( index ), "", +DefineTSShapeConstructorMethod(getSequenceName, const char*, (S32 index), , + (index), "", "Get the name of the indexed sequence.\n" "@param index index of the sequence to query (valid range is 0 - getSequenceCount()-1)\n" "@return the name of the sequence\n\n" @@ -1793,83 +1829,83 @@ DefineTSShapeConstructorMethod( getSequenceName, const char*, ( S32 index ),, "%count = %this.getSequenceCount();\n" "for ( %i = 0; %i < %count; %i++ )\n" " echo( %i SPC %this.getSequenceName( %i ) );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - CHECK_INDEX_IN_RANGE( getSequenceName, index, mShape->sequences.size(), "" ); + CHECK_INDEX_IN_RANGE(getSequenceName, index, mShape->sequences.size(), ""); - return mShape->getName( mShape->sequences[index].nameIndex ); + return mShape->getName(mShape->sequences[index].nameIndex); }} -DefineTSShapeConstructorMethod( getSequenceSource, const char*, ( const char* name ),, - ( name ), "", +DefineTSShapeConstructorMethod(getSequenceSource, const char*, (const char* name), , + (name), "", "Get information about where the sequence data came from.\n" "For example, whether it was loaded from an external DSQ file.\n" "@param name name of the sequence to query\n" "@return TAB delimited string of the form: \"from reserved start end total\", where:" "
" - "
from
the source of the animation data, such as the path to " - "a DSQ file, or the name of an existing sequence in the shape. This field " - "will be empty for sequences already embedded in the DTS or DAE file.
" - "
reserved
reserved value
" - "
start
the first frame in the source sequence used to create this sequence
" - "
end
the last frame in the source sequence used to create this sequence
" - "
total
the total number of frames in the source sequence
" + "
from
the source of the animation data, such as the path to " + "a DSQ file, or the name of an existing sequence in the shape. This field " + "will be empty for sequences already embedded in the DTS or DAE file.
" + "
reserved
reserved value
" + "
start
the first frame in the source sequence used to create this sequence
" + "
end
the last frame in the source sequence used to create this sequence
" + "
total
the total number of frames in the source sequence
" "
\n\n" "@tsexample\n" "// print the source for the walk animation\n" "echo( \"walk source:\" SPC getField( %this.getSequenceSource( \"walk\" ), 0 ) );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_SEQUENCE( getSequenceSource, seq, name, "" ); + GET_SEQUENCE(getSequenceSource, seq, name, ""); // Return information about the source data for this sequence static const U32 bufSize = 512; char* returnBuffer = Con::getReturnBuffer(bufSize); - dSprintf( returnBuffer, bufSize, "%s\t%d\t%d\t%d", + dSprintf(returnBuffer, bufSize, "%s\t%d\t%d\t%d", seq->sourceData.from.c_str(), seq->sourceData.start, - seq->sourceData.end, seq->sourceData.total ); + seq->sourceData.end, seq->sourceData.total); return returnBuffer; }} -DefineTSShapeConstructorMethod( getSequenceFrameCount, S32, ( const char* name ),, - ( name ), 0, +DefineTSShapeConstructorMethod(getSequenceFrameCount, S32, (const char* name), , + (name), 0, "Get the number of keyframes in the sequence.\n" "@param name name of the sequence to query\n" "@return number of keyframes in the sequence\n\n" "@tsexample\n" "echo( \"Run has \" @ %this.getSequenceFrameCount( \"run\" ) @ \" keyframes\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_SEQUENCE( getSequenceFrameCount, seq, name, 0 ); + GET_SEQUENCE(getSequenceFrameCount, seq, name, 0); return seq->numKeyframes; }} -DefineTSShapeConstructorMethod( getSequencePriority, F32, ( const char* name ),, - ( name ), -1.0f, +DefineTSShapeConstructorMethod(getSequencePriority, F32, (const char* name), , + (name), -1.0f, "Get the priority setting of the sequence.\n" "@param name name of the sequence to query\n" - "@return priority value of the sequence\n\n" ) + "@return priority value of the sequence\n\n") { - GET_SEQUENCE( getSequencePriority, seq, name, 0.0f ); + GET_SEQUENCE(getSequencePriority, seq, name, 0.0f); return seq->priority; }} -DefineTSShapeConstructorMethod( setSequencePriority, bool, ( const char* name, F32 priority ),, - ( name, priority ), false, +DefineTSShapeConstructorMethod(setSequencePriority, bool, (const char* name, F32 priority), , + (name, priority), false, "Set the sequence priority.\n" "@param name name of the sequence to modify\n" "@param priority new priority value\n" - "@return true if successful, false otherwise\n\n" ) + "@return true if successful, false otherwise\n\n") { - GET_SEQUENCE( setSequencePriority, seq, name, false ); + GET_SEQUENCE(setSequencePriority, seq, name, false); seq->priority = priority; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( getSequenceGroundSpeed, const char*, ( const char* name ),, - ( name ), "", +DefineTSShapeConstructorMethod(getSequenceGroundSpeed, const char*, (const char* name), , + (name), "", "Get the ground speed of the sequence.\n" "@note Note that only the first 2 ground frames of the sequence are " "examined; the speed is assumed to be constant throughout the sequence.\n" @@ -1878,13 +1914,13 @@ DefineTSShapeConstructorMethod( getSequenceGroundSpeed, const char*, ( const cha "@tsexample\n" "%speed = VectorLen( getWords( %this.getSequenceGroundSpeed( \"run\" ), 0, 2 ) );\n" " echo( \"Run moves at \" @ %speed @ \" units per frame\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { // Find the sequence and return the ground speed (assumed to be constant) - GET_SEQUENCE( getSequenceGroundSpeed, seq, name, "" ); + GET_SEQUENCE(getSequenceGroundSpeed, seq, name, ""); - Point3F trans(0,0,0), rot(0,0,0); - if ( seq->numGroundFrames > 0 ) + Point3F trans(0, 0, 0), rot(0, 0, 0); + if (seq->numGroundFrames > 0) { const Point3F& p1 = mShape->groundTranslations[seq->firstGroundFrame]; const Point3F& p2 = mShape->groundTranslations[seq->firstGroundFrame + 1]; @@ -1901,13 +1937,13 @@ DefineTSShapeConstructorMethod( getSequenceGroundSpeed, const char*, ( const cha static const U32 bufSize = 256; char* returnBuffer = Con::getReturnBuffer(bufSize); - dSprintf( returnBuffer, bufSize, "%g %g %g %g %g %g", - trans.x, trans.y, trans.z, rot.x, rot.y, rot.z ); + dSprintf(returnBuffer, bufSize, "%g %g %g %g %g %g", + trans.x, trans.y, trans.z, rot.x, rot.y, rot.z); return returnBuffer; }} -DefineTSShapeConstructorMethod( setSequenceGroundSpeed, bool, ( const char* name, Point3F transSpeed, Point3F rotSpeed ), ( Point3F::Zero ), - ( name, transSpeed, rotSpeed ), false, +DefineTSShapeConstructorMethod(setSequenceGroundSpeed, bool, (const char* name, Point3F transSpeed, Point3F rotSpeed), (Point3F::Zero), + (name, transSpeed, rotSpeed), false, "Set the translation and rotation ground speed of the sequence.\n" "The ground speed of the sequence is set by generating ground transform " "keyframes. The ground translational and rotational speed is assumed to " @@ -1922,31 +1958,31 @@ DefineTSShapeConstructorMethod( setSequenceGroundSpeed, bool, ( const char* name "@tsexample\n" "%this.setSequenceGroundSpeed( \"run\", \"5 0 0\" );\n" "%this.setSequenceGroundSpeed( \"spin\", \"0 0 0\", \"4 0 0\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - if ( !mShape->setSequenceGroundSpeed( name, transSpeed, rotSpeed ) ) + if (!mShape->setSequenceGroundSpeed(name, transSpeed, rotSpeed)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( getSequenceCyclic, bool, ( const char* name ),, - ( name ), false, +DefineTSShapeConstructorMethod(getSequenceCyclic, bool, (const char* name), , + (name), false, "Check if this sequence is cyclic (looping).\n" "@param name name of the sequence to query\n" "@return true if this sequence is cyclic, false if not\n\n" "@tsexample\n" "if ( !%this.getSequenceCyclic( \"ambient\" ) )\n" " error( \"ambient sequence is not cyclic!\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_SEQUENCE( getSequenceCyclic, seq, name, false ); + GET_SEQUENCE(getSequenceCyclic, seq, name, false); return seq->isCyclic(); }} -DefineTSShapeConstructorMethod( setSequenceCyclic, bool, ( const char* name, bool cyclic ),, - ( name, cyclic ), false, +DefineTSShapeConstructorMethod(setSequenceCyclic, bool, (const char* name, bool cyclic), , + (name, cyclic), false, "Mark a sequence as cyclic or non-cyclic.\n" "@param name name of the sequence to modify\n" "@param cyclic true to make the sequence cyclic, false for non-cyclic\n" @@ -1954,9 +1990,9 @@ DefineTSShapeConstructorMethod( setSequenceCyclic, bool, ( const char* name, boo "@tsexample\n" "%this.setSequenceCyclic( \"ambient\", true );\n" "%this.setSequenceCyclic( \"shoot\", false );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_SEQUENCE( setSequenceCyclic, seq, name, false ); + GET_SEQUENCE(setSequenceCyclic, seq, name, false); // update cyclic flag if (cyclic != seq->isCyclic()) @@ -1971,8 +2007,8 @@ DefineTSShapeConstructorMethod( setSequenceCyclic, bool, ( const char* name, boo return true; }} -DefineTSShapeConstructorMethod( getSequenceBlend, const char*, ( const char* name ),, - ( name ), "", +DefineTSShapeConstructorMethod(getSequenceBlend, const char*, (const char* name), , + (name), "", "Get information about blended sequences.\n" "@param name name of the sequence to query\n" "@return TAB delimited string of the form: \"isBlend blendSeq blendFrame\", where:" @@ -1989,20 +2025,20 @@ DefineTSShapeConstructorMethod( getSequenceBlend, const char*, ( const char* nam "%blendData = %this.getSequenceBlend( \"look\" );\n" "if ( getField( %blendData, 0 ) )\n" " echo( \"look is a blend, reference: \" @ getField( %blendData, 1 ) );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_SEQUENCE( getSequenceBlend, seq, name, "0" ); + GET_SEQUENCE(getSequenceBlend, seq, name, "0"); // Return the blend information (flag reference_sequence reference_frame) static const U32 bufSize = 512; char* returnBuffer = Con::getReturnBuffer(bufSize); - dSprintf( returnBuffer, bufSize, "%d\t%s\t%d", (int)seq->isBlend(), - seq->sourceData.blendSeq.c_str(), seq->sourceData.blendFrame ); + dSprintf(returnBuffer, bufSize, "%d\t%s\t%d", (int)seq->isBlend(), + seq->sourceData.blendSeq.c_str(), seq->sourceData.blendFrame); return returnBuffer; }} -DefineTSShapeConstructorMethod( setSequenceBlend, bool, ( const char* name, bool blend, const char* blendSeq, S32 blendFrame ),, - ( name, blend, blendSeq, blendFrame ), false, +DefineTSShapeConstructorMethod(setSequenceBlend, bool, (const char* name, bool blend, const char* blendSeq, S32 blendFrame), , + (name, blend, blendSeq, blendFrame), false, "Mark a sequence as a blend or non-blend.\n" "A blend sequence is one that will be added on top of any other playing " "sequences. This is done by storing the animated node transforms relative " @@ -2014,19 +2050,19 @@ DefineTSShapeConstructorMethod( setSequenceBlend, bool, ( const char* name, bool "@return true if successful, false otherwise\n\n" "@tsexample\n" "%this.setSequenceBlend( \"look\", true, \"root\", 0 );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_SEQUENCE( setSequenceBlend, seq, name, false ); + GET_SEQUENCE(setSequenceBlend, seq, name, false); - if ( !mShape->setSequenceBlend( name, blend, blendSeq, blendFrame ) ) + if (!mShape->setSequenceBlend(name, blend, blendSeq, blendFrame)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( renameSequence, bool, ( const char* oldName, const char* newName ),, - ( oldName, newName ), false, +DefineTSShapeConstructorMethod(renameSequence, bool, (const char* oldName, const char* newName), , + (oldName, newName), false, "Rename a sequence.\n" "@note Note that sequence names must be unique, so this command will fail " "if there is already a sequence with the desired name\n" @@ -2035,20 +2071,20 @@ DefineTSShapeConstructorMethod( renameSequence, bool, ( const char* oldName, con "@return true if successful, false otherwise\n\n" "@tsexample\n" "%this.renameSequence( \"walking\", \"walk\" );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - GET_SEQUENCE( renameSequence, seq, oldName, false ); + GET_SEQUENCE(renameSequence, seq, oldName, false); - if ( !mShape->renameSequence( oldName, newName ) ) + if (!mShape->renameSequence(oldName, newName)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( addSequence, bool, - ( const char* source, const char* name, S32 start, S32 end, bool padRot, bool padTrans ), - ( 0, -1, true, false ), ( source, name, start, end, padRot, padTrans ), false, +DefineTSShapeConstructorMethod(addSequence, bool, + (const char* source, const char* name, S32 start, S32 end, bool padRot, bool padTrans), + (0, -1, true, false), (source, name, start, end, padRot, padTrans), false, "Add a new sequence to the shape.\n" "@param source the name of an existing sequence, or the name of a DTS or DAE " "shape or DSQ sequence file. When the shape file contains more than one " @@ -2075,26 +2111,44 @@ DefineTSShapeConstructorMethod( addSequence, bool, "%this.addSequence( \"./player_look.dsq\", \"look\", 0, -1 ); // start to end\n" "%this.addSequence( \"walk\", \"walk_shortA\", 0, 4 ); // start to frame 4\n" "%this.addSequence( \"walk\", \"walk_shortB\", 4, -1 ); // frame 4 to end\n" - "@endtsexample\n" ) + "@endtsexample\n") { String srcName; - String srcPath( source ); - SplitSequencePathAndName( srcPath, srcName ); + String srcPath(source); + SplitSequencePathAndName(srcPath, srcName); - if ( !mShape->addSequence( srcPath, srcName, name, start, end, padRot, padTrans ) ) + if (AssetDatabase.isDeclaredAsset(srcPath)) + { + StringTableEntry assetId = StringTable->insert(srcPath.c_str()); + StringTableEntry assetType = AssetDatabase.getAssetType(assetId); + if (assetType == StringTable->insert("ShapeAsset")) + { + ShapeAsset* asset = AssetDatabase.acquireAsset(assetId); + srcPath = asset->getShapeFilePath(); + AssetDatabase.releaseAsset(assetId); + } + else if (assetType == StringTable->insert("ShapeAnimationAsset")) + { + ShapeAnimationAsset* asset = AssetDatabase.acquireAsset(assetId); + srcPath = asset->getAnimationPath(); + AssetDatabase.releaseAsset(assetId); + } + } + + if (!mShape->addSequence(srcPath, srcName, name, start, end, padRot, padTrans)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( removeSequence, bool, ( const char* name ),, - ( name ), false, +DefineTSShapeConstructorMethod(removeSequence, bool, (const char* name), , + (name), false, "Remove the sequence from the shape.\n" "@param name name of the sequence to remove\n" - "@return true if successful, false otherwise\n\n" ) + "@return true if successful, false otherwise\n\n") { - if ( !mShape->removeSequence( name ) ) + if (!mShape->removeSequence(name)) return false; ADD_TO_CHANGE_SET(); @@ -2103,18 +2157,18 @@ DefineTSShapeConstructorMethod( removeSequence, bool, ( const char* name ),, //----------------------------------------------------------------------------- // TRIGGERS -DefineTSShapeConstructorMethod( getTriggerCount, S32, ( const char* name ),, - ( name ), 0, +DefineTSShapeConstructorMethod(getTriggerCount, S32, (const char* name), , + (name), 0, "Get the number of triggers in the specified sequence.\n" "@param name name of the sequence to query\n" - "@return number of triggers in the sequence\n\n" ) + "@return number of triggers in the sequence\n\n") { - GET_SEQUENCE( getTriggerCount, seq, name, 0 ); + GET_SEQUENCE(getTriggerCount, seq, name, 0); return seq->numTriggers; }} -DefineTSShapeConstructorMethod( getTrigger, const char*, ( const char* name, S32 index ),, - ( name, index ), "", +DefineTSShapeConstructorMethod(getTrigger, const char*, (const char* name, S32 index), , + (name, index), "", "Get information about the indexed trigger\n" "@param name name of the sequence to query\n" "@param index index of the trigger (valid range is 0 - getTriggerCount()-1)\n" @@ -2124,12 +2178,12 @@ DefineTSShapeConstructorMethod( getTrigger, const char*, ( const char* name, S32 "%count = %this.getTriggerCount( \"back\" );\n" "for ( %i = 0; %i < %count; %i++ )\n" " echo( %i SPC %this.getTrigger( \"back\", %i ) );\n" - "@endtsexample\n" ) -{ + "@endtsexample\n") +{ // Find the sequence and return the indexed trigger (frame and state) - GET_SEQUENCE( getTrigger, seq, name, "" ); + GET_SEQUENCE(getTrigger, seq, name, ""); - CHECK_INDEX_IN_RANGE( getTrigger, index, seq->numTriggers, "" ); + CHECK_INDEX_IN_RANGE(getTrigger, index, seq->numTriggers, ""); const TSShape::Trigger& trig = mShape->triggers[seq->firstTrigger + index]; S32 frame = trig.pos * seq->numKeyframes; @@ -2143,8 +2197,8 @@ DefineTSShapeConstructorMethod( getTrigger, const char*, ( const char* name, S32 return returnBuffer; }} -DefineTSShapeConstructorMethod( addTrigger, bool, ( const char* name, S32 keyframe, S32 state ),, - ( name, keyframe, state ), false, +DefineTSShapeConstructorMethod(addTrigger, bool, (const char* name, S32 keyframe, S32 state), , + (name, keyframe, state), false, "Add a new trigger to the sequence.\n" "@param name name of the sequence to modify\n" "@param keyframe keyframe of the new trigger\n" @@ -2153,17 +2207,17 @@ DefineTSShapeConstructorMethod( addTrigger, bool, ( const char* name, S32 keyfra "@tsexample\n" "%this.addTrigger( \"walk\", 3, 1 );\n" "%this.addTrigger( \"walk\", 5, -1 );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - if ( !mShape->addTrigger( name, keyframe, state ) ) + if (!mShape->addTrigger(name, keyframe, state)) return false; ADD_TO_CHANGE_SET(); return true; }} -DefineTSShapeConstructorMethod( removeTrigger, bool, ( const char* name, S32 keyframe, S32 state ),, - ( name, keyframe, state ), false, +DefineTSShapeConstructorMethod(removeTrigger, bool, (const char* name, S32 keyframe, S32 state), , + (name, keyframe, state), false, "Remove a trigger from the sequence.\n" "@param name name of the sequence to modify\n" "@param keyframe keyframe of the trigger to remove\n" @@ -2171,68 +2225,97 @@ DefineTSShapeConstructorMethod( removeTrigger, bool, ( const char* name, S32 key "@return true if successful, false otherwise\n\n" "@tsexample\n" "%this.removeTrigger( \"walk\", 3, 1 );\n" - "@endtsexample\n" ) + "@endtsexample\n") { - if ( !mShape->removeTrigger( name, keyframe, state ) ) + if (!mShape->removeTrigger(name, keyframe, state)) return false; ADD_TO_CHANGE_SET(); return true; }} +DefineEngineFunction(findShapeConstructorByAssetId, S32, (const char* assetId),, + "Attempts to find an existing TSShapeConstructor by looking up an AssetId\n" + "@tsexample\n" + "findConstructorByAssetId(\"MyModule:MyShape\");\n" + "@endtsexample") +{ + StringTableEntry assetIdSTE = StringTable->insert(assetId); + TSShapeConstructor* tss = TSShapeConstructor::findShapeConstructorByAssetId(assetIdSTE); + + if (tss) + return tss->getId(); + else + return 0; +} + +DefineEngineFunction(findShapeConstructorByFilename, S32, (const char* filename),, + "Attempts to find an existing TSShapeConstructor by looking up a filename\n" + "@tsexample\n" + "findShapeConstructorByFilename(\"data/myShape.dae\");\n" + "@endtsexample") +{ + FileName flName = FileName(filename); + TSShapeConstructor* tss = TSShapeConstructor::findShapeConstructorByFilename(flName); + + if (tss) + return tss->getId(); + else + return 0; +} //----------------------------------------------------------------------------- // Change-Set manipulation TSShapeConstructor::ChangeSet::eCommandType TSShapeConstructor::ChangeSet::getCmdType(const char* name) { - #define RETURN_IF_MATCH(type) if (!dStricmp(name, #type)) return Cmd##type +#define RETURN_IF_MATCH(type) if (!dStricmp(name, #type)) return Cmd##type RETURN_IF_MATCH(AddNode); - else RETURN_IF_MATCH(RemoveNode); - else RETURN_IF_MATCH(RenameNode); - else RETURN_IF_MATCH(SetNodeTransform); - else RETURN_IF_MATCH(SetNodeParent); +else RETURN_IF_MATCH(RemoveNode); +else RETURN_IF_MATCH(RenameNode); +else RETURN_IF_MATCH(SetNodeTransform); +else RETURN_IF_MATCH(SetNodeParent); - else RETURN_IF_MATCH(AddMesh); - else RETURN_IF_MATCH(AddPrimitive); - else RETURN_IF_MATCH(SetMeshSize); - else RETURN_IF_MATCH(SetMeshType); - else RETURN_IF_MATCH(SetMeshMaterial); - else RETURN_IF_MATCH(RemoveMesh); +else RETURN_IF_MATCH(AddMesh); +else RETURN_IF_MATCH(AddPrimitive); +else RETURN_IF_MATCH(SetMeshSize); +else RETURN_IF_MATCH(SetMeshType); +else RETURN_IF_MATCH(SetMeshMaterial); +else RETURN_IF_MATCH(RemoveMesh); - else RETURN_IF_MATCH(SetObjectNode); - else RETURN_IF_MATCH(RenameObject); - else RETURN_IF_MATCH(RemoveObject); - else RETURN_IF_MATCH(SetBounds); +else RETURN_IF_MATCH(SetObjectNode); +else RETURN_IF_MATCH(RenameObject); +else RETURN_IF_MATCH(RemoveObject); +else RETURN_IF_MATCH(SetBounds); - else RETURN_IF_MATCH(SetDetailLevelSize); - else RETURN_IF_MATCH(RenameDetailLevel); - else RETURN_IF_MATCH(RemoveDetailLevel); - else RETURN_IF_MATCH(AddImposter); - else RETURN_IF_MATCH(RemoveImposter); - else RETURN_IF_MATCH(AddCollisionDetail); +else RETURN_IF_MATCH(SetDetailLevelSize); +else RETURN_IF_MATCH(RenameDetailLevel); +else RETURN_IF_MATCH(RemoveDetailLevel); +else RETURN_IF_MATCH(AddImposter); +else RETURN_IF_MATCH(RemoveImposter); +else RETURN_IF_MATCH(AddCollisionDetail); - else RETURN_IF_MATCH(AddSequence); - else RETURN_IF_MATCH(RemoveSequence); - else RETURN_IF_MATCH(RenameSequence); - else RETURN_IF_MATCH(SetSequenceCyclic); - else RETURN_IF_MATCH(SetSequenceBlend); - else RETURN_IF_MATCH(SetSequencePriority); - else RETURN_IF_MATCH(SetSequenceGroundSpeed); +else RETURN_IF_MATCH(AddSequence); +else RETURN_IF_MATCH(RemoveSequence); +else RETURN_IF_MATCH(RenameSequence); +else RETURN_IF_MATCH(SetSequenceCyclic); +else RETURN_IF_MATCH(SetSequenceBlend); +else RETURN_IF_MATCH(SetSequencePriority); +else RETURN_IF_MATCH(SetSequenceGroundSpeed); - else RETURN_IF_MATCH(AddTrigger); - else RETURN_IF_MATCH(RemoveTrigger); +else RETURN_IF_MATCH(AddTrigger); +else RETURN_IF_MATCH(RemoveTrigger); - else return CmdInvalid; +else return CmdInvalid; - #undef RETURN_IF_MATCH +#undef RETURN_IF_MATCH } void TSShapeConstructor::ChangeSet::write(TSShape* shape, Stream& stream, const String& savePath) { // First make a copy of the change-set ChangeSet output; - for ( S32 i = 0; i < mCommands.size(); i++ ) + for (S32 i = 0; i < mCommands.size(); i++) output.add(mCommands[i]); // Remove all __backup__ sequences (used during Shape Editing) @@ -2240,12 +2323,12 @@ void TSShapeConstructor::ChangeSet::write(TSShape* shape, Stream& stream, const { for (S32 i = 0; i < shape->sequences.size(); i++) { - const char* seqName = shape->getName( shape->sequences[i].nameIndex ); - if ( dStrStartsWith( seqName, "__backup__" ) ) + const char* seqName = shape->getName(shape->sequences[i].nameIndex); + if (dStrStartsWith(seqName, "__backup__")) { - Command cmd( "removeSequence" ); - cmd.addArgs( seqName ); - output.add( cmd ); + Command cmd("removeSequence"); + cmd.addArgs(seqName); + output.add(cmd); } } } @@ -2256,121 +2339,121 @@ void TSShapeConstructor::ChangeSet::write(TSShape* shape, Stream& stream, const const Command& cmd = output.mCommands[i]; // Write the command - stream.writeTabs( 1 ); - stream.writeText( "%this." ); + stream.writeTabs(1); + stream.writeText("%this."); - stream.writeText( cmd.name ); - stream.writeText( "(" ); + stream.writeText(cmd.name); + stream.writeText("("); - if ( cmd.argc > 0 ) + if (cmd.argc > 0) { // Use relative paths when possible - String str( cmd.argv[0] ); - if ( str.startsWith( savePath ) ) + String str(cmd.argv[0]); + if (str.startsWith(savePath)) { // Need to add "./" to a local file for the script file system. Otherwise // it will be assumed to be a full and complete path when it comes to loading. - str = "./" + str.substr( savePath.length() + 1 ); + str = "./" + str.substr(savePath.length() + 1); } - stream.writeText( "\"" ); - stream.write( str.length(), str.c_str() ); - stream.writeText( "\"" ); + stream.writeText("\""); + stream.write(str.length(), str.c_str()); + stream.writeText("\""); // Write remaining arguments and newline for (U32 j = 1; j < cmd.argc; j++) { // Use relative paths when possible - String relStr( cmd.argv[j] ); - if (relStr.startsWith( savePath ) ) - relStr = relStr.substr( savePath.length() + 1 ); + String relStr(cmd.argv[j]); + if (relStr.startsWith(savePath)) + relStr = relStr.substr(savePath.length() + 1); - stream.writeText( ", \"" ); - stream.write(relStr.length(), relStr.c_str() ); - stream.writeText( "\"" ); + stream.writeText(", \""); + stream.write(relStr.length(), relStr.c_str()); + stream.writeText("\""); } } - stream.writeText( ");\r\n" ); + stream.writeText(");\r\n"); } } void TSShapeConstructor::ChangeSet::add( TSShapeConstructor::ChangeSet::Command& cmd ) { // Lookup the command type - cmd.type = getCmdType( cmd.name );if ( cmd.type == CmdInvalid ) + cmd.type = getCmdType(cmd.name); if (cmd.type == CmdInvalid) return; // Ignore operations on __proxy__ sequences (they are only used by the shape editor) - if ( cmd.argv[0].startsWith( "__proxy__" ) || ((cmd.type == CmdAddSequence) && cmd.argv[1].startsWith( "__proxy__") ) ) + if (cmd.argv[0].startsWith("__proxy__") || ((cmd.type == CmdAddSequence) && cmd.argv[1].startsWith("__proxy__"))) return; // Add the command to the change set (apply command specific collapsing) bool addCommand = true; - switch ( cmd.type ) + switch (cmd.type) { - // Node commands - case CmdSetNodeParent: addCommand = addCmd_setNodeParent( cmd ); break; - case CmdSetNodeTransform: addCommand = addCmd_setNodeTransform( cmd ); break; - case CmdRenameNode: addCommand = addCmd_renameNode( cmd ); break; - case CmdRemoveNode: addCommand = addCmd_removeNode( cmd ); break; + // Node commands + case CmdSetNodeParent: addCommand = addCmd_setNodeParent(cmd); break; + case CmdSetNodeTransform: addCommand = addCmd_setNodeTransform(cmd); break; + case CmdRenameNode: addCommand = addCmd_renameNode(cmd); break; + case CmdRemoveNode: addCommand = addCmd_removeNode(cmd); break; - // Mesh commands - case CmdSetMeshSize: addCommand = addCmd_setMeshSize( cmd ); break; - case CmdSetMeshType: addCommand = addCmd_setMeshType( cmd ); break; - case CmdSetMeshMaterial: addCommand = addCmd_setMeshMaterial( cmd ); break; - case CmdRemoveMesh: addCommand = addCmd_removeMesh( cmd ); break; + // Mesh commands + case CmdSetMeshSize: addCommand = addCmd_setMeshSize(cmd); break; + case CmdSetMeshType: addCommand = addCmd_setMeshType(cmd); break; + case CmdSetMeshMaterial: addCommand = addCmd_setMeshMaterial(cmd); break; + case CmdRemoveMesh: addCommand = addCmd_removeMesh(cmd); break; - // Object commands - case CmdSetObjectNode: addCommand = addCmd_setObjectNode( cmd ); break; - case CmdRenameObject: addCommand = addCmd_renameObject( cmd ); break; - case CmdRemoveObject: addCommand = addCmd_removeObject( cmd ); break; - case CmdSetBounds: addCommand = addCmd_setBounds( cmd ); break; + // Object commands + case CmdSetObjectNode: addCommand = addCmd_setObjectNode(cmd); break; + case CmdRenameObject: addCommand = addCmd_renameObject(cmd); break; + case CmdRemoveObject: addCommand = addCmd_removeObject(cmd); break; + case CmdSetBounds: addCommand = addCmd_setBounds(cmd); break; - // Detail level commands - case CmdRenameDetailLevel: addCommand = addCmd_renameDetailLevel( cmd ); break; - case CmdRemoveDetailLevel: addCommand = addCmd_removeDetailLevel( cmd ); break; - case CmdSetDetailLevelSize: addCommand = addCmd_setDetailSize( cmd ); break; - case CmdAddImposter: addCommand = addCmd_addImposter( cmd ); break; - case CmdRemoveImposter: addCommand = addCmd_removeImposter( cmd ); break; + // Detail level commands + case CmdRenameDetailLevel: addCommand = addCmd_renameDetailLevel(cmd); break; + case CmdRemoveDetailLevel: addCommand = addCmd_removeDetailLevel(cmd); break; + case CmdSetDetailLevelSize: addCommand = addCmd_setDetailSize(cmd); break; + case CmdAddImposter: addCommand = addCmd_addImposter(cmd); break; + case CmdRemoveImposter: addCommand = addCmd_removeImposter(cmd); break; - // Sequence commands - case CmdAddSequence: addCommand = addCmd_addSequence( cmd ); break; - case CmdSetSequencePriority: addCommand = addCmd_setSequencePriority( cmd ); break; - case CmdSetSequenceGroundSpeed: addCommand = addCmd_setSequenceGroundSpeed( cmd ); break; - case CmdSetSequenceCyclic: addCommand = addCmd_setSequenceCyclic( cmd ); break; - case CmdSetSequenceBlend: addCommand = addCmd_setSequenceBlend( cmd ); break; - case CmdRenameSequence: addCommand = addCmd_renameSequence( cmd ); break; - case CmdRemoveSequence: addCommand = addCmd_removeSequence( cmd ); break; + // Sequence commands + case CmdAddSequence: addCommand = addCmd_addSequence(cmd); break; + case CmdSetSequencePriority: addCommand = addCmd_setSequencePriority(cmd); break; + case CmdSetSequenceGroundSpeed: addCommand = addCmd_setSequenceGroundSpeed(cmd); break; + case CmdSetSequenceCyclic: addCommand = addCmd_setSequenceCyclic(cmd); break; + case CmdSetSequenceBlend: addCommand = addCmd_setSequenceBlend(cmd); break; + case CmdRenameSequence: addCommand = addCmd_renameSequence(cmd); break; + case CmdRemoveSequence: addCommand = addCmd_removeSequence(cmd); break; - case CmdAddTrigger: addCommand = addCmd_addTrigger( cmd ); break; - case CmdRemoveTrigger: addCommand = addCmd_removeTrigger( cmd ); break; + case CmdAddTrigger: addCommand = addCmd_addTrigger(cmd); break; + case CmdRemoveTrigger: addCommand = addCmd_removeTrigger(cmd); break; - // Other commands that do not have optimizations + // Other commands that do not have optimizations default: break; } - if ( addCommand ) - mCommands.push_back( cmd ); + if (addCommand) + mCommands.push_back(cmd); } //----------------------------------------------------------------------------- // NODE COMMANDS -bool TSShapeConstructor::ChangeSet::addCmd_setNodeParent( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_setNodeParent(const TSShapeConstructor::ChangeSet::Command& newCmd) { // No dependencies, replace the parent argument for any previous addNode or // setNodeParent. - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdAddNode: case CmdSetNodeParent: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[0])) { cmd.argv[1] = newCmd.argv[1]; // Replace parent argument return false; @@ -2386,18 +2469,18 @@ bool TSShapeConstructor::ChangeSet::addCmd_setNodeParent( const TSShapeConstruct } -bool TSShapeConstructor::ChangeSet::addCmd_setNodeTransform( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_setNodeTransform(const TSShapeConstructor::ChangeSet::Command& newCmd) { // No dependencies, replace the parent argument for any previous addNode or // setNodeParent. - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdAddNode: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[0])) { cmd.argc = newCmd.argc + 1; // Replace transform argument cmd.argv[2] = newCmd.argv[1]; @@ -2407,7 +2490,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setNodeTransform( const TSShapeConstr break; case CmdSetNodeTransform: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[0])) { cmd = newCmd; // Collapse successive set transform commands return false; @@ -2422,7 +2505,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setNodeTransform( const TSShapeConstr return true; } -bool TSShapeConstructor::ChangeSet::addCmd_renameNode( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_renameNode(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Replace name argument for previous addNode or renameNode, but stop // if the new name is already in use (can occur if 2 nodes switch names). eg. @@ -2430,13 +2513,13 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameNode( const TSShapeConstructor: // B->A // C->B (cannot replace the previous A->C with A->B as 'B' is in use) - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdAddNode: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[0])) { cmd.argv[0] = newCmd.argv[1]; // Replace initial name argument return false; @@ -2444,14 +2527,14 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameNode( const TSShapeConstructor: break; case CmdRenameNode: - if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[1], newCmd.argv[0])) { cmd.argv[1] = newCmd.argv[1]; // Collapse successive renames - if ( namesEqual( cmd.argv[0], cmd.argv[1] ) ) + if (namesEqual(cmd.argv[0], cmd.argv[1])) mCommands.erase(index); // Ignore empty renames return false; } - else if ( namesEqual( cmd.argv[0], newCmd.argv[1] ) ) + else if (namesEqual(cmd.argv[0], newCmd.argv[1])) return true; // Name is in use, cannot go back further break; @@ -2463,18 +2546,18 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameNode( const TSShapeConstructor: return true; } -bool TSShapeConstructor::ChangeSet::addCmd_removeNode( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_removeNode(const TSShapeConstructor::ChangeSet::Command& newCmd) { // No dependencies. Remove any previous command that references the node - String nodeName( newCmd.argv[0] ); - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + String nodeName(newCmd.argv[0]); + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdAddNode: - if ( namesEqual( cmd.argv[0], nodeName ) ) + if (namesEqual(cmd.argv[0], nodeName)) { mCommands.erase(index); // Remove the added node return false; @@ -2483,12 +2566,12 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeNode( const TSShapeConstructor: case CmdSetNodeTransform: case CmdSetNodeParent: - if ( namesEqual( cmd.argv[0], nodeName ) ) + if (namesEqual(cmd.argv[0], nodeName)) mCommands.erase(index); // Remove any commands that reference the removed node break; case CmdRenameNode: - if ( namesEqual( cmd.argv[1], nodeName ) ) + if (namesEqual(cmd.argv[1], nodeName)) { nodeName = cmd.argv[0]; // Node is renamed mCommands.erase(index); @@ -2506,34 +2589,34 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeNode( const TSShapeConstructor: //----------------------------------------------------------------------------- // SEQUENCE COMMANDS -bool TSShapeConstructor::ChangeSet::addCmd_addSequence( TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_addSequence(TSShapeConstructor::ChangeSet::Command& newCmd) { // For sequences added from ShapeEditor __backup sequences, search backwards for // any changes made to the source of the __backup sequence. If none are found, // use the __backup source instead of the __backup. const char* backupPrefix = "__backup__"; - if ( !newCmd.argv[0].startsWith( backupPrefix ) ) + if (!newCmd.argv[0].startsWith(backupPrefix)) return true; - S32 start = dStrlen( backupPrefix ); - S32 end = newCmd.argv[0].find( '_', 0, String::Right ); - String sourceName = newCmd.argv[0].substr( start, end - start ); + S32 start = dStrlen(backupPrefix); + S32 end = newCmd.argv[0].find('_', 0, String::Right); + String sourceName = newCmd.argv[0].substr(start, end - start); - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdSetSequencePriority: case CmdSetSequenceCyclic: case CmdSetSequenceBlend: case CmdSetSequenceGroundSpeed: // __backup sequence source has been modified => cannot go back further - if ( namesEqual( cmd.argv[0], sourceName ) ) + if (namesEqual(cmd.argv[0], sourceName)) return true; case CmdAddSequence: - if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[1], newCmd.argv[0])) { // No changes to the __backup sequence were found newCmd.argv[0] = sourceName; @@ -2549,19 +2632,19 @@ bool TSShapeConstructor::ChangeSet::addCmd_addSequence( TSShapeConstructor::Chan return true; } -bool TSShapeConstructor::ChangeSet::addCmd_setSequencePriority( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_setSequencePriority(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Replace any previous setSequencePriority command, but stop if the // sequence is used as a source for addSequence (since the priority is // copied). - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdSetSequencePriority: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[0])) { cmd.argv[1] = newCmd.argv[1]; // Collapse successive set priority commands return false; @@ -2569,7 +2652,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequencePriority( const TSShapeCon break; case CmdAddSequence: - if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[1], newCmd.argv[0])) return true; // Sequence is used as source => cannot go back further break; @@ -2581,19 +2664,19 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequencePriority( const TSShapeCon return true; } -bool TSShapeConstructor::ChangeSet::addCmd_setSequenceGroundSpeed( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_setSequenceGroundSpeed(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Replace any previous setSequenceGroundSpeed command, but stop if the // sequence is used as a source for addSequence (since the priority is // copied). - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdSetSequenceGroundSpeed: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[0])) { cmd.argv[1] = newCmd.argv[1]; // Collapse successive set ground speed commands return false; @@ -2601,7 +2684,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequenceGroundSpeed( const TSShape break; case CmdAddSequence: - if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[1], newCmd.argv[0])) return true; // Sequence is used as source => cannot go back further break; @@ -2613,20 +2696,20 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequenceGroundSpeed( const TSShape return true; } -bool TSShapeConstructor::ChangeSet::addCmd_setSequenceCyclic( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_setSequenceCyclic(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Replace any previous setSequenceCyclic command, but stop if the // sequence is used as a source for addSequence (since the priority is // copied). - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdSetSequenceCyclic: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) && - dAtob( cmd.argv[1] ) != dAtob( newCmd.argv[1] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[0]) && + dAtob(cmd.argv[1]) != dAtob(newCmd.argv[1])) { mCommands.erase(index); // ignore both setCyclic commands (1 undoes the other) return false; @@ -2634,7 +2717,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequenceCyclic( const TSShapeConst break; case CmdAddSequence: - if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[1], newCmd.argv[0])) return true; // Sequence is used as source => cannot go back further break; @@ -2646,22 +2729,22 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequenceCyclic( const TSShapeConst return true; } -bool TSShapeConstructor::ChangeSet::addCmd_setSequenceBlend( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_setSequenceBlend(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Replace any previous setSequenceBlend command, but stop if the // sequence is used as a source for addSequence (since the priority is // copied). - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdSetSequenceBlend: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) && - dAtob( cmd.argv[1] ) != dAtob( newCmd.argv[1] ) && - namesEqual( cmd.argv[2], newCmd.argv[2] ) && - dAtoi( cmd.argv[3] ) == dAtoi( newCmd.argv[3] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[0]) && + dAtob(cmd.argv[1]) != dAtob(newCmd.argv[1]) && + namesEqual(cmd.argv[2], newCmd.argv[2]) && + dAtoi(cmd.argv[3]) == dAtoi(newCmd.argv[3])) { mCommands.erase(index); // Ignore both setBlend commands (1 undoes the other) return false; @@ -2669,7 +2752,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequenceBlend( const TSShapeConstr break; case CmdAddSequence: - if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[1], newCmd.argv[0])) return true; // Sequence is used as source => cannot go back further break; @@ -2681,7 +2764,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequenceBlend( const TSShapeConstr return true; } -bool TSShapeConstructor::ChangeSet::addCmd_renameSequence( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_renameSequence(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Replace name argument for previous addSequence or renameSequence, but stop // if the new name is already in use (can occur if 2 nodes switch names). eg. @@ -2692,40 +2775,40 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameSequence( const TSShapeConstruc // Once a previous command is found, go forward through the command list and // update any references to the old name - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdRenameSequence: - if ( namesEqual( cmd.argv[0], newCmd.argv[1] ) && !namesEqual( cmd.argv[1], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[1]) && !namesEqual(cmd.argv[1], newCmd.argv[0])) return true; // Name is in use => cannot go back further // fall through to common processing case CmdAddSequence: - if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[1], newCmd.argv[0])) { - if ( cmd.type == CmdRenameSequence ) + if (cmd.type == CmdRenameSequence) { cmd.argv[1] = newCmd.argv[1]; // Collapse successive renames - if ( namesEqual( cmd.argv[0], cmd.argv[1] ) ) + if (namesEqual(cmd.argv[0], cmd.argv[1])) mCommands.erase(index); // Ignore empty renames } - else if ( cmd.type == CmdAddSequence ) + else if (cmd.type == CmdAddSequence) { cmd.argv[1] = newCmd.argv[1]; // Replace initial name argument } // Update any references to the old name - for ( S32 j = index + 1; j < mCommands.size(); j++ ) + for (S32 j = index + 1; j < mCommands.size(); j++) { Command& cmd2 = mCommands[j]; - switch ( cmd2.type ) + switch (cmd2.type) { case CmdSetSequencePriority: case CmdSetSequenceCyclic: case CmdSetSequenceBlend: case CmdSetSequenceGroundSpeed: - if ( namesEqual( cmd2.argv[0], newCmd.argv[0] ) ) + if (namesEqual(cmd2.argv[0], newCmd.argv[0])) cmd2.argv[0] = newCmd.argv[1]; break; } @@ -2742,24 +2825,24 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameSequence( const TSShapeConstruc return true; } -bool TSShapeConstructor::ChangeSet::addCmd_removeSequence( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_removeSequence(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Remove any previous command that references the sequence, but stop if the // sequence is used as a source for addSequence - String seqName( newCmd.argv[0] ); - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + String seqName(newCmd.argv[0]); + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdAddSequence: - if ( namesEqual( cmd.argv[1], seqName ) ) + if (namesEqual(cmd.argv[1], seqName)) { - mCommands.erase( index ); // Remove the added sequence + mCommands.erase(index); // Remove the added sequence return false; } - else if ( namesEqual( cmd.argv[0], seqName ) ) + else if (namesEqual(cmd.argv[0], seqName)) { // Removed sequence is used as source for another sequence => can't // go back any further @@ -2768,10 +2851,10 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeSequence( const TSShapeConstruc break; case CmdRenameSequence: - if ( namesEqual( cmd.argv[1], seqName ) ) + if (namesEqual(cmd.argv[1], seqName)) { seqName = cmd.argv[0]; // Sequence is renamed - mCommands.erase( index ); + mCommands.erase(index); } break; @@ -2781,8 +2864,8 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeSequence( const TSShapeConstruc case CmdSetSequenceBlend: case CmdAddTrigger: case CmdRemoveTrigger: - if ( namesEqual( cmd.argv[0], seqName ) ) - mCommands.erase( index ); // Remove any commands that reference the removed sequence + if (namesEqual(cmd.argv[0], seqName)) + mCommands.erase(index); // Remove any commands that reference the removed sequence break; default: @@ -2793,20 +2876,20 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeSequence( const TSShapeConstruc return true; } -bool TSShapeConstructor::ChangeSet::addCmd_addTrigger( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_addTrigger(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Remove a matching removeTrigger command, but stop if the sequence is used as // a source for addSequence (since triggers are copied). - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdRemoveTrigger: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) && - cmd.argv[1] == newCmd.argv[1] && - cmd.argv[2] == newCmd.argv[2] ) + if (namesEqual(cmd.argv[0], newCmd.argv[0]) && + cmd.argv[1] == newCmd.argv[1] && + cmd.argv[2] == newCmd.argv[2]) { mCommands.erase(index); // Remove previous removeTrigger command return false; @@ -2814,7 +2897,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_addTrigger( const TSShapeConstructor: break; case CmdAddSequence: - if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[1], newCmd.argv[0])) return true; // Sequence is used as a source => cannot go back further break; @@ -2826,20 +2909,20 @@ bool TSShapeConstructor::ChangeSet::addCmd_addTrigger( const TSShapeConstructor: return true; } -bool TSShapeConstructor::ChangeSet::addCmd_removeTrigger( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_removeTrigger(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Remove a matching addTrigger command, but stop if the sequence is used as // a source for addSequence (since triggers are copied). - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdAddTrigger: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) && - cmd.argv[1] == newCmd.argv[1] && - cmd.argv[2] == newCmd.argv[2] ) + if (namesEqual(cmd.argv[0], newCmd.argv[0]) && + cmd.argv[1] == newCmd.argv[1] && + cmd.argv[2] == newCmd.argv[2]) { mCommands.erase(index); // Remove previous addTrigger command return false; @@ -2847,7 +2930,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeTrigger( const TSShapeConstruct break; case CmdAddSequence: - if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[1], newCmd.argv[0])) return true; // Sequence is used as a source => cannot go back further break; @@ -2862,7 +2945,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeTrigger( const TSShapeConstruct //----------------------------------------------------------------------------- // MESH COMMANDS -bool TSShapeConstructor::ChangeSet::addCmd_setMeshSize( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_setMeshSize(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Replace size argument for previous addMesh or setMeshSize, but stop if the // new name is already in use (can occur if 2 nodes switch names). eg. @@ -2870,13 +2953,13 @@ bool TSShapeConstructor::ChangeSet::addCmd_setMeshSize( const TSShapeConstructor // B->A // C->B (cannot replace the previous A->C with A->B as 'B' is in use) - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdAddMesh: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[0])) { cmd.argv[0] = newCmd.argv[1]; // Replace initial size argument return false; @@ -2884,14 +2967,14 @@ bool TSShapeConstructor::ChangeSet::addCmd_setMeshSize( const TSShapeConstructor break; case CmdSetMeshSize: - if ( cmd.argv[1] == newCmd.argv[0] ) + if (cmd.argv[1] == newCmd.argv[0]) { cmd.argv[1] = newCmd.argv[1]; // Collapse successive size sets - if ( cmd.argv[0] == cmd.argv[1] ) + if (cmd.argv[0] == cmd.argv[1]) mCommands.erase(index); // Ignore empty resizes return false; } - else if ( cmd.argv[0] == newCmd.argv[1] ) + else if (cmd.argv[0] == newCmd.argv[1]) return true; // Size is in use, cannot go back further break; @@ -2903,18 +2986,18 @@ bool TSShapeConstructor::ChangeSet::addCmd_setMeshSize( const TSShapeConstructor return true; } -bool TSShapeConstructor::ChangeSet::addCmd_setMeshType( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_setMeshType(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Replace any previous setMeshType command, but stop if the mesh is used as // a source for addMesh (since the type is copied). - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdSetMeshType: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[0])) { cmd.argv[1] = newCmd.argv[1]; // Collapse successive set type commands return false; @@ -2922,7 +3005,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setMeshType( const TSShapeConstructor break; case CmdAddMesh: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[0])) return true; // Mesh is used as source => cannot go back further break; @@ -2934,18 +3017,18 @@ bool TSShapeConstructor::ChangeSet::addCmd_setMeshType( const TSShapeConstructor return true; } -bool TSShapeConstructor::ChangeSet::addCmd_setMeshMaterial( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_setMeshMaterial(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Replace any previous setMeshMaterial command, but stop if the mesh is used as // a source for addMesh (since the materials are copied). - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdSetMeshMaterial: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[0])) { cmd.argv[1] = newCmd.argv[1]; // Collapse successive set material commands return false; @@ -2953,7 +3036,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setMeshMaterial( const TSShapeConstru break; case CmdAddMesh: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[0])) return true; // Mesh is used as source => cannot go back further break; @@ -2965,24 +3048,24 @@ bool TSShapeConstructor::ChangeSet::addCmd_setMeshMaterial( const TSShapeConstru return true; } -bool TSShapeConstructor::ChangeSet::addCmd_removeMesh( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_removeMesh(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Remove any previous command that references the mesh, but stop if the mesh // is used as a source for addMesh - String meshName( newCmd.argv[0] ); - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + String meshName(newCmd.argv[0]); + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdAddMesh: - if ( namesEqual( cmd.argv[0], meshName ) ) + if (namesEqual(cmd.argv[0], meshName)) { - mCommands.erase( index ); // Remove the added mesh + mCommands.erase(index); // Remove the added mesh return false; } - else if ( namesEqual( cmd.argv[2], meshName ) ) + else if (namesEqual(cmd.argv[2], meshName)) { // Removed mesh is used as source for another mesh => can't go back // any further @@ -2991,9 +3074,9 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeMesh( const TSShapeConstructor: break; case CmdAddPrimitive: - if ( namesEqual( cmd.argv[0], meshName ) ) + if (namesEqual(cmd.argv[0], meshName)) { - mCommands.erase( index ); // Remove the added primitive + mCommands.erase(index); // Remove the added primitive return false; } break; @@ -3001,8 +3084,8 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeMesh( const TSShapeConstructor: case CmdSetMeshSize: case CmdSetMeshType: case CmdSetMeshMaterial: - if ( namesEqual( cmd.argv[0], meshName ) ) - mCommands.erase( index ); // Remove any commands that reference the removed mesh + if (namesEqual(cmd.argv[0], meshName)) + mCommands.erase(index); // Remove any commands that reference the removed mesh break; default: @@ -3016,20 +3099,20 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeMesh( const TSShapeConstructor: //----------------------------------------------------------------------------- // OBJECT COMMANDS -bool TSShapeConstructor::ChangeSet::addCmd_setObjectNode( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_setObjectNode(const TSShapeConstructor::ChangeSet::Command& newCmd) { // No dependencies, replace the node argument for any previous parent argument for any previous addNode or // setNodeParent. - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdAddMesh: { S32 dummy; - if ( namesEqual( String::GetTrailingNumber(cmd.argv[0], dummy), newCmd.argv[0] ) ) + if (namesEqual(String::GetTrailingNumber(cmd.argv[0], dummy), newCmd.argv[0])) { cmd.argv[3] = newCmd.argv[1]; // Replace node argument return false; @@ -3038,7 +3121,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setObjectNode( const TSShapeConstruct } case CmdSetObjectNode: - if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[0], newCmd.argv[0])) { cmd.argv[1] = newCmd.argv[1]; return false; @@ -3053,7 +3136,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setObjectNode( const TSShapeConstruct return true; } -bool TSShapeConstructor::ChangeSet::addCmd_renameObject( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_renameObject(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Replace name argument for previous renameObject, but stop if the new name // is already in use (can occur if 2 objects switch names). eg. @@ -3061,20 +3144,20 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameObject( const TSShapeConstructo // B->A // C->B (cannot replace the previous A->C with A->B as 'B' is in use) - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdRenameObject: - if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[1], newCmd.argv[0])) { cmd.argv[1] = newCmd.argv[1]; // Collapse successive renames - if ( namesEqual( cmd.argv[0], cmd.argv[1] ) ) + if (namesEqual(cmd.argv[0], cmd.argv[1])) mCommands.erase(index); // Ignore empty renames return false; } - else if ( namesEqual( cmd.argv[0], newCmd.argv[1] ) ) + else if (namesEqual(cmd.argv[0], newCmd.argv[1])) return true; // Name is in use, cannot go back further break; @@ -3086,26 +3169,26 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameObject( const TSShapeConstructo return true; } -bool TSShapeConstructor::ChangeSet::addCmd_removeObject( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_removeObject(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Remove any previous command that references the object, but stop if any // object mesh is used as a source for addMesh S32 dummy; - String objName( newCmd.argv[0] ); - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + String objName(newCmd.argv[0]); + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdAddMesh: - if ( namesEqual( String::GetTrailingNumber(cmd.argv[0], dummy), objName ) ) + if (namesEqual(String::GetTrailingNumber(cmd.argv[0], dummy), objName)) { - mCommands.erase( index ); // Remove the added mesh + mCommands.erase(index); // Remove the added mesh // Must still add the removeObject command as there could be multiple // meshes in the object } - else if ( namesEqual( String::GetTrailingNumber(cmd.argv[2], dummy), objName ) ) + else if (namesEqual(String::GetTrailingNumber(cmd.argv[2], dummy), objName)) { // Removed mesh is used as source for another mesh => can't go back // any further @@ -3114,24 +3197,24 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeObject( const TSShapeConstructo break; case CmdRenameObject: - if ( namesEqual( cmd.argv[1], objName ) ) + if (namesEqual(cmd.argv[1], objName)) { objName = cmd.argv[0]; // Object is renamed - mCommands.erase( index ); + mCommands.erase(index); } break; case CmdSetObjectNode: - if ( namesEqual( cmd.argv[0], objName ) ) - mCommands.erase( index ); // Remove any commands that reference the removed object + if (namesEqual(cmd.argv[0], objName)) + mCommands.erase(index); // Remove any commands that reference the removed object break; case CmdSetMeshSize: case CmdSetMeshType: case CmdSetMeshMaterial: case CmdRemoveMesh: - if ( namesEqual( String::GetTrailingNumber(cmd.argv[0], dummy), objName ) ) - mCommands.erase( index ); // Remove comands that reference the removed object + if (namesEqual(String::GetTrailingNumber(cmd.argv[0], dummy), objName)) + mCommands.erase(index); // Remove comands that reference the removed object break; default: @@ -3142,17 +3225,17 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeObject( const TSShapeConstructo return true; } -bool TSShapeConstructor::ChangeSet::addCmd_setBounds( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_setBounds(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Only the last bounds update applies, so replace any previous command. - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdSetBounds: - mCommands.erase( index ); + mCommands.erase(index); break; default: @@ -3166,7 +3249,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setBounds( const TSShapeConstructor:: //----------------------------------------------------------------------------- // DETAIL COMMANDS -bool TSShapeConstructor::ChangeSet::addCmd_renameDetailLevel( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_renameDetailLevel(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Replace name argument for previous renameDetailLevel, but stop if the new // name is already in use (can occur if 2 objects switch names). eg. @@ -3174,20 +3257,20 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameDetailLevel( const TSShapeConst // B->A // C->B (cannot replace the previous A->C with A->B as 'B' is in use) - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdRenameDetailLevel: - if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) ) + if (namesEqual(cmd.argv[1], newCmd.argv[0])) { cmd.argv[1] = newCmd.argv[1]; // Collapse successive renames - if ( namesEqual( cmd.argv[0], cmd.argv[1] ) ) + if (namesEqual(cmd.argv[0], cmd.argv[1])) mCommands.erase(index); // Ignore empty renames return false; } - else if ( namesEqual( cmd.argv[0], newCmd.argv[1] ) ) + else if (namesEqual(cmd.argv[0], newCmd.argv[1])) return true; // Name is in use, cannot go back further break; @@ -3199,22 +3282,22 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameDetailLevel( const TSShapeConst return true; } -bool TSShapeConstructor::ChangeSet::addCmd_removeDetailLevel( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_removeDetailLevel(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Remove any previous command that references the detail, but stop if a mesh // is used as a source for addMesh - S32 detSize = dAtoi( newCmd.argv[0] ); - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + S32 detSize = dAtoi(newCmd.argv[0]); + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; S32 size; - switch ( cmd.type ) + switch (cmd.type) { case CmdAddMesh: - String::GetTrailingNumber( cmd.argv[2], size ); - if ( size == detSize ) + String::GetTrailingNumber(cmd.argv[2], size); + if (size == detSize) { // Removed detail is used as source for another mesh => can't go back // any further @@ -3227,16 +3310,16 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeDetailLevel( const TSShapeConst case CmdSetMeshType: case CmdSetMeshMaterial: case CmdRemoveMesh: - String::GetTrailingNumber( cmd.argv[0], size ); - if ( size == detSize ) - mCommands.erase( index ); + String::GetTrailingNumber(cmd.argv[0], size); + if (size == detSize) + mCommands.erase(index); break; case CmdAddImposter: case CmdAddCollisionDetail: - if ( dAtoi(cmd.argv[0]) == detSize ) + if (dAtoi(cmd.argv[0]) == detSize) { - mCommands.erase( index ); + mCommands.erase(index); return false; } break; @@ -3249,7 +3332,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeDetailLevel( const TSShapeConst return true; } -bool TSShapeConstructor::ChangeSet::addCmd_setDetailSize( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_setDetailSize(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Similar to renameXXX. Replace size argument for previous addImposter or // setDetailLevelSize, but stop if the new size is already in use (can occur @@ -3258,13 +3341,13 @@ bool TSShapeConstructor::ChangeSet::addCmd_setDetailSize( const TSShapeConstruct // B->A // C->B (cannot replace the previous A->C with A->B as 'B' is in use) - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdAddImposter: - if ( cmd.argv[0] == newCmd.argv[0] ) + if (cmd.argv[0] == newCmd.argv[0]) { cmd.argv[0] = newCmd.argv[1]; // Change detail size argument return false; @@ -3272,14 +3355,14 @@ bool TSShapeConstructor::ChangeSet::addCmd_setDetailSize( const TSShapeConstruct break; case CmdSetDetailLevelSize: - if ( cmd.argv[1] == newCmd.argv[0] ) + if (cmd.argv[1] == newCmd.argv[0]) { cmd.argv[1] = newCmd.argv[1]; // Collapse successive detail size changes - if ( cmd.argv[0] == cmd.argv[1] ) + if (cmd.argv[0] == cmd.argv[1]) mCommands.erase(index); // Ignore empty changes return false; } - else if ( cmd.argv[0] == newCmd.argv[1] ) + else if (cmd.argv[0] == newCmd.argv[1]) return true; // Detail size already in use => cannot go back further break; @@ -3291,24 +3374,24 @@ bool TSShapeConstructor::ChangeSet::addCmd_setDetailSize( const TSShapeConstruct return true; } -bool TSShapeConstructor::ChangeSet::addCmd_addImposter( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_addImposter(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Remove previous removeImposter, and replace any previous addImposter. If // replacing, also remove any setDetailLevelSize for the old imposter - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdAddImposter: // Replace the AddImposter command, but first remove any reference to // the added detail level. - for ( S32 j = index + 1; j < mCommands.size(); j++ ) + for (S32 j = index + 1; j < mCommands.size(); j++) { Command& cmd2 = mCommands[j]; - if ( ( cmd2.type == CmdSetDetailLevelSize ) && - cmd2.argv[0] == cmd.argv[0] ) + if ((cmd2.type == CmdSetDetailLevelSize) && + cmd2.argv[0] == cmd.argv[0]) { mCommands.erase(j); break; @@ -3330,26 +3413,26 @@ bool TSShapeConstructor::ChangeSet::addCmd_addImposter( const TSShapeConstructor return true; } -bool TSShapeConstructor::ChangeSet::addCmd_removeImposter( const TSShapeConstructor::ChangeSet::Command& newCmd ) +bool TSShapeConstructor::ChangeSet::addCmd_removeImposter(const TSShapeConstructor::ChangeSet::Command& newCmd) { // Remove any previous addImposter, and also remove any setDetailLevelSize // for that imposter. // Always need to return true, since we could be removing imposters already // present in the shape (not added with addImposter). - for ( S32 index = mCommands.size()-1; index >= 0; index-- ) + for (S32 index = mCommands.size() - 1; index >= 0; index--) { Command& cmd = mCommands[index]; - switch ( cmd.type ) + switch (cmd.type) { case CmdAddImposter: // Remove the AddImposter command, but first remove any reference to // the added detail level. - for ( S32 j = index + 1; j < mCommands.size(); j++ ) + for (S32 j = index + 1; j < mCommands.size(); j++) { Command& cmd2 = mCommands[j]; - if ( ( cmd2.type == CmdSetDetailLevelSize ) && - cmd2.argv[0] == cmd.argv[0] ) + if ((cmd2.type == CmdSetDetailLevelSize) && + cmd2.argv[0] == cmd.argv[0]) { mCommands.erase(j); break; diff --git a/Engine/source/ts/tsShapeConstruct.h b/Engine/source/ts/tsShapeConstruct.h index 49b157f17..caaf6ceff 100644 --- a/Engine/source/ts/tsShapeConstruct.h +++ b/Engine/source/ts/tsShapeConstruct.h @@ -42,6 +42,9 @@ #include "console/engineAPI.h" #endif +#include "T3D/assets/ShapeAsset.h" +#include "T3D/assets/ShapeAnimationAsset.h" + /// This class allows an artist to export their animations for the model /// into the .dsq format. This class in particular matches up the model /// with the .dsqs to create a nice animated model. @@ -101,17 +104,17 @@ public: String argv[MAX_ARGS]; // Command arguments S32 argc; // Number of arguments Command() : type(CmdInvalid), name(0), argc(0) { } - Command( const char* _name ) + Command(const char* _name) : type(CmdInvalid), argc(0) { - name = StringTable->insert( _name ); + name = StringTable->insert(_name); + } + + // Helper functions to fill in the command arguments + template inline void addArgs(ArgTs ...args) { + using Helper = engineAPI::detail::MarshallHelpers; + Helper::marshallEach(argc, argv, args...); } - - // Helper functions to fill in the command arguments - template inline void addArgs(ArgTs ...args){ - using Helper = engineAPI::detail::MarshallHelpers; - Helper::marshallEach(argc, argv, args...); - } }; Vector mCommands; @@ -120,40 +123,40 @@ public: void clear() { mCommands.clear(); } bool empty() { return mCommands.empty(); } - void add( Command& cmd ); + void add(Command& cmd); // These methods handle change set optimisation based on the newly added command - bool addCmd_setNodeParent( const Command& newCmd ); - bool addCmd_setNodeTransform( const Command& newCmd ); - bool addCmd_renameNode( const Command& newCmd ); - bool addCmd_removeNode( const Command& newCmd ); + bool addCmd_setNodeParent(const Command& newCmd); + bool addCmd_setNodeTransform(const Command& newCmd); + bool addCmd_renameNode(const Command& newCmd); + bool addCmd_removeNode(const Command& newCmd); - bool addCmd_setMeshSize( const Command& newCmd ); - bool addCmd_setMeshType( const Command& newCmd ); - bool addCmd_setMeshMaterial( const Command& newCmd ); - bool addCmd_removeMesh( const Command& newCmd ); + bool addCmd_setMeshSize(const Command& newCmd); + bool addCmd_setMeshType(const Command& newCmd); + bool addCmd_setMeshMaterial(const Command& newCmd); + bool addCmd_removeMesh(const Command& newCmd); - bool addCmd_setObjectNode( const Command& newCmd ); - bool addCmd_renameObject( const Command& newCmd ); - bool addCmd_removeObject( const Command& newCmd ); - bool addCmd_setBounds( const Command& newCmd ); + bool addCmd_setObjectNode(const Command& newCmd); + bool addCmd_renameObject(const Command& newCmd); + bool addCmd_removeObject(const Command& newCmd); + bool addCmd_setBounds(const Command& newCmd); - bool addCmd_renameDetailLevel( const Command& newCmd ); - bool addCmd_removeDetailLevel( const Command& newCmd ); - bool addCmd_setDetailSize( const Command& newCmd ); - bool addCmd_addImposter( const Command& newCmd ); - bool addCmd_removeImposter( const Command& newCmd ); + bool addCmd_renameDetailLevel(const Command& newCmd); + bool addCmd_removeDetailLevel(const Command& newCmd); + bool addCmd_setDetailSize(const Command& newCmd); + bool addCmd_addImposter(const Command& newCmd); + bool addCmd_removeImposter(const Command& newCmd); - bool addCmd_addSequence( Command& newCmd ); - bool addCmd_setSequencePriority( const Command& newCmd ); - bool addCmd_setSequenceGroundSpeed( const Command& newCmd ); - bool addCmd_setSequenceCyclic( const Command& newCmd ); - bool addCmd_setSequenceBlend( const Command& newCmd ); - bool addCmd_renameSequence( const Command& newCmd ); - bool addCmd_removeSequence( const Command& newCmd ); + bool addCmd_addSequence(Command& newCmd); + bool addCmd_setSequencePriority(const Command& newCmd); + bool addCmd_setSequenceGroundSpeed(const Command& newCmd); + bool addCmd_setSequenceCyclic(const Command& newCmd); + bool addCmd_setSequenceBlend(const Command& newCmd); + bool addCmd_renameSequence(const Command& newCmd); + bool addCmd_removeSequence(const Command& newCmd); - bool addCmd_addTrigger( const Command& newCmd ); - bool addCmd_removeTrigger( const Command& newCmd ); + bool addCmd_addTrigger(const Command& newCmd); + bool addCmd_removeTrigger(const Command& newCmd); void write(TSShape* shape, Stream& stream, const String& savePath); }; @@ -161,8 +164,12 @@ public: static const S32 MaxLegacySequences = 127; protected: - FileName mShapePath; - Vector mSequences; + StringTableEntry mShapeAssetId; + AssetPtr mShapeAsset; + + Vector mSequenceAssetIds; + Vector> mSequencesAssets; + ChangeSet mChangeSet; // Paths to shapes used by MeshFit @@ -170,46 +177,47 @@ protected: static String smCubeShapePath; static String smSphereShapePath; - static bool addSequenceFromField( void *obj, const char *index, const char *data ); - - static void _onTSShapeLoaded( Resource< TSShape >& shape ); - static void _onTSShapeUnloaded( const Torque::Path& path, TSShape* shape ); - + static bool addSequenceFromField(void* obj, const char* index, const char* data); + + static void _onTSShapeLoaded(Resource< TSShape >& shape); + static void _onTSShapeUnloaded(const Torque::Path& path, TSShape* shape); + static ResourceRegisterPostLoadSignal< TSShape > _smAutoLoad; static ResourceRegisterUnloadSignal< TSShape > _smAutoUnload; - + /// @name Callbacks ///@{ - DECLARE_CALLBACK( void, onLoad, () ); - DECLARE_CALLBACK( void, onUnload, () ); + DECLARE_CALLBACK(void, onLoad, ()); + DECLARE_CALLBACK(void, onUnload, ()); ///@} - virtual void _onLoad( TSShape* shape ); + virtual void _onLoad(TSShape* shape); virtual void _onUnload(); public: - TSShape* mShape; // Edited shape; NULL while not loaded; not a Resource as we don't want it to prevent from unloading. + TSShape* mShape; // Edited shape; NULL while not loaded; not a Resource as we don't want it to prevent from unloading. ColladaUtils::ImportOptions mOptions; bool mLoadingShape; public: TSShapeConstructor(); - TSShapeConstructor(const String& path) : mShapePath(path), mShape(NULL), mLoadingShape(false){ } + TSShapeConstructor(StringTableEntry path) : mShapeAssetId(path), mShape(NULL), mLoadingShape(false) { } ~TSShapeConstructor(); DECLARE_CONOBJECT(TSShapeConstructor); static void initPersistFields(); static void consoleInit(); - static TSShapeConstructor* findShapeConstructor(const FileName& path); + static TSShapeConstructor* findShapeConstructorByAssetId(StringTableEntry path); + static TSShapeConstructor* findShapeConstructorByFilename(const FileName& path); bool onAdd(); void onScriptChanged(const Torque::Path& path); void onActionPerformed(); - bool writeField(StringTableEntry fieldname, const char *value); + bool writeField(StringTableEntry fieldname, const char* value); void writeChangeSet(); void notifyShapeChanged(); @@ -222,107 +230,118 @@ public: ///@} TSShape* getShape() const { return mShape; } - const String& getShapePath() const { return mShapePath; } + StringTableEntry getShapePath() const + { + if (mShapeAsset.notNull()) + return mShapeAsset->getShapeFilePath(); + else + return StringTable->EmptyString(); + } + + StringTableEntry getShapeAssetId() const + { + return mShapeAssetId; + } /// @name Dumping ///@{ - void dumpShape( const char* filename ); - void saveShape( const char* filename ); + void dumpShape(const char* filename); + void saveShape(const char* filename); ///@} /// @name Nodes ///@{ S32 getNodeCount(); - S32 getNodeIndex( const char* name ); - const char* getNodeName( S32 index ); - const char* getNodeParentName( const char* name ); - bool setNodeParent( const char* name, const char* parentName ); - S32 getNodeChildCount( const char* name ); - const char* getNodeChildName( const char* name, S32 index ); - S32 getNodeObjectCount( const char* name ); - const char* getNodeObjectName( const char* name, S32 index ); - TransformF getNodeTransform( const char* name, bool isWorld=false ); - bool setNodeTransform( const char* name, TransformF txfm, bool isWorld=false ); - bool renameNode( const char* oldName, const char* newName ); - bool addNode( const char* name, const char* parentName, TransformF txfm=TransformF::Identity, bool isWorld=false); - bool removeNode( const char* name ); + S32 getNodeIndex(const char* name); + const char* getNodeName(S32 index); + const char* getNodeParentName(const char* name); + bool setNodeParent(const char* name, const char* parentName); + S32 getNodeChildCount(const char* name); + const char* getNodeChildName(const char* name, S32 index); + S32 getNodeObjectCount(const char* name); + const char* getNodeObjectName(const char* name, S32 index); + TransformF getNodeTransform(const char* name, bool isWorld = false); + bool setNodeTransform(const char* name, TransformF txfm, bool isWorld = false); + bool renameNode(const char* oldName, const char* newName); + bool addNode(const char* name, const char* parentName, TransformF txfm = TransformF::Identity, bool isWorld = false); + bool removeNode(const char* name); ///@} /// @name Materials ///@{ S32 getTargetCount(); - const char* getTargetName( S32 index ); + const char* getTargetName(S32 index); ///@} ///@{ S32 getObjectCount(); - const char* getObjectName( S32 index ); - S32 getObjectIndex( const char* name ); - const char* getObjectNode( const char* name ); - bool setObjectNode( const char* objName, const char* nodeName ); - bool renameObject( const char* oldName, const char* newName ); - bool removeObject( const char* name ); + const char* getObjectName(S32 index); + S32 getObjectIndex(const char* name); + const char* getObjectNode(const char* name); + bool setObjectNode(const char* objName, const char* nodeName); + bool renameObject(const char* oldName, const char* newName); + bool removeObject(const char* name); ///@} /// @name Meshes ///@{ - S32 getMeshCount( const char* name ); - const char* getMeshName( const char* name, S32 index ); - S32 getMeshSize( const char* name, S32 index ); - bool setMeshSize( const char* name, S32 size ); - const char* getMeshType( const char* name ); - bool setMeshType( const char* name, const char* type ); - const char* getMeshMaterial( const char* name ); - bool setMeshMaterial( const char* meshName, const char* matName ); - bool addMesh( const char* meshName, const char* srcShape, const char* srcMesh ); - bool addPrimitive( const char* meshName, const char* type, const char* params, TransformF txfm, const char* nodeName ); - bool removeMesh( const char* name ); + S32 getMeshCount(const char* name); + const char* getMeshName(const char* name, S32 index); + S32 getMeshSize(const char* name, S32 index); + bool setMeshSize(const char* name, S32 size); + const char* getMeshType(const char* name); + bool setMeshType(const char* name, const char* type); + const char* getMeshMaterial(const char* name); + bool setMeshMaterial(const char* meshName, const char* matName); + bool addMesh(const char* meshName, const char* srcShape, const char* srcMesh); + bool addPrimitive(const char* meshName, const char* type, const char* params, TransformF txfm, const char* nodeName); + bool removeMesh(const char* name); ///@} /// @name Detail Levels ///@{ Box3F getBounds(); - bool setBounds( Box3F bbox ); + bool setBounds(Box3F bbox); S32 getDetailLevelCount(); - const char* getDetailLevelName( S32 index ); - S32 getDetailLevelSize( S32 index); - S32 getDetailLevelIndex( S32 size ); - bool renameDetailLevel( const char* oldName, const char* newName ); - bool removeDetailLevel( S32 index ); - S32 setDetailLevelSize( S32 index, S32 newSize ); + const char* getDetailLevelName(S32 index); + S32 getDetailLevelSize(S32 index); + S32 getDetailLevelIndex(S32 size); + bool renameDetailLevel(const char* oldName, const char* newName); + bool removeDetailLevel(S32 index); + S32 setDetailLevelSize(S32 index, S32 newSize); S32 getImposterDetailLevel(); - const char* getImposterSettings( S32 index ); - S32 addImposter( S32 size, S32 equatorSteps, S32 polarSteps, S32 dl, S32 dim, bool includePoles, F32 polarAngle ); + const char* getImposterSettings(S32 index); + S32 addImposter(S32 size, S32 equatorSteps, S32 polarSteps, S32 dl, S32 dim, bool includePoles, F32 polarAngle); bool removeImposter(); - bool addCollisionDetail( S32 size, const char* type, const char* target, S32 depth=4, F32 merge=30.0f, F32 concavity=30.0f, S32 maxVerts=32, F32 boxMaxError=0, F32 sphereMaxError=0, F32 capsuleMaxError=0 ); + bool addCollisionDetail(S32 size, const char* type, const char* target, S32 depth = 4, F32 merge = 30.0f, F32 concavity = 30.0f, S32 maxVerts = 32, F32 boxMaxError = 0, F32 sphereMaxError = 0, F32 capsuleMaxError = 0); ///@} /// @name Sequences ///@{ S32 getSequenceCount(); - S32 getSequenceIndex( const char* name); - const char* getSequenceName( S32 index ); - const char* getSequenceSource( const char* name ); - S32 getSequenceFrameCount( const char* name ); - F32 getSequencePriority( const char* name ); - bool setSequencePriority( const char* name, F32 priority ); - const char* getSequenceGroundSpeed( const char* name ); - bool setSequenceGroundSpeed( const char* name, Point3F transSpeed, Point3F rotSpeed=Point3F::Zero ); - bool getSequenceCyclic( const char* name ); - bool setSequenceCyclic( const char* name, bool cyclic ); - const char* getSequenceBlend( const char* name ); - bool setSequenceBlend( const char* name, bool blend, const char* blendSeq, S32 blendFrame ); - bool renameSequence( const char* oldName, const char* newName ); - bool addSequence( const char* source, const char* name, S32 start=0, S32 end=-1, bool padRot=true, bool padTrans=false ); - bool removeSequence( const char* name ); + S32 getSequenceIndex(const char* name); + const char* getSequenceName(S32 index); + const char* getSequenceSource(const char* name); + S32 getSequenceFrameCount(const char* name); + F32 getSequencePriority(const char* name); + bool setSequencePriority(const char* name, F32 priority); + const char* getSequenceGroundSpeed(const char* name); + bool setSequenceGroundSpeed(const char* name, Point3F transSpeed, Point3F rotSpeed = Point3F::Zero); + bool getSequenceCyclic(const char* name); + bool setSequenceCyclic(const char* name, bool cyclic); + const char* getSequenceBlend(const char* name); + bool setSequenceBlend(const char* name, bool blend, const char* blendSeq, S32 blendFrame); + bool renameSequence(const char* oldName, const char* newName); + bool addSequence(const char* source, const char* name, S32 start = 0, S32 end = -1, bool padRot = true, bool padTrans = false); + bool removeSequence(const char* name); ///@} /// @name Triggers ///@{ - S32 getTriggerCount( const char* name ); - const char* getTrigger( const char* name, S32 index ); - bool addTrigger( const char* name, S32 keyframe, S32 state ); - bool removeTrigger( const char* name, S32 keyframe, S32 state ); + S32 getTriggerCount(const char* name); + const char* getTrigger(const char* name, S32 index); + bool addTrigger(const char* name, S32 keyframe, S32 state); + bool removeTrigger(const char* name, S32 keyframe, S32 state); ///@} }; @@ -330,7 +349,7 @@ typedef domUpAxisType TSShapeConstructorUpAxis; typedef ColladaUtils::ImportOptions::eLodType TSShapeConstructorLodType; typedef ColladaUtils::ImportOptions::eAnimTimingType TSShapeConstructorAnimType; -DefineEnumType( TSShapeConstructorUpAxis ); +DefineEnumType(TSShapeConstructorUpAxis); DefineEnumType(TSShapeConstructorLodType); DefineEnumType(TSShapeConstructorAnimType); @@ -339,7 +358,7 @@ class TSShapeConstructorMethodActionCallback TSShapeConstructor* mObject; public: - TSShapeConstructorMethodActionCallback(TSShapeConstructor *object) : mObject(object) { ; } + TSShapeConstructorMethodActionCallback(TSShapeConstructor* object) : mObject(object) { ; } ~TSShapeConstructorMethodActionCallback() { mObject->onActionPerformed(); } }; @@ -372,8 +391,8 @@ public: TORQUE_UNUSED(newCmd); -/* This macro just hides the name of the auto-created ChangeSet::Command from - above, so we are free to change the implementation later if needed */ + /* This macro just hides the name of the auto-created ChangeSet::Command from + above, so we are free to change the implementation later if needed */ #define ADD_TO_CHANGE_SET() mChangeSet.add( newCmd ); diff --git a/Engine/source/util/settings.cpp b/Engine/source/util/settings.cpp index 166c9dd1c..72962f4c6 100644 --- a/Engine/source/util/settings.cpp +++ b/Engine/source/util/settings.cpp @@ -252,7 +252,7 @@ bool Settings::write() node->clear(); delete node; - bool saved = document->saveFile(mFile.c_str()); + bool saved = document->saveFile(mFile); document->deleteObject(); if(saved) @@ -267,7 +267,7 @@ bool Settings::read() document->registerObject(); bool success = true; - if(document->loadFile(mFile.c_str())) + if(document->loadFile(mFile)) { clearAllFields(); diff --git a/Engine/source/util/settings.h b/Engine/source/util/settings.h index 6db4c81bb..3368fe759 100644 --- a/Engine/source/util/settings.h +++ b/Engine/source/util/settings.h @@ -32,7 +32,7 @@ class SimXMLDocument; class Settings : public SimObject { private: - FileName mFile; + StringTableEntry mFile; Vector mGroupStack; S32 mSearchPos; Vector mSearchResults; diff --git a/Templates/BaseGame/game/core/clientServer/Core_ClientServer.module b/Templates/BaseGame/game/core/clientServer/Core_ClientServer.module index ec72cbc70..5ef30114a 100644 --- a/Templates/BaseGame/game/core/clientServer/Core_ClientServer.module +++ b/Templates/BaseGame/game/core/clientServer/Core_ClientServer.module @@ -6,4 +6,9 @@ CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Core"> + \ No newline at end of file diff --git a/Templates/BaseGame/game/core/clientServer/scripts/client/client.tscript b/Templates/BaseGame/game/core/clientServer/scripts/client/client.tscript index b583bbc60..100b6b305 100644 --- a/Templates/BaseGame/game/core/clientServer/scripts/client/client.tscript +++ b/Templates/BaseGame/game/core/clientServer/scripts/client/client.tscript @@ -25,4 +25,5 @@ function initClient() // Copy saved script prefs into C++ code. setDefaultFov( $pref::Player::defaultFov ); setZoomSpeed( $pref::Player::zoomSpeed ); + loadModuleMaterials(); } \ No newline at end of file diff --git a/Templates/BaseGame/game/core/console/Core_Console.module b/Templates/BaseGame/game/core/console/Core_Console.module index 62839d63a..32bfe9af4 100644 --- a/Templates/BaseGame/game/core/console/Core_Console.module +++ b/Templates/BaseGame/game/core/console/Core_Console.module @@ -7,4 +7,9 @@ DestroyFunction="onDestroy" Group="Core" Dependencies="Core_GUI=1"> + \ No newline at end of file diff --git a/Templates/BaseGame/game/core/console/guis/ConsoleDlg.asset.taml b/Templates/BaseGame/game/core/console/guis/ConsoleDlg.asset.taml new file mode 100644 index 000000000..61d594176 --- /dev/null +++ b/Templates/BaseGame/game/core/console/guis/ConsoleDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/datablocks/defaultDatablocks.tscript b/Templates/BaseGame/game/core/gameObjects/datablocks/defaultDatablocks.tscript index 340cf368b..008b5e352 100644 --- a/Templates/BaseGame/game/core/gameObjects/datablocks/defaultDatablocks.tscript +++ b/Templates/BaseGame/game/core/gameObjects/datablocks/defaultDatablocks.tscript @@ -18,7 +18,7 @@ datablock ParticleEmitterNodeData(DefaultEmitterNodeData) datablock ParticleData(DefaultParticle) { - textureName = "core/gameObjects/images/defaultParticle"; + textureAsset = "Core_GameObjects:defaultParticle_image"; dragCoefficient = 0.498534; gravityCoefficient = 0; inheritedVelFactor = 0.499022; @@ -127,19 +127,19 @@ datablock RibbonData(TexturedRibbon) datablock MissionMarkerData(WayPointMarker) { category = "Misc"; - shapeFile = "core/gameObjects/shapes/octahedron.dts"; + shapeAsset = "Core_GameObjects:octahedron"; }; datablock MissionMarkerData(SpawnSphereMarker) { category = "Misc"; - shapeFile = "core/gameObjects/shapes/octahedron.dts"; + shapeAsset = "Core_GameObjects:octahedron"; }; datablock MissionMarkerData(CameraBookmarkMarker) { category = "Misc"; - shapeFile = "core/gameObjects/shapes/camera.dts"; + shapeAsset = "Core_GameObjects:Camera"; }; datablock CameraData(Observer) diff --git a/Templates/BaseGame/game/core/gameObjects/images/camera_image.asset.taml b/Templates/BaseGame/game/core/gameObjects/images/camera_image.asset.taml new file mode 100644 index 000000000..f902b5c72 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/images/camera_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/images/defaultParticle_image.asset.taml b/Templates/BaseGame/game/core/gameObjects/images/defaultParticle_image.asset.taml new file mode 100644 index 000000000..26fee691c --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/images/defaultParticle_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/images/defaultRoadTextureOther_image.asset.taml b/Templates/BaseGame/game/core/gameObjects/images/defaultRoadTextureOther_image.asset.taml new file mode 100644 index 000000000..911032bc1 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/images/defaultRoadTextureOther_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/images/defaultRoadTextureTop_image.asset.taml b/Templates/BaseGame/game/core/gameObjects/images/defaultRoadTextureTop_image.asset.taml new file mode 100644 index 000000000..dfd03bb0a --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/images/defaultRoadTextureTop_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/images/defaultpath_image.asset.taml b/Templates/BaseGame/game/core/gameObjects/images/defaultpath_image.asset.taml new file mode 100644 index 000000000..ad090aba3 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/images/defaultpath_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/images/defaultpath_normal_image.asset.taml b/Templates/BaseGame/game/core/gameObjects/images/defaultpath_normal_image.asset.taml new file mode 100644 index 000000000..3cf5290f4 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/images/defaultpath_normal_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/images/green_image.asset.taml b/Templates/BaseGame/game/core/gameObjects/images/green_image.asset.taml new file mode 100644 index 000000000..0abc12013 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/images/green_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/images/ribTex_image.asset.taml b/Templates/BaseGame/game/core/gameObjects/images/ribTex_image.asset.taml new file mode 100644 index 000000000..65e331d65 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/images/ribTex_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/materials/DefaultDecalRoadMaterial.asset.taml b/Templates/BaseGame/game/core/gameObjects/materials/DefaultDecalRoadMaterial.asset.taml new file mode 100644 index 000000000..08f5506ba --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/materials/DefaultDecalRoadMaterial.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/materials/DefaultRoadMaterialOther.asset.taml b/Templates/BaseGame/game/core/gameObjects/materials/DefaultRoadMaterialOther.asset.taml new file mode 100644 index 000000000..77164a8b5 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/materials/DefaultRoadMaterialOther.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/materials/DefaultRoadMaterialTop.asset.taml b/Templates/BaseGame/game/core/gameObjects/materials/DefaultRoadMaterialTop.asset.taml new file mode 100644 index 000000000..14a1a15cd --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/materials/DefaultRoadMaterialTop.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/materials/TexturedRibbonMat.asset.taml b/Templates/BaseGame/game/core/gameObjects/materials/TexturedRibbonMat.asset.taml new file mode 100644 index 000000000..930268299 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/materials/TexturedRibbonMat.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/materials/materials.tscript b/Templates/BaseGame/game/core/gameObjects/materials/materials.tscript index af1f49cf7..27ab97d94 100644 --- a/Templates/BaseGame/game/core/gameObjects/materials/materials.tscript +++ b/Templates/BaseGame/game/core/gameObjects/materials/materials.tscript @@ -58,7 +58,7 @@ singleton CustomMaterial( TexturedRibbonMat ) singleton Material(DefaultDecalRoadMaterial) { - diffuseMap[0] = "core/gameObjects/images/defaultRoadTextureTop.png"; + diffuseMapAsset[0] = "Core_GameObjects:defaultRoadTextureTop_image"; mapTo = "unmapped_mat"; materialTag0 = "RoadAndPath"; }; @@ -66,13 +66,13 @@ singleton Material(DefaultDecalRoadMaterial) singleton Material(DefaultRoadMaterialTop) { mapTo = "unmapped_mat"; - diffuseMap[0] = "core/gameObjects/images/defaultRoadTextureTop.png"; + diffuseMapAsset[0] = "Core_GameObjects:defaultRoadTextureTop_image"; materialTag0 = "RoadAndPath"; }; singleton Material(DefaultRoadMaterialOther) { mapTo = "unmapped_mat"; - diffuseMap[0] = "core/gameObjects/images/defaultRoadTextureOther.png"; + diffuseMapAsset[0] = "Core_GameObjects:defaultRoadTextureOther_image"; materialTag0 = "RoadAndPath"; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/Camera.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/Camera.asset.taml new file mode 100644 index 000000000..bd49ffbb6 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/Camera.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/CameraMat.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/CameraMat.asset.taml new file mode 100644 index 000000000..2b85211c6 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/CameraMat.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/OctahedronMat.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/OctahedronMat.asset.taml new file mode 100644 index 000000000..95227b6bb --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/OctahedronMat.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/camera.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/camera.tscript new file mode 100644 index 000000000..87d053808 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/camera.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(cameradts) +{ + baseShapeAsset = "Core_GameObjects:Camera"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/materials.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/materials.tscript index 63120f6a1..9cc31fbbe 100644 --- a/Templates/BaseGame/game/core/gameObjects/shapes/materials.tscript +++ b/Templates/BaseGame/game/core/gameObjects/shapes/materials.tscript @@ -24,7 +24,7 @@ singleton Material(OctahedronMat) { mapTo = "green"; - diffuseMap[0] = "core/gameObjects/images/camera"; + diffuseMapAsset[0] = "Core_GameObjects:camera_image"; translucent = "1"; translucentBlendOp = "PreMul"; @@ -39,7 +39,7 @@ singleton Material(CameraMat) { mapTo = "pasted__phongE1"; - diffuseMap[0] = "core/gameObjects/images/camera"; + diffuseMapAsset[0] = "Core_GameObjects:camera_image"; diffuseColor[0] = "0 0.627451 1 1"; specular[0] = "1 1 1 1"; @@ -60,7 +60,7 @@ singleton Material(noshape_NoShape) { mapTo = "NoShape"; - diffuseMap[0] = ""; + diffuseMapAsset[0] = ""; diffuseColor[0] = "0.8 0.003067 0 .8"; emissive[0] = 0; @@ -78,7 +78,7 @@ singleton Material(noshapetext_lambert1) { mapTo = "lambert1"; - diffuseMap[0] = ""; + diffuseMapAsset[0] = ""; diffuseColor[0] = "0.4 0.4 0.4 1"; specular[0] = "1 1 1 1"; @@ -95,7 +95,7 @@ singleton Material(noshapetext_noshape_mat) { mapTo = "noshape_mat"; - diffuseMap[0] = ""; + diffuseMapAsset[0] = ""; diffuseColor[0] = "0.4 0.3504 0.363784 0.33058"; specular[0] = "1 1 1 1"; diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/noshape.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/noshape.asset.taml new file mode 100644 index 000000000..aec6b87ba --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/noshape.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/noshape.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/noshape.tscript new file mode 100644 index 000000000..231812a1f --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/noshape.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(noshapedts) +{ + baseShapeAsset = "Core_GameObjects:noshape"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/noshape_NoShape.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/noshape_NoShape.asset.taml new file mode 100644 index 000000000..140cfb8dd --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/noshape_NoShape.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/noshapetext_lambert1.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/noshapetext_lambert1.asset.taml new file mode 100644 index 000000000..03690b6fe --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/noshapetext_lambert1.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/noshapetext_noshape_mat.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/noshapetext_noshape_mat.asset.taml new file mode 100644 index 000000000..1fec80c57 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/noshapetext_noshape_mat.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/octahedron.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/octahedron.asset.taml new file mode 100644 index 000000000..d2567f57e --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/octahedron.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/octahedron.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/octahedron.tscript new file mode 100644 index 000000000..ac5cb9bd6 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/octahedron.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(octahedrondts) +{ + baseShapeAsset = "Core_GameObjects:octahedron"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/simplecone.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/simplecone.asset.taml new file mode 100644 index 000000000..8da3471fd --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/simplecone.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/simplecone.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/simplecone.tscript new file mode 100644 index 000000000..c610ccd0c --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/simplecone.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(simpleconedts) +{ + baseShapeAsset = "Core_GameObjects:simplecone"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/unit_capsule.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/unit_capsule.asset.taml new file mode 100644 index 000000000..cfa70436d --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/unit_capsule.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/unit_capsule.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/unit_capsule.tscript new file mode 100644 index 000000000..3c6a00aab --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/unit_capsule.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(unit_capsuledts) +{ + baseShapeAsset = "Core_GameObjects:unit_capsule"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/unit_cube.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/unit_cube.asset.taml new file mode 100644 index 000000000..281f67ac9 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/unit_cube.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/unit_cube.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/unit_cube.tscript new file mode 100644 index 000000000..9d29021dc --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/unit_cube.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(unit_cubedts) +{ + baseShapeAsset = "Core_GameObjects:unit_cube"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/unit_sphere.asset.taml b/Templates/BaseGame/game/core/gameObjects/shapes/unit_sphere.asset.taml new file mode 100644 index 000000000..8072d7569 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/unit_sphere.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/unit_sphere.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/unit_sphere.tscript new file mode 100644 index 000000000..ef1d96fb1 --- /dev/null +++ b/Templates/BaseGame/game/core/gameObjects/shapes/unit_sphere.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(unit_spheredts) +{ + baseShapeAsset = "Core_GameObjects:unit_sphere"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/core/gui/Core_GUI.module b/Templates/BaseGame/game/core/gui/Core_GUI.module index 3e66cdc1a..b9d64a3d6 100644 --- a/Templates/BaseGame/game/core/gui/Core_GUI.module +++ b/Templates/BaseGame/game/core/gui/Core_GUI.module @@ -7,4 +7,9 @@ DestroyFunction="onDestroy" Group="Core" Dependencies="Core_Rendering=1"> + \ No newline at end of file diff --git a/Templates/BaseGame/game/core/gui/images/button_image.asset.taml b/Templates/BaseGame/game/core/gui/images/button_image.asset.taml new file mode 100644 index 000000000..9069be9a9 --- /dev/null +++ b/Templates/BaseGame/game/core/gui/images/button_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gui/images/checkbox_image.asset.taml b/Templates/BaseGame/game/core/gui/images/checkbox_image.asset.taml new file mode 100644 index 000000000..30de51698 --- /dev/null +++ b/Templates/BaseGame/game/core/gui/images/checkbox_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gui/images/group_border_image.asset.taml b/Templates/BaseGame/game/core/gui/images/group_border_image.asset.taml new file mode 100644 index 000000000..9b2972e84 --- /dev/null +++ b/Templates/BaseGame/game/core/gui/images/group_border_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gui/images/inactive_overlay_image.asset.taml b/Templates/BaseGame/game/core/gui/images/inactive_overlay_image.asset.taml new file mode 100644 index 000000000..318f2f289 --- /dev/null +++ b/Templates/BaseGame/game/core/gui/images/inactive_overlay_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gui/images/loadingbar_image.asset.taml b/Templates/BaseGame/game/core/gui/images/loadingbar_image.asset.taml new file mode 100644 index 000000000..548be3563 --- /dev/null +++ b/Templates/BaseGame/game/core/gui/images/loadingbar_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gui/images/scrollBar_image.asset.taml b/Templates/BaseGame/game/core/gui/images/scrollBar_image.asset.taml new file mode 100644 index 000000000..92fe3c13d --- /dev/null +++ b/Templates/BaseGame/game/core/gui/images/scrollBar_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gui/images/slider_image.asset.taml b/Templates/BaseGame/game/core/gui/images/slider_image.asset.taml new file mode 100644 index 000000000..1e5d96486 --- /dev/null +++ b/Templates/BaseGame/game/core/gui/images/slider_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gui/images/textEdit_image.asset.taml b/Templates/BaseGame/game/core/gui/images/textEdit_image.asset.taml new file mode 100644 index 000000000..241e228c8 --- /dev/null +++ b/Templates/BaseGame/game/core/gui/images/textEdit_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gui/images/thumbHighlightButton_image.asset.taml b/Templates/BaseGame/game/core/gui/images/thumbHighlightButton_image.asset.taml new file mode 100644 index 000000000..69f260c98 --- /dev/null +++ b/Templates/BaseGame/game/core/gui/images/thumbHighlightButton_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gui/images/window_image.asset.taml b/Templates/BaseGame/game/core/gui/images/window_image.asset.taml new file mode 100644 index 000000000..c01f24895 --- /dev/null +++ b/Templates/BaseGame/game/core/gui/images/window_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/gui/scripts/profiles.tscript b/Templates/BaseGame/game/core/gui/scripts/profiles.tscript index 73c60d9dc..dd0ede04a 100644 --- a/Templates/BaseGame/game/core/gui/scripts/profiles.tscript +++ b/Templates/BaseGame/game/core/gui/scripts/profiles.tscript @@ -63,7 +63,7 @@ new GuiControlProfile (GuiDefaultProfile) fontColorSEL= "255 255 255"; // bitmap information - bitmap = ""; + bitmapAsset = ""; bitmapBase = ""; textOffset = "0 0"; @@ -107,7 +107,7 @@ new GuiControlProfile (GuiWindowProfile) bevelColorHL = "255 255 255"; bevelColorLL = "0 0 0"; text = "untitled"; - bitmap = "core/gui/images/window"; + bitmapAsset = "Core_GUI:window_image"; textOffset = "8 4"; hasBitmapArray = true; justify = "left"; @@ -119,7 +119,7 @@ if(!isObject(GuiTextEditProfile)) new GuiControlProfile(GuiTextEditProfile) { opaque = true; - bitmap = "core/gui/images/textEdit"; + bitmapAsset = "Core_GUI:textEdit_image"; hasBitmapArray = true; border = -2; fillColor = "242 241 240 0"; @@ -145,7 +145,7 @@ new GuiControlProfile(GuiScrollProfile) fontColor = "0 0 0"; fontColorHL = "150 150 150"; border = true; - bitmap = "core/gui/images/scrollBar"; + bitmapAsset = "Core_GUI:scrollBar_image"; hasBitmapArray = true; category = "Core"; }; @@ -173,7 +173,7 @@ new GuiControlProfile(GuiCheckBoxProfile) fontColorNA = "200 200 200"; fixedExtent = true; justify = "left"; - bitmap = "core/gui/images/checkbox"; + bitmapAsset = "Core_GUI:checkbox_image"; hasBitmapArray = true; category = "Tools"; }; @@ -193,7 +193,7 @@ new GuiControlProfile( GuiProgressBitmapProfile ) { border = false; hasBitmapArray = true; - bitmap = "core/gui/images/loadingbar"; + bitmapAsset = "Core_GUI:loadingbar_image"; category = "Core"; }; @@ -220,7 +220,7 @@ new GuiControlProfile( GuiButtonProfile ) fixedExtent = false; justify = "center"; canKeyFocus = false; - bitmap = "core/gui/images/button"; + bitmapAsset = "Core_GUI:button_image"; hasBitmapArray = false; category = "Core"; }; @@ -231,6 +231,6 @@ new GuiControlProfile( GuiButtonProfile ) if( !isObject( GuiSliderProfile ) ) new GuiControlProfile( GuiSliderProfile ) { - bitmap = "core/gui/images/slider"; + bitmapAsset = "Core_GUI:slider_image"; category = "Core"; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/core/lighting/Core_Lighting.module b/Templates/BaseGame/game/core/lighting/Core_Lighting.module index f2757dfe3..1291231ce 100644 --- a/Templates/BaseGame/game/core/lighting/Core_Lighting.module +++ b/Templates/BaseGame/game/core/lighting/Core_Lighting.module @@ -6,4 +6,9 @@ CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Core"> + \ No newline at end of file diff --git a/Templates/BaseGame/game/core/lighting/scripts/AL_ConvexLightState.asset.taml b/Templates/BaseGame/game/core/lighting/scripts/AL_ConvexLightState.asset.taml new file mode 100644 index 000000000..1c3b81a5a --- /dev/null +++ b/Templates/BaseGame/game/core/lighting/scripts/AL_ConvexLightState.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/lighting/scripts/AL_DefaultDeferredMaterial.asset.taml b/Templates/BaseGame/game/core/lighting/scripts/AL_DefaultDeferredMaterial.asset.taml new file mode 100644 index 000000000..b5567f4b1 --- /dev/null +++ b/Templates/BaseGame/game/core/lighting/scripts/AL_DefaultDeferredMaterial.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/lighting/scripts/AL_DefaultShadowMaterial.asset.taml b/Templates/BaseGame/game/core/lighting/scripts/AL_DefaultShadowMaterial.asset.taml new file mode 100644 index 000000000..5e1bd8133 --- /dev/null +++ b/Templates/BaseGame/game/core/lighting/scripts/AL_DefaultShadowMaterial.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/lighting/scripts/AL_ParticlePointLightShader.asset.taml b/Templates/BaseGame/game/core/lighting/scripts/AL_ParticlePointLightShader.asset.taml new file mode 100644 index 000000000..3cf0aef47 --- /dev/null +++ b/Templates/BaseGame/game/core/lighting/scripts/AL_ParticlePointLightShader.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/lighting/scripts/AL_SpotLightShader.asset.taml b/Templates/BaseGame/game/core/lighting/scripts/AL_SpotLightShader.asset.taml new file mode 100644 index 000000000..e521008e8 --- /dev/null +++ b/Templates/BaseGame/game/core/lighting/scripts/AL_SpotLightShader.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/lighting/scripts/BL_ProjectedShadowRPM.asset.taml b/Templates/BaseGame/game/core/lighting/scripts/BL_ProjectedShadowRPM.asset.taml new file mode 100644 index 000000000..0911fb3fd --- /dev/null +++ b/Templates/BaseGame/game/core/lighting/scripts/BL_ProjectedShadowRPM.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/lighting/scripts/IrradianceShader.asset.taml b/Templates/BaseGame/game/core/lighting/scripts/IrradianceShader.asset.taml new file mode 100644 index 000000000..a525eecbb --- /dev/null +++ b/Templates/BaseGame/game/core/lighting/scripts/IrradianceShader.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/postFX/Core_PostFX.module b/Templates/BaseGame/game/core/postFX/Core_PostFX.module index 95c45ecc2..746b0f24c 100644 --- a/Templates/BaseGame/game/core/postFX/Core_PostFX.module +++ b/Templates/BaseGame/game/core/postFX/Core_PostFX.module @@ -7,4 +7,9 @@ DestroyFunction="onDestroy" Group="Core" Dependencies="Core_Rendering=1,Core_Lighting=1"> + \ No newline at end of file diff --git a/Templates/BaseGame/game/core/postFX/images/AreaMap33_image.asset.taml b/Templates/BaseGame/game/core/postFX/images/AreaMap33_image.asset.taml new file mode 100644 index 000000000..6a4e4ddf7 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/images/AreaMap33_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/postFX/images/Empty.asset.taml b/Templates/BaseGame/game/core/postFX/images/Empty.asset.taml new file mode 100644 index 000000000..a344e3ddb --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/images/Empty.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/postFX/images/WarningMaterial.asset.taml b/Templates/BaseGame/game/core/postFX/images/WarningMaterial.asset.taml new file mode 100644 index 000000000..abf94e410 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/images/WarningMaterial.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/postFX/images/caustics_1_image.asset.taml b/Templates/BaseGame/game/core/postFX/images/caustics_1_image.asset.taml new file mode 100644 index 000000000..e05b45da2 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/images/caustics_1_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/postFX/images/caustics_2_image.asset.taml b/Templates/BaseGame/game/core/postFX/images/caustics_2_image.asset.taml new file mode 100644 index 000000000..2a4e2fcd8 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/images/caustics_2_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/postFX/images/inactive_overlay_image.asset.taml b/Templates/BaseGame/game/core/postFX/images/inactive_overlay_image.asset.taml new file mode 100644 index 000000000..318f2f289 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/images/inactive_overlay_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/postFX/images/materials.tscript b/Templates/BaseGame/game/core/postFX/images/materials.tscript index a13c751b3..df1abcfbc 100644 --- a/Templates/BaseGame/game/core/postFX/images/materials.tscript +++ b/Templates/BaseGame/game/core/postFX/images/materials.tscript @@ -25,7 +25,7 @@ singleton Material( Empty ) }; singleton Material(WarningMaterial) { - detailMap[0] = "missingTexture"; + detailMapAsset[0] = "Core_PostFX:missingTexture_image"; diffuseColor[0] = "25 16 0"; emissive[0] = false; translucent = false; diff --git a/Templates/BaseGame/game/core/postFX/images/missingTexture_image.asset.taml b/Templates/BaseGame/game/core/postFX/images/missingTexture_image.asset.taml new file mode 100644 index 000000000..81a8b895a --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/images/missingTexture_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/postFX/images/noise_image.asset.taml b/Templates/BaseGame/game/core/postFX/images/noise_image.asset.taml new file mode 100644 index 000000000..8a2528a19 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/images/noise_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/postFX/images/null_color_ramp_image.asset.taml b/Templates/BaseGame/game/core/postFX/images/null_color_ramp_image.asset.taml new file mode 100644 index 000000000..bc01111b6 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/images/null_color_ramp_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/postFX/images/unavailable_image.asset.taml b/Templates/BaseGame/game/core/postFX/images/unavailable_image.asset.taml new file mode 100644 index 000000000..8b183e3bc --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/images/unavailable_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/postFX/images/warnMat_image.asset.taml b/Templates/BaseGame/game/core/postFX/images/warnMat_image.asset.taml new file mode 100644 index 000000000..d12da21b2 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/images/warnMat_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/postFX/scripts/Caustics/CausticsPostFX.tscript b/Templates/BaseGame/game/core/postFX/scripts/Caustics/CausticsPostFX.tscript index cba25b0c1..abd49c8ac 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/Caustics/CausticsPostFX.tscript +++ b/Templates/BaseGame/game/core/postFX/scripts/Caustics/CausticsPostFX.tscript @@ -58,7 +58,7 @@ singleton PostEffect( CausticsPFX ) shader = PFX_CausticsShader; stateBlock = PFX_CausticsStateBlock; texture[0] = "#deferred"; - texture[1] = "core/postFX/images/caustics_1"; - texture[2] = "core/postFX/images/caustics_2"; + textureAsset[1] = "Core_PostFX:caustics_1_image"; + textureAsset[2] = "Core_PostFX:caustics_2_image"; target = "$backBuffer"; }; diff --git a/Templates/BaseGame/game/core/postFX/scripts/LUTColorGrading/Eerie_image.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/LUTColorGrading/Eerie_image.asset.taml new file mode 100644 index 000000000..51e2c9783 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/LUTColorGrading/Eerie_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/postFX/scripts/LUTColorGrading/Misty_Blue_image.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/LUTColorGrading/Misty_Blue_image.asset.taml new file mode 100644 index 000000000..b74782693 --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/LUTColorGrading/Misty_Blue_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/postFX/scripts/LUTColorGrading/Warm_Day_image.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/LUTColorGrading/Warm_Day_image.asset.taml new file mode 100644 index 000000000..deadf05fd --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/LUTColorGrading/Warm_Day_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/postFX/scripts/LUTColorGrading/perfect_Gradient_image.asset.taml b/Templates/BaseGame/game/core/postFX/scripts/LUTColorGrading/perfect_Gradient_image.asset.taml new file mode 100644 index 000000000..6dfdafece --- /dev/null +++ b/Templates/BaseGame/game/core/postFX/scripts/LUTColorGrading/perfect_Gradient_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/postFX/scripts/MLAA/MLAAPostFX.tscript b/Templates/BaseGame/game/core/postFX/scripts/MLAA/MLAAPostFX.tscript index 0de83ef53..dcdb0c2e6 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/MLAA/MLAAPostFX.tscript +++ b/Templates/BaseGame/game/core/postFX/scripts/MLAA/MLAAPostFX.tscript @@ -162,7 +162,7 @@ singleton PostEffect( MLAAFx ) texture[0] = "$inTex"; // Edges mask texture[1] = "$inTex"; // Edges mask - texture[2] = "core/postFX/images/AreaMap33.dds"; + textureAsset[2] = "Core_PostFX:AreaMap33_image"; }; new PostEffect() @@ -183,4 +183,4 @@ function MLAAFx::setShaderConsts(%this) %this.setShaderConst("$lumaCoefficients", %this.lumaCoefficients); %this.setShaderConst("$threshold", %this.threshold); %this.setShaderConst("$depthThreshold", %this.depthThreshold); -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/core/postFX/scripts/SSAO/SSAOPostFx.tscript b/Templates/BaseGame/game/core/postFX/scripts/SSAO/SSAOPostFx.tscript index 59c4bc60a..8c95bff7a 100644 --- a/Templates/BaseGame/game/core/postFX/scripts/SSAO/SSAOPostFx.tscript +++ b/Templates/BaseGame/game/core/postFX/scripts/SSAO/SSAOPostFx.tscript @@ -270,7 +270,7 @@ singleton PostEffect( SSAOPostFx ) stateBlock = SSAOStateBlock; texture[0] = "#deferred"; - texture[1] = "core/postFX/images/noise.png"; + textureAsset[1] = "Core_PostFX:noise_image"; texture[2] = "#ssao_pow_table"; target = "$outTex"; @@ -369,4 +369,4 @@ singleton PostEffect( SSAOPowTablePostFx ) targetFormat = "GFXFormatR16F"; targetSize = "256 1"; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/core/rendering/Core_Rendering.tscript b/Templates/BaseGame/game/core/rendering/Core_Rendering.tscript index ab67dfccb..142f04783 100644 --- a/Templates/BaseGame/game/core/rendering/Core_Rendering.tscript +++ b/Templates/BaseGame/game/core/rendering/Core_Rendering.tscript @@ -9,6 +9,10 @@ function Core_Rendering::onCreate(%this) $Core::DefaultPrefilterCubemap = "core/rendering/images/default_prefilter.dds"; $Core::BRDFTexture = "core/rendering/images/brdfTexture.dds"; + $Core::NoImageAssetFallback = "Core_Rendering:missingTexture_image"; + $Core::NoMaterialAssetFallback = "Core_Rendering:noMaterial"; + $Core::NoShapeAssetFallback = "Core_Rendering:noShape"; + $pref::ReflectionProbes::BakeResolution = ProjectSettings.value("Rendering/ProbeCaptureResolution", "64"); $Terrain::LerpBlend = ProjectSettings.value("Terrain/LerpBlend"); @@ -26,15 +30,7 @@ function Core_Rendering::onCreate(%this) $Terrain::OrmTextureFormat = ProjectSettings.value("Terrain/OrmTextureFormat", 12); exec("./scripts/graphicsOptions." @ $TorqueScriptFileExtension); - exec("./scripts/terrainSettings." @ $TorqueScriptFileExtension); exec("./scripts/renderManager." @ $TorqueScriptFileExtension); - exec("./scripts/gfxData/clouds." @ $TorqueScriptFileExtension); - exec("./scripts/gfxData/commonMaterialData." @ $TorqueScriptFileExtension); - exec("./scripts/gfxData/scatterSky." @ $TorqueScriptFileExtension); - exec("./scripts/gfxData/shaders." @ $TorqueScriptFileExtension); - exec("./scripts/gfxData/terrainBlock." @ $TorqueScriptFileExtension); - exec("./scripts/gfxData/water." @ $TorqueScriptFileExtension); - exec("./scripts/gfxData/warningTerrainMat." @ $TorqueScriptFileExtension); } function Core_Rendering::onDestroy(%this) @@ -46,6 +42,14 @@ function Core_Rendering::initClient(%this) // Start rendering and stuff. initRenderManager(); initLightingSystems("Advanced Lighting"); + + exec("./scripts/gfxData/clouds." @ $TorqueScriptFileExtension); + exec("./scripts/gfxData/commonMaterialData." @ $TorqueScriptFileExtension); + exec("./scripts/gfxData/scatterSky." @ $TorqueScriptFileExtension); + exec("./scripts/gfxData/shaders." @ $TorqueScriptFileExtension); + exec("./scripts/gfxData/terrainBlock." @ $TorqueScriptFileExtension); + exec("./scripts/gfxData/water." @ $TorqueScriptFileExtension); + exec("./scripts/gfxData/warningTerrainMat." @ $TorqueScriptFileExtension); //load prefs exec("data/defaults." @ $TorqueScriptFileExtension); diff --git a/Templates/BaseGame/game/core/rendering/images/brdfTexture_image.asset.taml b/Templates/BaseGame/game/core/rendering/images/brdfTexture_image.asset.taml new file mode 100644 index 000000000..0d0175ca4 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/images/brdfTexture_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/images/cloud1_image.asset.taml b/Templates/BaseGame/game/core/rendering/images/cloud1_image.asset.taml new file mode 100644 index 000000000..b938c7d07 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/images/cloud1_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/images/cloud2_image.asset.taml b/Templates/BaseGame/game/core/rendering/images/cloud2_image.asset.taml new file mode 100644 index 000000000..025ff3c4d --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/images/cloud2_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/images/cloud3_image.asset.taml b/Templates/BaseGame/game/core/rendering/images/cloud3_image.asset.taml new file mode 100644 index 000000000..80e72fefb --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/images/cloud3_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/images/clouds_normal_displacement_image.asset.taml b/Templates/BaseGame/game/core/rendering/images/clouds_normal_displacement_image.asset.taml new file mode 100644 index 000000000..40c913332 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/images/clouds_normal_displacement_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/images/default_irradiance_image.asset.taml b/Templates/BaseGame/game/core/rendering/images/default_irradiance_image.asset.taml new file mode 100644 index 000000000..99da51304 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/images/default_irradiance_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/images/default_prefilter_image.asset.taml b/Templates/BaseGame/game/core/rendering/images/default_prefilter_image.asset.taml new file mode 100644 index 000000000..5a87d27d0 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/images/default_prefilter_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/images/depthcolor_ramp_image.asset.taml b/Templates/BaseGame/game/core/rendering/images/depthcolor_ramp_image.asset.taml new file mode 100644 index 000000000..44838f0d1 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/images/depthcolor_ramp_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/images/foam_image.asset.taml b/Templates/BaseGame/game/core/rendering/images/foam_image.asset.taml new file mode 100644 index 000000000..6ee42a169 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/images/foam_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/images/materials.tscript b/Templates/BaseGame/game/core/rendering/images/materials.tscript index a13c751b3..48d7bb61e 100644 --- a/Templates/BaseGame/game/core/rendering/images/materials.tscript +++ b/Templates/BaseGame/game/core/rendering/images/materials.tscript @@ -25,7 +25,7 @@ singleton Material( Empty ) }; singleton Material(WarningMaterial) { - detailMap[0] = "missingTexture"; + detailMapAsset[0] = "Core_Rendering:missingTexture_image"; diffuseColor[0] = "25 16 0"; emissive[0] = false; translucent = false; diff --git a/Templates/BaseGame/game/core/rendering/images/missingTexture_image.asset.taml b/Templates/BaseGame/game/core/rendering/images/missingTexture_image.asset.taml new file mode 100644 index 000000000..81a8b895a --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/images/missingTexture_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/images/ripple_image.asset.taml b/Templates/BaseGame/game/core/rendering/images/ripple_image.asset.taml new file mode 100644 index 000000000..15c46abf1 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/images/ripple_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/images/unavailable_image.asset.taml b/Templates/BaseGame/game/core/rendering/images/unavailable_image.asset.taml new file mode 100644 index 000000000..8b183e3bc --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/images/unavailable_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/images/warnMat_image.asset.taml b/Templates/BaseGame/game/core/rendering/images/warnMat_image.asset.taml new file mode 100644 index 000000000..d12da21b2 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/images/warnMat_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/materials/Blank_sky/BlankSkyMat.asset.taml b/Templates/BaseGame/game/core/rendering/materials/Blank_sky/BlankSkyMat.asset.taml new file mode 100644 index 000000000..e6c3bb76b --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/Blank_sky/BlankSkyMat.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/textEdit.png b/Templates/BaseGame/game/core/rendering/materials/Blank_sky/BlankSkybox.png similarity index 76% rename from Templates/BaseGame/game/tools/editorClasses/gui/images/textEdit.png rename to Templates/BaseGame/game/core/rendering/materials/Blank_sky/BlankSkybox.png index 1b601b2d6..9a60da1a2 100644 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/textEdit.png and b/Templates/BaseGame/game/core/rendering/materials/Blank_sky/BlankSkybox.png differ diff --git a/Templates/BaseGame/game/core/rendering/materials/Blank_sky/BlankSkybox_image.asset.taml b/Templates/BaseGame/game/core/rendering/materials/Blank_sky/BlankSkybox_image.asset.taml new file mode 100644 index 000000000..01c1de5b8 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/Blank_sky/BlankSkybox_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/materials/Blank_sky/materials.tscript b/Templates/BaseGame/game/core/rendering/materials/Blank_sky/materials.tscript new file mode 100644 index 000000000..fb2b57cc0 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/Blank_sky/materials.tscript @@ -0,0 +1,19 @@ +//----------------------------------------------------------------------------- +// Torque +// Copyright GarageGames, LLC 2011 +//----------------------------------------------------------------------------- + +singleton CubemapData( BlankSkyCubemap ) +{ + cubeMapFaceAsset[0] = "Core_Rendering:BlankSkybox_image"; + cubeMapFaceAsset[1] = "Core_Rendering:BlankSkybox_image"; + cubeMapFaceAsset[2] = "Core_Rendering:BlankSkybox_image"; + cubeMapFaceAsset[3] = "Core_Rendering:BlankSkybox_image"; + cubeMapFaceAsset[4] = "Core_Rendering:BlankSkybox_image"; + cubeMapFaceAsset[5] = "Core_Rendering:BlankSkybox_image"; +}; + +singleton Material( BlankSkyMat ) +{ + cubemap = BlankSkyCubemap; +}; diff --git a/Templates/BaseGame/game/core/rendering/materials/NightSkyMat.asset.taml b/Templates/BaseGame/game/core/rendering/materials/NightSkyMat.asset.taml new file mode 100644 index 000000000..318f83ca2 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/NightSkyMat.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/rendering/materials/NightSkybox_1.asset.taml b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_1.asset.taml new file mode 100644 index 000000000..8344c55a2 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_1.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/materials/NightSkybox_1.png b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_1.png new file mode 100644 index 000000000..aa9a94cc8 Binary files /dev/null and b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_1.png differ diff --git a/Templates/BaseGame/game/core/rendering/materials/NightSkybox_2.asset.taml b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_2.asset.taml new file mode 100644 index 000000000..e43fa4c40 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_2.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/materials/NightSkybox_2.png b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_2.png new file mode 100644 index 000000000..c04d1648a Binary files /dev/null and b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_2.png differ diff --git a/Templates/BaseGame/game/core/rendering/materials/NightSkybox_3.asset.taml b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_3.asset.taml new file mode 100644 index 000000000..cf83ba338 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_3.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/materials/NightSkybox_3.png b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_3.png new file mode 100644 index 000000000..00d03d634 Binary files /dev/null and b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_3.png differ diff --git a/Templates/BaseGame/game/core/rendering/materials/NightSkybox_4.asset.taml b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_4.asset.taml new file mode 100644 index 000000000..754204ed4 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_4.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/materials/NightSkybox_4.png b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_4.png new file mode 100644 index 000000000..1ba8ba331 Binary files /dev/null and b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_4.png differ diff --git a/Templates/BaseGame/game/core/rendering/materials/NightSkybox_5.asset.taml b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_5.asset.taml new file mode 100644 index 000000000..a3e774e56 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_5.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/materials/NightSkybox_5.png b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_5.png new file mode 100644 index 000000000..c71140a0d Binary files /dev/null and b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_5.png differ diff --git a/Templates/BaseGame/game/core/rendering/materials/NightSkybox_6.asset.taml b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_6.asset.taml new file mode 100644 index 000000000..6778e0033 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_6.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/materials/NightSkybox_6.png b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_6.png new file mode 100644 index 000000000..6398ace05 Binary files /dev/null and b/Templates/BaseGame/game/core/rendering/materials/NightSkybox_6.png differ diff --git a/Templates/BaseGame/game/core/rendering/materials/NoMaterial.asset.taml b/Templates/BaseGame/game/core/rendering/materials/NoMaterial.asset.taml index bce32d434..918d7099b 100644 --- a/Templates/BaseGame/game/core/rendering/materials/NoMaterial.asset.taml +++ b/Templates/BaseGame/game/core/rendering/materials/NoMaterial.asset.taml @@ -2,5 +2,5 @@ canSave="true" canSaveDynamicFields="true" AssetName="NoMaterial" - scriptFile="@assetFile=NoMaterial.cs" + scriptFile="@assetFile=NoMaterial" materialDefinitionName="NoMaterial" /> diff --git a/Templates/BaseGame/game/core/rendering/materials/NoMaterial.tscript b/Templates/BaseGame/game/core/rendering/materials/NoMaterial.tscript index 7e19aa619..fc6fb1d4f 100644 --- a/Templates/BaseGame/game/core/rendering/materials/NoMaterial.tscript +++ b/Templates/BaseGame/game/core/rendering/materials/NoMaterial.tscript @@ -1,6 +1,6 @@ //--- OBJECT WRITE BEGIN --- singleton Material(NoMaterial) { mapTo="NoMaterial"; - DiffuseMap = "core/rendering/images/warnMat"; + DiffuseMapAsset[0] = "Core_Rendering:warnMat_image"; }; //--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/core/rendering/materials/materials.tscript b/Templates/BaseGame/game/core/rendering/materials/materials.tscript new file mode 100644 index 000000000..3943b491b --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/materials.tscript @@ -0,0 +1,65 @@ +//----------------------------------------------------------------------------- +// 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. +//----------------------------------------------------------------------------- + +//--- OBJECT WRITE BEGIN --- + +singleton CubemapData( NightCubemap ) +{ + cubeMapFaceAsset[0] = "Core_Rendering:NightSkybox_1"; + cubeMapFaceAsset[1] = "Core_Rendering:NightSkybox_2"; + cubeMapFaceAsset[2] = "Core_Rendering:NightSkybox_3"; + cubeMapFaceAsset[3] = "Core_Rendering:NightSkybox_4"; + cubeMapFaceAsset[4] = "Core_Rendering:NightSkybox_5"; + cubeMapFaceAsset[5] = "Core_Rendering:NightSkybox_6"; +}; + +singleton Material( NightSkyMat ) +{ + cubemap = NightCubemap; + materialTag0 = "Skies"; +}; + +singleton Material(moon_noglow) { + mapTo="moon_noglow"; + DiffuseMapAsset = "Core_Rendering:moon_noglow_image"; + emissive = true; + translucent = true; + vertColor[ 0 ] = true; +}; + +singleton Material(moon_wglow) { + mapTo="moon_wglow"; + DiffuseMapAsset = "Core_Rendering:moon_wglow_image"; + emissive = true; + translucent = true; + vertColor[ 0 ] = true; +}; + +singleton Material(moon_wcorona) { + mapTo="moon_wcorona"; + DiffuseMapAsset = "Core_Rendering:moon_wcorona_image"; + emissive = true; + translucent = true; + vertColor[ 0 ] = true; +}; + +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/core/rendering/materials/moon_noglow.asset.taml b/Templates/BaseGame/game/core/rendering/materials/moon_noglow.asset.taml new file mode 100644 index 000000000..372a4037b --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/moon_noglow.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/rendering/materials/moon_noglow.png b/Templates/BaseGame/game/core/rendering/materials/moon_noglow.png new file mode 100644 index 000000000..973ddb6c2 Binary files /dev/null and b/Templates/BaseGame/game/core/rendering/materials/moon_noglow.png differ diff --git a/Templates/BaseGame/game/core/rendering/materials/moon_noglow_image.asset.taml b/Templates/BaseGame/game/core/rendering/materials/moon_noglow_image.asset.taml new file mode 100644 index 000000000..681bfa7a3 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/moon_noglow_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/materials/moon_wcorona.asset.taml b/Templates/BaseGame/game/core/rendering/materials/moon_wcorona.asset.taml new file mode 100644 index 000000000..d3b29de39 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/moon_wcorona.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/materials/moon_wcorona.png b/Templates/BaseGame/game/core/rendering/materials/moon_wcorona.png new file mode 100644 index 000000000..568f260ba Binary files /dev/null and b/Templates/BaseGame/game/core/rendering/materials/moon_wcorona.png differ diff --git a/Templates/BaseGame/game/core/rendering/materials/moon_wglow.asset.taml b/Templates/BaseGame/game/core/rendering/materials/moon_wglow.asset.taml new file mode 100644 index 000000000..846b4c6d3 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/moon_wglow.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/rendering/materials/moon_wglow.png b/Templates/BaseGame/game/core/rendering/materials/moon_wglow.png new file mode 100644 index 000000000..e8fdf0647 Binary files /dev/null and b/Templates/BaseGame/game/core/rendering/materials/moon_wglow.png differ diff --git a/Templates/BaseGame/game/core/rendering/materials/moon_wglow_image.asset.taml b/Templates/BaseGame/game/core/rendering/materials/moon_wglow_image.asset.taml new file mode 100644 index 000000000..33a468bd0 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/materials/moon_wglow_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderWaterBasicShader.asset.taml b/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderWaterBasicShader.asset.taml new file mode 100644 index 000000000..7b65e786e --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderWaterBasicShader.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderWaterShader.asset.taml b/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderWaterShader.asset.taml new file mode 100644 index 000000000..6cce67094 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderWaterShader.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterBasicMat.asset.taml b/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterBasicMat.asset.taml new file mode 100644 index 000000000..a0922de98 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterBasicMat.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterMat.asset.taml b/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterMat.asset.taml new file mode 100644 index 000000000..63c59abaa --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterMat.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterBasicMat.asset.taml b/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterBasicMat.asset.taml new file mode 100644 index 000000000..df5ddfb92 --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterBasicMat.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterBasicShader.asset.taml b/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterBasicShader.asset.taml new file mode 100644 index 000000000..8f313a6cd --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterBasicShader.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterMat.asset.taml b/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterMat.asset.taml new file mode 100644 index 000000000..2e270a6ab --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterMat.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/core/rendering/scripts/gfxData/warningTerrainMat.tscript b/Templates/BaseGame/game/core/rendering/scripts/gfxData/warningTerrainMat.tscript index 275874d58..55b8562ac 100644 --- a/Templates/BaseGame/game/core/rendering/scripts/gfxData/warningTerrainMat.tscript +++ b/Templates/BaseGame/game/core/rendering/scripts/gfxData/warningTerrainMat.tscript @@ -3,5 +3,5 @@ new TerrainMaterial() diffuseSize = "200"; detailSize = "10"; internalName = "warning_material"; - diffuseMap = "core/rendering/images/warnMat"; -}; \ No newline at end of file + diffuseMapAsset = "Core_Rendering:warnMat_image"; +}; diff --git a/Templates/BaseGame/game/core/rendering/shapes/Fog_Cube.asset.taml b/Templates/BaseGame/game/core/rendering/shapes/Fog_Cube.asset.taml new file mode 100644 index 000000000..84fbf05de --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shapes/Fog_Cube.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/core/rendering/shapes/Fog_Cube.tscript b/Templates/BaseGame/game/core/rendering/shapes/Fog_Cube.tscript new file mode 100644 index 000000000..a77e476df --- /dev/null +++ b/Templates/BaseGame/game/core/rendering/shapes/Fog_Cube.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(Fog_CubeDAE) +{ + baseShapeAsset = "Core_Rendering:Fog_Cube"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/core/rendering/shapes/materials.tscript b/Templates/BaseGame/game/core/rendering/shapes/materials.tscript index 2911ca4d2..0fd1ca716 100644 --- a/Templates/BaseGame/game/core/rendering/shapes/materials.tscript +++ b/Templates/BaseGame/game/core/rendering/shapes/materials.tscript @@ -3,7 +3,7 @@ singleton Material(noshape_NoShape) { mapTo = "NoShape"; - diffuseMap[0] = ""; + diffuseMapAsset[0] = ""; diffuseColor[0] = "0.8 0.003067 0 .8"; emissive[0] = 0; doubleSided = false; diff --git a/Templates/BaseGame/game/core/sfx/Core_SFX.module b/Templates/BaseGame/game/core/sfx/Core_SFX.module index e76ed3fcb..9f7390a21 100644 --- a/Templates/BaseGame/game/core/sfx/Core_SFX.module +++ b/Templates/BaseGame/game/core/sfx/Core_SFX.module @@ -6,4 +6,9 @@ CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Core"> + \ No newline at end of file diff --git a/Templates/BaseGame/game/core/utility/Core_Utility.module b/Templates/BaseGame/game/core/utility/Core_Utility.module index 2baba2fa3..c5cac7d3e 100644 --- a/Templates/BaseGame/game/core/utility/Core_Utility.module +++ b/Templates/BaseGame/game/core/utility/Core_Utility.module @@ -6,4 +6,9 @@ CreateFunction="onCreate" DestroyFunction="onDestroy" Group="Core"> + \ No newline at end of file diff --git a/Templates/BaseGame/game/core/utility/scripts/module.tscript b/Templates/BaseGame/game/core/utility/scripts/module.tscript index 978d23635..a895f99bf 100644 --- a/Templates/BaseGame/game/core/utility/scripts/module.tscript +++ b/Templates/BaseGame/game/core/utility/scripts/module.tscript @@ -81,7 +81,11 @@ function loadModuleMaterials(%moduleGroup) { exec( %file ); } - } + } + + //Next, frontload materials and terrainMaterials + loadAssetsByType(MaterialAsset); + loadAssetsByType(TerrainMaterialAsset); } function loadAssetsByType(%assetType) @@ -91,8 +95,8 @@ function loadAssetsByType(%assetType) %count = %assetQuery.getCount(); for(%i=0; %i < %count; %i++) { - %assetId = %assetQuery.getAsset(%i); - %asset = AssetDatabase.acquireAsset(%assetId); + %assetId = %assetQuery.getAsset(%i); + %asset = AssetDatabase.acquireAsset(%assetId); } } diff --git a/Templates/BaseGame/game/data/Prototyping/shapes/ConePrimitive.tscript b/Templates/BaseGame/game/data/Prototyping/shapes/ConePrimitive.tscript index 20631dc26..91bee1dbb 100644 --- a/Templates/BaseGame/game/data/Prototyping/shapes/ConePrimitive.tscript +++ b/Templates/BaseGame/game/data/Prototyping/shapes/ConePrimitive.tscript @@ -1,6 +1,6 @@ //--- OBJECT WRITE BEGIN --- new TSShapeConstructor(ConePrimitive_fbx) { - baseShape = "./ConePrimitive.fbx"; + baseShapeAsset = "Prototyping:ConePrimitive"; upAxis = "DEFAULT"; unit = "-1"; LODType = "TrailingNumber"; diff --git a/Templates/BaseGame/game/data/Prototyping/shapes/CubePrimitive.tscript b/Templates/BaseGame/game/data/Prototyping/shapes/CubePrimitive.tscript index 6b5f861c8..01162e086 100644 --- a/Templates/BaseGame/game/data/Prototyping/shapes/CubePrimitive.tscript +++ b/Templates/BaseGame/game/data/Prototyping/shapes/CubePrimitive.tscript @@ -1,6 +1,6 @@ //--- OBJECT WRITE BEGIN --- new TSShapeConstructor(CubePrimitive_fbx) { - baseShape = "./CubePrimitive.fbx"; + baseShapeAsset = "Prototyping:CubePrimitive"; upAxis = "DEFAULT"; unit = "-1"; LODType = "TrailingNumber"; diff --git a/Templates/BaseGame/game/data/Prototyping/shapes/CylinderPrimitive.tscript b/Templates/BaseGame/game/data/Prototyping/shapes/CylinderPrimitive.tscript index 5603b0e1f..14d13454f 100644 --- a/Templates/BaseGame/game/data/Prototyping/shapes/CylinderPrimitive.tscript +++ b/Templates/BaseGame/game/data/Prototyping/shapes/CylinderPrimitive.tscript @@ -1,6 +1,6 @@ //--- OBJECT WRITE BEGIN --- new TSShapeConstructor(CylinderPrimitive_fbx) { - baseShape = "./CylinderPrimitive.fbx"; + baseShapeAsset = "Prototyping:CylinderPrimitive"; upAxis = "DEFAULT"; unit = "-1"; LODType = "TrailingNumber"; diff --git a/Templates/BaseGame/game/data/Prototyping/shapes/SpherePrimitive.tscript b/Templates/BaseGame/game/data/Prototyping/shapes/SpherePrimitive.tscript index b9b693ac9..7c0352ff5 100644 --- a/Templates/BaseGame/game/data/Prototyping/shapes/SpherePrimitive.tscript +++ b/Templates/BaseGame/game/data/Prototyping/shapes/SpherePrimitive.tscript @@ -1,6 +1,6 @@ //--- OBJECT WRITE BEGIN --- new TSShapeConstructor(SpherePrimitive_fbx) { - baseShape = "./SpherePrimitive.fbx"; + baseShapeAsset = "Prototyping:SpherePrimitive"; upAxis = "DEFAULT"; unit = "-1"; LODType = "TrailingNumber"; diff --git a/Templates/BaseGame/game/data/Prototyping/shapes/TorusPrimitive.tscript b/Templates/BaseGame/game/data/Prototyping/shapes/TorusPrimitive.tscript index b2dedc16a..50888d79a 100644 --- a/Templates/BaseGame/game/data/Prototyping/shapes/TorusPrimitive.tscript +++ b/Templates/BaseGame/game/data/Prototyping/shapes/TorusPrimitive.tscript @@ -1,6 +1,6 @@ //--- OBJECT WRITE BEGIN --- new TSShapeConstructor(TorusPrimitive_fbx) { - baseShape = "./TorusPrimitive.fbx"; + baseShapeAsset = "Prototyping:TorusPrimitive"; upAxis = "DEFAULT"; unit = "-1"; LODType = "TrailingNumber"; diff --git a/Templates/BaseGame/game/data/Prototyping/shapes/TubePrimitive.tscript b/Templates/BaseGame/game/data/Prototyping/shapes/TubePrimitive.tscript index f73be16fb..02aab9014 100644 --- a/Templates/BaseGame/game/data/Prototyping/shapes/TubePrimitive.tscript +++ b/Templates/BaseGame/game/data/Prototyping/shapes/TubePrimitive.tscript @@ -1,6 +1,6 @@ //--- OBJECT WRITE BEGIN --- new TSShapeConstructor(TubePrimitive_fbx) { - baseShape = "./TubePrimitive.fbx"; + baseShapeAsset = "Prototyping:TubePrimitive"; upAxis = "DEFAULT"; unit = "-1"; LODType = "TrailingNumber"; diff --git a/Templates/BaseGame/game/data/Prototyping/shapes/kork_chanShape.tscript b/Templates/BaseGame/game/data/Prototyping/shapes/kork_chanShape.tscript index f6fe9b059..b53ee1f48 100644 --- a/Templates/BaseGame/game/data/Prototyping/shapes/kork_chanShape.tscript +++ b/Templates/BaseGame/game/data/Prototyping/shapes/kork_chanShape.tscript @@ -1,6 +1,6 @@ //--- OBJECT WRITE BEGIN --- new TSShapeConstructor(kork_chanShape_fbx) { - baseShape = "./kork_chanShape.fbx"; + baseShapeAsset = "Prototyping:kork_chanShape"; upAxis = "DEFAULT"; unit = "-1"; LODType = "TrailingNumber"; diff --git a/Templates/BaseGame/game/data/gameUI/GUIs/PlayGui.asset.taml b/Templates/BaseGame/game/data/gameUI/GUIs/PlayGui.asset.taml new file mode 100644 index 000000000..dcb25762e --- /dev/null +++ b/Templates/BaseGame/game/data/gameUI/GUIs/PlayGui.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/ChooseLevelDlg.asset.taml b/Templates/BaseGame/game/data/ui/guis/ChooseLevelDlg.asset.taml new file mode 100644 index 000000000..2d6a987f0 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/ChooseLevelDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/GuiMusicPlayer.asset.taml b/Templates/BaseGame/game/data/ui/guis/GuiMusicPlayer.asset.taml new file mode 100644 index 000000000..7014d72a6 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/GuiMusicPlayer.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/IODropdownDlg.asset.taml b/Templates/BaseGame/game/data/ui/guis/IODropdownDlg.asset.taml new file mode 100644 index 000000000..b929c70b0 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/IODropdownDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/JoinServerMenu.asset.taml b/Templates/BaseGame/game/data/ui/guis/JoinServerMenu.asset.taml new file mode 100644 index 000000000..0ca202e6d --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/JoinServerMenu.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/LoadingGui.asset.taml b/Templates/BaseGame/game/data/ui/guis/LoadingGui.asset.taml new file mode 100644 index 000000000..196bc91e7 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/LoadingGui.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/MainMenuGui.asset.taml b/Templates/BaseGame/game/data/ui/guis/MainMenuGui.asset.taml new file mode 100644 index 000000000..2fd6b7c72 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/MainMenuGui.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/MessageBoxDlg.asset.taml b/Templates/BaseGame/game/data/ui/guis/MessageBoxDlg.asset.taml new file mode 100644 index 000000000..9b9d38995 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/MessageBoxDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/NetGraphProfile.asset.taml b/Templates/BaseGame/game/data/ui/guis/NetGraphProfile.asset.taml new file mode 100644 index 000000000..2ee15e4ea --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/NetGraphProfile.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/OptionsDlg.asset.taml b/Templates/BaseGame/game/data/ui/guis/OptionsDlg.asset.taml new file mode 100644 index 000000000..21467cbc8 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/OptionsDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/OptionsMenu.asset.taml b/Templates/BaseGame/game/data/ui/guis/OptionsMenu.asset.taml new file mode 100644 index 000000000..a00b4c7d4 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/OptionsMenu.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/PauseMenu.asset.taml b/Templates/BaseGame/game/data/ui/guis/PauseMenu.asset.taml new file mode 100644 index 000000000..c3806430a --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/PauseMenu.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/ProfilerGui.asset.taml b/Templates/BaseGame/game/data/ui/guis/ProfilerGui.asset.taml new file mode 100644 index 000000000..0e49346ab --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/ProfilerGui.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/RemapConfirmDlg.asset.taml b/Templates/BaseGame/game/data/ui/guis/RemapConfirmDlg.asset.taml new file mode 100644 index 000000000..1e3fb30aa --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/RemapConfirmDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/RemapDlg.asset.taml b/Templates/BaseGame/game/data/ui/guis/RemapDlg.asset.taml new file mode 100644 index 000000000..6b1c4df9a --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/RemapDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/StartupGui.asset.taml b/Templates/BaseGame/game/data/ui/guis/StartupGui.asset.taml new file mode 100644 index 000000000..656157f71 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/StartupGui.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/chooseLevelDlg.gui b/Templates/BaseGame/game/data/ui/guis/chooseLevelDlg.gui index 9b4771717..e6018fdb1 100644 --- a/Templates/BaseGame/game/data/ui/guis/chooseLevelDlg.gui +++ b/Templates/BaseGame/game/data/ui/guis/chooseLevelDlg.gui @@ -96,7 +96,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapCtrl() { - bitmap = "data/ui/images/no-preview"; + bitmapAsset = "UI:no_preview_image"; color = "255 255 255 255"; wrap = "0"; position = "513 71"; diff --git a/Templates/BaseGame/game/data/ui/guis/joinServerMenu.gui b/Templates/BaseGame/game/data/ui/guis/joinServerMenu.gui index a45d5d3ce..29325c1b6 100644 --- a/Templates/BaseGame/game/data/ui/guis/joinServerMenu.gui +++ b/Templates/BaseGame/game/data/ui/guis/joinServerMenu.gui @@ -689,7 +689,7 @@ }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_R"; + bitmapAsset = "UI:Keyboard_Black_R_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; diff --git a/Templates/BaseGame/game/data/ui/guis/loadingGui.gui b/Templates/BaseGame/game/data/ui/guis/loadingGui.gui index b0af3e66e..d20abd28d 100644 --- a/Templates/BaseGame/game/data/ui/guis/loadingGui.gui +++ b/Templates/BaseGame/game/data/ui/guis/loadingGui.gui @@ -1,6 +1,6 @@ //--- OBJECT WRITE BEGIN --- %guiContent = new GuiChunkedBitmapCtrl(LoadingGui) { - bitmap = "data/ui/images/background-dark.png"; + bitmapAsset = "UI:background_dark_image"; useVariable = "0"; tile = "0"; position = "0 0"; @@ -36,7 +36,7 @@ canSaveDynamicFields = "0"; new GuiBitmapCtrl() { - bitmap = "data/ui/images/panel.png"; + bitmapAsset = "UI:panel_image"; color = "255 255 255 255"; wrap = "0"; position = "0 0"; @@ -54,7 +54,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapCtrl(LoadingLogo) { - bitmap = "data/ui/images/Torque-3D-logo_alt.png"; + bitmapAsset = "UI:Torque_3D_logo_alt_image"; color = "255 255 255 255"; wrap = "0"; position = "27 6"; diff --git a/Templates/BaseGame/game/data/ui/guis/mainMenu.gui b/Templates/BaseGame/game/data/ui/guis/mainMenu.gui index 9f4b8ec3b..ea3dbfae0 100644 --- a/Templates/BaseGame/game/data/ui/guis/mainMenu.gui +++ b/Templates/BaseGame/game/data/ui/guis/mainMenu.gui @@ -2,7 +2,7 @@ exec( "tools/gui/profiles.ed.tscript" ); //--- OBJECT WRITE BEGIN --- %guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) { - bitmap = "data/ui/images/background-dark.png"; + bitmapAsset = "UI:background_dark_image"; useVariable = "0"; tile = "0"; position = "0 0"; @@ -23,7 +23,7 @@ exec( "tools/gui/profiles.ed.tscript" ); navigationIndex = "-1"; new GuiBitmapCtrl(MainMenuAppLogo) { - bitmap = "data/ui/images/Torque-3D-logo_alt.png"; + bitmapAsset = "UI:Torque_3D_logo_alt_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; diff --git a/Templates/BaseGame/game/data/ui/guis/pauseMenu.gui b/Templates/BaseGame/game/data/ui/guis/pauseMenu.gui index 987493ba9..bc0e5675e 100644 --- a/Templates/BaseGame/game/data/ui/guis/pauseMenu.gui +++ b/Templates/BaseGame/game/data/ui/guis/pauseMenu.gui @@ -18,7 +18,7 @@ useVariable = "0"; new GuiChunkedBitmapCtrl(PauseMenuBG) { - bitmap = "data/ui/images/hudfill"; + bitmapAsset = "UI:hudfill_image"; useVariable = "0"; tile = "0"; position = "0 0"; diff --git a/Templates/BaseGame/game/data/ui/guis/recordingsDlg.asset.taml b/Templates/BaseGame/game/data/ui/guis/recordingsDlg.asset.taml new file mode 100644 index 000000000..7cc7b2168 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/guis/recordingsDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/data/ui/guis/remapConfirmDlg.gui b/Templates/BaseGame/game/data/ui/guis/remapConfirmDlg.gui index 6e32fd1ec..217a2dd74 100644 --- a/Templates/BaseGame/game/data/ui/guis/remapConfirmDlg.gui +++ b/Templates/BaseGame/game/data/ui/guis/remapConfirmDlg.gui @@ -37,7 +37,7 @@ canSaveDynamicFields = "0"; new GuiChunkedBitmapCtrl() { - bitmap = "data/ui/images/hudfill.png"; + bitmapAsset = "UI:hudfill_image"; useVariable = "0"; tile = "0"; position = "0 0"; diff --git a/Templates/BaseGame/game/data/ui/guis/remapDlg.gui b/Templates/BaseGame/game/data/ui/guis/remapDlg.gui index 71832d81c..e8f76b642 100644 --- a/Templates/BaseGame/game/data/ui/guis/remapDlg.gui +++ b/Templates/BaseGame/game/data/ui/guis/remapDlg.gui @@ -53,7 +53,7 @@ canSaveDynamicFields = "0"; }; new GuiChunkedBitmapCtrl() { - bitmap = "data/ui/images/hudfill.png"; + bitmapAsset = "UI:hudfill_image"; useVariable = "0"; tile = "0"; position = "0 0"; diff --git a/Templates/BaseGame/game/data/ui/guis/startupGui.gui b/Templates/BaseGame/game/data/ui/guis/startupGui.gui index ad7afcf63..cc6aee78b 100644 --- a/Templates/BaseGame/game/data/ui/guis/startupGui.gui +++ b/Templates/BaseGame/game/data/ui/guis/startupGui.gui @@ -13,7 +13,7 @@ Visible = "1"; tooltipprofile = "GuiToolTipProfile"; hovertime = "1000"; - bitmap = ""; + bitmapAsset = ""; wrap = "0"; fadeinTime = "1000"; waitTime = "4000"; @@ -70,7 +70,7 @@ new GuiFadeinBitmapCtrl(BlankGui) { minExtent = "8 8"; visible = "1"; helpTag = "0"; - bitmap = ""; + bitmapAsset = ""; wrap = "0"; fadeinTime = "100"; waitTime = "2000"; diff --git a/Templates/BaseGame/game/data/ui/guis/startupGui.tscript b/Templates/BaseGame/game/data/ui/guis/startupGui.tscript index f82a0b24c..af673c819 100644 --- a/Templates/BaseGame/game/data/ui/guis/startupGui.tscript +++ b/Templates/BaseGame/game/data/ui/guis/startupGui.tscript @@ -32,8 +32,8 @@ function loadStartup() // A list of the splash screens and logos // to cycle through. Note that they have to // be in consecutive numerical order - StartupGui.bitmap[0] = "data/ui/images/background-dark"; - StartupGui.logo[0] = "data/ui/images/Torque-3D-logo_alt"; + StartupGui.bitmap[0] = "UI:background_dark_image"; + StartupGui.logo[0] = "UI:Torque_3D_logo_alt_image"; StartupGui.logoPos[0] = "178 251"; StartupGui.logoExtent[0] = "443 139"; @@ -63,7 +63,7 @@ function StartupGui::next(%this) { // Set us to a blank screen while we load the next one Canvas.setContent(BlankGui); - + // Set our bitmap and reset the done variable %this.setBitmap(%this.bitmap[$StartupIdx]); %this.done = false; diff --git a/Templates/BaseGame/game/data/ui/images/BackgroundImage_image.asset.taml b/Templates/BaseGame/game/data/ui/images/BackgroundImage_image.asset.taml new file mode 100644 index 000000000..257f07b0a --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/BackgroundImage_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Controller_Disconnected_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Controller_Disconnected_image.asset.taml new file mode 100644 index 000000000..4cbcd78a3 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Controller_Disconnected_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_0_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_0_image.asset.taml new file mode 100644 index 000000000..be402ee47 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_0_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_10_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_10_image.asset.taml new file mode 100644 index 000000000..f0437bdb6 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_10_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_11_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_11_image.asset.taml new file mode 100644 index 000000000..a57b24abd --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_11_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_12_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_12_image.asset.taml new file mode 100644 index 000000000..3bfc39fa7 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_12_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_1_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_1_image.asset.taml new file mode 100644 index 000000000..475caaadf --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_1_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_2_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_2_image.asset.taml new file mode 100644 index 000000000..dd304b13c --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_2_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_3_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_3_image.asset.taml new file mode 100644 index 000000000..3b9a580a9 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_3_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_4_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_4_image.asset.taml new file mode 100644 index 000000000..97a1c0938 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_4_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_5_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_5_image.asset.taml new file mode 100644 index 000000000..9f9d9d4c0 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_5_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_6_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_6_image.asset.taml new file mode 100644 index 000000000..1024d18fc --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_6_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_7_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_7_image.asset.taml new file mode 100644 index 000000000..b702f4370 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_7_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_8_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_8_image.asset.taml new file mode 100644 index 000000000..44b3e815e --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_8_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_9_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_9_image.asset.taml new file mode 100644 index 000000000..e3ae0b99e --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_9_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_A_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_A_image.asset.taml new file mode 100644 index 000000000..f1cd63a18 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_A_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Alt_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Alt_image.asset.taml new file mode 100644 index 000000000..4e798e60a --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Alt_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Arrow_Down_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Arrow_Down_image.asset.taml new file mode 100644 index 000000000..8a20ab2dc --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Arrow_Down_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Arrow_Left_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Arrow_Left_image.asset.taml new file mode 100644 index 000000000..b3c56dafe --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Arrow_Left_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Arrow_Right_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Arrow_Right_image.asset.taml new file mode 100644 index 000000000..3468759ed --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Arrow_Right_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Arrow_Up_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Arrow_Up_image.asset.taml new file mode 100644 index 000000000..c1910c432 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Arrow_Up_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Asterisk_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Asterisk_image.asset.taml new file mode 100644 index 000000000..f19259ed4 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Asterisk_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_B_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_B_image.asset.taml new file mode 100644 index 000000000..2c2308280 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_B_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Backspace_Alt_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Backspace_Alt_image.asset.taml new file mode 100644 index 000000000..6bea391c1 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Backspace_Alt_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Backspace_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Backspace_image.asset.taml new file mode 100644 index 000000000..18ed32d19 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Backspace_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Blank_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Blank_image.asset.taml new file mode 100644 index 000000000..00e07aeeb --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Blank_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Bracket_Left_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Bracket_Left_image.asset.taml new file mode 100644 index 000000000..e9b95f17f --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Bracket_Left_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Bracket_Right_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Bracket_Right_image.asset.taml new file mode 100644 index 000000000..b6c06c314 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Bracket_Right_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_C_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_C_image.asset.taml new file mode 100644 index 000000000..32d50b1ce --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_C_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Caps_Lock_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Caps_Lock_image.asset.taml new file mode 100644 index 000000000..f7412e237 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Caps_Lock_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Command_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Command_image.asset.taml new file mode 100644 index 000000000..06d5bfb9f --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Command_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Ctrl_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Ctrl_image.asset.taml new file mode 100644 index 000000000..45cb458c8 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Ctrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_D_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_D_image.asset.taml new file mode 100644 index 000000000..cfe023534 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_D_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Del_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Del_image.asset.taml new file mode 100644 index 000000000..3fd9f1adb --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Del_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_E_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_E_image.asset.taml new file mode 100644 index 000000000..22b1d99c0 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_E_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_End_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_End_image.asset.taml new file mode 100644 index 000000000..4d54f951f --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_End_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Escape_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Escape_image.asset.taml new file mode 100644 index 000000000..e03b14b32 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Escape_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F10_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F10_image.asset.taml new file mode 100644 index 000000000..00547cb5b --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F10_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F11_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F11_image.asset.taml new file mode 100644 index 000000000..3d7e41fd7 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F11_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F12_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F12_image.asset.taml new file mode 100644 index 000000000..081b2bbc1 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F12_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F1_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F1_image.asset.taml new file mode 100644 index 000000000..afadf6ec6 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F1_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F2_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F2_image.asset.taml new file mode 100644 index 000000000..e4eeb527c --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F2_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F3_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F3_image.asset.taml new file mode 100644 index 000000000..baa3292ad --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F3_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F4_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F4_image.asset.taml new file mode 100644 index 000000000..4f9eb18ec --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F4_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F5_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F5_image.asset.taml new file mode 100644 index 000000000..7a0022545 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F5_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F6_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F6_image.asset.taml new file mode 100644 index 000000000..d9a32b5dc --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F6_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F7_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F7_image.asset.taml new file mode 100644 index 000000000..14fab0d6d --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F7_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F8_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F8_image.asset.taml new file mode 100644 index 000000000..34e0bcc58 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F8_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F9_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F9_image.asset.taml new file mode 100644 index 000000000..93150a25d --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F9_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F_image.asset.taml new file mode 100644 index 000000000..afb23972d --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_F_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_G_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_G_image.asset.taml new file mode 100644 index 000000000..c62a1844b --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_G_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_H_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_H_image.asset.taml new file mode 100644 index 000000000..964f72bc0 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_H_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Home_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Home_image.asset.taml new file mode 100644 index 000000000..d91aea372 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Home_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_I_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_I_image.asset.taml new file mode 100644 index 000000000..1224fc40f --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_I_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Insert_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Insert_image.asset.taml new file mode 100644 index 000000000..451acd29e --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Insert_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_J_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_J_image.asset.taml new file mode 100644 index 000000000..2bd032ea7 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_J_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_K_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_K_image.asset.taml new file mode 100644 index 000000000..e70546e23 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_K_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_L_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_L_image.asset.taml new file mode 100644 index 000000000..5b5d52b67 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_L_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_M_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_M_image.asset.taml new file mode 100644 index 000000000..1fa8b85ff --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_M_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mark_Left_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mark_Left_image.asset.taml new file mode 100644 index 000000000..b72280974 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mark_Left_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mark_Right_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mark_Right_image.asset.taml new file mode 100644 index 000000000..3a74629f0 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mark_Right_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Minus_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Minus_image.asset.taml new file mode 100644 index 000000000..16a496661 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Minus_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mouse1_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mouse1_image.asset.taml new file mode 100644 index 000000000..e7dbcdb44 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mouse1_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mouse2_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mouse2_image.asset.taml new file mode 100644 index 000000000..fc1849765 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mouse2_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mouse3_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mouse3_image.asset.taml new file mode 100644 index 000000000..5f2969d39 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mouse3_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mouse_Simple_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mouse_Simple_image.asset.taml new file mode 100644 index 000000000..5d85499ad --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Mouse_Simple_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_N_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_N_image.asset.taml new file mode 100644 index 000000000..277049e6f --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_N_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Num_Lock_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Num_Lock_image.asset.taml new file mode 100644 index 000000000..db0e6df4a --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Num_Lock_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_O_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_O_image.asset.taml new file mode 100644 index 000000000..a800beeec --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_O_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_P_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_P_image.asset.taml new file mode 100644 index 000000000..a33be5bb0 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_P_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Page_Down_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Page_Down_image.asset.taml new file mode 100644 index 000000000..19d3d3081 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Page_Down_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Page_Up_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Page_Up_image.asset.taml new file mode 100644 index 000000000..8fea1eaa5 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Page_Up_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Plus_Tall_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Plus_Tall_image.asset.taml new file mode 100644 index 000000000..2aab21510 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Plus_Tall_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Plus_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Plus_image.asset.taml new file mode 100644 index 000000000..e198d5bcb --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Plus_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Print_Screen_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Print_Screen_image.asset.taml new file mode 100644 index 000000000..410b655f1 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Print_Screen_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Q_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Q_image.asset.taml new file mode 100644 index 000000000..a80f085e2 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Q_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Question_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Question_image.asset.taml new file mode 100644 index 000000000..e39d517c7 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Question_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Quote_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Quote_image.asset.taml new file mode 100644 index 000000000..a42465659 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Quote_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_R_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_R_image.asset.taml new file mode 100644 index 000000000..8f1b08f61 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_R_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return_Alt_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return_Alt_image.asset.taml new file mode 100644 index 000000000..af498fb47 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return_Alt_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return_Tall_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return_Tall_image.asset.taml new file mode 100644 index 000000000..4dbd21270 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return_Tall_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return_image.asset.taml new file mode 100644 index 000000000..739278567 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Return_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_S_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_S_image.asset.taml new file mode 100644 index 000000000..9db023730 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_S_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Semicolon_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Semicolon_image.asset.taml new file mode 100644 index 000000000..c6946adcb --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Semicolon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Shift_Alt_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Shift_Alt_image.asset.taml new file mode 100644 index 000000000..2a210f34b --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Shift_Alt_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Shift_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Shift_image.asset.taml new file mode 100644 index 000000000..08ba936e5 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Shift_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Slash_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Slash_image.asset.taml new file mode 100644 index 000000000..e7a750164 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Slash_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Space_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Space_image.asset.taml new file mode 100644 index 000000000..e58285f23 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Space_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_T_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_T_image.asset.taml new file mode 100644 index 000000000..ae590c8ce --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_T_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Tab_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Tab_image.asset.taml new file mode 100644 index 000000000..d48b2a9c8 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Tab_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Tilda_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Tilda_image.asset.taml new file mode 100644 index 000000000..c12871b9a --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Tilda_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_U_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_U_image.asset.taml new file mode 100644 index 000000000..4b7599d06 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_U_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_V_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_V_image.asset.taml new file mode 100644 index 000000000..c881684e7 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_V_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_W_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_W_image.asset.taml new file mode 100644 index 000000000..bc18cd655 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_W_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Win_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Win_image.asset.taml new file mode 100644 index 000000000..6972d1fd2 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Win_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_X_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_X_image.asset.taml new file mode 100644 index 000000000..a39405e5b --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_X_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Y_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Y_image.asset.taml new file mode 100644 index 000000000..f154684cc --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Y_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Z_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Z_image.asset.taml new file mode 100644 index 000000000..ab5ef8beb --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Z_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Circle_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Circle_image.asset.taml new file mode 100644 index 000000000..eff562f0d --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Circle_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Cross_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Cross_image.asset.taml new file mode 100644 index 000000000..2794ea8db --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Cross_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_Down_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_Down_image.asset.taml new file mode 100644 index 000000000..0308d7c65 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_Down_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_Left_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_Left_image.asset.taml new file mode 100644 index 000000000..61d37dd99 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_Left_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_Right_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_Right_image.asset.taml new file mode 100644 index 000000000..939bc896e --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_Right_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_Up_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_Up_image.asset.taml new file mode 100644 index 000000000..d227bca6f --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_Up_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_image.asset.taml new file mode 100644 index 000000000..7c277f46d --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Dpad_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_L1_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_L1_image.asset.taml new file mode 100644 index 000000000..56d2f23fe --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_L1_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_L2_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_L2_image.asset.taml new file mode 100644 index 000000000..48d3409e4 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_L2_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Left_Stick_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Left_Stick_image.asset.taml new file mode 100644 index 000000000..b94963a58 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Left_Stick_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Options_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Options_image.asset.taml new file mode 100644 index 000000000..52219baf9 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Options_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_R1_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_R1_image.asset.taml new file mode 100644 index 000000000..0e6a68e0e --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_R1_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_R2_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_R2_image.asset.taml new file mode 100644 index 000000000..1596a08b1 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_R2_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Right_Stick_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Right_Stick_image.asset.taml new file mode 100644 index 000000000..9003dc998 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Right_Stick_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Share_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Share_image.asset.taml new file mode 100644 index 000000000..18deaf629 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Share_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Square_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Square_image.asset.taml new file mode 100644 index 000000000..b7d39f82c --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Square_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Touch_Pad_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Touch_Pad_image.asset.taml new file mode 100644 index 000000000..c1b16cefe --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Touch_Pad_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Triangle_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Triangle_image.asset.taml new file mode 100644 index 000000000..b22cb47d6 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/PS4/PS4_Triangle_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_A_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_A_image.asset.taml new file mode 100644 index 000000000..1fd3b2b09 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_A_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_B_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_B_image.asset.taml new file mode 100644 index 000000000..d5aeea85c --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_B_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Controller_Left_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Controller_Left_image.asset.taml new file mode 100644 index 000000000..88dda38da --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Controller_Left_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Controller_Right_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Controller_Right_image.asset.taml new file mode 100644 index 000000000..4b7129f12 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Controller_Right_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Controllers_Separate_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Controllers_Separate_image.asset.taml new file mode 100644 index 000000000..955ff550b --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Controllers_Separate_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Controllers_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Controllers_image.asset.taml new file mode 100644 index 000000000..cdaf313c0 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Controllers_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Down_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Down_image.asset.taml new file mode 100644 index 000000000..4620dc776 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Down_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_Down_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_Down_image.asset.taml new file mode 100644 index 000000000..6fc1f60b8 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_Down_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_Left_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_Left_image.asset.taml new file mode 100644 index 000000000..3b3e0b970 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_Left_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_Right_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_Right_image.asset.taml new file mode 100644 index 000000000..97b643b01 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_Right_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_Up_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_Up_image.asset.taml new file mode 100644 index 000000000..e62227b04 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_Up_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_image.asset.taml new file mode 100644 index 000000000..0e6736bd7 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Dpad_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Home_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Home_image.asset.taml new file mode 100644 index 000000000..24658efd6 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Home_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_LB_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_LB_image.asset.taml new file mode 100644 index 000000000..bab32a192 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_LB_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_LT_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_LT_image.asset.taml new file mode 100644 index 000000000..6e06321ef --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_LT_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Left_Stick_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Left_Stick_image.asset.taml new file mode 100644 index 000000000..3ccd202d6 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Left_Stick_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Left_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Left_image.asset.taml new file mode 100644 index 000000000..a48d02ff3 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Left_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Minus_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Minus_image.asset.taml new file mode 100644 index 000000000..81126e13a --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Minus_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Plus_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Plus_image.asset.taml new file mode 100644 index 000000000..5279c0077 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Plus_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_RB_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_RB_image.asset.taml new file mode 100644 index 000000000..12755c7c9 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_RB_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_RT_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_RT_image.asset.taml new file mode 100644 index 000000000..5546d4711 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_RT_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Right_Stick_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Right_Stick_image.asset.taml new file mode 100644 index 000000000..03295ec2e --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Right_Stick_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Right_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Right_image.asset.taml new file mode 100644 index 000000000..29752c050 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Right_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Square_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Square_image.asset.taml new file mode 100644 index 000000000..e1411d9b7 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Square_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Up_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Up_image.asset.taml new file mode 100644 index 000000000..0a650deea --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Up_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_X_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_X_image.asset.taml new file mode 100644 index 000000000..33542ebc9 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_X_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Y_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Y_image.asset.taml new file mode 100644 index 000000000..ae328a645 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Switch/Switch_Y_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_A_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_A_image.asset.taml new file mode 100644 index 000000000..f4d22a7f3 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_A_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_B_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_B_image.asset.taml new file mode 100644 index 000000000..89a58c8ff --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_B_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_Down_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_Down_image.asset.taml new file mode 100644 index 000000000..9dcda7f63 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_Down_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_Left_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_Left_image.asset.taml new file mode 100644 index 000000000..3357cf7e7 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_Left_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_Right_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_Right_image.asset.taml new file mode 100644 index 000000000..39eade6e0 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_Right_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_Up_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_Up_image.asset.taml new file mode 100644 index 000000000..210462baf --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_Up_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_image.asset.taml new file mode 100644 index 000000000..0b56ff50f --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Dpad_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_LB_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_LB_image.asset.taml new file mode 100644 index 000000000..950f39bb1 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_LB_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_LT_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_LT_image.asset.taml new file mode 100644 index 000000000..9987db01c --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_LT_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Left_Stick_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Left_Stick_image.asset.taml new file mode 100644 index 000000000..e294e21f9 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Left_Stick_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Menu_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Menu_image.asset.taml new file mode 100644 index 000000000..6218669f9 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Menu_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_RB_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_RB_image.asset.taml new file mode 100644 index 000000000..d464f4247 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_RB_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_RT_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_RT_image.asset.taml new file mode 100644 index 000000000..9b8575bc4 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_RT_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Right_Stick_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Right_Stick_image.asset.taml new file mode 100644 index 000000000..75ea8c904 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Right_Stick_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Windows_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Windows_image.asset.taml new file mode 100644 index 000000000..259ec8172 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Windows_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_X_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_X_image.asset.taml new file mode 100644 index 000000000..6afe85cb4 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_X_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Y_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Y_image.asset.taml new file mode 100644 index 000000000..fe4c77aa3 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Inputs/Xbox/Xbox_Y_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/ScreenBrightness_Dark_image.asset.taml b/Templates/BaseGame/game/data/ui/images/ScreenBrightness_Dark_image.asset.taml new file mode 100644 index 000000000..22c79dc8c --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/ScreenBrightness_Dark_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/ScreenBrightness_Light_image.asset.taml b/Templates/BaseGame/game/data/ui/images/ScreenBrightness_Light_image.asset.taml new file mode 100644 index 000000000..870a93062 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/ScreenBrightness_Light_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Torque_3D_logo_alt_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Torque_3D_logo_alt_image.asset.taml new file mode 100644 index 000000000..b153f46bc --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Torque_3D_logo_alt_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Torque_3D_logo_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Torque_3D_logo_image.asset.taml new file mode 100644 index 000000000..da6130ae8 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Torque_3D_logo_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Torque_3D_logo_shortcut_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Torque_3D_logo_shortcut_image.asset.taml new file mode 100644 index 000000000..f780d2f0d --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Torque_3D_logo_shortcut_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/Torque_3D_logo_w_image.asset.taml b/Templates/BaseGame/game/data/ui/images/Torque_3D_logo_w_image.asset.taml new file mode 100644 index 000000000..7d6d2fc14 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/Torque_3D_logo_w_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/background_dark_image.asset.taml b/Templates/BaseGame/game/data/ui/images/background_dark_image.asset.taml new file mode 100644 index 000000000..95c45a078 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/background_dark_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/background_image.asset.taml b/Templates/BaseGame/game/data/ui/images/background_image.asset.taml new file mode 100644 index 000000000..43e84d5fe --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/background_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/buttontab_image.asset.taml b/Templates/BaseGame/game/data/ui/images/buttontab_image.asset.taml new file mode 100644 index 000000000..371fbdc5d --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/buttontab_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/chatHudBorderArray_image.asset.taml b/Templates/BaseGame/game/data/ui/images/chatHudBorderArray_image.asset.taml new file mode 100644 index 000000000..7651873a4 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/chatHudBorderArray_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/checkbox_image.asset.taml b/Templates/BaseGame/game/data/ui/images/checkbox_image.asset.taml new file mode 100644 index 000000000..30de51698 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/checkbox_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/clear_btn_d_image.asset.taml b/Templates/BaseGame/game/data/ui/images/clear_btn_d_image.asset.taml new file mode 100644 index 000000000..a35213c68 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/clear_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/clear_btn_h_image.asset.taml b/Templates/BaseGame/game/data/ui/images/clear_btn_h_image.asset.taml new file mode 100644 index 000000000..49b78e8a2 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/clear_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/clear_btn_n_image.asset.taml b/Templates/BaseGame/game/data/ui/images/clear_btn_n_image.asset.taml new file mode 100644 index 000000000..c6868777f --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/clear_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/collapse_toolbar_d_image.asset.taml b/Templates/BaseGame/game/data/ui/images/collapse_toolbar_d_image.asset.taml new file mode 100644 index 000000000..92894d013 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/collapse_toolbar_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/collapse_toolbar_h_image.asset.taml b/Templates/BaseGame/game/data/ui/images/collapse_toolbar_h_image.asset.taml new file mode 100644 index 000000000..f78712c70 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/collapse_toolbar_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/collapse_toolbar_n_image.asset.taml b/Templates/BaseGame/game/data/ui/images/collapse_toolbar_n_image.asset.taml new file mode 100644 index 000000000..3938463f3 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/collapse_toolbar_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/defaultCursor_image.asset.taml b/Templates/BaseGame/game/data/ui/images/defaultCursor_image.asset.taml new file mode 100644 index 000000000..e40d04bd5 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/defaultCursor_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/dropDown_image.asset.taml b/Templates/BaseGame/game/data/ui/images/dropDown_image.asset.taml new file mode 100644 index 000000000..657510d4e --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/dropDown_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/dropdown_button_arrow_image.asset.taml b/Templates/BaseGame/game/data/ui/images/dropdown_button_arrow_image.asset.taml new file mode 100644 index 000000000..449f1638b --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/dropdown_button_arrow_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/dropdown_textEdit_image.asset.taml b/Templates/BaseGame/game/data/ui/images/dropdown_textEdit_image.asset.taml new file mode 100644 index 000000000..63455e9dd --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/dropdown_textEdit_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/dropslider_d_image.asset.taml b/Templates/BaseGame/game/data/ui/images/dropslider_d_image.asset.taml new file mode 100644 index 000000000..e1aafe2e2 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/dropslider_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/dropslider_h_image.asset.taml b/Templates/BaseGame/game/data/ui/images/dropslider_h_image.asset.taml new file mode 100644 index 000000000..666c57ac3 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/dropslider_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/dropslider_n_image.asset.taml b/Templates/BaseGame/game/data/ui/images/dropslider_n_image.asset.taml new file mode 100644 index 000000000..1ccfc0900 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/dropslider_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/expand_toolbar_d_image.asset.taml b/Templates/BaseGame/game/data/ui/images/expand_toolbar_d_image.asset.taml new file mode 100644 index 000000000..e693637b9 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/expand_toolbar_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/expand_toolbar_h_image.asset.taml b/Templates/BaseGame/game/data/ui/images/expand_toolbar_h_image.asset.taml new file mode 100644 index 000000000..d014248c6 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/expand_toolbar_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/expand_toolbar_n_image.asset.taml b/Templates/BaseGame/game/data/ui/images/expand_toolbar_n_image.asset.taml new file mode 100644 index 000000000..efd5fd96d --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/expand_toolbar_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/folder_image.asset.taml b/Templates/BaseGame/game/data/ui/images/folder_image.asset.taml new file mode 100644 index 000000000..473e98b75 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/folder_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/group_border_image.asset.taml b/Templates/BaseGame/game/data/ui/images/group_border_image.asset.taml new file mode 100644 index 000000000..9b2972e84 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/group_border_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/hudfill_image.asset.taml b/Templates/BaseGame/game/data/ui/images/hudfill_image.asset.taml new file mode 100644 index 000000000..2e67ecd22 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/hudfill_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/inactive_overlay_image.asset.taml b/Templates/BaseGame/game/data/ui/images/inactive_overlay_image.asset.taml new file mode 100644 index 000000000..318f2f289 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/inactive_overlay_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/lagIcon_image.asset.taml b/Templates/BaseGame/game/data/ui/images/lagIcon_image.asset.taml new file mode 100644 index 000000000..0c765ea20 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/lagIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/listMenuArray_image.asset.taml b/Templates/BaseGame/game/data/ui/images/listMenuArray_image.asset.taml new file mode 100644 index 000000000..c074f7c00 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/listMenuArray_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/loadingbar_image.asset.taml b/Templates/BaseGame/game/data/ui/images/loadingbar_image.asset.taml new file mode 100644 index 000000000..548be3563 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/loadingbar_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/macCursor_image.asset.taml b/Templates/BaseGame/game/data/ui/images/macCursor_image.asset.taml new file mode 100644 index 000000000..de1223a2b --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/macCursor_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/menuSlider_image.asset.taml b/Templates/BaseGame/game/data/ui/images/menuSlider_image.asset.taml new file mode 100644 index 000000000..4b1f0fc9a --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/menuSlider_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/menu_button_image.asset.taml b/Templates/BaseGame/game/data/ui/images/menu_button_image.asset.taml new file mode 100644 index 000000000..e1c825640 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/menu_button_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/menu_image.asset.taml b/Templates/BaseGame/game/data/ui/images/menu_image.asset.taml new file mode 100644 index 000000000..4435ca8ef --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/menu_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/new_d_image.asset.taml b/Templates/BaseGame/game/data/ui/images/new_d_image.asset.taml new file mode 100644 index 000000000..5e31bedbd --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/new_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/new_h_image.asset.taml b/Templates/BaseGame/game/data/ui/images/new_h_image.asset.taml new file mode 100644 index 000000000..d50f57573 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/new_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/new_n_image.asset.taml b/Templates/BaseGame/game/data/ui/images/new_n_image.asset.taml new file mode 100644 index 000000000..6dd4f671c --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/new_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/next_button_d_image.asset.taml b/Templates/BaseGame/game/data/ui/images/next_button_d_image.asset.taml new file mode 100644 index 000000000..7b1cfa797 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/next_button_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/next_button_h_image.asset.taml b/Templates/BaseGame/game/data/ui/images/next_button_h_image.asset.taml new file mode 100644 index 000000000..9646231e5 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/next_button_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/next_button_n_image.asset.taml b/Templates/BaseGame/game/data/ui/images/next_button_n_image.asset.taml new file mode 100644 index 000000000..31eb65042 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/next_button_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/no_preview_image.asset.taml b/Templates/BaseGame/game/data/ui/images/no_preview_image.asset.taml new file mode 100644 index 000000000..1546088dc --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/no_preview_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/numericslider_image.asset.taml b/Templates/BaseGame/game/data/ui/images/numericslider_image.asset.taml new file mode 100644 index 000000000..a322b5269 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/numericslider_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/optionsMenuSliderBitmapArray_image.asset.taml b/Templates/BaseGame/game/data/ui/images/optionsMenuSliderBitmapArray_image.asset.taml new file mode 100644 index 000000000..9adb5a291 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/optionsMenuSliderBitmapArray_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/panel_image.asset.taml b/Templates/BaseGame/game/data/ui/images/panel_image.asset.taml new file mode 100644 index 000000000..35df247c8 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/panel_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/panel_low_image.asset.taml b/Templates/BaseGame/game/data/ui/images/panel_low_image.asset.taml new file mode 100644 index 000000000..22c37b3fe --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/panel_low_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/previous_button_d_image.asset.taml b/Templates/BaseGame/game/data/ui/images/previous_button_d_image.asset.taml new file mode 100644 index 000000000..93a2f1d1b --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/previous_button_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/previous_button_h_image.asset.taml b/Templates/BaseGame/game/data/ui/images/previous_button_h_image.asset.taml new file mode 100644 index 000000000..7391d63d9 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/previous_button_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/previous_button_n_image.asset.taml b/Templates/BaseGame/game/data/ui/images/previous_button_n_image.asset.taml new file mode 100644 index 000000000..3f4b44df6 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/previous_button_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/radioButton_image.asset.taml b/Templates/BaseGame/game/data/ui/images/radioButton_image.asset.taml new file mode 100644 index 000000000..c8872ef78 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/radioButton_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/scrollBar_image.asset.taml b/Templates/BaseGame/game/data/ui/images/scrollBar_image.asset.taml new file mode 100644 index 000000000..92fe3c13d --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/scrollBar_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/selector_button_blank_image.asset.taml b/Templates/BaseGame/game/data/ui/images/selector_button_blank_image.asset.taml new file mode 100644 index 000000000..058b3d4c4 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/selector_button_blank_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/selector_button_dark_image.asset.taml b/Templates/BaseGame/game/data/ui/images/selector_button_dark_image.asset.taml new file mode 100644 index 000000000..a669fe5d6 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/selector_button_dark_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/selector_button_highlight_only_image.asset.taml b/Templates/BaseGame/game/data/ui/images/selector_button_highlight_only_image.asset.taml new file mode 100644 index 000000000..96c16617a --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/selector_button_highlight_only_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/selector_button_image.asset.taml b/Templates/BaseGame/game/data/ui/images/selector_button_image.asset.taml new file mode 100644 index 000000000..ffe4338e5 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/selector_button_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/separator_h_image.asset.taml b/Templates/BaseGame/game/data/ui/images/separator_h_image.asset.taml new file mode 100644 index 000000000..ec8c67549 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/separator_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/separator_v_image.asset.taml b/Templates/BaseGame/game/data/ui/images/separator_v_image.asset.taml new file mode 100644 index 000000000..7558e847a --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/separator_v_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/slider___Copy_image.asset.taml b/Templates/BaseGame/game/data/ui/images/slider___Copy_image.asset.taml new file mode 100644 index 000000000..3a460e432 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/slider___Copy_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/slider_w_box_image.asset.taml b/Templates/BaseGame/game/data/ui/images/slider_w_box_image.asset.taml new file mode 100644 index 000000000..6661f7999 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/slider_w_box_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/tab_border_image.asset.taml b/Templates/BaseGame/game/data/ui/images/tab_border_image.asset.taml new file mode 100644 index 000000000..9d4db0d2d --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/tab_border_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/tab_image.asset.taml b/Templates/BaseGame/game/data/ui/images/tab_image.asset.taml new file mode 100644 index 000000000..15c2b4b7b --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/tab_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/textEditSliderBox_image.asset.taml b/Templates/BaseGame/game/data/ui/images/textEditSliderBox_image.asset.taml new file mode 100644 index 000000000..77429e702 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/textEditSliderBox_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/textEdit_image.asset.taml b/Templates/BaseGame/game/data/ui/images/textEdit_image.asset.taml new file mode 100644 index 000000000..241e228c8 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/textEdit_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/images/window_image.asset.taml b/Templates/BaseGame/game/data/ui/images/window_image.asset.taml new file mode 100644 index 000000000..c01f24895 --- /dev/null +++ b/Templates/BaseGame/game/data/ui/images/window_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/data/ui/scripts/menuInputButtons.tscript b/Templates/BaseGame/game/data/ui/scripts/menuInputButtons.tscript index 758ce61c4..3d4c76c90 100644 --- a/Templates/BaseGame/game/data/ui/scripts/menuInputButtons.tscript +++ b/Templates/BaseGame/game/data/ui/scripts/menuInputButtons.tscript @@ -92,81 +92,81 @@ function MenuInputButton::refresh(%this) { if(%this.gamepadButton !$= "") { - %path = ""; + %assetId = ""; if($activeControllerName $= "PS4 Controller") { - %path = "data/ui/images/inputs/PS4/PS4_"; + %assetId = "UI:PS4_"; if(%this.gamepadButton $= "btn_a") - %path = %path @ "Cross"; + %assetId = %assetId @ "Cross"; else if(%this.gamepadButton $= "btn_b") - %path = %path @ "Circle"; + %assetId = %assetId @ "Circle"; else if(%this.gamepadButton $= "btn_x") - %path = %path @ "Square"; + %assetId = %assetId @ "Square"; else if(%this.gamepadButton $= "btn_y") - %path = %path @ "Triangle"; + %assetId = %assetId @ "Triangle"; else if(%this.gamepadButton $= "btn_l") - %path = %path @ "L1"; + %assetId = %assetId @ "L1"; else if(%this.gamepadButton $= "zaxis") - %path = %path @ "L2"; + %assetId = %assetId @ "L2"; else if(%this.gamepadButton $= "btn_r") - %path = %path @ "R1"; + %assetId = %assetId @ "R1"; else if(%this.gamepadButton $= "rzaxis") - %path = %path @ "R2"; + %assetId = %assetId @ "R2"; else if(%this.gamepadButton $= "btn_start") - %path = %path @ "Options"; + %assetId = %assetId @ "Options"; else if(%this.gamepadButton $= "btn_back") - %path = %path @ "Share"; + %assetId = %assetId @ "Share"; } else if($activeControllerName $= "Nintendo Switch Pro Controller") { - %path = "data/ui/images/inputs/Switch/Switch_"; + %assetId = "UI:Switch_"; if(%this.gamepadButton $= "btn_a") - %path = %path @ "B"; + %assetId = %assetId @ "B"; else if(%this.gamepadButton $= "btn_b") - %path = %path @ "A"; + %assetId = %assetId @ "A"; else if(%this.gamepadButton $= "btn_x") - %path = %path @ "Y"; + %assetId = %assetId @ "Y"; else if(%this.gamepadButton $= "btn_y") - %path = %path @ "X"; + %assetId = %assetId @ "X"; else if(%this.gamepadButton $= "btn_l") - %path = %path @ "LB"; + %assetId = %assetId @ "LB"; else if(%this.gamepadButton $= "zaxis") - %path = %path @ "LT"; + %assetId = %assetId @ "LT"; else if(%this.gamepadButton $= "btn_r") - %path = %path @ "RB"; + %assetId = %assetId @ "RB"; else if(%this.gamepadButton $= "rzaxis") - %path = %path @ "RT"; + %assetId = %assetId @ "RT"; else if(%this.gamepadButton $= "btn_start") - %path = %path @ "Plus"; + %assetId = %assetId @ "Plus"; else if(%this.gamepadButton $= "btn_back") - %path = %path @ "Minus"; + %assetId = %assetId @ "Minus"; } else if($activeControllerName !$= "") { - %path = "data/ui/images/inputs/Xbox/Xbox_"; + %assetId = "UI:Xbox_"; if(%this.gamepadButton $= "btn_a") - %path = %path @ "A"; + %assetId = %assetId @ "A"; else if(%this.gamepadButton $= "btn_b") - %path = %path @ "B"; + %assetId = %assetId @ "B"; else if(%this.gamepadButton $= "btn_x") - %path = %path @ "X"; + %assetId = %assetId @ "X"; else if(%this.gamepadButton $= "btn_y") - %path = %path @ "Y"; + %assetId = %assetId @ "Y"; else if(%this.gamepadButton $= "btn_l") - %path = %path @ "LB"; + %assetId = %assetId @ "LB"; else if(%this.gamepadButton $= "zaxis") - %path = %path @ "LT"; + %assetId = %assetId @ "LT"; else if(%this.gamepadButton $= "btn_r") - %path = %path @ "RB"; + %assetId = %assetId @ "RB"; else if(%this.gamepadButton $= "rzaxis") - %path = %path @ "RT"; + %assetId = %assetId @ "RT"; else if(%this.gamepadButton $= "btn_start") - %path = %path @ "Menu"; + %assetId = %assetId @ "Menu"; else if(%this.gamepadButton $= "btn_back") - %path = %path @ "Windows"; + %assetId = %assetId @ "Windows"; } } } @@ -174,11 +174,11 @@ function MenuInputButton::refresh(%this) { if(%this.keyboardButton !$= "") { - %path = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_" @ %this.keyboardButton; + %assetId = "UI:Keyboard_Black_" @ %this.keyboardButton; } } - %this.setBitmap(%path); + %this.setBitmap(%assetId @ "_image"); return true; } diff --git a/Templates/BaseGame/game/data/ui/scripts/profiles.tscript b/Templates/BaseGame/game/data/ui/scripts/profiles.tscript index c4f972082..c9dfed5b5 100644 --- a/Templates/BaseGame/game/data/ui/scripts/profiles.tscript +++ b/Templates/BaseGame/game/data/ui/scripts/profiles.tscript @@ -22,7 +22,7 @@ new GuiGameListMenuProfile(DefaultListMenuProfile) RowSize = "500 90"; ColumnSplit = "250"; RightPad = "20"; - bitmap = "data/ui/images/listMenuArray"; + bitmap = "UI:listMenuArray_image"; canKeyFocus = true; }; @@ -98,7 +98,7 @@ new GuiControlProfile( GuiMenuButtonProfile ) fixedExtent = false; justify = "center"; canKeyFocus = false; - //bitmap = "data/ui/images/menu-button"; + //bitmapAsset = "UI:menu_button_image"; hasBitmapArray = false; soundButtonDown = menuButtonPressed; soundButtonOver = menuButtonHover; @@ -119,7 +119,7 @@ new GuiControlProfile( GuiHighlightMenuButtonProfile ) fixedExtent = false; justify = "center"; canKeyFocus = false; - bitmap = "data/ui/images/selector-button-highlight-only"; + bitmapAsset = "UI:selector_button_highlight_only_image"; hasBitmapArray = false; category = "Core"; }; @@ -138,7 +138,7 @@ new GuiControlProfile( GuiBlankMenuButtonProfile ) fixedExtent = false; justify = "center"; canKeyFocus = false; - bitmap = "data/ui/images/selector-button-blank"; + bitmapAsset = "UI:selector_button_blank_image"; hasBitmapArray = false; soundButtonDown = menuButtonPressed; soundButtonOver = menuButtonHover; @@ -182,7 +182,7 @@ new GuiControlProfile( GuiGroupBorderProfile ) border = false; opaque = false; hasBitmapArray = true; - bitmap = "data/ui/images/group-border"; + bitmapAsset = "UI:group_border_image"; category = "Core"; }; @@ -192,7 +192,7 @@ new GuiControlProfile( GuiTabBorderProfile ) border = false; opaque = false; hasBitmapArray = true; - bitmap = "data/ui/images/tab-border"; + bitmapAsset = "UI:tab_border_image"; category = "Core"; }; @@ -355,7 +355,7 @@ new GuiControlProfile( GuiPopUpMenuDefault : GuiDefaultProfile ) border = 0; borderThickness = 0; fixedExtent = true; - bitmap = "data/ui/images/scrollBar"; + bitmapAsset = "UI:scrollBar_image"; hasBitmapArray = true; profileForChildren = GuiPopupMenuItemBorder; fillColor = "242 241 240 ";//"255 255 255";//100 @@ -372,7 +372,7 @@ if( !isObject( GuiPopUpMenuProfile ) ) new GuiControlProfile( GuiPopUpMenuProfile : GuiPopUpMenuDefault ) { textOffset = "6 4"; - bitmap = "data/ui/images/dropDown"; + bitmapAsset = "UI:dropDown_image"; hasBitmapArray = true; border = 1; profileForChildren = GuiPopUpMenuDefault; @@ -390,7 +390,7 @@ new GuiControlProfile( GuiTabBookProfile ) fontType = "Arial"; fontSize = 14; justify = "center"; - bitmap = "data/ui/images/tab"; + bitmapAsset = "UI:tab_image"; tabWidth = 64; tabHeight = 24; tabPosition = "Top"; @@ -407,7 +407,7 @@ new GuiControlProfile( GuiTabPageProfile : GuiDefaultProfile ) fontType = "Arial"; fontSize = 10; justify = "center"; - bitmap = "data/ui/images/tab"; + bitmapAsset = "UI:tab_image"; opaque = false; fillColor = "240 239 238"; category = "Core"; @@ -501,7 +501,7 @@ new GuiControlProfile( GuiRadioProfile ) fontColor = "20 20 20"; fontColorHL = "80 80 80"; fixedExtent = true; - bitmap = "data/ui/images/radioButton"; + bitmapAsset = "UI:radioButton_image"; hasBitmapArray = true; category = "Core"; }; @@ -517,7 +517,7 @@ new GuiControlProfile(GuiMenuScrollProfile) fontColor = "200 200 200"; fontColorHL = "250 250 250"; border = false; - bitmap = "data/ui/images/scrollBar"; + bitmapAsset = "UI:scrollBar_image"; hasBitmapArray = true; category = "Core"; }; @@ -531,14 +531,14 @@ new GuiControlProfile(GuiMenuScrollProfile) fontColor = "0 0 0"; fontColorHL = "150 150 150"; border = true; - bitmap = "data/ui/images/scrollBar"; + bitmapAsset = "UI:scrollBar_image"; hasBitmapArray = true; category = "Core"; }; singleton GuiControlProfile(SliderBitmapGUIProfile) { - bitmap = "data/ui/images/optionsMenuSliderBitmapArray.png"; + bitmapAsset = "UI:optionsMenuSliderBitmapArray_image"; hasBitmapArray = true; opaque = false; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/MainEditor/MainEditor.module b/Templates/BaseGame/game/tools/MainEditor/MainEditor.module deleted file mode 100644 index 0b796cd00..000000000 --- a/Templates/BaseGame/game/tools/MainEditor/MainEditor.module +++ /dev/null @@ -1,9 +0,0 @@ - - \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/MainEditor/MainEditor.tscript b/Templates/BaseGame/game/tools/MainEditor/MainEditor.tscript deleted file mode 100644 index 8d5b844cc..000000000 --- a/Templates/BaseGame/game/tools/MainEditor/MainEditor.tscript +++ /dev/null @@ -1,207 +0,0 @@ -function MainEditor::onCreate( %this ) -{ - echo("\n--------- Initializing MainEditor ---------"); - - //exec("tools/gui/profiles.ed." @ $TorqueScriptFileExtension); - //exec("./scripts/GuiProfiles." @ $TorqueScriptFileExtension); - - exec("./guis/MainEditorWindow.gui"); - - //exec("./scripts/newEditorGui." @ $TorqueScriptFileExtension); - - $UsePanelLayout = false; - $AssetBrowserPanelState = true; - $AssetBrowserPanelSplit = 0; - $InspectorPanelState = true; - $InspectorPanelSplit = 0; - $ToolsPanelState = true; - $ToolsPanelSplit = 0; -} - -function MainEditor::onDestroy( %this ) -{ -} - -function NewEditorGui::addNewEditorTab(%this, %editorName) -{ - %editorTab = new GuiTabPageCtrl() - { - Profile = "ToolsGuiEditorTabPage"; - position = "0 0"; - extent = Editor_MainViewTabBook.extent; - AnchorTop = "1"; - AnchorBottom = "0"; - AnchorLeft = "1"; - AnchorRight = "0"; - horizSizing = "width"; - vertSizing = "height"; - text = %editorName; - }; - - Editor_MainViewTabBook.add(%editorTab); - - return %editorTab; -} - -function togglePanelLayout() -{ - $UsePanelLayout = !$UsePanelLayout; - - if($UsePanelLayout) - { - EditorGui.add(NewEditorGui); - - //Nudge us down so we show the toolbar - NewEditorGui.resize(0, EditorGuiToolbar.extent.y, EditorGui.extent.x, EditorGui.extent.y - EditorGuiToolbar.extent.y - EditorGuiStatusBar.extent.y); - - %mainEditViewTitle = "Level - " @ getScene(0).getName(); - %mainEditViewCtrl = NewEditorGui.addNewEditorTab(%mainEditViewTitle); - - %mainEditViewCtrl.add(EWorldEditor); - EWorldEditor.position = "0 24"; - EWorldEditor.extent = %mainEditViewCtrl.extent.x SPC %mainEditViewCtrl.extent.y - 24; - - Editor_AssetBrowserPanel.add(AssetBrowser); - AssetBrowser.resize(0,0, Editor_AssetBrowserPanel.extent.x, Editor_AssetBrowserPanel.extent.y); - AssetBrowser.horizSizing = "width"; - AssetBrowser.vertSizing = "height"; - AssetBrowserWindow.resize(0,0, AssetBrowser.extent.x, AssetBrowser.extent.y); - AssetBrowserWindow.horizSizing = "width"; - AssetBrowserWindow.vertSizing = "height"; - AssetBrowserWindow.canClose = false; - AssetBrowserWindow.canCollapse = false; - AssetBrowserWindow.canMaximize = false; - AssetBrowserWindow.canMinimize = false; - AssetBrowserWindow.canMove = false; - AssetBrowserWindow.resizeWidth = false; - AssetBrowserWindow.resizeHeight = false; - - //Prep it - AssetBrowser.loadFilters(); - - Editor_SceneTreePanel.add(EWTreeWindow); - EWTreeWindow.resize(0,0, Editor_SceneTreePanel.extent.x, Editor_SceneTreePanel.extent.y); - EWTreeWindow.horizSizing = "width"; - EWTreeWindow.vertSizing = "height"; - EWTreeWindow.canClose = false; - EWTreeWindow.canCollapse = false; - EWTreeWindow.canMaximize = false; - EWTreeWindow.canMinimize = false; - EWTreeWindow.canMove = false; - EWTreeWindow.resizeWidth = false; - EWTreeWindow.resizeHeight = false; - - if(!isObject(Scenes)) - { - $scenesRootGroup = new SimGroup(Scenes); - - $scenesRootGroup.add(getScene(0)); - } - - EditorTree.open($scenesRootGroup,true); - - Editor_PropertiesPanel.add(EWInspectorWindow); - EWInspectorWindow.resize(0,0, Editor_PropertiesPanel.extent.x, Editor_PropertiesPanel.extent.y); - EWInspectorWindow.horizSizing = "width"; - EWInspectorWindow.vertSizing = "height"; - EWInspectorWindow.canClose = false; - EWInspectorWindow.canCollapse = false; - EWInspectorWindow.canMaximize = false; - EWInspectorWindow.canMinimize = false; - EWInspectorWindow.canMove = false; - EWInspectorWindow.resizeWidth = false; - EWInspectorWindow.resizeHeight = false; - } - else - { - EditorGui.remove(NewEditorGui); - - EditorGui.add(EWorldEditor); - - EditorGui.add(AssetBrowser); - AssetBrowserWindow.canClose = false; - AssetBrowserWindow.canCollapse = false; - AssetBrowserWindow.canMaximize = false; - AssetBrowserWindow.canMinimize = false; - AssetBrowserWindow.canMove = false; - - EditorGui.add(EWTreeWindow); - - EditorGui.add(EWInspectorWindow); - } -} - -function Editor_AssetBrowserButton::onClick(%this) -{ - $AssetBrowserPanelState = !$AssetBrowserPanelState; - - //If we're collapsing - if(!$AssetBrowserPanelState) - { - //Store the original - $AssetBrowserPanelSplit = Editor_MainViewSplit.splitPoint.y; - - //collapse it - Editor_MainViewSplit.setSplitPoint(Editor_MainViewSplit.splitPoint.x SPC Editor_MainViewSplit.extent.y - Editor_MainViewSplit.splitterSize); - } - else - { - //restore the original - Editor_MainViewSplit.setSplitPoint(Editor_MainViewSplit.splitPoint.x SPC $AssetBrowserPanelSplit); - } -} - -function Editor_InspectorSidebarButton::onClick(%this) -{ - $InspectorPanelState = !$InspectorPanelState; - - //If we're collapsing - if(!$InspectorPanelState) - { - //Store the original - $InspectorPanelSplit = NewEditorGuiLayout.splitPoint.x; - - //collapse it - NewEditorGuiLayout.setSplitPoint(NewEditorGui.extent.x - NewEditorGuiLayout.splitterSize SPC NewEditorGuiLayout.splitPoint.y); - } - else - { - //restore the original - NewEditorGuiLayout.setSplitPoint($InspectorPanelSplit SPC NewEditorGuiLayout.splitPoint.y); - } -} - -function Editor_ToolsSidebarButton::onClick(%this) -{ - $ToolsPanelState = !$ToolsPanelState; - - //If we're collapsing - if(!$ToolsPanelState) - { - //Store the original - $ToolsPanelSplit = Editor_ToolsMainSplit.splitPoint.x; - - //collapse it - Editor_ToolsMainSplit.setSplitPoint(Editor_ToolsMainSplit.splitterSize SPC Editor_ToolsMainSplit.splitPoint.y); - } - else - { - //restore the original - Editor_ToolsMainSplit.setSplitPoint($ToolsPanelSplit SPC Editor_ToolsMainSplit.splitPoint.y); - } -} - -function Editor_VisibilityOptionsButton::onClick(%this) -{ - if ( EVisibility.visible ) - { - EVisibility.setVisible(false); - //visibilityToggleBtn.setStateOn(0); - } - else - { - EVisibility.setVisible(true); - //visibilityToggleBtn.setStateOn(1); - EVisibility.setExtent("200 540"); - } -} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/MainEditor/art/Button.png b/Templates/BaseGame/game/tools/MainEditor/art/Button.png deleted file mode 100644 index fc420ad8a..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/Button.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/GroupBackground.png b/Templates/BaseGame/game/tools/MainEditor/art/GroupBackground.png deleted file mode 100644 index 12c703b9d..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/GroupBackground.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/GroupBackground_h.png b/Templates/BaseGame/game/tools/MainEditor/art/GroupBackground_h.png deleted file mode 100644 index 8b55fa7ed..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/GroupBackground_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/GroupBackground_i.png b/Templates/BaseGame/game/tools/MainEditor/art/GroupBackground_i.png deleted file mode 100644 index 5f23f7ca6..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/GroupBackground_i.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/PropertyRollout.png b/Templates/BaseGame/game/tools/MainEditor/art/PropertyRollout.png deleted file mode 100644 index 2ab71d1c6..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/PropertyRollout.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/ScrollBar.png b/Templates/BaseGame/game/tools/MainEditor/art/ScrollBar.png deleted file mode 100644 index dc2318343..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/ScrollBar.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/ScrollBar_.png b/Templates/BaseGame/game/tools/MainEditor/art/ScrollBar_.png deleted file mode 100644 index 287ce57eb..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/ScrollBar_.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/Spacer.png b/Templates/BaseGame/game/tools/MainEditor/art/Spacer.png deleted file mode 100644 index bb2d24be1..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/Spacer.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddEvent.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddEvent.png deleted file mode 100644 index 7be6afbe8..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddEvent.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddEvent_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddEvent_d.png deleted file mode 100644 index b8e9f8df3..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddEvent_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddEvent_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddEvent_h.png deleted file mode 100644 index b4b96029f..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddEvent_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddGroup.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddGroup.png deleted file mode 100644 index 27ae0e21d..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddGroup.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddGroup_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddGroup_d.png deleted file mode 100644 index 8877ceaa6..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddGroup_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddGroup_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddGroup_h.png deleted file mode 100644 index 887080475..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddGroup_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddL.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddL.png deleted file mode 100644 index f2c5a0179..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddL.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddL_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddL_d.png deleted file mode 100644 index 6df64c5c8..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddL_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddL_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddL_h.png deleted file mode 100644 index d1302ed4a..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddL_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddR.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddR.png deleted file mode 100644 index a69233788..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddR.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddR_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddR_d.png deleted file mode 100644 index 392d196dc..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddR_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddR_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddR_h.png deleted file mode 100644 index b5d80a246..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddR_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddSml.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddSml.png deleted file mode 100644 index fc32ee544..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddSml.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddSml_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddSml_d.png deleted file mode 100644 index adfe16658..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddSml_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddSml_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddSml_h.png deleted file mode 100644 index 119f5df6d..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddSml_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddTrack.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddTrack.png deleted file mode 100644 index 4428e8ebc..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddTrack.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddTrack_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddTrack_d.png deleted file mode 100644 index 3ef7d2a0f..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddTrack_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddTrack_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_AddTrack_h.png deleted file mode 100644 index 1b32c0259..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_AddTrack_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Delete.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Delete.png deleted file mode 100644 index a7a01eb50..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Delete.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_DeleteSml.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_DeleteSml.png deleted file mode 100644 index 63b67b3a1..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_DeleteSml.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_DeleteSml_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_DeleteSml_d.png deleted file mode 100644 index 0cf78be02..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_DeleteSml_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_DeleteSml_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_DeleteSml_h.png deleted file mode 100644 index ef35233d2..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_DeleteSml_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Delete_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Delete_d.png deleted file mode 100644 index 1b5aa8b09..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Delete_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Delete_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Delete_h.png deleted file mode 100644 index 17721dc23..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Delete_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Forward.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Forward.png deleted file mode 100644 index c14fc173c..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Forward.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Forward_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Forward_d.png deleted file mode 100644 index f01742727..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Forward_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Forward_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Forward_h.png deleted file mode 100644 index 24f3234de..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Forward_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Palette_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Palette_d.png deleted file mode 100644 index 298764c09..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Palette_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Palette_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Palette_h.png deleted file mode 100644 index 7d7975f32..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Palette_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Palette_n.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Palette_n.png deleted file mode 100644 index 881d92250..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Palette_n.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Pause.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Pause.png deleted file mode 100644 index b0d7a9dc1..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Pause.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Pause_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Pause_d.png deleted file mode 100644 index 62c5aeed3..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Pause_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Pause_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Pause_h.png deleted file mode 100644 index 7e510a997..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Pause_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Play.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Play.png deleted file mode 100644 index 9163fa726..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Play.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Play_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Play_d.png deleted file mode 100644 index 5df9830f0..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Play_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Play_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Play_h.png deleted file mode 100644 index f24a859de..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Play_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Rewind.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Rewind.png deleted file mode 100644 index dbf50891e..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Rewind.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Rewind_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Rewind_d.png deleted file mode 100644 index dc73431ea..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Rewind_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_Rewind_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_Rewind_h.png deleted file mode 100644 index 0cd671ccb..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_Rewind_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_StepB.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_StepB.png deleted file mode 100644 index fb3ad2a6a..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_StepB.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_StepB_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_StepB_d.png deleted file mode 100644 index e1b0036c6..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_StepB_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_StepB_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_StepB_h.png deleted file mode 100644 index 94fbfebcf..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_StepB_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_StepF.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_StepF.png deleted file mode 100644 index 78a33a0cc..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_StepF.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_StepF_d.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_StepF_d.png deleted file mode 100644 index d4ca592b6..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_StepF_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/art/btn_StepF_h.png b/Templates/BaseGame/game/tools/MainEditor/art/btn_StepF_h.png deleted file mode 100644 index 35749528d..000000000 Binary files a/Templates/BaseGame/game/tools/MainEditor/art/btn_StepF_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/MainEditor/guis/MainEditorWindow.gui b/Templates/BaseGame/game/tools/MainEditor/guis/MainEditorWindow.gui deleted file mode 100644 index 42c5eca6e..000000000 --- a/Templates/BaseGame/game/tools/MainEditor/guis/MainEditorWindow.gui +++ /dev/null @@ -1,485 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -%guiContent = new GuiContainer(NewEditorGui) { - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 0"; - extent = "1920 1080"; - minExtent = "8 8"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "1"; - enabled = "1"; - - new GuiSplitContainer(NewEditorGuiLayout) { - orientation = "Vertical"; - splitterSize = "2"; - splitPoint = "1661 100"; - fixedPanel = "None"; - useMinExtent="0"; - fixedSize = "260"; - docking = "None"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 0"; - extent = "1921 1081"; - minExtent = "64 64"; - horizSizing = "width"; - vertSizing = "height"; - 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 = "1659 1081"; - minExtent = "0 0"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "Panel1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiSplitContainer(Editor_ToolsMainSplit) { - orientation = "Vertical"; - splitterSize = "2"; - splitPoint = "230 100"; - fixedPanel = "None"; - useMinExtent="0"; - fixedSize = "1429"; - docking = "None"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 0"; - extent = "1659 1081"; - minExtent = "64 64"; - horizSizing = "width"; - vertSizing = "height"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiPanel(Editor_ToolSidebarPanel) { - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 0"; - extent = "228 1081"; - minExtent = "0 0"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "Panel1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiWindowCtrl(Editor_ToolsSidebarWindow) { - text = "Tool Settings"; - resizeWidth = "0"; - resizeHeight = "0"; - canMove = "0"; - canClose = "0"; - canMinimize = "0"; - canMaximize = "0"; - canCollapse = "0"; - edgeSnap = "1"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 0"; - extent = "228 1081"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "height"; - profile = "GuiWindowProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiPanel(Editor_MainWindowPanel) { - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "232 0"; - extent = "1427 1081"; - minExtent = "0 0"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "panel2"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiSplitContainer(Editor_MainViewSplit) { - orientation = "Horizontal"; - splitterSize = "2"; - splitPoint = "182 745"; - fixedPanel = "None"; - useMinExtent="0"; - fixedSize = "273"; - docking = "None"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 0"; - extent = "1427 1081"; - minExtent = "64 64"; - horizSizing = "width"; - vertSizing = "height"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiPanel(Editor_MainViewPanel) { - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 0"; - extent = "1427 743"; - minExtent = "0 0"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "Panel1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiTabBookCtrl(Editor_MainViewTabBook) { - tabPosition = "Top"; - tabMargin = "7"; - minTabWidth = "64"; - tabHeight = "20"; - allowReorder = "0"; - defaultPage = "-1"; - selectedPage = "-1"; - frontTabPadding = "0"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 0"; - extent = "1427 743"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "height"; - profile = "ToolsGuiTabBookProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl(Editor_InspectorSidebarButton) { - bitmap = "tools/gui/images/iconAdd.png"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - masked = "0"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "1411 61"; - extent = "15 15"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl(Editor_ToolsSidebarButton) { - bitmap = "tools/gui/images/iconAdd.png"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - masked = "0"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "0 61"; - extent = "15 15"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl(Editor_AssetBrowserButton) { - bitmap = "tools/gui/images/iconAdd.png"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - masked = "0"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "1411 725"; - extent = "15 15"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "top"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl(Editor_VisibilityOptionsButton) { - bitmap = "tools/gui/images/visible"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - masked = "0"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "16 30"; - extent = "18 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiPanel(Editor_AssetBrowserPanel) { - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 747"; - extent = "1427 334"; - minExtent = "16 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "panel2"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - }; - }; - }; - new GuiPanel(Editor_InspectorPanel) { - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "1663 0"; - extent = "258 1081"; - minExtent = "0 0"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "panel2"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiSplitContainer() { - orientation = "Horizontal"; - splitterSize = "2"; - splitPoint = "182 556"; - fixedPanel = "None"; - useMinExtent="0"; - fixedSize = "100"; - docking = "None"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 0"; - extent = "258 1081"; - minExtent = "64 64"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiPanel(Editor_SceneTreePanel) { - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 0"; - extent = "258 554"; - minExtent = "0 0"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "Panel1"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiPanel(Editor_PropertiesPanel) { - docking = "Client"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 558"; - extent = "258 523"; - minExtent = "0 0"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "panel2"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - }; - }; -}; -//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/MainEditor/scripts/GuiProfiles.tscript b/Templates/BaseGame/game/tools/MainEditor/scripts/GuiProfiles.tscript deleted file mode 100644 index 079bdaa68..000000000 --- a/Templates/BaseGame/game/tools/MainEditor/scripts/GuiProfiles.tscript +++ /dev/null @@ -1,213 +0,0 @@ -//----------------------------------------------------------------------------- -// Verve -// Copyright (C) - Violent Tulip -//----------------------------------------------------------------------------- - -singleton GuiControlProfile( VEditorDefaultProfile ) -{ - opaque = true; - fillColor = "70 70 70"; - fillColorHL = "90 90 90"; - fillColorNA = "70 70 70"; - - border = 1; - borderColor = "120 120 120"; - borderColorHL = "100 100 100"; - borderColorNA = "240 240 240"; - - fontType = "Arial"; - fontSize = 12; - fontCharset = ANSI; - - fontColor = "255 255 255"; - fontColorHL = "255 255 255"; - fontColorNA = "255 255 255"; - fontColorSEL = "255 255 255"; -}; - -singleton GuiControlProfile( VEditorTestProfile ) -{ - opaque = true; - fillColor = "255 255 0"; - fillColorHL = "255 255 0"; - fillColorNA = "255 255 0"; -}; - -singleton GuiControlProfile( VEditorNoFillProfile : VEditorDefaultProfile ) -{ - opaque = false; -}; - -singleton GuiControlProfile( VEditorNoBorderProfile : VEditorDefaultProfile ) -{ - border = false; -}; - -singleton GuiControlProfile( VEditorTransparentProfile : VEditorDefaultProfile ) -{ - opaque = false; - border = false; -}; - -//----------------------------------------------------------------------------- - -singleton GuiControlProfile( VEditorTextProfile : VEditorDefaultProfile ) -{ - border = false; - opaque = false; - - fontType = "Arial Bold"; -}; - -singleton GuiControlProfile( VEditorTextEditProfile : VEditorDefaultProfile ) -{ - fillColor = "70 70 70"; - fillColorHL = "90 90 90"; - fillColorSEL = "0 0 0"; - fillColorNA = "70 70 70"; - - fontColor = "255 255 255"; - fontColorHL = "0 0 0"; - fontColorSEL = "128 128 128"; - fontColorNA = "128 128 128"; - - textOffset = "4 2"; - autoSizeWidth = false; - autoSizeHeight = false; - justify = "left"; - tab = true; - canKeyFocus = true; -}; - -singleton GuiControlProfile( VEditorPopupMenuProfile : GuiPopUpMenuProfile ) -{ - FillColorHL = "90 90 90"; - FillColorSEL = "0 0 0"; - - FontColorHL = "255 255 255"; -}; - -singleton GuiControlProfile ( VEditorBitmapButtonProfile : VEditorDefaultProfile ) -{ - justify = "center"; - - hasBitmapArray = true; - bitmap = "./Images/Button"; -}; - -//----------------------------------------------------------------------------- - -singleton GuiControlProfile( VEditorGroupHeaderProfile : VEditorDefaultProfile ) -{ - CanKeyFocus = true; - TextOffset = "23 0"; - - fontColor = "70 70 70"; -}; - -singleton GuiControlProfile( VEditorGroupHeaderErrorProfile : VEditorGroupHeaderProfile ) -{ - fontColor = "255 70 70"; -}; - -singleton GuiControlProfile( VEditorGroupTrackProfile : VEditorTransparentProfile ) -{ - CanKeyFocus = true; -}; - -singleton GuiControlProfile( VEditorTrackProfile : VEditorDefaultProfile ) -{ - CanKeyFocus = true; - TextOffset = "33 0"; - - opaque = true; - fillColor = "255 255 255 15"; - fillColorHL = "151 166 191 60"; - - borderColor = "100 100 100"; -}; - -singleton GuiControlProfile( VEditorTrackErrorProfile : VEditorTrackProfile ) -{ - fontColor = "255 70 70"; -}; - -singleton GuiControlProfile( VEditorEventProfile : VEditorDefaultProfile ) -{ - CanKeyFocus = true; - Justify = "left"; - TextOffset = "6 1"; - - fillColor = "81 81 81"; - fillColorHL = "102 102 102"; - - borderColor = "255 255 255"; - borderColorHL = "255 255 255"; - borderColorNA = "100 100 100"; -}; - -singleton GuiControlProfile( VEditorTimeLineProfile : VEditorDefaultProfile ) -{ - CanKeyFocus = true; - - opaque = false; - fillColorHL = "255 255 255 15"; - - border = false; - borderColor = "100 100 100"; -}; - -singleton GuiControlProfile( VEditorPropertyProfile : VEditorDefaultProfile ) -{ - fillColor = "102 102 102"; -}; - -//----------------------------------------------------------------------------- - -singleton GuiControlProfile ( VEditorScrollProfile : VEditorDefaultProfile ) -{ - opaque = false; - border = false; - - hasBitmapArray = true; - bitmap = "./Images/ScrollBar"; -}; - -singleton GuiControlProfile ( VEditorCheckBoxProfile : GuiCheckBoxProfile ) -{ - // Void. -}; - -//----------------------------------------------------------------------------- - -singleton GuiControlProfile( VEditorPropertyRolloutProfile : GuiRolloutProfile ) -{ - border = 0; - hasBitmapArray = true; - bitmap = "./Images/PropertyRollout"; - - fontType = "Arial"; - fontSize = 12; - fontCharset = ANSI; - - fontColor = "255 255 255"; - fontColorHL = "255 255 255"; - fontColorNA = "255 255 255"; - fontColorSEL = "255 255 255"; -}; - -singleton GuiControlProfile( VEditorPropertyLabelProfile : VEditorTextProfile ) -{ - border = "1"; - justify = "center"; -}; - -//----------------------------------------------------------------------------- - -singleton GuiControlProfile( VEditorPreferenceLabelProfile : GuiTextProfile ) -{ - opaque = true; - fillColor = "242 241 240"; - fillColorHL = "242 241 240"; - fillColorNA = "242 241 240"; -}; \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/MainEditor/scripts/newEditorGui.tscript b/Templates/BaseGame/game/tools/MainEditor/scripts/newEditorGui.tscript deleted file mode 100644 index 59a8e541e..000000000 --- a/Templates/BaseGame/game/tools/MainEditor/scripts/newEditorGui.tscript +++ /dev/null @@ -1,103 +0,0 @@ -function NewEditorGui::AddWindow(%this) -{ - %page = new GuiTabPageCtrl() - { - fitBook = "1"; - text = "Object Viewer"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 0"; - extent = "1024 768"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "height"; - profile = "ToolsGuiTabPageProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "1"; - }; - - %page.add(ObjectViewer); - - MainEditorBasePanel.add(%page); - - //Ensure the sidebar is spaced sanely - %pos = MainEditorBasePanel.extent.x * 0.8; - ObjectViewer-->splitContainer.splitPoint.x = MainEditorBasePanel.extent.x * 0.8; - -} - -function AssetBrowserWindow::onMouseDragged(%this) -{ - %payload = new GuiBitmapButtonCtrl(); - %payload.assignFieldsFrom( %this ); - %payload.className = "AssetPreviewControl"; - %payload.position = "0 0"; - %payload.dragSourceControl = %this; - %payload.bitmap = %this.icon; - %payload.extent.x /= 2; - %payload.extent.y /= 2; - - %xOffset = getWord( %payload.extent, 0 ) / 2; - %yOffset = getWord( %payload.extent, 1 ) / 2; - - // Compute the initial position of the GuiDragAndDrop control on the cavas based on the current - // mouse cursor position. - - %cursorpos = Canvas.getCursorPos(); - %xPos = getWord( %cursorpos, 0 ) - %xOffset; - %yPos = getWord( %cursorpos, 1 ) - %yOffset; - - if(!isObject(EditorDragAndDropLayer)) - { - new GuiControl(EditorDragAndDropLayer) - { - position = "0 0"; - extent = Canvas.extent; - }; - } - - // Create the drag control. - %ctrl = new GuiDragAndDropControl() - { - canSaveDynamicFields = "0"; - Profile = "GuiSolidDefaultProfile"; - HorizSizing = "right"; - VertSizing = "bottom"; - Position = %xPos SPC %yPos; - extent = %payload.extent; - MinExtent = "4 4"; - canSave = "1"; - Visible = "1"; - hovertime = "1000"; - - // Let the GuiDragAndDropControl delete itself on mouse-up. When the drag is aborted, - // this not only deletes the drag control but also our payload. - deleteOnMouseUp = true; - - useWholeCanvas = true; - - // To differentiate drags, use the namespace hierarchy to classify them. - // This will allow a color swatch drag to tell itself apart from a file drag, for example. - class = "AssetPreviewControlType_AssetDrop"; - }; - - // Add the temporary color swatch to the drag control as the payload. - %ctrl.add( %payload ); - - // Start drag by adding the drag control to the canvas and then calling startDragging(). - //Canvas.getContent().add( %ctrl ); - EditorDragAndDropLayer.add(%ctrl); - Canvas.pushDialog(EditorDragAndDropLayer); - - %ctrl.startDragging( %xOffset, %yOffset ); -} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/VPathEditor/GUI/EVPathEditor.asset.taml b/Templates/BaseGame/game/tools/VPathEditor/GUI/EVPathEditor.asset.taml new file mode 100644 index 000000000..783226bc6 --- /dev/null +++ b/Templates/BaseGame/game/tools/VPathEditor/GUI/EVPathEditor.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_d_image.asset.taml b/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_d_image.asset.taml new file mode 100644 index 000000000..ebf48969f --- /dev/null +++ b/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_h_image.asset.taml b/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_h_image.asset.taml new file mode 100644 index 000000000..a2dc1f821 --- /dev/null +++ b/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_n_image.asset.taml b/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_n_image.asset.taml new file mode 100644 index 000000000..d697e1095 --- /dev/null +++ b/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditor.gui b/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditor.gui index d9941f9db..8962b3ec7 100644 --- a/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditor.gui +++ b/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditor.gui @@ -141,7 +141,7 @@ new VPathEditor(EVPathEditor) { }; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -431,4 +431,4 @@ function OnOrientationChanged() %mode = EPathEditorNodeOrientationMode.getText(); %data = EPathEditorNodeOrientationData.getText(); EVPathEditor.setNodeOrientationMode( %mode, %data ); -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorPalette.asset.taml b/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorPalette.asset.taml new file mode 100644 index 000000000..3eae73f78 --- /dev/null +++ b/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorPalette.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorPalette.gui b/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorPalette.gui index 94f8102dc..0963ae68f 100644 --- a/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorPalette.gui +++ b/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorPalette.gui @@ -33,7 +33,7 @@ tooltipprofile = "GuiToolTipProfile"; ToolTip = "Select Path / Node (1)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/arrow"; + bitmapAsset = "ToolsModule:arrow_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -53,7 +53,7 @@ tooltipprofile = "GuiToolTipProfile"; ToolTip = "Move Point (2)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/move-point"; + bitmapAsset = "ToolsModule:move_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -73,7 +73,7 @@ tooltipprofile = "GuiToolTipProfile"; ToolTip = "Rotate Point (3)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/rotate-point"; + bitmapAsset = "ToolsModule:rotate_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -93,7 +93,7 @@ tooltipprofile = "GuiToolTipProfile"; ToolTip = "Scale Point (4)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/scale-point"; + bitmapAsset = "ToolsModule:scale_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -113,7 +113,7 @@ tooltipprofile = "GuiToolTipProfile"; ToolTip = "Add Node (5)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/add-point"; + bitmapAsset = "ToolsModule:add_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -133,7 +133,7 @@ tooltipprofile = "GuiToolTipProfile"; ToolTip = "Delete Node (6)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/subtract-point"; + bitmapAsset = "ToolsModule:subtract_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -173,4 +173,4 @@ function EVPathEditorAddNodeButton::onClick( %this ) function EVPathEditorDeleteNodeButton::onClick( %this ) { EVPathEditor.EditMode = "DeleteNode"; -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorToolbar.asset.taml b/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorToolbar.asset.taml new file mode 100644 index 000000000..a82c0160b --- /dev/null +++ b/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorToolbar.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/VPathEditor/Scripts/Plugin.tscript b/Templates/BaseGame/game/tools/VPathEditor/Scripts/Plugin.tscript index 8af3a167a..60bf4ceb9 100644 --- a/Templates/BaseGame/game/tools/VPathEditor/Scripts/Plugin.tscript +++ b/Templates/BaseGame/game/tools/VPathEditor/Scripts/Plugin.tscript @@ -40,7 +40,7 @@ function VPathEditorPlugin::onWorldEditorStartup( %this ) // Add ourselves to the ToolsToolbar %tooltip = "Path Editor (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "VPathEditorPlugin", "VPathEditorPalette", expandFilename( "tools/VPathEditor/GUI/Images/btn_Palette" ), %tooltip ); + EditorGui.addToToolsToolbar( "VPathEditorPlugin", "VPathEditorPalette", "ToolsModule:btn_Palette_n_image", %tooltip ); // Find and Store the Button. %this.ToolbarButton = ToolsToolbarArray.findObjectByInternalName( "VPathEditorPalette", false ); @@ -175,4 +175,4 @@ function VPathEditorPlugin::syncGizmo( %this ) case "Rotate" : EVPathEditorRotateButton.performClick(); case "Scale" : EVPathEditorScaleButton.performClick(); } -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/GuiProfiles.tscript b/Templates/BaseGame/game/tools/VerveEditor/GUI/GuiProfiles.tscript index 079bdaa68..f636bf413 100644 --- a/Templates/BaseGame/game/tools/VerveEditor/GUI/GuiProfiles.tscript +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/GuiProfiles.tscript @@ -170,7 +170,7 @@ singleton GuiControlProfile ( VEditorScrollProfile : VEditorDefaultProfile ) border = false; hasBitmapArray = true; - bitmap = "./Images/ScrollBar"; + bitmapAsset = "ToolsModule:Images_ScrollBar_image"; }; singleton GuiControlProfile ( VEditorCheckBoxProfile : GuiCheckBoxProfile ) @@ -184,7 +184,7 @@ singleton GuiControlProfile( VEditorPropertyRolloutProfile : GuiRolloutProfile ) { border = 0; hasBitmapArray = true; - bitmap = "./Images/PropertyRollout"; + bitmapAsset = "ToolsModule:PropertyRollout_image"; fontType = "Arial"; fontSize = 12; @@ -210,4 +210,4 @@ singleton GuiControlProfile( VEditorPreferenceLabelProfile : GuiTextProfile ) fillColor = "242 241 240"; fillColorHL = "242 241 240"; fillColorNA = "242 241 240"; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Button.png b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Button.png deleted file mode 100644 index fc420ad8a..000000000 Binary files a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Button.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/GroupBackground_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/GroupBackground_h_image.asset.taml new file mode 100644 index 000000000..773762a37 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/GroupBackground_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/GroupBackground_i_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/GroupBackground_i_image.asset.taml new file mode 100644 index 000000000..fbedb4c5f --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/GroupBackground_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/GroupBackground_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/GroupBackground_image.asset.taml new file mode 100644 index 000000000..c82fa2df9 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/GroupBackground_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Images_ScrollBar_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Images_ScrollBar_image.asset.taml new file mode 100644 index 000000000..58cd97824 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Images_ScrollBar_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/PropertyRollout_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/PropertyRollout_image.asset.taml new file mode 100644 index 000000000..facd4e326 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/PropertyRollout_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/ScrollBar__image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/ScrollBar__image.asset.taml new file mode 100644 index 000000000..301dc191a --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/ScrollBar__image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Spacer_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Spacer_image.asset.taml new file mode 100644 index 000000000..25f6033fc --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Spacer_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddEvent_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddEvent_d_image.asset.taml new file mode 100644 index 000000000..4afb1ddcd --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddEvent_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddEvent_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddEvent_h_image.asset.taml new file mode 100644 index 000000000..1452c9c6c --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddEvent_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddEvent_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddEvent_image.asset.taml new file mode 100644 index 000000000..081f68f5b --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddEvent_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddGroup_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddGroup_d_image.asset.taml new file mode 100644 index 000000000..b97a92913 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddGroup_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddGroup_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddGroup_h_image.asset.taml new file mode 100644 index 000000000..06438812c --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddGroup_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddGroup_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddGroup_image.asset.taml new file mode 100644 index 000000000..079b2c6ee --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddGroup_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddL_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddL_d_image.asset.taml new file mode 100644 index 000000000..60c86d7a9 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddL_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddL_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddL_h_image.asset.taml new file mode 100644 index 000000000..7f712db80 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddL_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddL_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddL_image.asset.taml new file mode 100644 index 000000000..f06454b35 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddL_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddR_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddR_d_image.asset.taml new file mode 100644 index 000000000..bfed9cdf8 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddR_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddR_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddR_h_image.asset.taml new file mode 100644 index 000000000..2ee76425c --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddR_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddR_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddR_image.asset.taml new file mode 100644 index 000000000..58d809782 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddR_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddSml_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddSml_d_image.asset.taml new file mode 100644 index 000000000..b95f48130 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddSml_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddSml_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddSml_h_image.asset.taml new file mode 100644 index 000000000..caf6e3558 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddSml_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddSml_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddSml_image.asset.taml new file mode 100644 index 000000000..fe6b96d49 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddSml_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddTrack_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddTrack_d_image.asset.taml new file mode 100644 index 000000000..a2a86e771 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddTrack_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddTrack_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddTrack_h_image.asset.taml new file mode 100644 index 000000000..fcd1d4356 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddTrack_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddTrack_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddTrack_image.asset.taml new file mode 100644 index 000000000..a7d5b5932 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_AddTrack_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_DeleteSml_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_DeleteSml_d_image.asset.taml new file mode 100644 index 000000000..96eb3a357 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_DeleteSml_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_DeleteSml_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_DeleteSml_h_image.asset.taml new file mode 100644 index 000000000..0de575835 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_DeleteSml_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_DeleteSml_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_DeleteSml_image.asset.taml new file mode 100644 index 000000000..221d28cb4 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_DeleteSml_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Delete_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Delete_d_image.asset.taml new file mode 100644 index 000000000..a8b55de99 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Delete_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Delete_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Delete_h_image.asset.taml new file mode 100644 index 000000000..266f0bbb1 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Delete_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Delete_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Delete_image.asset.taml new file mode 100644 index 000000000..5944e00b3 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Delete_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Forward_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Forward_d_image.asset.taml new file mode 100644 index 000000000..1ef7a2165 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Forward_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Forward_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Forward_h_image.asset.taml new file mode 100644 index 000000000..756a816f8 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Forward_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Forward_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Forward_image.asset.taml new file mode 100644 index 000000000..5e3a0d852 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Forward_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Palette_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Palette_d_image.asset.taml new file mode 100644 index 000000000..f338ba178 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Palette_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Palette_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Palette_h_image.asset.taml new file mode 100644 index 000000000..e7d389472 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Palette_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Palette_n_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Palette_n_image.asset.taml new file mode 100644 index 000000000..18998e7ca --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Palette_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Pause_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Pause_d_image.asset.taml new file mode 100644 index 000000000..404e24464 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Pause_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Pause_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Pause_h_image.asset.taml new file mode 100644 index 000000000..6a7430685 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Pause_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Pause_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Pause_image.asset.taml new file mode 100644 index 000000000..c8eedc261 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Pause_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Play_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Play_d_image.asset.taml new file mode 100644 index 000000000..598d89c40 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Play_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Play_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Play_h_image.asset.taml new file mode 100644 index 000000000..b5f507406 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Play_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Play_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Play_image.asset.taml new file mode 100644 index 000000000..8f2c4a497 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Play_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Rewind_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Rewind_d_image.asset.taml new file mode 100644 index 000000000..6dbf0364c --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Rewind_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Rewind_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Rewind_h_image.asset.taml new file mode 100644 index 000000000..db93f6613 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Rewind_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Rewind_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Rewind_image.asset.taml new file mode 100644 index 000000000..25b1de591 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_Rewind_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepB_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepB_d_image.asset.taml new file mode 100644 index 000000000..608aef35e --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepB_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepB_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepB_h_image.asset.taml new file mode 100644 index 000000000..d6531f503 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepB_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepB_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepB_image.asset.taml new file mode 100644 index 000000000..efd079e32 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepB_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepF_d_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepF_d_image.asset.taml new file mode 100644 index 000000000..2e387ae53 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepF_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepF_h_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepF_h_image.asset.taml new file mode 100644 index 000000000..4861ab083 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepF_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepF_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepF_image.asset.taml new file mode 100644 index 000000000..99a7c1aa1 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/btn_StepF_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditor.gui b/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditor.gui index 091288fe0..10bd0fe35 100644 --- a/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditor.gui +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditor.gui @@ -307,7 +307,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "./Images/btn_AddGroup"; + bitmapAsset = "ToolsModule:btn_AddGroup_image"; }; new GuiBitmapButtonCtrl(VerveEditorAddTrackButton) { canSaveDynamicFields = "0"; @@ -330,7 +330,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "./Images/btn_AddTrack"; + bitmapAsset = "ToolsModule:btn_AddTrack_image"; }; new GuiBitmapButtonCtrl(VerveEditorAddEventButton) { canSaveDynamicFields = "0"; @@ -352,7 +352,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "./Images/btn_AddEvent"; + bitmapAsset = "ToolsModule:btn_AddEvent_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -374,7 +374,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "./Images/btn_Delete"; + bitmapAsset = "ToolsModule:btn_Delete_image"; }; }; }; @@ -623,7 +623,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "./Images/btn_Rewind"; + bitmapAsset = "ToolsModule:btn_Rewind_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -645,7 +645,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "./Images/btn_StepB"; + bitmapAsset = "ToolsModule:btn_StepB_image"; }; new GuiBitmapButtonCtrl(VerveEditorPlayButton) { canSaveDynamicFields = "0"; @@ -667,7 +667,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "./Images/btn_Play"; + bitmapAsset = "ToolsModule:btn_Play_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -689,7 +689,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "./Images/btn_StepF"; + bitmapAsset = "ToolsModule:btn_StepF_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -711,7 +711,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "./Images/btn_Forward"; + bitmapAsset = "ToolsModule:btn_Forward_image"; }; }; new GuiBitmapButtonCtrl() { @@ -734,7 +734,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "./Images/btn_AddL"; + bitmapAsset = "ToolsModule:btn_AddL_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -756,7 +756,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "./Images/btn_AddR"; + bitmapAsset = "ToolsModule:btn_AddR_image"; }; }; }; diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditorGroupBuilderGUI.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditorGroupBuilderGUI.asset.taml new file mode 100644 index 000000000..29b0c89ae --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditorGroupBuilderGUI.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditorGui.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditorGui.asset.taml new file mode 100644 index 000000000..314f31cce --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditorGui.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditorImportPathNodesGUI.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditorImportPathNodesGUI.asset.taml new file mode 100644 index 000000000..c173f655d --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditorImportPathNodesGUI.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditorPreferenceGui.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditorPreferenceGui.asset.taml new file mode 100644 index 000000000..4fd02c0f3 --- /dev/null +++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditorPreferenceGui.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/Fields/main.tscript b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/Fields/main.tscript index 2bfde4966..2acb25bf6 100644 --- a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/Fields/main.tscript +++ b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/Fields/main.tscript @@ -22,4 +22,4 @@ function VerveEditor::InitInspectorFieldScripts() exec( "./TypeVShapeAnimationEnum." @ $TorqueScriptFileExtension ); exec( "./TypeToggleEnum." @ $TorqueScriptFileExtension ); } -VerveEditor::InitInspectorFieldScripts(); \ No newline at end of file +VerveEditor::InitInspectorFieldScripts(); diff --git a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript index bcbc87906..caf6c29b5 100644 --- a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript +++ b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript @@ -17,4 +17,4 @@ function VerveEditor::InitInspectorScripts() exec( "./Fields/main." @ $TorqueScriptFileExtension ); } -VerveEditor::InitInspectorScripts(); \ No newline at end of file +VerveEditor::InitInspectorScripts(); diff --git a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Plugin.tscript b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Plugin.tscript index df7c4efcc..f3532ae8a 100644 --- a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Plugin.tscript +++ b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Plugin.tscript @@ -26,7 +26,7 @@ function VerveEditorPlugin::onWorldEditorStartup( %this ) %tooltip = "Verve Editor (" @ %accel @ ")"; // Add ourselves to the ToolsToolbar - EditorGui.addToToolsToolbar( "VerveEditorPlugin", "VerveEditorPluginPalette", expandFilename( "tools/VerveEditor/GUI/Images/btn_Palette" ), %tooltip ); + EditorGui.addToToolsToolbar( "VerveEditorPlugin", "VerveEditorPluginPalette", "ToolsModule:btn_Palette_n_image", %tooltip ); // Find and Store the Button. %this.ToolbarButton = ToolsToolbarArray.findObjectByInternalName( "VerveEditorPluginPalette", false ); diff --git a/Templates/BaseGame/game/tools/VerveEditor/main.tscript b/Templates/BaseGame/game/tools/VerveEditor/main.tscript index f50360412..45ff8b2d9 100644 --- a/Templates/BaseGame/game/tools/VerveEditor/main.tscript +++ b/Templates/BaseGame/game/tools/VerveEditor/main.tscript @@ -231,4 +231,4 @@ function VerveEditor::Reset() // Stop. $VerveEditor::Controller.Stop(); } -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/animationIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/animationIcon_image.asset.taml new file mode 100644 index 000000000..0d9824fd0 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/animationIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/checkbox.png b/Templates/BaseGame/game/tools/assetBrowser/art/checkbox.png deleted file mode 100644 index 46e0ac959..000000000 Binary files a/Templates/BaseGame/game/tools/assetBrowser/art/checkbox.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/clientScriptIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/clientScriptIcon_image.asset.taml new file mode 100644 index 000000000..e2925dad6 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/clientScriptIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/componentIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/componentIcon_image.asset.taml new file mode 100644 index 000000000..f97327417 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/componentIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/cppIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/cppIcon_image.asset.taml new file mode 100644 index 000000000..afe2c6d98 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/cppIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/datablockIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/datablockIcon_image.asset.taml new file mode 100644 index 000000000..2d01230f9 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/datablockIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/folderIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/folderIcon_image.asset.taml new file mode 100644 index 000000000..982c2cbaa --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/folderIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/gameObjectIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/gameObjectIcon_image.asset.taml new file mode 100644 index 000000000..01db0ff0c --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/gameObjectIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/genericAssetIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/genericAssetIcon_image.asset.taml new file mode 100644 index 000000000..4ff83f51c --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/genericAssetIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/guiIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/guiIcon_image.asset.taml new file mode 100644 index 000000000..3afbd83fb --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/guiIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/levelIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/levelIcon_image.asset.taml new file mode 100644 index 000000000..052f9fab3 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/levelIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/looseFileIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/looseFileIcon_image.asset.taml new file mode 100644 index 000000000..8659c9c12 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/looseFileIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/materialIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/materialIcon_image.asset.taml new file mode 100644 index 000000000..698c5e8c3 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/materialIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/postEffectIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/postEffectIcon_image.asset.taml new file mode 100644 index 000000000..a07b5706b --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/postEffectIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/scriptIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/scriptIcon_image.asset.taml new file mode 100644 index 000000000..5bfb2217e --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/scriptIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/serverScriptIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/serverScriptIcon_image.asset.taml new file mode 100644 index 000000000..6e36ac2b0 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/serverScriptIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/soundIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/soundIcon_image.asset.taml new file mode 100644 index 000000000..2371cdff2 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/soundIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/stateMachineIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/stateMachineIcon_image.asset.taml new file mode 100644 index 000000000..6cdf3adf5 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/stateMachineIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/art/terrainMaterialIcon_image.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/art/terrainMaterialIcon_image.asset.taml new file mode 100644 index 000000000..4a6ef4a57 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/art/terrainMaterialIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml b/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml index 47e260f68..c2256aeb7 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml +++ b/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml @@ -1,156 +1,451 @@ - - - 2 - Seconds - 1 - 1 + + + 2 + Seconds + 1 + 1 - - Col - CollisionMesh - 1 - 1 - CollisionMesh - LOS + + Col + CollisionMesh + 1 + 1 + CollisionMesh + LOS - - 0 - AutoPrune - 1 - 0 + + 0 + AutoPrune + 1 + 0 + 0 - - _image - 1 - _AO,_AMBIENT,_AMBIENTOCCLUSION - _COMP,_COMPOSITE,_PBR,-COMP,-COMPOSITE,-PBR,_ORM,-ORM - 1 - _ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL - 1 - N/A - 1 - 0 - _METAL,_MET,_METALNESS,_METALLIC - _NORMAL,_NORM - _ROUGH,_ROUGHNESS - 1.0 - _SMOOTH,_SMOOTHNESS - Bilinear - 1 + + _image + 1 + _AO,_AMBIENT,_AMBIENTOCCLUSION + _COMP,_COMPOSITE,_PBR,-COMP,-COMPOSITE,-PBR,_ORM,-ORM + 1 + _ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL + 0 + N/A + 1 + 0 + _METAL,_MET,_METALNESS,_METALLIC + _NORMAL,_NORM + _ROUGH,_ROUGHNESS + 1.0 + _SMOOTH,_SMOOTHNESS + Bilinear + 1 - - _mat - 0 - 1 - 1 - 1 - 1 - 1 + + _mat + 0 + 1 + 1 + 1 + 1 + 1 - - _shape - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - TrailingNumber - 0 - 0 - 1 - 0 - Z_AXIS + + _shape + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + TrailingNumber + 0 + 0 + 1 + 0 + Z_AXIS - - 0 - 1.0 - 1.0 + + 0 + 1.0 + 1.0 - - - 2 - Seconds - 1 - 1 + + + 2 + Seconds + 1 + 1 - - Col - CollisionMesh - 1 - 1 - CollisionMesh - LOS + + Col + CollisionMesh + 1 + 1 + CollisionMesh + LOS - - 0 - AutoPrune - 1 - 0 + + 0 + FolderPrefix + 1 + 0 + 1 - - _AO,_AMBIENT,_AMBIENTOCCLUSION - 1 - _ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL - 1 - N/A - 0 - _METAL,_MET,_METALNESS,_METALLIC - _NORMAL,_NORM - _COMP,_COMPOSITE,_PBR,-COMP,-COMPOSITE,-PBR,_ORM,-ORM - _ROUGH,_ROUGHNESS - 1.0 - _SMOOTH,_SMOOTHNESS - Bilinear - 1 + + _image + 1 + _AO,_AMBIENT,_AMBIENTOCCLUSION + _COMP,_COMPOSITE + 1 + _ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL + 0 + N/A + 1 + 0 + _METAL,_MET,_METALNESS,_METALLIC + _NORMAL,_NORM + _ROUGH,_ROUGHNESS + 1.0 + _SMOOTH,_SMOOTHNESS + Bilinear + 1 - - 1 - 1 - 1 - 1 - 1 + + _mat + 1 + 1 + 1 + 1 + 1 + 1 - - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 0 - 1 - 0 - 0 - 0 - TrailingNumber - 0 - 0 - 1 - 0 - Z_AXIS + + _shape + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + TrailingNumber + 0 + 0 + 1 + 0 + Z_AXIS - - 0 - 1.0 - 1.0 + + 0 + 1.0 + 1.0 + + + + + 2 + Seconds + 1 + 1 + + + Col + CollisionMesh + 1 + 1 + CollisionMesh + LOS + + + 0 + AutoPrune + 1 + 0 + 0 + + + _AO,_AMBIENT,_AMBIENTOCCLUSION + 1 + _ALBEDO,_DIFFUSE,_ALB,_DIF,_COLOR,_COL + 1 + N/A + 0 + _METAL,_MET,_METALNESS,_METALLIC + _NORMAL,_NORM + _COMP,_COMPOSITE,_PBR,-COMP,-COMPOSITE,-PBR,_ORM,-ORM + _ROUGH,_ROUGHNESS + 1.0 + _SMOOTH,_SMOOTHNESS + Bilinear + 1 + + + 1 + 1 + 1 + 1 + 1 + + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + TrailingNumber + 0 + 0 + 1 + 0 + Z_AXIS + + + 0 + 1.0 + 1.0 diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser.asset.taml new file mode 100644 index 000000000..8e4c64aba --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowserImportLog.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowserImportLog.asset.taml new file mode 100644 index 000000000..0942ae310 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowserImportLog.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_AddModule.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_AddModule.asset.taml new file mode 100644 index 000000000..9a5a90595 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_AddModule.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_AddPackage.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_AddPackage.asset.taml new file mode 100644 index 000000000..9b004f04b --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_AddPackage.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_SelectModule.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_SelectModule.asset.taml new file mode 100644 index 000000000..544c5e934 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_SelectModule.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_SelectPackage.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_SelectPackage.asset.taml new file mode 100644 index 000000000..f08bbfaa1 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_SelectPackage.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_assetNameEdit.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_assetNameEdit.asset.taml new file mode 100644 index 000000000..b7cf337cb --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_assetNameEdit.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_editAsset.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_editAsset.asset.taml new file mode 100644 index 000000000..453564e89 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_editAsset.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_editModule.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_editModule.asset.taml new file mode 100644 index 000000000..0ddd217a5 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_editModule.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_newAsset.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_newAsset.asset.taml new file mode 100644 index 000000000..4ce34d652 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_newAsset.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_newComponentAsset.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_newComponentAsset.asset.taml new file mode 100644 index 000000000..4b998026e --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_newComponentAsset.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_newFolder.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_newFolder.asset.taml new file mode 100644 index 000000000..7f5e12c04 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetBrowser_newFolder.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetImportCtrl.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetImportCtrl.asset.taml new file mode 100644 index 000000000..f51508d18 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/AssetImportCtrl.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/LooseFileAudit.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/LooseFileAudit.asset.taml new file mode 100644 index 000000000..09aca5a5f --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/LooseFileAudit.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/SelectAssetPath.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/SelectAssetPath.asset.taml new file mode 100644 index 000000000..f5e6e2252 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/SelectAssetPath.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui index 40d772206..92f4358c5 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui @@ -197,7 +197,7 @@ new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "tools/gui/images/stencilIcons/phone.png"; + bitmapAsset = "ToolsModule:phone_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; @@ -225,7 +225,7 @@ }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "tools/gui/images/stencilIcons/plus.png"; + bitmapAsset = "ToolsModule:plus_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; @@ -253,7 +253,7 @@ }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "tools/gui/images/stencilIcons/import.png"; + bitmapAsset = "ToolsModule:import_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; @@ -281,7 +281,7 @@ }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "tools/gui/images/stencilIcons/filter.png"; + bitmapAsset = "ToolsModule:filter_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; @@ -310,7 +310,7 @@ }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "tools/gui/images/stencilIcons/gear.png"; + bitmapAsset = "ToolsModule:gear_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; @@ -339,7 +339,7 @@ }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "tools/gui/images/stencilIcons/warning.png"; + bitmapAsset = "ToolsModule:warning_image"; iconLocation = "Left"; sizeIconToButton = "1"; makeIconSquare = "1"; @@ -469,7 +469,7 @@ command="AssetBrowserFolderSearchFilter.onEdited();"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/stencilIcons/zoom.png"; + bitmapAsset = "ToolsModule:zoom_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -631,7 +631,7 @@ canSaveDynamicFields = "0"; new GuiBitmapButtonCtrl(AssetBrowser_NavigateBackBtn) { - bitmap = "tools/gui/images/folderUp.png"; + bitmapAsset = "ToolsModule:folderUp_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; @@ -657,7 +657,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl(AssetBrowser_NavigateForwardBtn) { - bitmap = "tools/gui/images/folderDown.png"; + bitmapAsset = "ToolsModule:folderDown_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; @@ -758,7 +758,7 @@ canSaveDynamicFields = "0"; new GuiBitmapButtonCtrl(AssetBrowser_VisibilityOptions) { - bitmap = "tools/gui/images/visible"; + bitmapAsset = "ToolsModule:visible_n_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; @@ -814,7 +814,7 @@ command="AssetBrowserSearchFilter.onEdited();"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/stencilIcons/zoom.png"; + bitmapAsset = "ToolsModule:zoom_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -840,7 +840,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/save-icon"; + bitmapAsset = "ToolsModule:save_icon_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -1034,7 +1034,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl(AssetBrowser_ToggleFolderPanel) { - bitmap = "tools/gui/images/stencilIcons/previous.png"; + bitmapAsset = "ToolsModule:previous_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui index 1e4913025..103d48901 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui @@ -95,7 +95,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/iconOpen.png"; + bitmapAsset = "ToolsModule:iconOpen_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; @@ -221,7 +221,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/save-as"; + bitmapAsset = "ToolsModule:save_as_n_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; @@ -504,7 +504,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl(ImportLogButton) { - bitmap = "tools/gui/images/iconInformation.png"; + bitmapAsset = "ToolsModule:iconInformation_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/assetImportConfigEditor.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/assetImportConfigEditor.asset.taml new file mode 100644 index 000000000..5e909e9c7 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/assetImportConfigEditor.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetImportConfigEditor.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/assetImportConfigEditor.gui similarity index 99% rename from Templates/BaseGame/game/tools/assetBrowser/guis/AssetImportConfigEditor.gui rename to Templates/BaseGame/game/tools/assetBrowser/guis/assetImportConfigEditor.gui index 4bffe1234..4eb1432be 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/AssetImportConfigEditor.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/assetImportConfigEditor.gui @@ -198,7 +198,7 @@ canSaveDynamicFields = "0"; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/iconAdd.png"; + bitmapAsset = "ToolsModule:iconAdd_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; @@ -225,7 +225,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/iconDelete.png"; + bitmapAsset = "ToolsModule:iconDelete_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/assetPreviewButtonsTemplate.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/assetPreviewButtonsTemplate.gui deleted file mode 100644 index 2ee3b1cdc..000000000 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/assetPreviewButtonsTemplate.gui +++ /dev/null @@ -1,270 +0,0 @@ -//--- OBJECT WRITE BEGIN --- -%guiContent = new GuiControl(AssetPreviewButtonsTemplate) { - position = "0 0"; - extent = "1024 768"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "1"; - - new GuiControl() { - position = "0 0"; - extent = "100 124"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "ShapeAssetPreviewButton"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiObjectView() { - shapeFile = "data/Blockout_Basics/Walls/DoorWall2x2.fbx"; - mountedNode = "mount0"; - lightColor = "1 1 1 1"; - lightAmbient = "0.5 0.5 0.5 1"; - lightDirection = "0 0.707 -0.707"; - orbitDiststance = "5"; - minOrbitDiststance = "141.715"; - maxOrbitDiststance = "5"; - cameraSpeed = "0.01"; - cameraRotation = "0 0 0"; - cameraZRot = "0"; - forceFOV = "0"; - reflectPriority = "0"; - renderStyle = "standard"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "7 4"; - extent = "80 80"; - minExtent = "8 8"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "shapeAssetView"; - class = "AssetPreviewControl"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiBitmapButtonCtrl() { - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - masked = "0"; - groupNum = "0"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "0 0"; - extent = "80 80"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - internalName="AssetPreviewBorderButton"; - }; - }; - new GuiButtonCtrl() { - groupNum = "0"; - buttonType = "RadioButton"; - useMouseEvents = "1"; - position = "0 0"; - extent = "100 104"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiThumbHighlightButtonProfile"; - visible = "1"; - active = "1"; - command = "AssetBrowser.updateSelection( $ThisControl.getParent().assetName, $ThisControl.getParent().moduleName );"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "\n20540"; - hovertime = "1000"; - isContainer = "0"; - internalName = "Button"; - class = "AssetPreviewButton"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextEditCtrl() { - historySize = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - password = "0"; - passwordMask = "*"; - text = "DoorWall2x2"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 84"; - extent = "100 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextEditProfile"; - visible = "1"; - active = "0"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "AssetNameLabel"; - class = "AssetNameField"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiControl() { - position = "102 0"; - extent = "100 124"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "GeneralAssetPreviewButton"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiBitmapButtonCtrl() { - bitmap = "Data/Blockout_Basics/Walls/WallGrid2x2_Albedo.png"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "0"; - masked = "0"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "10 4"; - extent = "80 80"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "assetPreviewImage"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiBitmapButtonCtrl() { - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - masked = "0"; - groupNum = "0"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "0 0"; - extent = "80 80"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - internalName="AssetPreviewBorderButton"; - }; - }; - new GuiButtonCtrl() { - groupNum = "0"; - buttonType = "RadioButton"; - useMouseEvents = "1"; - position = "0 0"; - extent = "100 104"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiThumbHighlightButtonProfile"; - visible = "1"; - active = "1"; - command = "AssetBrowser.updateSelection( $ThisControl.getParent().assetName, $ThisControl.getParent().moduleName );"; - tooltipProfile = "GuiToolTipProfile"; - tooltip = "\n20550"; - hovertime = "1000"; - isContainer = "0"; - internalName = "Button"; - class = "AssetPreviewButton"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextEditCtrl() { - historySize = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - password = "0"; - passwordMask = "*"; - text = "WallGrid2x2"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "0 84"; - extent = "100 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "GuiTextEditProfile"; - visible = "1"; - active = "0"; - tooltipProfile = "GuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - internalName = "AssetNameLabel"; - class = "AssetNameField"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; -}; -//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/createNewCollectionSetCtrl.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/createNewCollectionSetCtrl.asset.taml new file mode 100644 index 000000000..75cc65e26 --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/createNewCollectionSetCtrl.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/gameObjectCreator.asset.taml b/Templates/BaseGame/game/tools/assetBrowser/guis/gameObjectCreator.asset.taml new file mode 100644 index 000000000..65769925b --- /dev/null +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/gameObjectCreator.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/GameObjectCreator.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/gameObjectCreator.gui similarity index 99% rename from Templates/BaseGame/game/tools/assetBrowser/guis/GameObjectCreator.gui rename to Templates/BaseGame/game/tools/assetBrowser/guis/gameObjectCreator.gui index 6ade66e95..ade837912 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/GameObjectCreator.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/gameObjectCreator.gui @@ -132,7 +132,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl(GameObjectCreatorPkgBtn) { - bitmap = "tools/gui/images/iconAdd.png"; + bitmapAsset = "ToolsModule:iconAdd_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/newAsset.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/newAsset.gui index e7efb40d4..cd9cc378b 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/newAsset.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/newAsset.gui @@ -119,7 +119,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/iconOpen.png"; + bitmapAsset = "ToolsModule:iconOpen_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/newComponentAsset.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/newComponentAsset.gui index 37e6fc4a1..0a44d213e 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/newComponentAsset.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/newComponentAsset.gui @@ -98,7 +98,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/iconAdd.png"; + bitmapAsset = "ToolsModule:iconAdd_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/selectModule.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/selectModule.gui index ed907fbd9..95bf9b399 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/selectModule.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/selectModule.gui @@ -75,7 +75,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/iconAdd.png"; + bitmapAsset = "ToolsModule:iconAdd_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/selectPackage.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/selectPackage.gui index c31dbf53e..abf0c48f4 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/selectPackage.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/selectPackage.gui @@ -75,7 +75,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/iconAdd.png"; + bitmapAsset = "ToolsModule:iconAdd_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/selectPath.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/selectPath.gui index 21949c518..ea8b37b9f 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/selectPath.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/selectPath.gui @@ -96,7 +96,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/clear-icon"; + bitmapAsset = "ToolsModule:clear_icon_n_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; diff --git a/Templates/BaseGame/game/tools/assetBrowser/main.tscript b/Templates/BaseGame/game/tools/assetBrowser/main.tscript index 7ac0ced40..2f284a16d 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/main.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/main.tscript @@ -64,8 +64,6 @@ function initializeAssetBrowser() exec("./guis/selectModule.gui"); exec("./guis/selectPath.gui"); exec("./guis/editModule.gui"); - exec("./guis/importTemplateModules.gui"); - exec("./guis/assetPreviewButtonsTemplate.gui"); exec("./guis/newFolder.gui"); exec("./guis/assetImportLog.gui"); exec("./guis/looseFileAudit.gui"); @@ -202,4 +200,4 @@ function TSStatic::onConstructField(%this, %fieldName, %fieldLabel, %fieldTypeNa %makeCommand = %this @ ".build" @ %fieldTypeName @ "Field(\""@ %fieldName @ "\",\"" @ %fieldLabel @ "\",\"" @ %fieldDesc @ "\",\"" @ %fieldDefaultVal @ "\",\"" @ %fieldDataVals @ "\",\"" @ %inspector @ "." @ %callbackName @ "\",\"" @ %ownerObj @"\");"; eval(%makeCommand); -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript index 3831adf2e..d69d4af71 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript @@ -3,7 +3,6 @@ new SimGroup(AssetBrowserPreviewCache); //AssetBrowser.addToolbarButton function AssetBrowser::addToolbarButton(%this) { - %filename = expandFilename("tools/gui/images/stencilIcons/menuGrid"); %button = new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; internalName = AssetBrowserBtn; @@ -21,7 +20,7 @@ function AssetBrowser::addToolbarButton(%this) tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Asset Browser"; hovertime = "750"; - bitmap = %filename; + bitmapAsset = "ToolsModule:menuGrid_n_image"; bitmapMode = "Stretched"; buttonType = "PushButton"; groupNum = "0"; @@ -453,15 +452,6 @@ function AssetBrowser::buildAssetPreview( %this, %asset, %moduleName ) %doubleClickCommand = "AssetBrowser.editAsset( "@%assetDesc@" );"; - /*if(%assetType $= "ShapeAsset") - { - %previewButton = AssetPreviewButtonsTemplate-->ShapeAssetPreviewButton.deepClone(); - } - else - { - %previewButton = AssetPreviewButtonsTemplate-->GeneralAssetPreviewButton.deepClone(); - }*/ - %textBottomPad = 20; %previewButton = new GuiIconButtonCtrl() @@ -517,7 +507,7 @@ function AssetBrowser::buildAssetPreview( %this, %asset, %moduleName ) %previewButton.moduleName = %moduleName; %previewButton.assetType = %assetType; - %previewButton.iconBitmap = %this.previewData.previewImage; + %previewButton.bitmapAsset = %this.previewData.previewImage; %previewButton.profile = "AssetBrowserPreview" @ %previewButton.assetType; %previewButton.tooltip = %this.previewData.tooltip; @@ -2151,7 +2141,7 @@ function AssetBrowser::updateNavigationBreadcrumb(%this, %address) %folderSpacerButton = new GuiBitmapButtonCtrl() { profile = ToolsGuiButtonProfile; - bitmap = "tools/gui/images/rightArrowWhite"; + bitmapAsset = "ToolsModule:rightArrowWhite_image"; bitmapMode = "Centered"; extent = "25" SPC AssetBrowser_BreadcrumbBar.extent.y; //command = "AssetBrowser.navigateTo(\"" @ %rebuiltPath @ "\");"; @@ -2584,4 +2574,4 @@ function AssetBrowser::importLooseFiles(%this) { echo("Adding loose files at directory " @ %this.dirHandler.currentAddress); LooseFileAuditWindow.showDialog(%this.dirHandler.currentAddress); -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfig.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfig.tscript index 97bd9b8db..48df680f8 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfig.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfig.tscript @@ -31,7 +31,7 @@ function setupImportConfigSettingsList() { new ArrayObject(ImportAssetConfigSettingsList); - ImportAssetConfigSettingsList.addNewConfigSetting("General/DuplicatAutoResolution", "Duplicate Asset Auto-Resolution Action", "list", "", "AutoPrune", "None,AutoPrune,AutoRename"); + ImportAssetConfigSettingsList.addNewConfigSetting("General/DuplicateAutoResolution", "Duplicate Asset Auto-Resolution Action", "list", "", "AutoRename", "None,AutoPrune,AutoRename,FolderPrefix"); ImportAssetConfigSettingsList.addNewConfigSetting("General/WarningsAsErrors", "Warnings As Errors", "bool", "", "0", "", ""); ImportAssetConfigSettingsList.addNewConfigSetting("General/PreventImportWithErrors", "Prevent Import With Errors", "bool", "", "1", "", ""); ImportAssetConfigSettingsList.addNewConfigSetting("General/AutomaticallyPromptMissingFiles", "Automatically Prompt Missing Files", "bool", "", "0", "", ""); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/component.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/component.tscript index 8d0b6eaee..3e3c08fd2 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/component.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/component.tscript @@ -140,9 +140,9 @@ function AssetBrowser::buildComponentAssetPreview(%this, %assetDef, %previewData %previewData.assetPath = %assetDef.scriptFile; %previewData.doubleClickCommand = "EditorOpenFileInTorsion( "@%previewData.assetPath@", 0 );"; - %previewData.previewImage = "tools/assetBrowser/art/componentIcon"; + %previewData.previewImage = "ToolsModule:componentIcon_image"; %previewData.assetFriendlyName = %assetDef.friendlyName; %previewData.assetDesc = %assetDef.description; %previewData.tooltip = %assetDef.friendlyName @ "\n" @ %assetDef; -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.tscript index 4ae71361b..4fdd7b173 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/cpp.tscript @@ -4,7 +4,7 @@ function AssetBrowser::buildCppPreview(%this, %assetDef, %previewData) %previewData.assetPath = %assetDef.codeFilePath; %previewData.doubleClickCommand = "echo(\"Not yet implemented to edit C++ files from the editor\");";//"EditorOpenFileInTorsion( "@%previewData.assetPath@", 0 );"; - %previewData.previewImage = "tools/assetBrowser/art/cppIcon"; + %previewData.previewImage = "ToolsModule:cppIcon_image"; %previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/creatorObj.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/creatorObj.tscript index 0cdeb5d0d..3c90e1782 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/creatorObj.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/creatorObj.tscript @@ -7,7 +7,7 @@ function AssetBrowser::buildCreatorPreview(%this, %assetDef, %previewData) %previewData.assetName = %name; %previewData.assetPath = ""; - %previewData.previewImage = "tools/classIcons/" @ %class; + %previewData.previewImage = "ToolsModule:" @ %class @ "_image"; //%previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetDesc = %assetDef; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/datablockObjects.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/datablockObjects.tscript index 2c46ca1e6..b13b0b470 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/datablockObjects.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/datablockObjects.tscript @@ -45,7 +45,7 @@ function AssetBrowser::buildDatablockPreview(%this, %assetDef, %previewData) %previewData.assetName = %assetDef; %previewData.assetPath = ""; - %previewData.previewImage = "tools/assetBrowser/art/datablockIcon"; + %previewData.previewImage = "ToolsModule:datablockIcon_image"; //Lets see if we have a icon for specifically for this datablock type %dataClass = %assetDef.getClassName(); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.tscript index 5c8bcc10a..33dd9a98b 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/folder.tscript @@ -58,7 +58,7 @@ function AssetBrowser::buildFolderPreview(%this, %assetDef, %previewData) %previewData.assetName = %assetDef.assetName; %previewData.assetPath = %assetDef.dirPath; - %previewData.previewImage = "tools/assetBrowser/art/folderIcon"; + %previewData.previewImage = "ToolsModule:FolderIcon_image"; //%previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gameObject.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gameObject.tscript index 617c6f8ba..90d9a4a0e 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gameObject.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gameObject.tscript @@ -265,7 +265,7 @@ function AssetBrowser::buildGameObjectAssetPreview(%this, %assetDef, %previewDat %previewData.assetPath = %assetDef.scriptFile; %previewData.doubleClickCommand = "EditorOpenFileInTorsion( "@%previewData.assetPath@", 0 );"; - %previewData.previewImage = "tools/assetBrowser/art/gameObjectIcon"; + %previewData.previewImage = "ToolsModule:gameObjectIcon_image"; %previewData.assetFriendlyName = %assetDef.gameObjectName; %previewData.assetDesc = %assetDef.description; @@ -293,4 +293,4 @@ function GuiInspectorTypeGameObjectAssetPtr::onClick( %this, %fieldName ) //We've gotta be trying to create a GameObject, so kick that off AssetBrowser.createGameObjectAsset(); } -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.tscript index c4e2b99c7..f30b42483 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.tscript @@ -171,9 +171,9 @@ function AssetBrowser::buildGUIAssetPreview(%this, %assetDef, %previewData) %previewData.assetPath = %assetDef.GUIFilePath; %previewData.doubleClickCommand = ""; - %previewData.previewImage = "tools/assetBrowser/art/guiIcon"; + %previewData.previewImage = "ToolsModule:guiIcon_image"; %previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetDesc = %assetDef.description; %previewData.tooltip = %assetDef.assetName; -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.tscript index a2f6291c2..b306c9300 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/image.tscript @@ -172,15 +172,55 @@ function AssetBrowser::importImageAsset(%this, %assetItem) function AssetBrowser::buildImageAssetPreview(%this, %assetDef, %previewData) { + %module = %this.dirHandler.getModuleFromAddress(makeRelativePath(filePath(%assetDef.getImagePath()))); + %previewPath = "tools/resources/previewCache/" @ %module.moduleId @ "/"; + + if(!IsDirectory(%previewPath)) + { + %this.dirHandler.createFolder(%previewPath); + } + + %generatePreview = false; + + %previewFilePath = %previewPath @ %assetDef.assetName @ "_Preview.png"; + if(!isFile(%previewFilePath) || (compareFileTimes(%assetDef.getImagePath(), %previewFilePath) == 1)) + { + %generatePreview = true; + } + + %previewAssetName = %module.moduleId @ "_" @ %assetDef.assetName @ "_PreviewImage"; + + if(%generatePreview) + { + displayEditorLoadingGui("Generating Image Asset Preview..."); + + %success = saveScaledImage(%assetDef.getImagePath(), %previewFilePath); + + %previewAsset = new ImageAsset() + { + assetName = %previewAssetName; + versionId = 1; + imageFile = fileName(%previewFilePath); + }; + + %previewImgAssetPath = %previewPath @ %previewAsset.assetName @ ".asset.taml"; + %assetImportSuccessful = TAMLWrite(%previewAsset, %previewImgAssetPath); + + %toolsModuleDef = ModuleDatabase.findModule("ToolsModule",1); + + %success = AssetDatabase.addDeclaredAsset(%toolsModuleDef, %previewImgAssetPath); + + hideEditorLoadingGui(); + } + + //Revalidate. If it didn't work, just use the default placeholder one + if(!isFile(%previewFilePath)) + %previewAssetName = "ToolsModule:genericAssetIcon_image"; + %previewData.assetName = %assetDef.assetName; %previewData.assetPath = %assetDef.scriptFile; - //%previewData.doubleClickCommand = "EditorOpenFileInTorsion( "@%previewData.assetPath@", 0 );"; - %imageFilePath = %assetDef.getImagePath(); - if(isFile(%imageFilePath)) - %previewData.previewImage = %imageFilePath; - else - %previewData.previewImage = "core/rendering/images/unavailable"; + %previewData.previewImage = "ToolsModule:" @ %previewAssetName;//%assetDef.fileName; %previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.tscript index d57f1594c..9f1a62a40 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/level.tscript @@ -142,7 +142,7 @@ function AssetBrowser::buildLevelAssetPreview(%this, %assetDef, %previewData) if(isFile(%levelPreviewImage)) %previewData.previewImage = %levelPreviewImage; else - %previewData.previewImage = "tools/assetBrowser/art/levelIcon"; + %previewData.previewImage = "ToolsModule:levelIcon_image"; %previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/looseFiles.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/looseFiles.tscript index d209e2f06..2c036c064 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/looseFiles.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/looseFiles.tscript @@ -4,7 +4,7 @@ function AssetBrowser::buildLooseFilePreview(%this, %assetDef, %previewData) %previewData.assetName = %assetDef.assetName; %previewData.assetPath = %fullPath; - %previewData.previewImage = "tools/assetBrowser/art/looseFileIcon"; + %previewData.previewImage = "ToolsModule:looseFileIcon_image"; //%previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.tscript index f4ba45999..a61bd4d2d 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/material.tscript @@ -8,18 +8,21 @@ function AssetBrowser::createMaterialAsset(%this) %assetPath = AssetBrowser.dirHandler.currentAddress @ "/"; %tamlpath = %assetPath @ %assetName @ ".asset.taml"; - %sgfPath = %assetPath @ %assetName @ ".sgf"; + %scriptPath = %assetPath @ %assetName @ "." @ $TorqueScriptFileExtension; %asset = new MaterialAsset() { AssetName = %assetName; versionId = 1; - shaderData = ""; - shaderGraph = %sgfPath; + materialDefinitionName = %assetName; + scriptFile = %assetName @ "." @ $TorqueScriptFileExtension; }; TamlWrite(%asset, %tamlpath); + %mat = new Material(%assetName); + %mat.save(%scriptPath); + %moduleDef = ModuleDatabase.findModule(%moduleName, 1); AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath); @@ -43,18 +46,6 @@ function AssetBrowser::editMaterialAsset(%this, %assetDef) MaterialEditorGui.setActiveMaterial( %assetDef.materialDefinitionName ); AssetBrowser.hideDialog(); - - // - // - /*%assetDef.materialDefinitionName.reload(); - $Tools::materialEditorList = ""; - EWorldEditor.clearSelection(); - MaterialEditorGui.currentObject = 0; - MaterialEditorGui.currentMode = "asset"; - MaterialEditorGui.currentMaterial = %assetDef.materialDefinitionName; - MaterialEditorGui.setActiveMaterial( %assetDef.materialDefinitionName); - EditorGui.setEditor(MaterialEditorPlugin); - AssetBrowser.hideDialog();*/ } //Renames the asset @@ -347,7 +338,7 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem) %depAssetType = %childAssetItem.assetType; if(%depAssetType $= "ImageAsset") { - %matSet = "%newAsset.imageMap"@%dependencySlotId@"=\"@Asset="@%moduleName@":"@%childAssetItem.assetName@"\";"; + %matSet = "%newAsset.imageMap"@%dependencySlotId@"=\"@asset="@%moduleName@":"@%childAssetItem.assetName@"\";"; eval(%matSet); %dependencySlotId++; } @@ -432,39 +423,77 @@ function AssetBrowser::importMaterialAsset(%this, %assetItem) function AssetBrowser::buildMaterialAssetPreview(%this, %assetDef, %previewData) { + %module = %this.dirHandler.getModuleFromAddress(makeRelativePath(filePath(%assetDef.getScriptPath()))); + %previewPath = "tools/resources/previewCache/" @ %module.moduleId @ "/"; + + if(!IsDirectory(%previewPath)) + { + %this.dirHandler.createFolder(%previewPath); + } + + %generatePreview = false; + + %previewFilePath = %previewPath @ %assetDef.assetName @ "_Preview.png"; + if(!isFile(%previewFilePath) || (compareFileTimes(%assetDef.getImagePath(), %previewFilePath) == 1)) + { + %generatePreview = true; + } + + %previewAssetName = %module.moduleId @ "_" @ %assetDef.assetName @ "_PreviewImage"; + + if(%generatePreview) + { + displayEditorLoadingGui("Generating Material Asset Preview..."); + + if(isObject(%assetDef.materialDefinitionName)) + { + if(isFile(%assetDef.materialDefinitionName.getDiffuseMap(0))) + { + %difMap = %assetDef.materialDefinitionName.getDiffuseMap(0); + } + else if(%assetDef.materialDefinitionName.getDiffuseMapAsset(0) !$= "") + { + %imgAsset = AssetDatabase.acquireAsset(%assetDef.materialDefinitionName.getDiffuseMapAsset(0)); + %difMap = %imgAsset.getImagePath(); + } + + %success = saveScaledImage(%difMap, %previewFilePath); + + %previewAsset = new ImageAsset() + { + assetName = %previewAssetName; + versionId = 1; + imageFile = fileName(%previewFilePath); + }; + + %previewImgAssetPath = %previewPath @ %previewAsset.assetName @ ".asset.taml"; + %assetImportSuccessful = TAMLWrite(%previewAsset, %previewImgAssetPath); + + %toolsModuleDef = ModuleDatabase.findModule("ToolsModule",1); + + %success = AssetDatabase.addDeclaredAsset(%toolsModuleDef, %previewImgAssetPath); + } + + hideEditorLoadingGui(); + } + + //Revalidate. If it didn't work, just use the default placeholder one + if(!isFile(%previewFilePath)) + %previewAssetName = "ToolsModule:genericAssetIcon_image"; + %previewData.assetName = %assetDef.assetName; %previewData.assetPath = %assetDef.scriptFile; + + %previewData.previewImage = "ToolsModule:" @ %previewAssetName;//%assetDef.fileName; + + %previewData.assetFriendlyName = %assetDef.assetName; + %previewData.assetDesc = %assetDef.description; - //Lotta prepwork - /*%previewData.doubleClickCommand = %assetDef@".materialDefinitionName.reload(); " - @ "$Tools::materialEditorList = \"\";" - @ "EWorldEditor.clearSelection();" - @ "MaterialEditorGui.currentObject = 0;" - @ "MaterialEditorGui.currentMode = \"asset\";" - @ "MaterialEditorGui.currentMaterial = "@%assetDef@".materialDefinitionName;" - @ "MaterialEditorGui.setActiveMaterial( "@%assetDef@".materialDefinitionName );" - @ "EditorGui.setEditor(MaterialEditorPlugin); " - @ "AssetBrowser.hideDialog();";*/ - if(%this.selectMode) %previewData.doubleClickCommand = "AssetBrowser.selectAsset( AssetBrowser.selectedAsset );"; else %previewData.doubleClickCommand = "AssetBrowser.editAsset( "@%assetDef@" );"; - %test = %assetDef.materialDefinitionName.diffuseMapAsset[0]; - - if(isFile(%assetDef.materialDefinitionName.diffuseMap[0])) - %previewData.previewImage = %assetDef.materialDefinitionName.diffuseMap[0]; - else if(%assetDef.materialDefinitionName.diffuseMapAsset[0] !$= "") - { - %imgAsset = AssetDatabase.acquireAsset(%assetDef.materialDefinitionName.diffuseMapAsset[0]); - %previewData.previewImage = %imgAsset.getImagePath(); - } - else - %previewData.previewImage = "tools/assetBrowser/art/materialIcon"; - - %previewData.assetFriendlyName = %assetDef.assetName; - %previewData.assetDesc = %assetDef.description; %previewData.tooltip = "Asset Name: " @ %assetDef.assetName @ "\n" @ "Asset Type: Material Asset\n" @ "Asset Definition ID: " @ %assetDef; @@ -490,6 +519,12 @@ function AssetBrowser::onMaterialAssetEditorDropped(%this, %assetDef, %position) %obj.materialSlot0 = %assetDef.getAssetId(); echo("MaterialSlot0 set to " @ %assetDef.getAssetId()); } + else if(%obj.isField("materialAsset")) + { + %obj.materialAsset = %assetDef.getAssetId(); + echo("materialAsset set to " @ %assetDef.getAssetId()); + } + %obj.inspectPostApply(); } EWorldEditor.isDirty = true; @@ -510,9 +545,9 @@ function GuiInspectorTypeMaterialAssetPtr::onControlDropped( %this, %payload, %p if(%assetType $= "MaterialAsset") { - //%assetDef = AssetDatabase.acquireAsset(%module @ ":" @ %assetName); - - %this.setMaterialAsset(%module @ ":" @ %assetName); + %cmd = %this @ ".apply(\""@ %module @ ":" @ %assetName @ "\");"; + echo("Changing asset via the " @ %cmd @ " command"); + eval(%cmd); } EWorldEditor.isDirty = true; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/postFX.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/postFX.tscript index 06ca879f6..f5f8a3af7 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/postFX.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/postFX.tscript @@ -161,7 +161,7 @@ function AssetBrowser::buildPostEffectAssetPreview(%this, %assetDef, %previewDat %previewData.assetPath = %assetDef.scriptFilePath; %previewData.doubleClickCommand = ""; - %previewData.previewImage = "tools/assetBrowser/art/postEffectIcon"; + %previewData.previewImage = "ToolsModule:postEffectIcon_image"; %previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/prefab.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/prefab.tscript index a2a44568d..a13711aae 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/prefab.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/prefab.tscript @@ -21,7 +21,7 @@ function AssetBrowser::buildPrefabPreview(%this, %assetDef, %previewData) %previewData.assetName = %assetDef.assetName; %previewData.assetPath = %fullPath; - %previewData.previewImage = "tools/assetBrowser/art/genericAssetIcon"; + %previewData.previewImage = "ToolsModule:genericAssetIcon_image"; //%previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.tscript index c7a226d49..c3b978318 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/script.tscript @@ -97,9 +97,9 @@ function AssetBrowser::buildTScriptPreview(%this, %assetDef, %previewData) %previewData.doubleClickCommand = "EditorOpenFileInTorsion( \""@%previewData.assetPath@"\", 0 );"; if(%assetDef.isServerSide) - %previewData.previewImage = "tools/assetBrowser/art/serverScriptIcon"; + %previewData.previewImage = "ToolsModule:serverScriptIcon_image"; else - %previewData.previewImage = "tools/assetBrowser/art/clien" @ $TorqueScriptFileExtension @ "Icon"; + %previewData.previewImage = "ToolsModule:clientScriptIcon_image"; %previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.tscript index dd6310c74..e4687faf1 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shape.tscript @@ -143,13 +143,13 @@ function AssetBrowser::importShapeAsset(%this, %assetItem) %depAssetType = %childAssetItem.assetType; if(%childAssetItem.assetType $= "MaterialAsset") { - %matSet = "%newAsset.materialSlot"@%dependencySlotId@"=\"@Asset="@%moduleName@":"@%childAssetItem.assetName@"\";"; + %matSet = "%newAsset.materialSlot"@%dependencySlotId@"=\"@asset="@%moduleName@":"@%childAssetItem.assetName@"\";"; eval(%matSet); %dependencySlotId++; } else if(%depAssetType $= "AnimationAsset") { - %matSet = "%newAsset.animationSequence"@%dependencySlotId@"=\"@Asset="@%moduleName@":"@%childAssetItem.assetName@"\";"; + %matSet = "%newAsset.animationSequence"@%dependencySlotId@"=\"@asset="@%moduleName@":"@%childAssetItem.assetName@"\";"; eval(%matSet); %dependencySlotId++; } @@ -245,15 +245,24 @@ function AssetBrowser::importShapeAsset(%this, %assetItem) function AssetBrowser::buildShapeAssetPreview(%this, %assetDef, %previewData) { %module = %this.dirHandler.getModuleFromAddress(makeRelativePath(filePath(%assetDef.getShapeFile()))); - %previewPath = "tools/resources/shapePreviewCache/" @ %module.moduleId @ "/"; + %previewPath = "tools/resources/previewCache/" @ %module.moduleId @ "/"; if(!IsDirectory(%previewPath)) { %this.dirHandler.createFolder(%previewPath); } - %previewPath = %previewPath @ %assetDef.assetName @ "_Preview.png"; - if(!isFile(%previewPath)) + %generatePreview = false; + + %previewFilePath = %previewPath @ %assetDef.assetName @ "_Preview.png"; + if(!isFile(%previewFilePath) || (compareFileTimes(%assetDef.getShapeFile(), %previewFilePath) == 1)) + { + %generatePreview = true; + } + + %previewAssetName = %module.moduleId @ "_" @ %assetDef.assetName @ "_PreviewImage"; + + if(%generatePreview) { displayEditorLoadingGui("Generating Shape Asset Preview..."); @@ -265,7 +274,7 @@ function AssetBrowser::buildShapeAssetPreview(%this, %assetDef, %previewData) %filePath = %assetDef.generateCachedPreviewImage(); %imposterPath = %filePath @ ".imposter.png"; - pathCopy(%imposterPath, %previewPath); + pathCopy(%imposterPath, %previewFilePath); //cleanup fileDelete(%imposterPath); @@ -275,17 +284,31 @@ function AssetBrowser::buildShapeAssetPreview(%this, %assetDef, %previewData) $TSLastDetail::dumpImposters = %oldImposterSetting; + %previewAsset = new ImageAsset() + { + assetName = %previewAssetName; + versionId = 1; + imageFile = fileName(%previewFilePath); + }; + + %previewImgAssetPath = %previewPath @ %previewAsset.assetName @ ".asset.taml"; + %assetImportSuccessful = TAMLWrite(%previewAsset, %previewImgAssetPath); + + %toolsModuleDef = ModuleDatabase.findModule("ToolsModule",1); + + %success = AssetDatabase.addDeclaredAsset(%toolsModuleDef, %previewImgAssetPath); + hideEditorLoadingGui(); } //Revalidate. If it didn't work, just use the default placeholder one - if(!isFile(%previewPath)) - %previewPath = "tools/assetBrowser/art/genericAssetIcon"; + if(!isFile(%previewFilePath)) + %previewAssetName = "ToolsModule:genericAssetIcon_image"; %previewData.assetName = %assetDef.assetName; %previewData.assetPath = %assetDef.fileName; - %previewData.previewImage = %previewPath;//%assetDef.fileName; + %previewData.previewImage = "ToolsModule:" @ %previewAssetName;//%assetDef.fileName; %previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shapeAnimation.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shapeAnimation.tscript index 1f418876b..2c72ce8c7 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shapeAnimation.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/shapeAnimation.tscript @@ -47,7 +47,7 @@ function AssetBrowser::buildShapeAnimationAssetPreview(%this, %assetDef, %previe @ "EditorGui.setEditor(MaterialEditorPlugin); " @ "AssetBrowser.hideDialog();";*/ - %previewData.previewImage = "tools/assetBrowser/art/animationIcon"; + %previewData.previewImage = "ToolsModule:animationIcon_image"; %previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/sound.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/sound.tscript index 7c11680fb..a3132d213 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/sound.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/sound.tscript @@ -9,7 +9,7 @@ function AssetBrowser::buildSoundAssetPreview(%this, %assetDef, %previewData) else %previewData.doubleClickCommand = "AssetBrowser.editAsset( "@%assetDef@" );"; - %previewData.previewImage = "tools/assetBrowser/art/soundIcon"; + %previewData.previewImage = "ToolsModule:soundIcon_image"; %previewData.assetFriendlyName = %assetDef.assetName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/stateMachine.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/stateMachine.tscript index d55b926df..1a18b7ed1 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/stateMachine.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/stateMachine.tscript @@ -166,7 +166,7 @@ function AssetBrowser::buildStateMachineAssetPreview(%this, %assetDef, %previewD %previewData.assetPath = %assetDef.scriptFile; %previewData.doubleClickCommand = "AssetBrowser.editStateMachineAsset( "@%assetDef@" );"; - %previewData.previewImage = "tools/assetBrowser/art/stateMachineIcon"; + %previewData.previewImage = "ToolsModule:stateMachineIcon_image"; %previewData.assetFriendlyName = %assetDef.friendlyName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.tscript index cacee3655..64e0eb7c6 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.tscript @@ -162,7 +162,7 @@ function AssetBrowser::buildTerrainAssetPreview(%this, %assetDef, %previewData) %previewData.assetPath = ""; %previewData.doubleClickCommand = ""; - %previewData.previewImage = "tools/assetBrowser/art/gameObjectIcon"; + %previewData.previewImage = "ToolsModule:gameObjectIcon_image"; %previewData.assetFriendlyName = %assetDef.gameObjectName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.tscript index fb53a25fa..51bc88d54 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrainMaterial.tscript @@ -97,7 +97,7 @@ function AssetBrowser::buildTerrainMaterialAssetPreview(%this, %assetDef, %previ %previewData.assetPath = ""; %previewData.doubleClickCommand = ""; - %previewData.previewImage = "tools/assetBrowser/art/terrainMaterialIcon"; + %previewData.previewImage = "ToolsModule:terrainMaterialIcon_image"; %previewData.assetFriendlyName = %assetDef.gameObjectName; %previewData.assetDesc = %assetDef.description; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/directoryHandling.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/directoryHandling.tscript index f40904ea8..8c1782108 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/directoryHandling.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/directoryHandling.tscript @@ -114,7 +114,7 @@ function directoryHandler::navigateTo(%this, %address, %historyNav, %selectionNa %folderSpacerButton = new GuiBitmapButtonCtrl() { profile = ToolsGuiButtonProfile; - bitmap = "tools/gui/images/rightArrowWhite"; + bitmapAsset = "ToolsModule:rightArrowWhite_image"; bitmapMode = "Centered"; extent = "25" SPC AssetBrowser_BreadcrumbBar.extent.y; //command = "AssetBrowser.navigateTo(\"" @ %rebuiltPath @ "\");"; @@ -188,8 +188,8 @@ function directoryHandler::getModuleFromAddress(%this, %address) %modulePath = makeRelativePath(%module.ModulePath); //We don't want to add stuff directly to the root core or tools modules - if(%modulePath $= "Core" || %modulePath $= "Tools") - continue; + //if(%modulePath $= "Core" || %modulePath $= "Tools") + // continue; if(startsWith(%address, %modulePath)) { @@ -338,4 +338,4 @@ function directoryHandler::copyFolder(%this, %fromFolder, %toFolder) } return true; -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.tscript index 82385f25f..856ba7d11 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/editAsset.tscript @@ -28,7 +28,7 @@ function AssetBrowser::editAsset(%this, %assetDef) } } } - else if(!isObject(%assetDef) && strchrpos(%assetDef, ":") != -1) + else if(AssetDatabase.isDeclaredAsset(%assetDef)) { //Turns out we were passed an assetid, not an asset definition. //Grab the asset def from that diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/selectModule.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/selectModule.tscript index 4b34f4551..54358a8e8 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/selectModule.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/selectModule.tscript @@ -1,3 +1,9 @@ +function AssetBrowser_SelectModule::showDialog(%this, %callback) +{ + AssetBrowser_SelectModule.callback = %callback; + Canvas.pushDialog(AssetBrowser_SelectModule); +} + function AssetBrowser_SelectModule::onWake(%this) { AssetBrowser_SelectModuleWindow-->ModuleList.refresh(); diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/templateFiles/module.tscript.template b/Templates/BaseGame/game/tools/assetBrowser/scripts/templateFiles/module.tscript.template index bcc092757..4a9eafc7d 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/templateFiles/module.tscript.template +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/templateFiles/module.tscript.template @@ -14,6 +14,17 @@ function @@::initServer(%this) //This is called when the server is created for an actual game/map to be played function @@::onCreateGameServer(%this) { + //These are common managed data files. For any datablock-based stuff that gets generated by the editors + //(that doesn't have a specific associated file, like data for a player class) will go into these. + //So we'll register them now if they exist. + if(isFile("./scripts/managedData/managedDatablocks." @ $TorqueScriptFileExtension)) + %this.registerDatablock("./scripts/managedData/managedDatablocks"); + if(isFile("./scripts/managedData/managedForestItemData." @ $TorqueScriptFileExtension)) + %this.registerDatablock("./scripts/managedData/managedForestItemData"); + if(isFile("./scripts/managedData/managedParticleEmitterData." @ $TorqueScriptFileExtension)) + %this.registerDatablock("./scripts/managedData/managedParticleEmitterData"); + if(isFile("./scripts/managedData/managedParticleData." @ $TorqueScriptFileExtension)) + %this.registerDatablock("./scripts/managedData/managedParticleData"); } //This is called when the server is shut down due to the game/map being exited diff --git a/Templates/BaseGame/game/tools/base/images/512_black_image.asset.taml b/Templates/BaseGame/game/tools/base/images/512_black_image.asset.taml new file mode 100644 index 000000000..53eb58666 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/512_black_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/512_blue_image.asset.taml b/Templates/BaseGame/game/tools/base/images/512_blue_image.asset.taml new file mode 100644 index 000000000..02ad7ec24 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/512_blue_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/512_forestgreen_image.asset.taml b/Templates/BaseGame/game/tools/base/images/512_forestgreen_image.asset.taml new file mode 100644 index 000000000..cbe3b11a4 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/512_forestgreen_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/512_forestgreen_lines_image.asset.taml b/Templates/BaseGame/game/tools/base/images/512_forestgreen_lines_image.asset.taml new file mode 100644 index 000000000..40c3e209d --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/512_forestgreen_lines_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/512_green_image.asset.taml b/Templates/BaseGame/game/tools/base/images/512_green_image.asset.taml new file mode 100644 index 000000000..97e9a083f --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/512_green_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/512_grey_base_image.asset.taml b/Templates/BaseGame/game/tools/base/images/512_grey_base_image.asset.taml new file mode 100644 index 000000000..092e7a5c1 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/512_grey_base_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/512_grey_image.asset.taml b/Templates/BaseGame/game/tools/base/images/512_grey_image.asset.taml new file mode 100644 index 000000000..180837714 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/512_grey_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/512_orange_image.asset.taml b/Templates/BaseGame/game/tools/base/images/512_orange_image.asset.taml new file mode 100644 index 000000000..2cd578b0a --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/512_orange_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/512_orange_lines_image.asset.taml b/Templates/BaseGame/game/tools/base/images/512_orange_lines_image.asset.taml new file mode 100644 index 000000000..f1590eacc --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/512_orange_lines_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/512_red_image.asset.taml b/Templates/BaseGame/game/tools/base/images/512_red_image.asset.taml new file mode 100644 index 000000000..8872d2ea9 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/512_red_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/Black.asset.taml b/Templates/BaseGame/game/tools/base/images/Black.asset.taml new file mode 100644 index 000000000..b8cf9af8a --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/Black.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/Gray.asset.taml b/Templates/BaseGame/game/tools/base/images/Gray.asset.taml new file mode 100644 index 000000000..358ce1109 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/Gray.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_Black.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_Black.asset.taml new file mode 100644 index 000000000..d5e57d9c9 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/Grid_512_Black.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen.asset.taml new file mode 100644 index 000000000..6935dba28 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen_Lines.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen_Lines.asset.taml new file mode 100644 index 000000000..6ff9c66c5 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen_Lines.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_Green.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_Green.asset.taml new file mode 100644 index 000000000..b6843c4b6 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/Grid_512_Green.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_Grey.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_Grey.asset.taml new file mode 100644 index 000000000..3d711a7c9 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/Grid_512_Grey.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_Grey_Base.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_Grey_Base.asset.taml new file mode 100644 index 000000000..ff8d3047a --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/Grid_512_Grey_Base.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_Orange.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_Orange.asset.taml new file mode 100644 index 000000000..e8ae4e6b7 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/Grid_512_Orange.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_Orange_Lines.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_Orange_Lines.asset.taml new file mode 100644 index 000000000..5221fa29c --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/Grid_512_Orange_Lines.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_Red.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_Red.asset.taml new file mode 100644 index 000000000..1ab418120 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/Grid_512_Red.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/White.asset.taml b/Templates/BaseGame/game/tools/base/images/White.asset.taml new file mode 100644 index 000000000..062281c3e --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/White.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/black_image.asset.taml b/Templates/BaseGame/game/tools/base/images/black_image.asset.taml new file mode 100644 index 000000000..06817ceb8 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/black_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/gray_image.asset.taml b/Templates/BaseGame/game/tools/base/images/gray_image.asset.taml new file mode 100644 index 000000000..dc5036a21 --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/gray_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/base/images/materials.tscript b/Templates/BaseGame/game/tools/base/images/materials.tscript index f1b7fc5ac..b1525a317 100644 --- a/Templates/BaseGame/game/tools/base/images/materials.tscript +++ b/Templates/BaseGame/game/tools/base/images/materials.tscript @@ -3,69 +3,54 @@ // Copyright GarageGames, LLC 2011 //----------------------------------------------------------------------------- -singleton CubemapData( BlankSkyCubemap ) -{ - cubeFace[0] = "./skybox_1"; - cubeFace[1] = "./skybox_2"; - cubeFace[2] = "./skybox_3"; - cubeFace[3] = "./skybox_4"; - cubeFace[4] = "./skybox_5"; - cubeFace[5] = "./skybox_6"; -}; - -singleton Material( BlankSkyMat ) -{ - cubemap = BlankSkyCubemap; -}; - singleton Material(White) { - diffuseMap[0] = "./white.png"; + diffuseMapAsset[0] = "ToolsModule:white_image"; }; singleton Material(Gray) { - diffuseMap[0] = "./gray.png"; + diffuseMapAsset[0] = "ToolsModule:gray_image"; }; singleton Material(Black) { - diffuseMap[0] = "./black.png"; + diffuseMapAsset[0] = "ToolsModule:black_image"; }; singleton Material(Grid_512_Black) { - diffuseMap[0] = "./512_black.png"; + diffuseMapAsset[0] = "ToolsModule:512_black_image"; }; singleton Material(Grid_512_ForestGreen) { - diffuseMap[0] = "./512_forestgreen.png"; + diffuseMapAsset[0] = "ToolsModule:512_forestgreen_image"; }; singleton Material(Grid_512_ForestGreen_Lines) { - diffuseMap[0] = "./512_forestgreen_lines.png"; + diffuseMapAsset[0] = "ToolsModule:512_forestgreen_lines_image"; }; singleton Material(Grid_512_Green) { - diffuseMap[0] = "./512_green.png"; + diffuseMapAsset[0] = "ToolsModule:512_green_image"; }; singleton Material(Grid_512_Grey) { - diffuseMap[0] = "./512_grey.png"; + diffuseMapAsset[0] = "ToolsModule:512_grey_image"; }; singleton Material(Grid_512_Grey_Base) { - diffuseMap[0] = "./512_grey_base.png"; + diffuseMapAsset[0] = "ToolsModule:512_grey_base_image"; }; singleton Material(Grid_512_Orange) { - diffuseMap[0] = "tools/base/images/512_orange.png"; + diffuseMapAsset[0] = "ToolsModule:512_orange_image"; translucent = "0"; translucentBlendOp = "PreMul"; mapTo = "512_orange.png"; @@ -73,10 +58,10 @@ singleton Material(Grid_512_Orange) singleton Material(Grid_512_Orange_Lines) { - diffuseMap[0] = "./512_orange_lines.png"; + diffuseMapAsset[0] = "ToolsModule:512_orange_lines_image"; }; singleton Material(Grid_512_Red) { - diffuseMap[0] = "./512_red.png"; -}; \ No newline at end of file + diffuseMapAsset[0] = "ToolsModule:512_red_image"; +}; diff --git a/Templates/BaseGame/game/tools/base/images/skybox_1.jpg b/Templates/BaseGame/game/tools/base/images/skybox_1.jpg deleted file mode 100644 index 871322e94..000000000 Binary files a/Templates/BaseGame/game/tools/base/images/skybox_1.jpg and /dev/null differ diff --git a/Templates/BaseGame/game/tools/base/images/skybox_2.jpg b/Templates/BaseGame/game/tools/base/images/skybox_2.jpg deleted file mode 100644 index 3e2a810de..000000000 Binary files a/Templates/BaseGame/game/tools/base/images/skybox_2.jpg and /dev/null differ diff --git a/Templates/BaseGame/game/tools/base/images/skybox_3.jpg b/Templates/BaseGame/game/tools/base/images/skybox_3.jpg deleted file mode 100644 index 757f99b33..000000000 Binary files a/Templates/BaseGame/game/tools/base/images/skybox_3.jpg and /dev/null differ diff --git a/Templates/BaseGame/game/tools/base/images/skybox_4.jpg b/Templates/BaseGame/game/tools/base/images/skybox_4.jpg deleted file mode 100644 index 30eb1d2a3..000000000 Binary files a/Templates/BaseGame/game/tools/base/images/skybox_4.jpg and /dev/null differ diff --git a/Templates/BaseGame/game/tools/base/images/skybox_5.jpg b/Templates/BaseGame/game/tools/base/images/skybox_5.jpg deleted file mode 100644 index 10a24db73..000000000 Binary files a/Templates/BaseGame/game/tools/base/images/skybox_5.jpg and /dev/null differ diff --git a/Templates/BaseGame/game/tools/base/images/skybox_6.jpg b/Templates/BaseGame/game/tools/base/images/skybox_6.jpg deleted file mode 100644 index 3ec28d02e..000000000 Binary files a/Templates/BaseGame/game/tools/base/images/skybox_6.jpg and /dev/null differ diff --git a/Templates/BaseGame/game/tools/base/images/white_image.asset.taml b/Templates/BaseGame/game/tools/base/images/white_image.asset.taml new file mode 100644 index 000000000..0c9bfdcef --- /dev/null +++ b/Templates/BaseGame/game/tools/base/images/white_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/ActiveScene_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/ActiveScene_image.asset.taml new file mode 100644 index 000000000..f47594c72 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/ActiveScene_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/BasicClouds_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/BasicClouds_image.asset.taml new file mode 100644 index 000000000..2c0db5462 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/BasicClouds_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/CameraBookmark_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/CameraBookmark_image.asset.taml new file mode 100644 index 000000000..c1c68ba4a --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/CameraBookmark_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/CloudLayer_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/CloudLayer_image.asset.taml new file mode 100644 index 000000000..fed6edc13 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/CloudLayer_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/ConvexShape_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/ConvexShape_image.asset.taml new file mode 100644 index 000000000..d3524c21b --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/ConvexShape_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/CreatorTree_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/CreatorTree_image.asset.taml new file mode 100644 index 000000000..e753e1b82 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/CreatorTree_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/DecalRoad_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/DecalRoad_image.asset.taml new file mode 100644 index 000000000..a4c096d4c --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/DecalRoad_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/ForestBrushElement_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/ForestBrushElement_image.asset.taml new file mode 100644 index 000000000..7bb87e173 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/ForestBrushElement_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/ForestBrush_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/ForestBrush_image.asset.taml new file mode 100644 index 000000000..4669a9540 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/ForestBrush_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/Forest_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/Forest_image.asset.taml new file mode 100644 index 000000000..552c901e4 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/Forest_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GameTSCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GameTSCtrl_image.asset.taml new file mode 100644 index 000000000..4af991b3c --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GameTSCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GroundCover_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GroundCover_image.asset.taml new file mode 100644 index 000000000..eaa6dbbc9 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GroundCover_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GroundPlane_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GroundPlane_image.asset.taml new file mode 100644 index 000000000..959e5f00e --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GroundPlane_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiAutoScrollCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiAutoScrollCtrl_image.asset.taml new file mode 100644 index 000000000..9a3ac857c --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiAutoScrollCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiBitmapBorderCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiBitmapBorderCtrl_image.asset.taml new file mode 100644 index 000000000..7a13a56b5 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiBitmapBorderCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiBitmapButtonCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiBitmapButtonCtrl_image.asset.taml new file mode 100644 index 000000000..f0d0d00c2 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiBitmapButtonCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiBitmapButtonTextCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiBitmapButtonTextCtrl_image.asset.taml new file mode 100644 index 000000000..a39f08eb0 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiBitmapButtonTextCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiBitmapCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiBitmapCtrl_image.asset.taml new file mode 100644 index 000000000..7db7c91be --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiBitmapCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiBorderButtonCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiBorderButtonCtrl_image.asset.taml new file mode 100644 index 000000000..6e3e7bf21 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiBorderButtonCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiButtonCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiButtonCtrl_image.asset.taml new file mode 100644 index 000000000..65c3964ac --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiButtonCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiCheckBoxCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiCheckBoxCtrl_image.asset.taml new file mode 100644 index 000000000..d0eef21e9 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiCheckBoxCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiColorPickerCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiColorPickerCtrl_image.asset.taml new file mode 100644 index 000000000..b04c6ed4a --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiColorPickerCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiContainer_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiContainer_image.asset.taml new file mode 100644 index 000000000..a9f75a141 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiContainer_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiControlArrayControl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiControlArrayControl_image.asset.taml new file mode 100644 index 000000000..dee1621d7 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiControlArrayControl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiControl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiControl_image.asset.taml new file mode 100644 index 000000000..8a268283d --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiControl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiCrossHairHud_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiCrossHairHud_image.asset.taml new file mode 100644 index 000000000..0cba82a60 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiCrossHairHud_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiDecoyCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiDecoyCtrl_image.asset.taml new file mode 100644 index 000000000..6f749fa92 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiDecoyCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiDragAndDropControl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiDragAndDropControl_image.asset.taml new file mode 100644 index 000000000..ddb0d4bcf --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiDragAndDropControl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiDynamicCtrlArrayControl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiDynamicCtrlArrayControl_image.asset.taml new file mode 100644 index 000000000..9d6c5d8b7 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiDynamicCtrlArrayControl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiFadeinBitmapCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiFadeinBitmapCtrl_image.asset.taml new file mode 100644 index 000000000..5a54617a3 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiFadeinBitmapCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiFileTreeCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiFileTreeCtrl_image.asset.taml new file mode 100644 index 000000000..308467ef1 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiFileTreeCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiFilterCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiFilterCtrl_image.asset.taml new file mode 100644 index 000000000..e293161ed --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiFilterCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiFormCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiFormCtrl_image.asset.taml new file mode 100644 index 000000000..4102c1b25 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiFormCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiFrameSetCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiFrameSetCtrl_image.asset.taml new file mode 100644 index 000000000..070ea30de --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiFrameSetCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiGradientSwatchCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiGradientSwatchCtrl_image.asset.taml new file mode 100644 index 000000000..09a5b0948 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiGradientSwatchCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiGraphCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiGraphCtrl_image.asset.taml new file mode 100644 index 000000000..9e4f68603 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiGraphCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiHealthBarHud_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiHealthBarHud_image.asset.taml new file mode 100644 index 000000000..01b2eb930 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiHealthBarHud_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiIconButtonCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiIconButtonCtrl_image.asset.taml new file mode 100644 index 000000000..be2ca6dde --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiIconButtonCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiListBoxCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiListBoxCtrl_image.asset.taml new file mode 100644 index 000000000..0110e9bc7 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiListBoxCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiMLTextCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiMLTextCtrl_image.asset.taml new file mode 100644 index 000000000..e821af0e5 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiMLTextCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiMLTextEditCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiMLTextEditCtrl_image.asset.taml new file mode 100644 index 000000000..9322bd290 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiMLTextEditCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiMenuBar_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiMenuBar_image.asset.taml new file mode 100644 index 000000000..54a1157e7 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiMenuBar_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiObjectView_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiObjectView_image.asset.taml new file mode 100644 index 000000000..f6ecfb8dc --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiObjectView_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiPanel_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiPanel_image.asset.taml new file mode 100644 index 000000000..3a558572d --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiPanel_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiPopUpMenuCtrlEx_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiPopUpMenuCtrlEx_image.asset.taml new file mode 100644 index 000000000..d29d14c8f --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiPopUpMenuCtrlEx_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiPopUpMenuCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiPopUpMenuCtrl_image.asset.taml new file mode 100644 index 000000000..c3acd8c1e --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiPopUpMenuCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiProgressBitmapCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiProgressBitmapCtrl_image.asset.taml new file mode 100644 index 000000000..16a8c9f8e --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiProgressBitmapCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiProgressCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiProgressCtrl_image.asset.taml new file mode 100644 index 000000000..2e084930b --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiProgressCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiRadioCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiRadioCtrl_image.asset.taml new file mode 100644 index 000000000..441a9ccc3 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiRadioCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiRectHandles_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiRectHandles_image.asset.taml new file mode 100644 index 000000000..d5888c586 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiRectHandles_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiRolloutCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiRolloutCtrl_image.asset.taml new file mode 100644 index 000000000..803d72640 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiRolloutCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiScrollCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiScrollCtrl_image.asset.taml new file mode 100644 index 000000000..2cd6a3020 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiScrollCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiSplitContainer_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiSplitContainer_image.asset.taml new file mode 100644 index 000000000..501ff7eef --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiSplitContainer_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiStackControl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiStackControl_image.asset.taml new file mode 100644 index 000000000..f2809653f --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiStackControl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiSwatchButtonCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiSwatchButtonCtrl_image.asset.taml new file mode 100644 index 000000000..072438705 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiSwatchButtonCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiTabBookCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiTabBookCtrl_image.asset.taml new file mode 100644 index 000000000..3a4229bbb --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiTabBookCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiTabPageCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiTabPageCtrl_image.asset.taml new file mode 100644 index 000000000..714dfe73c --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiTabPageCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiTextCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiTextCtrl_image.asset.taml new file mode 100644 index 000000000..4642083e2 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiTextCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiTextEditCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiTextEditCtrl_image.asset.taml new file mode 100644 index 000000000..6b7851ddc --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiTextEditCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiTextEditSliderCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiTextEditSliderCtrl_image.asset.taml new file mode 100644 index 000000000..069bc1ecd --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiTextEditSliderCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiTextListCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiTextListCtrl_image.asset.taml new file mode 100644 index 000000000..756260cd8 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiTextListCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiTheoraCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiTheoraCtrl_image.asset.taml new file mode 100644 index 000000000..7ead50315 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiTheoraCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiTreeViewCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiTreeViewCtrl_image.asset.taml new file mode 100644 index 000000000..b5677fb93 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiTreeViewCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiWindowCollapseCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiWindowCollapseCtrl_image.asset.taml new file mode 100644 index 000000000..1f1341d92 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiWindowCollapseCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/GuiWindowCtrl_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/GuiWindowCtrl_image.asset.taml new file mode 100644 index 000000000..9f386fdd7 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/GuiWindowCtrl_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/Item_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/Item_image.asset.taml new file mode 100644 index 000000000..fd55d7053 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/Item_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/LevelInfo_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/LevelInfo_image.asset.taml new file mode 100644 index 000000000..636d01de2 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/LevelInfo_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/Lightning_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/Lightning_image.asset.taml new file mode 100644 index 000000000..0e9a1ff43 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/Lightning_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/Marker_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/Marker_image.asset.taml new file mode 100644 index 000000000..b535ae811 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/Marker_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/MeshRoad_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/MeshRoad_image.asset.taml new file mode 100644 index 000000000..bcd242c8b --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/MeshRoad_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/MissionArea_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/MissionArea_image.asset.taml new file mode 100644 index 000000000..72b941abe --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/MissionArea_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/NavMesh_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/NavMesh_image.asset.taml new file mode 100644 index 000000000..9f3f340ed --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/NavMesh_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/NavPath_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/NavPath_image.asset.taml new file mode 100644 index 000000000..19ff2f28a --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/NavPath_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/ParticleEmitterNode_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/ParticleEmitterNode_image.asset.taml new file mode 100644 index 000000000..740ac15b7 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/ParticleEmitterNode_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/ParticleEmitter_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/ParticleEmitter_image.asset.taml new file mode 100644 index 000000000..893cbdc59 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/ParticleEmitter_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/Path_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/Path_image.asset.taml new file mode 100644 index 000000000..d59eb44b6 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/Path_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/PhysicalZone_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/PhysicalZone_image.asset.taml new file mode 100644 index 000000000..aa2ec61ba --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/PhysicalZone_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/Player_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/Player_image.asset.taml new file mode 100644 index 000000000..03ebd71f4 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/Player_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/PointLight_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/PointLight_image.asset.taml new file mode 100644 index 000000000..d5d0222e6 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/PointLight_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/Portal_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/Portal_image.asset.taml new file mode 100644 index 000000000..b925f115b --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/Portal_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/Precipitation_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/Precipitation_image.asset.taml new file mode 100644 index 000000000..75da5eab2 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/Precipitation_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/Prefab_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/Prefab_image.asset.taml new file mode 100644 index 000000000..cfaca90df --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/Prefab_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/PxCloth_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/PxCloth_image.asset.taml new file mode 100644 index 000000000..4eff82025 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/PxCloth_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/River_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/River_image.asset.taml new file mode 100644 index 000000000..cc199f2ea --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/River_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/SFXEmitter_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/SFXEmitter_image.asset.taml new file mode 100644 index 000000000..d3cb4ee76 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/SFXEmitter_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/ScatterSky_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/ScatterSky_image.asset.taml new file mode 100644 index 000000000..3b956413f --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/ScatterSky_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/SceneObject_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/SceneObject_image.asset.taml new file mode 100644 index 000000000..4cfc526ed --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/SceneObject_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/Scene_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/Scene_image.asset.taml new file mode 100644 index 000000000..f8745a345 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/Scene_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/SimDataBlock_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/SimDataBlock_image.asset.taml new file mode 100644 index 000000000..34ecd6f96 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/SimDataBlock_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/SimObject_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/SimObject_image.asset.taml new file mode 100644 index 000000000..736ffbc82 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/SimObject_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/SimSet_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/SimSet_image.asset.taml new file mode 100644 index 000000000..17dbf6500 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/SimSet_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/SkyBox_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/SkyBox_image.asset.taml new file mode 100644 index 000000000..ef837c9da --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/SkyBox_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/SpawnSphere_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/SpawnSphere_image.asset.taml new file mode 100644 index 000000000..9fbcfdf27 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/SpawnSphere_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/SpotLight_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/SpotLight_image.asset.taml new file mode 100644 index 000000000..3a74080a8 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/SpotLight_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/Sun_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/Sun_image.asset.taml new file mode 100644 index 000000000..673c69637 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/Sun_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/TSForestItemData_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/TSForestItemData_image.asset.taml new file mode 100644 index 000000000..c69006cb2 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/TSForestItemData_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/TSStatic_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/TSStatic_image.asset.taml new file mode 100644 index 000000000..a0e411c50 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/TSStatic_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/TerrainBlock_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/TerrainBlock_image.asset.taml new file mode 100644 index 000000000..d204dc419 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/TerrainBlock_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/TimeOfDay_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/TimeOfDay_image.asset.taml new file mode 100644 index 000000000..3790fa915 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/TimeOfDay_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/Trigger_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/Trigger_image.asset.taml new file mode 100644 index 000000000..c97e8e903 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/Trigger_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/VolumetricFog_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/VolumetricFog_image.asset.taml new file mode 100644 index 000000000..c34ebadf9 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/VolumetricFog_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/WaterBlock_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/WaterBlock_image.asset.taml new file mode 100644 index 000000000..16e0b5d77 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/WaterBlock_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/WaterPlane_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/WaterPlane_image.asset.taml new file mode 100644 index 000000000..883349850 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/WaterPlane_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/Zone_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/Zone_image.asset.taml new file mode 100644 index 000000000..d2a6513bd --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/Zone_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/cameraSpawn_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/cameraSpawn_image.asset.taml new file mode 100644 index 000000000..b3480ddef --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/cameraSpawn_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/camera_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/camera_image.asset.taml new file mode 100644 index 000000000..f902b5c72 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/camera_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/decalNode_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/decalNode_image.asset.taml new file mode 100644 index 000000000..705ec68bd --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/decalNode_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/decal_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/decal_image.asset.taml new file mode 100644 index 000000000..e41eeb750 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/decal_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/default_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/default_image.asset.taml new file mode 100644 index 000000000..e65b743c7 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/default_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/fxFoliageReplicator_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/fxFoliageReplicator_image.asset.taml new file mode 100644 index 000000000..556b72185 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/fxFoliageReplicator_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/fxShapeReplicator_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/fxShapeReplicator_image.asset.taml new file mode 100644 index 000000000..2ab473678 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/fxShapeReplicator_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/interiorInstance_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/interiorInstance_image.asset.taml new file mode 100644 index 000000000..e6c1dbd6a --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/interiorInstance_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/material_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/material_image.asset.taml new file mode 100644 index 000000000..c90d4c827 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/material_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/particleEffecterObject_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/particleEffecterObject_image.asset.taml new file mode 100644 index 000000000..1c3f618a8 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/particleEffecterObject_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/particleEmitterObject_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/particleEmitterObject_image.asset.taml new file mode 100644 index 000000000..d4de2fbd8 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/particleEmitterObject_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/particleSimulation_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/particleSimulation_image.asset.taml new file mode 100644 index 000000000..bb6d74a8f --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/particleSimulation_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/pathMarker_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/pathMarker_image.asset.taml new file mode 100644 index 000000000..1be9e28ae --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/pathMarker_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/classIcons/volumeLight_image.asset.taml b/Templates/BaseGame/game/tools/classIcons/volumeLight_image.asset.taml new file mode 100644 index 000000000..edf2f6123 --- /dev/null +++ b/Templates/BaseGame/game/tools/classIcons/volumeLight_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/componentEditor/gui/SuperTooltipDlg.asset.taml b/Templates/BaseGame/game/tools/componentEditor/gui/SuperTooltipDlg.asset.taml new file mode 100644 index 000000000..26e3fa128 --- /dev/null +++ b/Templates/BaseGame/game/tools/componentEditor/gui/SuperTooltipDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/componentEditor/gui/TypeMaskFieldGui.asset.taml b/Templates/BaseGame/game/tools/componentEditor/gui/TypeMaskFieldGui.asset.taml new file mode 100644 index 000000000..4b227f94b --- /dev/null +++ b/Templates/BaseGame/game/tools/componentEditor/gui/TypeMaskFieldGui.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/componentEditor/interface/materialFieldType.tscript b/Templates/BaseGame/game/tools/componentEditor/interface/materialFieldType.tscript index aff83f5de..060333e62 100644 --- a/Templates/BaseGame/game/tools/componentEditor/interface/materialFieldType.tscript +++ b/Templates/BaseGame/game/tools/componentEditor/interface/materialFieldType.tscript @@ -66,7 +66,7 @@ function GuiInspectorGroup::buildMaterialField(%this, %fieldName, %fieldLabel, % position = "7 4"; extent = "64 64"; buttonType = "PushButton"; - bitmap = ""; + bitmapAsset = ""; Command = ""; text = "Loading..."; useStates = false; @@ -80,7 +80,7 @@ function GuiInspectorGroup::buildMaterialField(%this, %fieldName, %fieldLabel, % extent = "64 64"; Variable = ""; buttonType = "toggleButton"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; groupNum = "0"; text = ""; tooltip = "Change material"; @@ -274,4 +274,4 @@ function materialFieldBtn::onClick(%this) function materialFieldBtn::setMaterial(%this, %matAssetName) { -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/componentEditor/main.tscript b/Templates/BaseGame/game/tools/componentEditor/main.tscript index 7dc10a11f..d026ec39d 100644 --- a/Templates/BaseGame/game/tools/componentEditor/main.tscript +++ b/Templates/BaseGame/game/tools/componentEditor/main.tscript @@ -21,15 +21,15 @@ //----------------------------------------------------------------------------- //Scripts -exec("./scripts/componentEditor.ed." @ $TorqueScriptFileExtension); -exec("./scripts/stateMachineEditor.ed." @ $TorqueScriptFileExtension); +//exec("./scripts/componentEditor.ed." @ $TorqueScriptFileExtension); +//exec("./scripts/stateMachineEditor.ed." @ $TorqueScriptFileExtension); exec("./scripts/superToolTipDlg.ed." @ $TorqueScriptFileExtension); //gui exec("./gui/superToolTipDlg.ed.gui"); -exec("./gui/stateMachineDlg.ed.gui"); +//exec("./gui/stateMachineDlg.ed.gui"); //field types exec("./interface/materialFieldType." @ $TorqueScriptFileExtension); exec("./interface/typeMaskFieldType." @ $TorqueScriptFileExtension); -exec("./interface/stateMachineField." @ $TorqueScriptFileExtension); \ No newline at end of file +exec("./interface/stateMachineField." @ $TorqueScriptFileExtension); diff --git a/Templates/BaseGame/game/tools/componentEditor/scripts/componentEditor.ed.tscript b/Templates/BaseGame/game/tools/componentEditor/scripts/componentEditor.ed.tscript index c136bb4bf..15bc5aa8b 100644 --- a/Templates/BaseGame/game/tools/componentEditor/scripts/componentEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/componentEditor/scripts/componentEditor.ed.tscript @@ -65,7 +65,7 @@ function GuiInspectorEntityGroup::createAddComponentList(%this) buttonMargin = "4 4"; iconLocation = "Left"; sizeIconToButton = "0"; - iconBitmap = "tools/gui/images/iconAdd.png"; + bitmapAsset = "ToolsModule:iconAdd_image"; hovertime = "100"; tooltip = "Add the selected component to the object"; tooltipProfile = "EditorToolTipProfile"; @@ -320,4 +320,4 @@ function ComponentEditorRemoveComponent(%entity, %component) %entity.removeComponent(%component, true); inspector.removeInspect(%entity); inspector.addInspect(%entity); -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/convexEditor/ConvexEditorGui.asset.taml b/Templates/BaseGame/game/tools/convexEditor/ConvexEditorGui.asset.taml new file mode 100644 index 000000000..a13ad881b --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/ConvexEditorGui.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/ConvexEditorOptions.asset.taml b/Templates/BaseGame/game/tools/convexEditor/ConvexEditorOptions.asset.taml new file mode 100644 index 000000000..eba1f4728 --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/ConvexEditorOptions.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/ConvexEditorSettingsTab,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/convexEditor/ConvexEditorSettingsTab,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..a216d1e5c --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/ConvexEditorSettingsTab,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/OccluderProxyMaterial.asset.taml b/Templates/BaseGame/game/tools/convexEditor/OccluderProxyMaterial.asset.taml new file mode 100644 index 000000000..3e9048f43 --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/OccluderProxyMaterial.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/PortalProxyMaterial.asset.taml b/Templates/BaseGame/game/tools/convexEditor/PortalProxyMaterial.asset.taml new file mode 100644 index 000000000..ac08480eb --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/PortalProxyMaterial.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/TriggerProxyMaterial.asset.taml b/Templates/BaseGame/game/tools/convexEditor/TriggerProxyMaterial.asset.taml new file mode 100644 index 000000000..ac5eea347 --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/TriggerProxyMaterial.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/ZoneProxyMaterial.asset.taml b/Templates/BaseGame/game/tools/convexEditor/ZoneProxyMaterial.asset.taml new file mode 100644 index 000000000..efde833a2 --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/ZoneProxyMaterial.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/convexEditorGui.tscript b/Templates/BaseGame/game/tools/convexEditor/convexEditorGui.tscript index c9a9325de..65266a382 100644 --- a/Templates/BaseGame/game/tools/convexEditor/convexEditorGui.tscript +++ b/Templates/BaseGame/game/tools/convexEditor/convexEditorGui.tscript @@ -24,14 +24,21 @@ function ConvexEditorGui::onWake( %this ) { convexEditorToolbar-->gridSnapSizeEdit.setText(%this.getGridSnapSize()); - if(ConvexEditorOptionsWindow-->matPreviewBtn.bitmap $= "") + if(ConvexEditorOptionsWindow-->matPreviewBtn.getBitmap() $= "") { //no active material, so set one ConvexEditorOptionsWindow-->matPreviewBtn.setText(""); %mat = EditorSettings.Value("ConvexEditor/MaterialName"); - ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap(%mat.diffuseMap[0]); + if(AssetDatabase.isDeclaredAsset(%mat)) + { + %matName = AssetDatabase.acquireAsset(%mat).materialDefinitionName; + AssetDatabase.releaseAsset(%mat); + %mat = %matName; + } + + ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap(%mat.getDiffuseMap(0)); ConvexEditorOptionsWindow.activeMaterial = %mat; } @@ -68,7 +75,8 @@ function ConvexEditorGui::onSelectionChanged( %this, %shape, %face ) ConvexEditorDeleteFaceBtn.setActive( true ); ConvexEditorOptionsWindow-->defMatPreviewBtn.setText(""); - ConvexEditorOptionsWindow-->defMatPreviewBtn.setBitmap(%shape.material.diffuseMap[0]); + %shapeMat = %shape.getMaterial(); + ConvexEditorOptionsWindow-->defMatPreviewBtn.setBitmap(%shapeMat.getDiffuseMap(0)); ConvexEditorOptionsWindow.activeShape = %shape; @@ -156,10 +164,10 @@ function ConvexEditorMaterialBtn::gotMaterialName(%this, %name) //eval(%this.object @ "." @ %this.targetField @ " = " @ %name @ ";"); //%this.object.changeMaterial(getTrailingNumber(%this.targetField), %name); //%this.object.inspectorApply(); - %diffusemap = %materialAsset.materialDefinitionName.diffuseMap[0]; + %diffusemap = %materialAsset.materialDefinitionName.getDiffuseMap(0); if(%diffusemap $= "") { - %diffuseAsset = %materialAsset.materialDefinitionName.diffuseMapAsset[0]; + %diffuseAsset = %materialAsset.materialDefinitionName.getDiffuseMapAsset(0); if(%diffuseAsset !$= "") { %diffuseAssetDef = AssetDatabase.acquireAsset(%diffuseAsset); @@ -183,7 +191,7 @@ function ConvexEditorMaterialLiftBtn::onClick(%this) { %mat = ConvexEditorGui.getSelectedFaceMaterial(); ConvexEditorOptionsWindow.activeMaterial = %mat; - ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap(%mat.diffuseMap[0]); + ConvexEditorOptionsWindow-->matPreviewBtn.setBitmap(%mat.getDiffuseMap(0)); } function ConvexEditorMaterialResetBtn::onClick(%this) @@ -221,10 +229,10 @@ function ConvexEditorDefaultMaterialBtn::gotMaterialName(%this, %name) //eval(%this.object @ "." @ %this.targetField @ " = " @ %name @ ";"); //%this.object.changeMaterial(getTrailingNumber(%this.targetField), %name); //%this.object.inspectorApply(); - %diffusemap = %materialAsset.materialDefinitionName.diffuseMap[0]; + %diffusemap = %materialAsset.materialDefinitionName.getDiffuseMap(0); if(%diffusemap $= "") { - %diffuseAsset = %materialAsset.materialDefinitionName.diffuseMapAsset[0]; + %diffuseAsset = %materialAsset.materialDefinitionName.getDiffuseMapAsset(0); if(%diffuseAsset !$= "") { %diffuseAssetDef = AssetDatabase.acquireAsset(%diffuseAsset); @@ -234,7 +242,7 @@ function ConvexEditorDefaultMaterialBtn::gotMaterialName(%this, %name) ConvexEditorOptionsWindow-->defMatPreviewBtn.setBitmap(%diffusemap); - ConvexEditorOptionsWindow.activeShape.material = %materialAsset.materialDefinitionName; + ConvexEditorOptionsWindow.activeShape.setMaterial(%name); ConvexEditorGui.updateShape(); } \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/convexEditor/convexEditorToolbar, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/convexEditor/convexEditorToolbar, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..2d1605eee --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/convexEditorToolbar, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/convexEditorToolbar.ed.gui b/Templates/BaseGame/game/tools/convexEditor/convexEditorToolbar.ed.gui index 2e737c942..eebd56e85 100644 --- a/Templates/BaseGame/game/tools/convexEditor/convexEditorToolbar.ed.gui +++ b/Templates/BaseGame/game/tools/convexEditor/convexEditorToolbar.ed.gui @@ -38,7 +38,7 @@ position = "94 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiBitmapButtonCtrl(ConvexEditorCreateBoxBtn) { canSaveDynamicFields = "0"; @@ -55,7 +55,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Create ConvexShape Box" NL "Use Alt + Click-Drag instead of this for more control of starting placement."; hovertime = "1000"; - bitmap = "tools/convexEditor/images/convex-editor-btn"; + bitmapAsset = "ToolsModule:convex_editor_btn_n_image"; text = ""; groupNum = "-1"; buttonType = "pushButton"; @@ -76,7 +76,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Split selected face" NL "Use Ctrl + Rotate instead for more control."; hovertime = "1000"; - bitmap = "tools/convexEditor/images/split-face-btn"; + bitmapAsset = "ToolsModule:split_face_btn_n_image"; text = ""; groupNum = "-1"; buttonType = "PushButton"; @@ -97,7 +97,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Delete selected face" NL "(Delete)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/delete-btn"; + bitmapAsset = "ToolsModule:delete_btn_n_image"; text = ""; groupNum = "-1"; buttonType = "PushButton"; @@ -108,7 +108,7 @@ position = "190 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiContainer() { canSaveDynamicFields = "0"; @@ -145,7 +145,7 @@ buttonType = "toggleButton"; useMouseEvents = "0"; groupNum = "-1"; - bitmap = "tools/gui/images/menubar/snap-grid"; + bitmapAsset = "ToolsModule:menubar_snap_grid_n_image"; textMargin = "4"; }; new GuiTextCtrl() { @@ -197,7 +197,7 @@ position = "380 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; }; -//--- OBJECT WRITE END --- \ No newline at end of file +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/convexEditor/images/convex_editor_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/convexEditor/images/convex_editor_btn_d_image.asset.taml new file mode 100644 index 000000000..27c38a321 --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/images/convex_editor_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/images/convex_editor_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/convexEditor/images/convex_editor_btn_h_image.asset.taml new file mode 100644 index 000000000..e59e29ca3 --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/images/convex_editor_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/images/convex_editor_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/convexEditor/images/convex_editor_btn_n_image.asset.taml new file mode 100644 index 000000000..d508dd1fc --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/images/convex_editor_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/images/occluderProxyImage_image.asset.taml b/Templates/BaseGame/game/tools/convexEditor/images/occluderProxyImage_image.asset.taml new file mode 100644 index 000000000..ae2f6015d --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/images/occluderProxyImage_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/images/portalProxyImage_image.asset.taml b/Templates/BaseGame/game/tools/convexEditor/images/portalProxyImage_image.asset.taml new file mode 100644 index 000000000..1b5053f3c --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/images/portalProxyImage_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/images/split_face_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/convexEditor/images/split_face_btn_d_image.asset.taml new file mode 100644 index 000000000..819a7b685 --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/images/split_face_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/images/split_face_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/convexEditor/images/split_face_btn_h_image.asset.taml new file mode 100644 index 000000000..eac855856 --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/images/split_face_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/images/split_face_btn_i_image.asset.taml b/Templates/BaseGame/game/tools/convexEditor/images/split_face_btn_i_image.asset.taml new file mode 100644 index 000000000..4750a1279 --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/images/split_face_btn_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/images/split_face_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/convexEditor/images/split_face_btn_n_image.asset.taml new file mode 100644 index 000000000..e9a7b7994 --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/images/split_face_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/images/triggerProxyImage_image.asset.taml b/Templates/BaseGame/game/tools/convexEditor/images/triggerProxyImage_image.asset.taml new file mode 100644 index 000000000..89cbe66e3 --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/images/triggerProxyImage_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/images/zoneProxyImage_image.asset.taml b/Templates/BaseGame/game/tools/convexEditor/images/zoneProxyImage_image.asset.taml new file mode 100644 index 000000000..de3bdde8f --- /dev/null +++ b/Templates/BaseGame/game/tools/convexEditor/images/zoneProxyImage_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/convexEditor/main.tscript b/Templates/BaseGame/game/tools/convexEditor/main.tscript index 6ecb12b6c..6e0a41970 100644 --- a/Templates/BaseGame/game/tools/convexEditor/main.tscript +++ b/Templates/BaseGame/game/tools/convexEditor/main.tscript @@ -68,7 +68,7 @@ function ConvexEditorPlugin::onWorldEditorStartup( %this ) // Add ourselves to the ToolsToolbar %tooltip = "Sketch Tool (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "ConvexEditorPlugin", "ConvexEditorPalette", expandFilename("tools/convexEditor/images/convex-editor-btn"), %tooltip ); + EditorGui.addToToolsToolbar( "ConvexEditorPlugin", "ConvexEditorPalette", "ToolsModule:convex_editor_btn_n_image", %tooltip ); //connect editor windows GuiWindowCtrl::attach( ConvexEditorOptionsWindow, ConvexEditorTreeWindow); @@ -209,14 +209,14 @@ function ConvexEditorPlugin::onSaveMission( %this, %missionFile ) function ConvexEditorPlugin::initSettings( %this ) { EditorSettings.beginGroup( "ConvexEditor", true ); - EditorSettings.setDefaultValue( "MaterialName", "Grid_512_Orange" ); + EditorSettings.setDefaultValue( "MaterialName", "Prototyping:WallOrange" ); EditorSettings.endGroup(); } function ESettingsWindow::getConvexEditorSettings(%this) { SettingsInspector.startGroup("General"); - SettingsInspector.addSettingsField("ConvexEditor/MaterialName", "Default Material Name", "string", ""); + SettingsInspector.addSettingsField("ConvexEditor/MaterialName", "Default Material Asset Name", "TypeMaterialAssetId", ""); SettingsInspector.endGroup(); } @@ -232,4 +232,4 @@ function ConvexEditorPlugin::writeSettings( %this ) EditorSettings.beginGroup( "ConvexEditor", true ); EditorSettings.setValue( "MaterialName", ConvexEditorGui.materialName ); EditorSettings.endGroup(); -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/convexEditor/materials.tscript b/Templates/BaseGame/game/tools/convexEditor/materials.tscript index c34d24daf..bd2e37c17 100644 --- a/Templates/BaseGame/game/tools/convexEditor/materials.tscript +++ b/Templates/BaseGame/game/tools/convexEditor/materials.tscript @@ -1,7 +1,7 @@ singleton Material( ZoneProxyMaterial ) { mapTo = "ZoneProxyMaterial"; - diffuseMap[0] = "tools/convexEditor/images/zoneProxyImage"; + diffuseMapAsset[0] = "ToolsModule:zoneProxyImage_image"; materialTag0 = "TestMaterial"; translucent = true; translucentBlendOp = "LerpAlpha"; @@ -11,7 +11,7 @@ singleton Material( ZoneProxyMaterial ) singleton Material( TriggerProxyMaterial ) { mapTo = "TriggerProxyMaterial"; - diffuseMap[0] = "./images/triggerProxyImage"; + diffuseMapAsset[0] = "ToolsModule:triggerProxyImage_image"; materialTag0 = "TestMaterial"; translucent = true; translucentBlendOp = "PreMul"; @@ -21,7 +21,7 @@ singleton Material( TriggerProxyMaterial ) singleton Material( PortalProxyMaterial ) { mapTo = "PortalProxyMaterial"; - diffuseMap[0] = "./images/portalProxyImage"; + diffuseMapAsset[0] = "ToolsModule:portalProxyImage_image"; materialTag0 = "TestMaterial"; translucent = true; translucentBlendOp = "PreMul"; @@ -31,7 +31,7 @@ singleton Material( PortalProxyMaterial ) singleton Material( OccluderProxyMaterial ) { mapTo = "OccluderProxyMaterial"; - diffuseMap[0] = "./images/occluderProxyImage"; + diffuseMapAsset[0] = "ToolsModule:occluderProxyImage_image"; materialTag0 = "TestMaterial"; translucent = true; translucentBlendOp = "PreMul"; diff --git a/Templates/BaseGame/game/tools/datablockEditor/.asset.taml b/Templates/BaseGame/game/tools/datablockEditor/.asset.taml new file mode 100644 index 000000000..fd3c1a4cb --- /dev/null +++ b/Templates/BaseGame/game/tools/datablockEditor/.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorCreatePrompt,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorCreatePrompt,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..a9849c688 --- /dev/null +++ b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorCreatePrompt,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui index 5a68c4df2..25962a61a 100644 --- a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui +++ b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui @@ -166,7 +166,7 @@ active = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/save-icon"; + bitmapAsset = "ToolsModule:save_icon_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -186,7 +186,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/save-as"; + bitmapAsset = "ToolsModule:save_as_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; diff --git a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui index d07a4158d..6877ca6fb 100644 --- a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui +++ b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui @@ -103,7 +103,7 @@ }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/clear-icon"; + bitmapAsset = "ToolsModule:clear_icon_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -265,7 +265,7 @@ }; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -286,7 +286,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/new"; + bitmapAsset = "ToolsModule:new_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; diff --git a/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript b/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript index dd7925bbe..6ef48370a 100644 --- a/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript +++ b/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript @@ -46,7 +46,7 @@ function DatablockEditorPlugin::onWorldEditorStartup( %this ) // Add ourselves to the ToolsToolbar %tooltip = "Datablock Editor (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "DatablockEditorPlugin", "DatablockEditorPalette", expandFilename("tools/worldEditor/images/toolbar/datablock-editor"), %tooltip ); + EditorGui.addToToolsToolbar( "DatablockEditorPlugin", "DatablockEditorPalette", "ToolsModule:datablock_editor_n_image", %tooltip ); //connect editor windows GuiWindowCtrl::Attach( DatablockEditorInspectorWindow, DatablockEditorTreeWindow); @@ -676,13 +676,16 @@ function DatablockEditorPlugin::createDatablock(%this) //--------------------------------------------------------------------------------------------- function DatablockEditorPlugin::pickDatablockPath(%this) { - SelectAssetPath.showDialog(AssetBrowser.dirHandler.currentAddress, "DatablockEditorPlugin.pickedNewDBPath", "Select New Datablock Path"); - SelectAssetPathWindow.selectWindow(); + AssetBrowser_SelectModule.showDialog("DatablockEditorPlugin.pickedNewDBTargetModule"); + //SelectAssetPath.showDialog(AssetBrowser.dirHandler.currentAddress, "DatablockEditorPlugin.pickedNewDBPath", "Select New Datablock Path"); + AssetBrowser_SelectModuleWindow.selectWindow(); } -function DatablockEditorPlugin::pickedNewDBPath(%this, %path) +function DatablockEditorPlugin::pickedNewDBTargetModule(%this, %module) { - $DATABLOCK_EDITOR_DEFAULT_FILENAME = %path @ "/managedDatablocks." @ $TorqueScriptFileExtension; + %moduleDef = ModuleDatabase.findModule(%module); + + $DATABLOCK_EDITOR_DEFAULT_FILENAME = %moduleDef.ModulePath @ "/scripts/managedData/managedDatablocks." @ $TorqueScriptFileExtension; DatablockEditorPlugin.createDatablock(); } diff --git a/Templates/BaseGame/game/tools/debugger/gui/DebuggerBreakConditionDlg, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/debugger/gui/DebuggerBreakConditionDlg, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..6efebf3f4 --- /dev/null +++ b/Templates/BaseGame/game/tools/debugger/gui/DebuggerBreakConditionDlg, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/debugger/gui/DebuggerConnectDlg, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/debugger/gui/DebuggerConnectDlg, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..d2c7c0cb3 --- /dev/null +++ b/Templates/BaseGame/game/tools/debugger/gui/DebuggerConnectDlg, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/debugger/gui/DebuggerEditWatchDlg, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/debugger/gui/DebuggerEditWatchDlg, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..d18dd120c --- /dev/null +++ b/Templates/BaseGame/game/tools/debugger/gui/DebuggerEditWatchDlg, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/debugger/gui/DebuggerFindDlg, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/debugger/gui/DebuggerFindDlg, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..4e4e7ed2d --- /dev/null +++ b/Templates/BaseGame/game/tools/debugger/gui/DebuggerFindDlg, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/debugger/gui/DebuggerGui, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/debugger/gui/DebuggerGui, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..76080de0c --- /dev/null +++ b/Templates/BaseGame/game/tools/debugger/gui/DebuggerGui, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/debugger/gui/DebuggerWatchDlg, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/debugger/gui/DebuggerWatchDlg, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..08b3a08d0 --- /dev/null +++ b/Templates/BaseGame/game/tools/debugger/gui/DebuggerWatchDlg, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/decalEditor/DecalEditorGui.asset.taml b/Templates/BaseGame/game/tools/decalEditor/DecalEditorGui.asset.taml new file mode 100644 index 000000000..ba8497922 --- /dev/null +++ b/Templates/BaseGame/game/tools/decalEditor/DecalEditorGui.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/decalEditor/add_decal_d_image.asset.taml b/Templates/BaseGame/game/tools/decalEditor/add_decal_d_image.asset.taml new file mode 100644 index 000000000..071360602 --- /dev/null +++ b/Templates/BaseGame/game/tools/decalEditor/add_decal_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/decalEditor/add_decal_h_image.asset.taml b/Templates/BaseGame/game/tools/decalEditor/add_decal_h_image.asset.taml new file mode 100644 index 000000000..83d265266 --- /dev/null +++ b/Templates/BaseGame/game/tools/decalEditor/add_decal_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/decalEditor/add_decal_n_image.asset.taml b/Templates/BaseGame/game/tools/decalEditor/add_decal_n_image.asset.taml new file mode 100644 index 000000000..fc7bb49e0 --- /dev/null +++ b/Templates/BaseGame/game/tools/decalEditor/add_decal_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.gui b/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.gui index 919291d2c..172e33b0e 100644 --- a/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.gui +++ b/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.gui @@ -310,7 +310,7 @@ tooltip = "Save All"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/save-icon"; + bitmapAsset = "ToolsModule:save_icon_n_image"; }; new GuiBitmapButtonCtrl(RetargetDecalButton) { @@ -329,7 +329,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; tooltip = "Retarget missing decals to an existing decal datablock"; - bitmap = "tools/gui/images/retarget-btn"; + bitmapAsset = "ToolsModule:retarget_btn_n_image"; buttonType = "PushButton"; useMouseEvents = "0"; }; @@ -350,7 +350,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; tooltip = "Create New Decal Template"; - bitmap = "tools/gui/images/new"; + bitmapAsset = "ToolsModule:new_n_image"; buttonType = "PushButton"; useMouseEvents = "0"; }; @@ -372,7 +372,7 @@ hovertime = "1000"; text = ""; tooltip = "Delete Selected Decal Template"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -517,7 +517,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; wrap = "0"; - bitmap= "tools/materialeditor/gui/unknownImage"; + bitmapAsset= "ToolsModule:unknownImage_image"; }; new GuiBitmapCtrl() { canSaveDynamicFields = "0"; @@ -534,7 +534,7 @@ Visible = "1"; tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/terrainpainter/terrain-painter-border-large"; + bitmapAsset = "ToolsModule:terrain_painter_border_large_image"; wrap = "0"; }; }; @@ -761,7 +761,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; wrap = "0"; - bitmap= "tools/materialeditor/gui/unknownImage"; + bitmapAsset= "ToolsModule:unknownImage_image"; }; new GuiBitmapCtrl() { canSaveDynamicFields = "0"; @@ -778,7 +778,7 @@ Visible = "1"; tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/terrainpainter/terrain-painter-border-large"; + bitmapAsset = "ToolsModule:terrain_painter_border_large_image"; wrap = "0"; }; }; diff --git a/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.tscript b/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.tscript index 98950f9a6..f3bfc991e 100644 --- a/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.tscript +++ b/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.tscript @@ -100,7 +100,7 @@ function DecalEditorGui::syncNodeDetails( %this ) return; %lookupName = DecalEditorGui.getDecalLookupName( %decalId ); - DecalEditorGui.updateInstancePreview( %lookupName.material ); + DecalEditorGui.updateInstancePreview( %lookupName.materialAsset ); DecalEditorDetailContainer-->instanceId.setText(%decalId @ " " @ %lookupName); %transformData = DecalEditorGui.getDecalTransform(%decalId); @@ -131,7 +131,7 @@ function DecalDataList::onSelect( %this, %id, %text ) //Canvas.pushDialog( DecalEditDlg ); DecalInspector.inspect( %data ); - DecalEditorGui.updateDecalPreview( %data.material ); + DecalEditorGui.updateDecalPreview( %data.materialAsset ); } function RetargetDecalButton::onClick( %this ) @@ -158,6 +158,15 @@ function RetargetDecalButton::onClick( %this ) function NewDecalButton::onClick( %this ) { + AssetBrowser_SelectModule.showDialog("DecalEditorGui.pickedNewDecalTargetModule"); + AssetBrowser_SelectModuleWindow.selectWindow(); +} + +function DecalEditorGui::pickedNewDecalTargetModule(%this, %module) +{ + %moduleDef = ModuleDatabase.findModule(%module); + $decalDataFile = %moduleDef.ModulePath @ "/scripts/managedData/managedDecalData." @ $TorqueScriptFileExtension; + %name = getUniqueName( "NewDecalData" ); %str = "datablock DecalData( " @ %name @ " ) { Material = \"WarningMaterial\"; };"; @@ -286,7 +295,7 @@ function DecalEditorTreeView::addNodeTree(%this, %nodeName, %parentName) function DecalInspector::onInspectorFieldModified( %this, %object, %fieldName, %arrayIndex, %oldValue, %newValue ) { - if( %fieldName $= "Material" ) + if( %fieldName $= "Material" || %fieldName $= "MaterialAsset") DecalEditorGui.updateDecalPreview( %newValue ); // Same work to do as for the regular WorldEditor Inspector. @@ -313,17 +322,50 @@ function DecalInspector::removeDirty() function DecalEditorGui::updateDecalPreview( %this, %material ) { if( isObject( %material ) ) - DecalPreviewWindow-->decalPreview.setBitmap( MaterialEditorGui.searchForTexture( %material.getId(), %material.diffuseMap[0]) ); + { + DecalPreviewWindow-->decalPreview.setBitmap( %material.getDiffuseMap(0) ); + } else - DecalPreviewWindow-->decalPreview.setBitmap("tools/materialEditor/gui/unknownImage"); + { + if(AssetDatabase.isDeclaredAsset(%material)) + { + %assetDef = AssetDatabase.acquireAsset(%material); + %difMap = %assetDef.materialDefinitionName.getDiffuseMap(0); + AssetDatabase.acquireAsset(%material); + + if(%difMap !$= "" && %difMap !$= "Core_Rendering:missingTexture") + { + DecalPreviewWindow-->decalPreview.setBitmap( %difMap ); + return; + } + } + DecalPreviewWindow-->decalPreview.setBitmap("ToolsModule:unknownImage_image"); + } } function DecalEditorGui::updateInstancePreview( %this, %material ) { if( isObject( %material ) ) - DecalPreviewWindow-->instancePreview.setBitmap( MaterialEditorGui.searchForTexture( %material.getId(), %material.diffuseMap[0]) ); + { + DecalPreviewWindow-->instancePreview.setBitmap( %material.getDiffuseMap(0) ); + } else - DecalPreviewWindow-->instancePreview.setBitmap("tools/materialEditor/gui/unknownImage"); + { + if(AssetDatabase.isDeclaredAsset(%material)) + { + %assetDef = AssetDatabase.acquireAsset(%material); + %difMap = %assetDef.materialDefinitionName.getDiffuseMap(0); + AssetDatabase.acquireAsset(%material); + + if(%difMap !$= "" && %difMap !$= "Core_Rendering:missingTexture") + { + DecalPreviewWindow-->instancePreview.setBitmap( %difMap ); + return; + } + } + + DecalPreviewWindow-->instancePreview.setBitmap("ToolsModule:unknownImage_image"); +} } function DecalEditorGui::rebuildInstanceTree( %this ) diff --git a/Templates/BaseGame/game/tools/decalEditor/decal_editor_d_image.asset.taml b/Templates/BaseGame/game/tools/decalEditor/decal_editor_d_image.asset.taml new file mode 100644 index 000000000..d342d426a --- /dev/null +++ b/Templates/BaseGame/game/tools/decalEditor/decal_editor_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/decalEditor/decal_editor_h_image.asset.taml b/Templates/BaseGame/game/tools/decalEditor/decal_editor_h_image.asset.taml new file mode 100644 index 000000000..50be078a0 --- /dev/null +++ b/Templates/BaseGame/game/tools/decalEditor/decal_editor_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/decalEditor/decal_editor_n_image.asset.taml b/Templates/BaseGame/game/tools/decalEditor/decal_editor_n_image.asset.taml new file mode 100644 index 000000000..2df2c21f9 --- /dev/null +++ b/Templates/BaseGame/game/tools/decalEditor/decal_editor_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/decalEditor/main.tscript b/Templates/BaseGame/game/tools/decalEditor/main.tscript index d948f1133..58b3201ec 100644 --- a/Templates/BaseGame/game/tools/decalEditor/main.tscript +++ b/Templates/BaseGame/game/tools/decalEditor/main.tscript @@ -24,7 +24,7 @@ function initializeDecalEditor() { echo(" % - Initializing Decal Editor"); - $decalDataFile = "art/decals/managedDecalData." @ $TorqueScriptFileExtension; + $decalDataFile = "data/managedDecalData." @ $TorqueScriptFileExtension; exec( "./decalEditor." @ $TorqueScriptFileExtension ); exec( "./decalEditorGui.gui" ); @@ -78,7 +78,7 @@ function DecalEditorPlugin::onWorldEditorStartup( %this ) // Add ourselves to the ToolsToolbar %tooltip = "Decal Editor (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "DecalEditorPlugin", "DecalEditorPalette", expandFilename("tools/decalEditor/decal-editor"), %tooltip ); + EditorGui.addToToolsToolbar( "DecalEditorPlugin", "DecalEditorPalette", "ToolsModule:decal_editor_n_image", %tooltip ); //connect editor windows GuiWindowCtrl::attach( DecalPreviewWindow, DecalEditorWindow ); diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/button.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/button.png deleted file mode 100644 index e255cb911..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/button.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/button_left.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/button_left.png deleted file mode 100644 index 3f7238fbf..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/button_left.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/button_middle.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/button_middle.png deleted file mode 100644 index 263e4bcc2..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/button_middle.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/button_right.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/button_right.png deleted file mode 100644 index 40ff128f1..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/button_right.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/button_toolbar.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/button_toolbar.png deleted file mode 100644 index 3de3b1519..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/button_toolbar.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/dropDown.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/dropDown.png deleted file mode 100644 index 795b0e575..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/dropDown.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/formMenu_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/formMenu_image.asset.taml new file mode 100644 index 000000000..eede1b7e6 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/formMenu_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/form_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/form_image.asset.taml new file mode 100644 index 000000000..823ab00b9 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/form_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/iconAccept.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconAccept.png deleted file mode 100644 index a24d6052d..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/iconAccept.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/iconCancel.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconCancel.png deleted file mode 100644 index 744df795a..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/iconCancel.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/iconInformation.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconInformation.png deleted file mode 100644 index a7e472232..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/iconInformation.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/iconNext_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconNext_image.asset.taml new file mode 100644 index 000000000..800b5098a --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconNext_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/iconPrevious_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconPrevious_image.asset.taml new file mode 100644 index 000000000..6521c6bf3 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconPrevious_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/iconRSSNews_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconRSSNews_image.asset.taml new file mode 100644 index 000000000..2e5a95f42 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconRSSNews_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/iconSave.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/iconSave.png deleted file mode 100644 index 50e70bd70..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/iconSave.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/images_window_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/images_window_image.asset.taml new file mode 100644 index 000000000..b4ffac18d --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/images_window_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_button_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_button_image.asset.taml new file mode 100644 index 000000000..94585dbfd --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_button_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_dark_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_dark_image.asset.taml new file mode 100644 index 000000000..6c3ac2c39 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_dark_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_light_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_light_image.asset.taml new file mode 100644 index 000000000..592ad2a95 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_light_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_medium_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_medium_image.asset.taml new file mode 100644 index 000000000..8a5e904d2 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/panel_medium_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_dark_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_dark_image.asset.taml new file mode 100644 index 000000000..583a22cd3 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_dark_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_image.asset.taml new file mode 100644 index 000000000..aeeeadde1 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_plusminus_header_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_plusminus_header_image.asset.taml new file mode 100644 index 000000000..5972f93a7 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_plusminus_header_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_plusminus_transparent_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_plusminus_transparent_image.asset.taml new file mode 100644 index 000000000..a0b7af1aa --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_plusminus_transparent_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_thin_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_thin_image.asset.taml new file mode 100644 index 000000000..c9f108cb0 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_thin_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_thin_light_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_thin_light_image.asset.taml new file mode 100644 index 000000000..5b4c19151 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/rollout_thin_light_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/scroll_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/scroll_image.asset.taml new file mode 100644 index 000000000..9c9855bb3 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/scroll_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/slider.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/slider.png deleted file mode 100644 index d13b9372d..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/slider.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/background.jpg b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/background.jpg deleted file mode 100644 index 5fee24333..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/background.jpg and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create.png deleted file mode 100644 index c3f868412..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_d.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_d.png deleted file mode 100644 index 35156129c..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_h.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_h.png deleted file mode 100644 index d8c0ccd5c..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_i.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_i.png deleted file mode 100644 index 5c21094d9..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/create_i.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import.png deleted file mode 100644 index b1f2448de..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_d.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_d.png deleted file mode 100644 index 4b30cd1b5..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_h.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_h.png deleted file mode 100644 index a5396d101..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_i.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_i.png deleted file mode 100644 index fae4e774a..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/import_i.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/navPanel.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/navPanel.png deleted file mode 100644 index 2d1493b59..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/navPanel.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open.png deleted file mode 100644 index 1af53606b..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_d.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_d.png deleted file mode 100644 index d83907bfd..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_d.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_h.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_h.png deleted file mode 100644 index 13938ae28..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_h.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_i.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_i.png deleted file mode 100644 index 1775c78e9..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/open_i.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/splash.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/splash.png deleted file mode 100644 index b988c35c3..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/splash.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarLeft.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarLeft.png deleted file mode 100644 index 206b6b0c6..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarLeft.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarMiddle.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarMiddle.png deleted file mode 100644 index c5332c092..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarMiddle.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarRight.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarRight.png deleted file mode 100644 index 4ea1bc2a5..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/start/topBarRight.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/tabBook_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/tabBook_image.asset.taml new file mode 100644 index 000000000..fc98a7408 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/tabBook_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/toolWindow_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/toolWindow_image.asset.taml new file mode 100644 index 000000000..b66ec7906 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/toolWindow_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/toolbar_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/toolbar_image.asset.taml new file mode 100644 index 000000000..324d0e809 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/toolbar_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/treeView.png b/Templates/BaseGame/game/tools/editorClasses/gui/images/treeView.png deleted file mode 100644 index ae42402f1..000000000 Binary files a/Templates/BaseGame/game/tools/editorClasses/gui/images/treeView.png and /dev/null differ diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/editor_menubar_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/editor_menubar_image.asset.taml new file mode 100644 index 000000000..e8a2ddd89 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/editor_menubar_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/icon_dropdownbar_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/icon_dropdownbar_image.asset.taml new file mode 100644 index 000000000..7e19624f8 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/icon_dropdownbar_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_dark_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_dark_image.asset.taml new file mode 100644 index 000000000..448e5ede0 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_dark_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_image.asset.taml new file mode 100644 index 000000000..af939cc49 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_inner_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_inner_image.asset.taml new file mode 100644 index 000000000..515d5f199 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_inner_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_list_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_list_image.asset.taml new file mode 100644 index 000000000..6d936ad1f --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_list_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_noheader_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_noheader_image.asset.taml new file mode 100644 index 000000000..fca827063 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/inspector_style_rollout_noheader_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/menu_fullborder_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/menu_fullborder_image.asset.taml new file mode 100644 index 000000000..790687740 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/menu_fullborder_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/menubar_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/menubar_image.asset.taml new file mode 100644 index 000000000..117c6b44e --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/menubar_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.tscript b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.tscript index 2b690ff79..f857f6c31 100644 --- a/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.tscript +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.tscript @@ -30,36 +30,36 @@ singleton GuiControlProfile (NavPanelProfile) singleton GuiControlProfile (NavPanel : NavPanelProfile) { - bitmap = "./navPanel"; + bitmapAsset = "ToolsModule:navPanel_image"; category = "Editor"; }; singleton GuiControlProfile (NavPanelBlue : NavPanelProfile) { - bitmap = "./navPanel_blue"; + bitmapAsset = "ToolsModule:navPanel_blue_image"; category = "Editor"; }; singleton GuiControlProfile (NavPanelGreen : NavPanelProfile) { - bitmap = "./navPanel_green"; + bitmapAsset = "ToolsModule:navPanel_green_image"; category = "Editor"; }; singleton GuiControlProfile (NavPanelRed : NavPanelProfile) { - bitmap = "./navPanel_red"; + bitmapAsset = "ToolsModule:navPanel_red_image"; category = "Editor"; }; singleton GuiControlProfile (NavPanelWhite : NavPanelProfile) { - bitmap = "./navPanel_white"; + bitmapAsset = "ToolsModule:navPanel_white_image"; category = "Editor"; }; singleton GuiControlProfile (NavPanelYellow : NavPanelProfile) { - bitmap = "./navPanel_yellow"; + bitmapAsset = "ToolsModule:navPanel_yellow_image"; category = "Editor"; }; diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_blue_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_blue_image.asset.taml new file mode 100644 index 000000000..806f7fb90 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_blue_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_green_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_green_image.asset.taml new file mode 100644 index 000000000..2c3caab46 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_green_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_image.asset.taml new file mode 100644 index 000000000..333237c7a --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_red_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_red_image.asset.taml new file mode 100644 index 000000000..d2d83b4a3 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_red_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_white_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_white_image.asset.taml new file mode 100644 index 000000000..fd2115fa4 --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_white_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_yellow_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_yellow_image.asset.taml new file mode 100644 index 000000000..133332a2e --- /dev/null +++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanel_yellow_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript b/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript index b5e93d831..dc7622eed 100644 --- a/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript +++ b/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript @@ -391,4 +391,4 @@ function GuiFormManager::ClearLayoutContent( %layoutObj ) else GuiFormManager::ClearLayoutContent( %object ); } -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/forestEditor/ForestEditToolbar,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/forestEditor/ForestEditToolbar,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..0a6f21ce3 --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/ForestEditToolbar,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/ForestEditorGui,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/forestEditor/ForestEditorGui,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..7a496d3c3 --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/ForestEditorGui,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/brushes.tscript b/Templates/BaseGame/game/tools/forestEditor/brushes.tscript index 2146c2e34..ea313e60b 100644 --- a/Templates/BaseGame/game/tools/forestEditor/brushes.tscript +++ b/Templates/BaseGame/game/tools/forestEditor/brushes.tscript @@ -20,6 +20,8 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- +//--- OBJECT WRITE BEGIN --- %forestBrushesGroup = new SimGroup( ForestBrushGroup ) { -}; \ No newline at end of file +}; +//--- OBJECT WRITE END --- \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/forestEditor/forestEditToolbar.ed.gui b/Templates/BaseGame/game/tools/forestEditor/forestEditToolbar.ed.gui index 782383121..c6976584f 100644 --- a/Templates/BaseGame/game/tools/forestEditor/forestEditToolbar.ed.gui +++ b/Templates/BaseGame/game/tools/forestEditor/forestEditToolbar.ed.gui @@ -118,7 +118,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -139,7 +139,7 @@ }; }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; wrap = "0"; isContainer = "0"; Profile = "ToolsGuiDefaultProfile"; @@ -220,7 +220,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -241,7 +241,7 @@ }; }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; wrap = "0"; isContainer = "0"; Profile = "ToolsGuiDefaultProfile"; @@ -322,7 +322,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; diff --git a/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.gui b/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.gui index e46a09f3d..171c34ffd 100644 --- a/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.gui +++ b/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.gui @@ -295,7 +295,7 @@ canSaveDynamicFields = "0"; new GuiBitmapButtonCtrl() { - bitmap = "tools/forestEditor/images/new-mesh"; + bitmapAsset = "ToolsModule:new_mesh_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -315,7 +315,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -358,7 +358,7 @@ canSaveDynamicFields = "0"; new GuiBitmapButtonCtrl() { - bitmap = "tools/forestEditor/images/new-brush"; + bitmapAsset = "ToolsModule:new_brush_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -378,7 +378,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/forestEditor/images/new-element"; + bitmapAsset = "ToolsModule:new_element_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -398,7 +398,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; diff --git a/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.tscript b/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.tscript index b6a3d61d4..93e659307 100644 --- a/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.tscript +++ b/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.tscript @@ -171,13 +171,15 @@ function ForestEditorGui::deleteBrushOrElement( %this ) function ForestEditorGui::newMesh( %this ) { - SelectAssetPath.showDialog(AssetBrowser.dirHandler.currentAddress, "createNewForestMesh", "Select Forest Mesh Datablock Path"); - SelectAssetPathWindow.selectWindow(); + AssetBrowser_SelectModule.showDialog("ForestEditorGui.pickedNewMeshTargetModule"); + AssetBrowser_SelectModuleWindow.selectWindow(); } -function createNewForestMesh(%newPath) +function ForestEditorGui::pickedNewMeshTargetModule(%this, %module) { - ForestEditorGui.newMeshPath = %newPath; + %moduleDef = ModuleDatabase.findModule(%module); + + ForestEditorGui.forestItemDataPath = %moduleDef.ModulePath @ "/scripts/managedData/managedForestItemData." @ $TorqueScriptFileExtension; AssetBrowser.showDialog("ShapeAsset", "selectNewForestMesh", "", "", ""); } @@ -212,10 +214,10 @@ function selectNewForestMesh(%selectedShapeAssetId) //%str = "datablock TSForestItemData( " @ %name @ " ) { shapeFile = \"" @ %fullPath @ "\"; };"; //eval( %str ); - %fullPath = AssetDatabase.acquireAsset(%selectedShapeAssetId).getShapeFile(); + //%fullPath = AssetDatabase.acquireAsset(%selectedShapeAssetId).getShapeFile(); new TSForestItemData(%name) { - shapeFile = %fullPath; + shapeAsset = %selectedShapeAssetId; }; %isrl = isObject( %name ); @@ -228,7 +230,7 @@ function selectNewForestMesh(%selectedShapeAssetId) ForestEditMeshTree.scrollVisible( %item ); ForestEditMeshTree.addSelection( %item ); - ForestDataManager.setDirty( %name, ForestEditorGui.newMeshPath @ "/managedForestItemData." @ $TorqueScriptFileExtension ); + ForestDataManager.setDirty( %name, ForestEditorGui.forestItemDataPath ); %element = new ForestBrushElement() { diff --git a/Templates/BaseGame/game/tools/forestEditor/images/erase_all_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/erase_all_btn_d_image.asset.taml new file mode 100644 index 000000000..00a60d891 --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/erase_all_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/erase_all_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/erase_all_btn_h_image.asset.taml new file mode 100644 index 000000000..1c7d2be31 --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/erase_all_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/erase_all_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/erase_all_btn_n_image.asset.taml new file mode 100644 index 000000000..d4311cf4b --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/erase_all_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/erase_element_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/erase_element_btn_d_image.asset.taml new file mode 100644 index 000000000..8ba376881 --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/erase_element_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/erase_element_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/erase_element_btn_h_image.asset.taml new file mode 100644 index 000000000..cd42448a5 --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/erase_element_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/erase_element_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/erase_element_btn_n_image.asset.taml new file mode 100644 index 000000000..dbc602a54 --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/erase_element_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/forest_editor_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/forest_editor_btn_d_image.asset.taml new file mode 100644 index 000000000..1cd6a9fb6 --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/forest_editor_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/forest_editor_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/forest_editor_btn_h_image.asset.taml new file mode 100644 index 000000000..8ad241073 --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/forest_editor_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/forest_editor_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/forest_editor_btn_n_image.asset.taml new file mode 100644 index 000000000..85e467208 --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/forest_editor_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/new_brush_d_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/new_brush_d_image.asset.taml new file mode 100644 index 000000000..8b10ca956 --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/new_brush_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/new_brush_h_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/new_brush_h_image.asset.taml new file mode 100644 index 000000000..862691604 --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/new_brush_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/new_brush_n_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/new_brush_n_image.asset.taml new file mode 100644 index 000000000..2c653463f --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/new_brush_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/new_element_d_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/new_element_d_image.asset.taml new file mode 100644 index 000000000..65e245e8c --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/new_element_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/new_element_h_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/new_element_h_image.asset.taml new file mode 100644 index 000000000..3cc350b9b --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/new_element_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/new_element_n_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/new_element_n_image.asset.taml new file mode 100644 index 000000000..e0cf4097a --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/new_element_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/new_mesh_d_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/new_mesh_d_image.asset.taml new file mode 100644 index 000000000..5ba86d976 --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/new_mesh_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/new_mesh_h_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/new_mesh_h_image.asset.taml new file mode 100644 index 000000000..d6bd7ca75 --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/new_mesh_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/new_mesh_n_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/new_mesh_n_image.asset.taml new file mode 100644 index 000000000..773b8df0d --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/new_mesh_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/paint_forest_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/paint_forest_btn_d_image.asset.taml new file mode 100644 index 000000000..607f771dc --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/paint_forest_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/paint_forest_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/paint_forest_btn_h_image.asset.taml new file mode 100644 index 000000000..54293386d --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/paint_forest_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/images/paint_forest_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/forestEditor/images/paint_forest_btn_n_image.asset.taml new file mode 100644 index 000000000..b021431fa --- /dev/null +++ b/Templates/BaseGame/game/tools/forestEditor/images/paint_forest_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/forestEditor/main.tscript b/Templates/BaseGame/game/tools/forestEditor/main.tscript index 99d1bab88..9f4689622 100644 --- a/Templates/BaseGame/game/tools/forestEditor/main.tscript +++ b/Templates/BaseGame/game/tools/forestEditor/main.tscript @@ -119,7 +119,7 @@ function ForestEditorPlugin::onWorldEditorStartup( %this ) // Add ourselves to the tools menu. %tooltip = "Forest Editor (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "ForestEditorPlugin", "ForestEditorPalette", expandFilename("tools/forestEditor/images/forest-editor-btn"), %tooltip ); + EditorGui.addToToolsToolbar( "ForestEditorPlugin", "ForestEditorPalette", "ToolsModule:forest_editor_btn_n_image", %tooltip ); //connect editor windows GuiWindowCtrl::attach( ForestEditorPropertiesWindow, ForestEditorPalleteWindow ); @@ -308,4 +308,4 @@ function ForestEditorPlugin::handleCopy( %this ) function ForestEditorPlugin::handlePaste( %this ) { ForestTools->SelectionTool.pasteSelection(); -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/gui/.asset.taml b/Templates/BaseGame/game/tools/gui/.asset.taml new file mode 100644 index 000000000..5995b2ea7 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/gui/AssimpImportDlg,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/gui/AssimpImportDlg,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..1e47bf124 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/AssimpImportDlg,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/ColladaImportDlg,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/gui/ColladaImportDlg,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..e94e20b1d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/ColladaImportDlg,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/ColorPickerDlg,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/gui/ColorPickerDlg,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..cf8d66f70 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/ColorPickerDlg,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/CubemapEditor.asset.taml b/Templates/BaseGame/game/tools/gui/CubemapEditor.asset.taml new file mode 100644 index 000000000..bf47a3b3e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/CubemapEditor.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/EditorLoadingGui,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/gui/EditorLoadingGui,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..9f88d3915 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/EditorLoadingGui,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/EditorSettingsWindow,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/gui/EditorSettingsWindow,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..f9f52ce07 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/EditorSettingsWindow,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/GuiEaseEditDlg,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/gui/GuiEaseEditDlg,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..6e9c821c1 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/GuiEaseEditDlg,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/MaterialSelectorOverlay, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/gui/MaterialSelectorOverlay, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..e839b6a0d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/MaterialSelectorOverlay, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/ProfilerGraphGui.asset.taml b/Templates/BaseGame/game/tools/gui/ProfilerGraphGui.asset.taml new file mode 100644 index 000000000..ddc29ee33 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/ProfilerGraphGui.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/RenderTargetVisualizer.asset.taml b/Templates/BaseGame/game/tools/gui/RenderTargetVisualizer.asset.taml new file mode 100644 index 000000000..b2d88386e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/RenderTargetVisualizer.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/ScriptEditorDlg,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/gui/ScriptEditorDlg,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..4d0ee9c39 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/ScriptEditorDlg,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/UVEditorOverlay, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/gui/UVEditorOverlay, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..87e0161d5 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/UVEditorOverlay, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/assimpImport.ed.tscript b/Templates/BaseGame/game/tools/gui/assimpImport.ed.tscript index 054e31e51..af9f3bb38 100644 --- a/Templates/BaseGame/game/tools/gui/assimpImport.ed.tscript +++ b/Templates/BaseGame/game/tools/gui/assimpImport.ed.tscript @@ -284,7 +284,7 @@ function AssimpImportDlg::showDialog(%this, %shapePath, %cmd) if (isFile(%csPath)) exec(%csPath); - %this.constructor = ShapeEditor.findConstructor(%this.path); + %this.constructor = findShapeConstructorByFilename(%this.path); // Only show the import dialog if required. Note that 'GetShapeInfo' will // fail if the source file is missing, or a cached.dts is available. @@ -537,4 +537,4 @@ function AssimpImportDlg::saveSettingsTo(%this, %filename) %fileObj.close(); %fileObj.delete(); -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/gui/colladaImport.ed.gui b/Templates/BaseGame/game/tools/gui/colladaImport.ed.gui index d098bffe6..4909cee08 100644 --- a/Templates/BaseGame/game/tools/gui/colladaImport.ed.gui +++ b/Templates/BaseGame/game/tools/gui/colladaImport.ed.gui @@ -1259,7 +1259,7 @@ function ColladaImportDlg::showDialog(%this, %shapePath, %cmd) if (isFile(%csPath)) exec(%csPath); - %this.constructor = ShapeEditor.findConstructor(%this.path); + %this.constructor = findShapeConstructorByFilename(%this.path); // Only show the import dialog if required. Note that 'enumColladaScene' will // fail if the COLLADA file is missing, or a cached.dts is available. @@ -1768,4 +1768,4 @@ function showImportDialog(%shapePath, %cmd) if ( isObject(AssimpImportDlg) ) AssimpImportDlg.showDialog(%shapePath, %cmd); } -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/gui/cubemapEditor.gui b/Templates/BaseGame/game/tools/gui/cubemapEditor.gui index 26ae7877d..ee274fa10 100644 --- a/Templates/BaseGame/game/tools/gui/cubemapEditor.gui +++ b/Templates/BaseGame/game/tools/gui/cubemapEditor.gui @@ -143,7 +143,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiTextCtrl(matEd_cubeMapEd_xPosTxt) { @@ -170,7 +170,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; // ------------------------------ X Negitive ------------------------------------ new GuiBitmapCtrl(matEd_cubemapEd_XNeg) { @@ -186,7 +186,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiTextCtrl(matEd_cubeMapEd_xNegTxt) { @@ -213,7 +213,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; // ------------------------------ Y Positive ------------------------------------ new GuiBitmapCtrl(matEd_cubemapEd_YPos) { @@ -229,7 +229,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiTextCtrl(matEd_cubeMapEd_yPosTxt) { @@ -256,7 +256,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; // ------------------------------ Y Negitive ------------------------------------ new GuiBitmapCtrl(matEd_cubemapEd_YNeG) { @@ -272,7 +272,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiTextCtrl(matEd_cubeMapEd_yNegTxt) { @@ -299,7 +299,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; // ------------------------------ Z Positive ------------------------------------ new GuiBitmapCtrl(matEd_cubemapEd_ZPos) { @@ -315,7 +315,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiTextCtrl(matEd_cubeMapEd_zPosTxt) { @@ -342,7 +342,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; // ------------------------------ Z Negitive ------------------------------------ new GuiBitmapCtrl(matEd_cubemapEd_ZNeg) { @@ -358,7 +358,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiTextCtrl(matEd_cubeMapEd_zNegTxt) { @@ -385,7 +385,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; // Create New Cubemap @@ -404,7 +404,7 @@ Command = "matEd_addCubemapWindow.setVisible(1);"; // -------------- Needs Hookup Create New Cubemap hovertime = "1000"; tooltip = "Create New Cubemap"; - bitmap = "tools/gui/images/new"; + bitmapAsset = "ToolsModule:new_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -424,7 +424,7 @@ Command = "MaterialEditorGui.showDeleteCubemapDialog();"; // -------------- Needs Hookup Delete Cubemap hovertime = "1000"; tooltip = "Delete Cubemap"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -445,10 +445,10 @@ Command = "MaterialEditorGui.showSaveCubemapDialog();"; // -------------- Needs Hookup Save Cubemap hovertime = "1000"; tooltip = "Save Cubemap"; - bitmap = "tools/gui/images/save-icon"; + bitmapAsset = "ToolsModule:save_icon_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; }; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript b/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript index 55842264c..b64d2cb42 100644 --- a/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript +++ b/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript @@ -531,4 +531,4 @@ function ESettingsWindow::getGameOptionsSettings(%this) SettingsInspector.startGroup("Options Settings"); SettingsInspector.addSettingsField("Options/optionsList", "OptionsList", "OptionsSetting", ""); SettingsInspector.endGroup(); -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/gui/guiDialogs.ed.tscript b/Templates/BaseGame/game/tools/gui/guiDialogs.ed.tscript index fdb16e1b4..1eae6bb2e 100644 --- a/Templates/BaseGame/game/tools/gui/guiDialogs.ed.tscript +++ b/Templates/BaseGame/game/tools/gui/guiDialogs.ed.tscript @@ -34,7 +34,6 @@ exec("./GuiEaseEditDlg.ed." @ $TorqueScriptFileExtension); exec("./guiObjectInspector.ed." @ $TorqueScriptFileExtension); exec("./uvEditor.ed.gui"); exec("./objectSelection.ed." @ $TorqueScriptFileExtension); -exec("./postFxManager.gui"); exec("./assimpImport.ed.gui"); exec("./fieldTypes/assetDependencies." @ $TorqueScriptFileExtension); diff --git a/Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.gui b/Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.gui index 596e8e216..ecc17c7e2 100644 --- a/Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.gui +++ b/Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.gui @@ -94,7 +94,7 @@ }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/clear-icon"; + bitmapAsset = "ToolsModule:clear_icon_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; diff --git a/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconAnimation_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconAnimation_image.asset.taml new file mode 100644 index 000000000..129f0721e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconAnimation_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconExistingMaterial_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconExistingMaterial_image.asset.taml new file mode 100644 index 000000000..998570966 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconExistingMaterial_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconIgnoreNode_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconIgnoreNode_image.asset.taml new file mode 100644 index 000000000..8516179f6 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconIgnoreNode_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconLight_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconLight_image.asset.taml new file mode 100644 index 000000000..4e9137ac9 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconLight_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconMaterial_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconMaterial_image.asset.taml new file mode 100644 index 000000000..1577eaeb6 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconMaterial_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconMesh_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconMesh_image.asset.taml new file mode 100644 index 000000000..36acd50d4 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconMesh_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconNode_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconNode_image.asset.taml new file mode 100644 index 000000000..58ba1fe3a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/ColladaImport/iconNode_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_bottom_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_bottom_d_image.asset.taml new file mode 100644 index 000000000..7b17b67fe --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_bottom_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_bottom_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_bottom_h_image.asset.taml new file mode 100644 index 000000000..d737b96b4 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_bottom_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_bottom_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_bottom_n_image.asset.taml new file mode 100644 index 000000000..0955cbc44 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_bottom_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_left_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_left_d_image.asset.taml new file mode 100644 index 000000000..d036eb9c3 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_left_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_left_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_left_h_image.asset.taml new file mode 100644 index 000000000..65926041e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_left_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_left_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_left_n_image.asset.taml new file mode 100644 index 000000000..0731efae2 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_left_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_right_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_right_d_image.asset.taml new file mode 100644 index 000000000..9d48fd1d9 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_right_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_right_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_right_h_image.asset.taml new file mode 100644 index 000000000..37d02af2c --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_right_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_right_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_right_n_image.asset.taml new file mode 100644 index 000000000..7941ff148 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_right_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_top_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_top_d_image.asset.taml new file mode 100644 index 000000000..e4bed46b4 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_top_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_top_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_top_h_image.asset.taml new file mode 100644 index 000000000..cd9aba9bc --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_top_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_top_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_top_n_image.asset.taml new file mode 100644 index 000000000..bc69eeb4a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/align_top_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/bring_to_front_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/bring_to_front_d_image.asset.taml new file mode 100644 index 000000000..845674d0a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/bring_to_front_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/bring_to_front_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/bring_to_front_h_image.asset.taml new file mode 100644 index 000000000..d3aeb5063 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/bring_to_front_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/bring_to_front_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/bring_to_front_n_image.asset.taml new file mode 100644 index 000000000..ac4dfb351 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/bring_to_front_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_d_image.asset.taml new file mode 100644 index 000000000..d5c64f22d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_h_image.asset.taml new file mode 100644 index 000000000..ffa2b7cca --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_n_image.asset.taml new file mode 100644 index 000000000..6930da05b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/centersnap_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_horizontal_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_horizontal_d_image.asset.taml new file mode 100644 index 000000000..f00ccce18 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_horizontal_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_horizontal_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_horizontal_h_image.asset.taml new file mode 100644 index 000000000..2fd033b2b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_horizontal_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_horizontal_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_horizontal_n_image.asset.taml new file mode 100644 index 000000000..b2b0568ad --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_horizontal_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_vertical_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_vertical_d_image.asset.taml new file mode 100644 index 000000000..b33f5a276 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_vertical_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_vertical_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_vertical_h_image.asset.taml new file mode 100644 index 000000000..84b033624 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_vertical_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_vertical_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_vertical_n_image.asset.taml new file mode 100644 index 000000000..a569b8f7e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/distribute_vertical_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_d_image.asset.taml new file mode 100644 index 000000000..729170139 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_h_image.asset.taml new file mode 100644 index 000000000..384957402 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_n_image.asset.taml new file mode 100644 index 000000000..d9b9b8162 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/edgesnap_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/gui_library_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/gui_library_d_image.asset.taml new file mode 100644 index 000000000..ecd1b34cd --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/gui_library_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/gui_library_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/gui_library_h_image.asset.taml new file mode 100644 index 000000000..0eee7d88d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/gui_library_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/gui_library_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/gui_library_n_image.asset.taml new file mode 100644 index 000000000..0642feba2 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/gui_library_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal_center_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal_center_d_image.asset.taml new file mode 100644 index 000000000..e6c999095 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal_center_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal_center_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal_center_h_image.asset.taml new file mode 100644 index 000000000..ef398e4c3 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal_center_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal_center_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal_center_n_image.asset.taml new file mode 100644 index 000000000..a8402fe03 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/horizontal_center_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/send_to_back_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/send_to_back_d_image.asset.taml new file mode 100644 index 000000000..92ecde67e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/send_to_back_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/send_to_back_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/send_to_back_h_image.asset.taml new file mode 100644 index 000000000..519b9565c --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/send_to_back_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/send_to_back_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/send_to_back_n_image.asset.taml new file mode 100644 index 000000000..67e3e042a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/send_to_back_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/snap_grid_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/snap_grid_d_image.asset.taml new file mode 100644 index 000000000..a0fc9ca0e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/snap_grid_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/snap_grid_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/snap_grid_h_image.asset.taml new file mode 100644 index 000000000..83fd738a8 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/snap_grid_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/snap_grid_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/snap_grid_n_image.asset.taml new file mode 100644 index 000000000..a3e366718 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/snap_grid_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical_center_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical_center_d_image.asset.taml new file mode 100644 index 000000000..11dbf9f64 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical_center_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical_center_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical_center_h_image.asset.taml new file mode 100644 index 000000000..7314dfe12 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical_center_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical_center_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical_center_n_image.asset.taml new file mode 100644 index 000000000..8cbc23ce7 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/GUI-editor/vertical_center_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/NESW_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/NESW_image.asset.taml new file mode 100644 index 000000000..3e50a4009 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/NESW_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/NWSE_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/NWSE_image.asset.taml new file mode 100644 index 000000000..de2209444 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/NWSE_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_ctrl_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_ctrl_d_image.asset.taml new file mode 100644 index 000000000..d8500e63e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_ctrl_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_ctrl_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_ctrl_h_image.asset.taml new file mode 100644 index 000000000..e98b66bdd --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_ctrl_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_ctrl_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_ctrl_n_image.asset.taml new file mode 100644 index 000000000..6305afcf6 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_ctrl_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_d_image.asset.taml new file mode 100644 index 000000000..82dda697e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_h_image.asset.taml new file mode 100644 index 000000000..9bf4655a2 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_n_image.asset.taml new file mode 100644 index 000000000..90ef5381a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/add_simgroup_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/arrowbtn_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/arrowbtn_d_image.asset.taml new file mode 100644 index 000000000..f8b4e1826 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/arrowbtn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/arrowbtn_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/arrowbtn_n_image.asset.taml new file mode 100644 index 000000000..084792940 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/arrowbtn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/axis_icon__x_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/axis_icon__x_image.asset.taml new file mode 100644 index 000000000..e929d0422 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/axis_icon__x_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/axis_icon__y_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/axis_icon__y_image.asset.taml new file mode 100644 index 000000000..5a84cfaf4 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/axis_icon__y_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/axis_icon__z_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/axis_icon__z_image.asset.taml new file mode 100644 index 000000000..0d1bcc56a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/axis_icon__z_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/axis_icon_x_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/axis_icon_x_image.asset.taml new file mode 100644 index 000000000..6b696c46d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/axis_icon_x_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/axis_icon_y_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/axis_icon_y_image.asset.taml new file mode 100644 index 000000000..23572020a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/axis_icon_y_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/axis_icon_z_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/axis_icon_z_image.asset.taml new file mode 100644 index 000000000..dd70f82a8 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/axis_icon_z_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/button_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/button_image.asset.taml new file mode 100644 index 000000000..9069be9a9 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/button_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/camera_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/camera_btn_d_image.asset.taml new file mode 100644 index 000000000..c9ed05626 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/camera_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/camera_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/camera_btn_h_image.asset.taml new file mode 100644 index 000000000..dbfb64bc7 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/camera_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/camera_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/camera_btn_n_image.asset.taml new file mode 100644 index 000000000..4d041d6bc --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/camera_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/checkbox_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/checkbox_image.asset.taml new file mode 100644 index 000000000..30de51698 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/checkbox_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/checkbox_list_fliped_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/checkbox_list_fliped_image.asset.taml new file mode 100644 index 000000000..e093f49b5 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/checkbox_list_fliped_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/checkbox_list_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/checkbox_list_image.asset.taml new file mode 100644 index 000000000..f5ee07ed3 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/checkbox_list_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/checkbox_menubar_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/checkbox_menubar_image.asset.taml new file mode 100644 index 000000000..7447e5821 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/checkbox_menubar_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/clear_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/clear_btn_d_image.asset.taml new file mode 100644 index 000000000..a35213c68 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/clear_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/clear_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/clear_btn_h_image.asset.taml new file mode 100644 index 000000000..49b78e8a2 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/clear_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/clear_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/clear_btn_n_image.asset.taml new file mode 100644 index 000000000..c6868777f --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/clear_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/clear_icon_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/clear_icon_d_image.asset.taml new file mode 100644 index 000000000..be9a79774 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/clear_icon_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/clear_icon_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/clear_icon_h_image.asset.taml new file mode 100644 index 000000000..716fb70b2 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/clear_icon_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/clear_icon_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/clear_icon_n_image.asset.taml new file mode 100644 index 000000000..e34a193b5 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/clear_icon_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/collapse_toolbar_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/collapse_toolbar_d_image.asset.taml new file mode 100644 index 000000000..92894d013 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/collapse_toolbar_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/collapse_toolbar_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/collapse_toolbar_h_image.asset.taml new file mode 100644 index 000000000..f78712c70 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/collapse_toolbar_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/collapse_toolbar_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/collapse_toolbar_n_image.asset.taml new file mode 100644 index 000000000..3938463f3 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/collapse_toolbar_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/copy_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/copy_btn_d_image.asset.taml new file mode 100644 index 000000000..547e3ab6b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/copy_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/copy_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/copy_btn_h_image.asset.taml new file mode 100644 index 000000000..f330b892e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/copy_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/copy_btn_i_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/copy_btn_i_image.asset.taml new file mode 100644 index 000000000..b41d2105b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/copy_btn_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/copy_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/copy_btn_n_image.asset.taml new file mode 100644 index 000000000..d6d47f7e7 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/copy_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/crosshair_blue_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/crosshair_blue_image.asset.taml new file mode 100644 index 000000000..fca94e41a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/crosshair_blue_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/crosshair_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/crosshair_image.asset.taml new file mode 100644 index 000000000..454dce4d0 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/crosshair_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/delete_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/delete_d_image.asset.taml new file mode 100644 index 000000000..dc0ccd6c2 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/delete_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/delete_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/delete_h_image.asset.taml new file mode 100644 index 000000000..4f15bd645 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/delete_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/delete_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/delete_n_image.asset.taml new file mode 100644 index 000000000..e5975769e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/delete_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/dropDown_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/dropDown_image.asset.taml new file mode 100644 index 000000000..657510d4e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/dropDown_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/dropDown_tab_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/dropDown_tab_image.asset.taml new file mode 100644 index 000000000..190a38c28 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/dropDown_tab_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/dropdown_button_arrow_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/dropdown_button_arrow_image.asset.taml new file mode 100644 index 000000000..449f1638b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/dropdown_button_arrow_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/dropdown_textEdit_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/dropdown_textEdit_image.asset.taml new file mode 100644 index 000000000..63455e9dd --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/dropdown_textEdit_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/dropslider_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/dropslider_d_image.asset.taml new file mode 100644 index 000000000..e1aafe2e2 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/dropslider_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/dropslider_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/dropslider_h_image.asset.taml new file mode 100644 index 000000000..666c57ac3 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/dropslider_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/dropslider_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/dropslider_n_image.asset.taml new file mode 100644 index 000000000..1ccfc0900 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/dropslider_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/expand_toolbar_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/expand_toolbar_d_image.asset.taml new file mode 100644 index 000000000..e693637b9 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/expand_toolbar_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/expand_toolbar_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/expand_toolbar_h_image.asset.taml new file mode 100644 index 000000000..d014248c6 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/expand_toolbar_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/expand_toolbar_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/expand_toolbar_n_image.asset.taml new file mode 100644 index 000000000..efd5fd96d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/expand_toolbar_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/folderDown_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/folderDown_image.asset.taml new file mode 100644 index 000000000..a74b5259f --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/folderDown_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/folderUp_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/folderUp_d_image.asset.taml new file mode 100644 index 000000000..66ca5dc6b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/folderUp_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/folderUp_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/folderUp_h_image.asset.taml new file mode 100644 index 000000000..06a4bd904 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/folderUp_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/folderUp_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/folderUp_image.asset.taml new file mode 100644 index 000000000..def5a336f --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/folderUp_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/folder_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/folder_image.asset.taml new file mode 100644 index 000000000..473e98b75 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/folder_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/group_border_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/group_border_image.asset.taml new file mode 100644 index 000000000..9b2972e84 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/group_border_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconAccept_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconAccept_image.asset.taml new file mode 100644 index 000000000..82e88e870 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconAccept_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconAdd_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconAdd_image.asset.taml new file mode 100644 index 000000000..bf8333d7a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconAdd_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconCancel_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconCancel_image.asset.taml new file mode 100644 index 000000000..e7b4d41f1 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconCancel_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconCollada_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconCollada_image.asset.taml new file mode 100644 index 000000000..385aec624 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconCollada_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconDelete_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconDelete_image.asset.taml new file mode 100644 index 000000000..c504fea0e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconDelete_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconError_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconError_image.asset.taml new file mode 100644 index 000000000..d6f1cc74c --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconError_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconIcon_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconIcon_image.asset.taml new file mode 100644 index 000000000..887456fcb --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconIcon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconInformation_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconInformation_image.asset.taml new file mode 100644 index 000000000..e4df9f3a5 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconInformation_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconList_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconList_image.asset.taml new file mode 100644 index 000000000..ef98b403c --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconList_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconLocked_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconLocked_image.asset.taml new file mode 100644 index 000000000..9fe69e67c --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconLocked_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconNew_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconNew_image.asset.taml new file mode 100644 index 000000000..ffa450fd6 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconNew_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconOpen_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconOpen_image.asset.taml new file mode 100644 index 000000000..e4e39c6cd --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconOpen_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconRefresh_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconRefresh_image.asset.taml new file mode 100644 index 000000000..6fbab6883 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconRefresh_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconSave_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconSave_image.asset.taml new file mode 100644 index 000000000..bb258b950 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconSave_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconUnlocked_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconUnlocked_image.asset.taml new file mode 100644 index 000000000..26a344a13 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconUnlocked_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconVisible_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconVisible_image.asset.taml new file mode 100644 index 000000000..905e6773b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconVisible_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconWarn_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconWarn_image.asset.taml new file mode 100644 index 000000000..a04354fd7 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconWarn_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconbutton_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconbutton_image.asset.taml new file mode 100644 index 000000000..c1701af7b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconbutton_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/iconbuttonsmall_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/iconbuttonsmall_image.asset.taml new file mode 100644 index 000000000..c2c05e81d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/iconbuttonsmall_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/inactive_overlay_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/inactive_overlay_image.asset.taml new file mode 100644 index 000000000..318f2f289 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/inactive_overlay_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/layers_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/layers_btn_d_image.asset.taml new file mode 100644 index 000000000..8d8f0c697 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/layers_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/layers_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/layers_btn_h_image.asset.taml new file mode 100644 index 000000000..b926b7f80 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/layers_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/layers_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/layers_btn_n_image.asset.taml new file mode 100644 index 000000000..8d4264a31 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/layers_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/leftRight_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/leftRight_image.asset.taml new file mode 100644 index 000000000..30f603518 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/leftRight_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/lock_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/lock_d_image.asset.taml new file mode 100644 index 000000000..bab1fac2e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/lock_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/lock_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/lock_h_image.asset.taml new file mode 100644 index 000000000..120353080 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/lock_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/lock_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/lock_n_image.asset.taml new file mode 100644 index 000000000..21de1e1a7 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/lock_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/arrow_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/arrow_d_image.asset.taml new file mode 100644 index 000000000..ad5fa895f --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/arrow_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/arrow_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/arrow_h_image.asset.taml new file mode 100644 index 000000000..d8829482c --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/arrow_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/arrow_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/arrow_n_image.asset.taml new file mode 100644 index 000000000..43410f782 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/arrow_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/bounds_center_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/bounds_center_d_image.asset.taml new file mode 100644 index 000000000..66c1b4ad8 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/bounds_center_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/bounds_center_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/bounds_center_h_image.asset.taml new file mode 100644 index 000000000..7b00aa21c --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/bounds_center_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/bounds_center_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/bounds_center_n_image.asset.taml new file mode 100644 index 000000000..dabc49afe --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/bounds_center_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/delete_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/delete_btn_d_image.asset.taml new file mode 100644 index 000000000..0f19a9ab4 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/delete_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/delete_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/delete_btn_h_image.asset.taml new file mode 100644 index 000000000..64c6b2d5d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/delete_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/delete_btn_i_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/delete_btn_i_image.asset.taml new file mode 100644 index 000000000..ebdab5152 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/delete_btn_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/delete_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/delete_btn_n_image.asset.taml new file mode 100644 index 000000000..6c176f78f --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/delete_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/explode_prefab_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/explode_prefab_d_image.asset.taml new file mode 100644 index 000000000..083fdbdfe --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/explode_prefab_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/explode_prefab_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/explode_prefab_h_image.asset.taml new file mode 100644 index 000000000..83d4c1d02 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/explode_prefab_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/explode_prefab_i_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/explode_prefab_i_image.asset.taml new file mode 100644 index 000000000..d276ee999 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/explode_prefab_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/explode_prefab_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/explode_prefab_n_image.asset.taml new file mode 100644 index 000000000..30902038a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/explode_prefab_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/fit_selection_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/fit_selection_d_image.asset.taml new file mode 100644 index 000000000..f7d0509af --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/fit_selection_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/fit_selection_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/fit_selection_h_image.asset.taml new file mode 100644 index 000000000..b7ac193c2 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/fit_selection_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/fit_selection_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/fit_selection_n_image.asset.taml new file mode 100644 index 000000000..b6f9679d4 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/fit_selection_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_d_image.asset.taml new file mode 100644 index 000000000..544267d81 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_h_image.asset.taml new file mode 100644 index 000000000..866507c7b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_n_image.asset.taml new file mode 100644 index 000000000..0c34c1608 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/object_center_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/object_center_d_image.asset.taml new file mode 100644 index 000000000..457174245 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/object_center_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/object_center_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/object_center_h_image.asset.taml new file mode 100644 index 000000000..7f5307e18 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/object_center_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/object_center_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/object_center_n_image.asset.taml new file mode 100644 index 000000000..340c2a58a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/object_center_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/object_node_icon_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/object_node_icon_d_image.asset.taml new file mode 100644 index 000000000..f1be7ba89 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/object_node_icon_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/object_node_icon_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/object_node_icon_h_image.asset.taml new file mode 100644 index 000000000..36d070819 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/object_node_icon_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/object_node_icon_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/object_node_icon_n_image.asset.taml new file mode 100644 index 000000000..4ac396b6f --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/object_node_icon_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/object_node_lable_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/object_node_lable_d_image.asset.taml new file mode 100644 index 000000000..923a97936 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/object_node_lable_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/object_node_lable_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/object_node_lable_h_image.asset.taml new file mode 100644 index 000000000..44384d92a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/object_node_lable_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/object_node_lable_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/object_node_lable_n_image.asset.taml new file mode 100644 index 000000000..b9e3274f4 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/object_node_lable_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/object_transform_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/object_transform_d_image.asset.taml new file mode 100644 index 000000000..2c3fbe3be --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/object_transform_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/object_transform_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/object_transform_h_image.asset.taml new file mode 100644 index 000000000..49636ce6c --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/object_transform_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/object_transform_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/object_transform_n_image.asset.taml new file mode 100644 index 000000000..5f66f6bd3 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/object_transform_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/orbit_cam_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/orbit_cam_d_image.asset.taml new file mode 100644 index 000000000..2e35de1a6 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/orbit_cam_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/orbit_cam_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/orbit_cam_h_image.asset.taml new file mode 100644 index 000000000..9049c9954 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/orbit_cam_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/orbit_cam_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/orbit_cam_n_image.asset.taml new file mode 100644 index 000000000..7b14b5679 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/orbit_cam_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/probe_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/probe_d_image.asset.taml new file mode 100644 index 000000000..75e55df26 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/probe_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/probe_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/probe_h_image.asset.taml new file mode 100644 index 000000000..bbfe3a030 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/probe_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/probe_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/probe_n_image.asset.taml new file mode 100644 index 000000000..77d87ed6b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/probe_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/rotate_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/rotate_d_image.asset.taml new file mode 100644 index 000000000..fd704188c --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/rotate_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/rotate_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/rotate_h_image.asset.taml new file mode 100644 index 000000000..e85c6b1a9 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/rotate_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/rotate_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/rotate_n_image.asset.taml new file mode 100644 index 000000000..2140600b1 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/rotate_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/scale_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/scale_d_image.asset.taml new file mode 100644 index 000000000..bc27096de --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/scale_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/scale_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/scale_h_image.asset.taml new file mode 100644 index 000000000..3d5a9dee8 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/scale_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/scale_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/scale_n_image.asset.taml new file mode 100644 index 000000000..107bbc158 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/scale_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/select_bounds_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/select_bounds_d_image.asset.taml new file mode 100644 index 000000000..563a7be43 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/select_bounds_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/select_bounds_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/select_bounds_h_image.asset.taml new file mode 100644 index 000000000..8420a7375 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/select_bounds_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/select_bounds_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/select_bounds_n_image.asset.taml new file mode 100644 index 000000000..485d03006 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/select_bounds_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/selection_to_prefab_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/selection_to_prefab_d_image.asset.taml new file mode 100644 index 000000000..6eb13a00d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/selection_to_prefab_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/selection_to_prefab_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/selection_to_prefab_h_image.asset.taml new file mode 100644 index 000000000..8d13e30b3 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/selection_to_prefab_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/selection_to_prefab_i_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/selection_to_prefab_i_image.asset.taml new file mode 100644 index 000000000..1db62ce80 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/selection_to_prefab_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/selection_to_prefab_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/selection_to_prefab_n_image.asset.taml new file mode 100644 index 000000000..97232be30 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/selection_to_prefab_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/settings_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/settings_d_image.asset.taml new file mode 100644 index 000000000..35bb8b9bc --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/settings_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/settings_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/settings_h_image.asset.taml new file mode 100644 index 000000000..7bf11ac2e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/settings_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/settings_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/settings_n_image.asset.taml new file mode 100644 index 000000000..d2233f60a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/settings_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/show_grid_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/show_grid_d_image.asset.taml new file mode 100644 index 000000000..dd28d8a5f --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/show_grid_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/show_grid_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/show_grid_h_image.asset.taml new file mode 100644 index 000000000..e11bd669e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/show_grid_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/show_grid_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/show_grid_n_image.asset.taml new file mode 100644 index 000000000..74adcbd88 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/show_grid_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/show_preview_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/show_preview_d_image.asset.taml new file mode 100644 index 000000000..6fb54b3a9 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/show_preview_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/show_preview_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/show_preview_h_image.asset.taml new file mode 100644 index 000000000..b6f4b9c10 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/show_preview_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/show_preview_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/show_preview_n_image.asset.taml new file mode 100644 index 000000000..e7677914b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/show_preview_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_d_image.asset.taml new file mode 100644 index 000000000..91cf755bc --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_h_image.asset.taml new file mode 100644 index 000000000..8a7c0a9c0 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_n_image.asset.taml new file mode 100644 index 000000000..9d0777271 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_rot_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_rot_d_image.asset.taml new file mode 100644 index 000000000..77f396dc8 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_rot_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_rot_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_rot_h_image.asset.taml new file mode 100644 index 000000000..5e4afc8b9 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_rot_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_rot_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_rot_n_image.asset.taml new file mode 100644 index 000000000..659b94821 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/smooth_cam_rot_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/snap_bounds_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/snap_bounds_d_image.asset.taml new file mode 100644 index 000000000..ac1bb3731 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/snap_bounds_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/snap_bounds_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/snap_bounds_h_image.asset.taml new file mode 100644 index 000000000..64fcf78b5 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/snap_bounds_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/snap_bounds_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/snap_bounds_n_image.asset.taml new file mode 100644 index 000000000..cda7b77a2 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/snap_bounds_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/snap_objects_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/snap_objects_d_image.asset.taml new file mode 100644 index 000000000..a0b3dcc5b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/snap_objects_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/snap_objects_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/snap_objects_h_image.asset.taml new file mode 100644 index 000000000..77b0f7fc6 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/snap_objects_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/snap_objects_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/snap_objects_n_image.asset.taml new file mode 100644 index 000000000..c81f69efc --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/snap_objects_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/snap_terrain_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/snap_terrain_d_image.asset.taml new file mode 100644 index 000000000..843bebb61 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/snap_terrain_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/snap_terrain_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/snap_terrain_h_image.asset.taml new file mode 100644 index 000000000..34a55778d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/snap_terrain_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/snap_terrain_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/snap_terrain_n_image.asset.taml new file mode 100644 index 000000000..cfa55183f --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/snap_terrain_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/snapping_settings_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/snapping_settings_d_image.asset.taml new file mode 100644 index 000000000..7a6bc1c0e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/snapping_settings_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/snapping_settings_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/snapping_settings_h_image.asset.taml new file mode 100644 index 000000000..289aea9ae --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/snapping_settings_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/snapping_settings_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/snapping_settings_n_image.asset.taml new file mode 100644 index 000000000..e27d52b4b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/snapping_settings_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/translate_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/translate_d_image.asset.taml new file mode 100644 index 000000000..4c44884f1 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/translate_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/translate_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/translate_h_image.asset.taml new file mode 100644 index 000000000..14e7507f0 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/translate_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/translate_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/translate_n_image.asset.taml new file mode 100644 index 000000000..15d7a6a6d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/translate_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/visibility_toggle_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/visibility_toggle_d_image.asset.taml new file mode 100644 index 000000000..6f5fa2674 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/visibility_toggle_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/visibility_toggle_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/visibility_toggle_h_image.asset.taml new file mode 100644 index 000000000..3986076aa --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/visibility_toggle_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/visibility_toggle_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/visibility_toggle_n_image.asset.taml new file mode 100644 index 000000000..5c24cdf33 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/visibility_toggle_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/world_transform_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/world_transform_d_image.asset.taml new file mode 100644 index 000000000..71fdb6a84 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/world_transform_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/world_transform_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/world_transform_h_image.asset.taml new file mode 100644 index 000000000..280ca2bca --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/world_transform_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/world_transform_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/world_transform_n_image.asset.taml new file mode 100644 index 000000000..4b8e779d2 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/menubar/world_transform_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/move_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/move_image.asset.taml new file mode 100644 index 000000000..90ef3d2bd --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/move_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/new_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/new_d_image.asset.taml new file mode 100644 index 000000000..5e31bedbd --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/new_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/new_folder_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/new_folder_btn_d_image.asset.taml new file mode 100644 index 000000000..2d8a4a1f8 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/new_folder_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/new_folder_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/new_folder_btn_h_image.asset.taml new file mode 100644 index 000000000..685edadcf --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/new_folder_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/new_folder_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/new_folder_btn_n_image.asset.taml new file mode 100644 index 000000000..3f675a036 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/new_folder_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/new_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/new_h_image.asset.taml new file mode 100644 index 000000000..d50f57573 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/new_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/new_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/new_n_image.asset.taml new file mode 100644 index 000000000..6dd4f671c --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/new_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/open_file_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/open_file_d_image.asset.taml new file mode 100644 index 000000000..0260b91a5 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/open_file_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/open_file_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/open_file_h_image.asset.taml new file mode 100644 index 000000000..e1ff44e41 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/open_file_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/open_file_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/open_file_n_image.asset.taml new file mode 100644 index 000000000..a4070ac11 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/open_file_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/radioButton_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/radioButton_image.asset.taml new file mode 100644 index 000000000..c8872ef78 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/radioButton_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/reset_icon_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/reset_icon_d_image.asset.taml new file mode 100644 index 000000000..f3a4089af --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/reset_icon_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/reset_icon_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/reset_icon_h_image.asset.taml new file mode 100644 index 000000000..4d979db7e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/reset_icon_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/reset_icon_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/reset_icon_n_image.asset.taml new file mode 100644 index 000000000..33e4de3aa --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/reset_icon_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/retarget_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/retarget_btn_d_image.asset.taml new file mode 100644 index 000000000..f1a0080d5 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/retarget_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/retarget_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/retarget_btn_h_image.asset.taml new file mode 100644 index 000000000..5f56fbf47 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/retarget_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/retarget_btn_i_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/retarget_btn_i_image.asset.taml new file mode 100644 index 000000000..3695d3070 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/retarget_btn_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/retarget_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/retarget_btn_n_image.asset.taml new file mode 100644 index 000000000..ce32da547 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/retarget_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/rightArrowWhite_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/rightArrowWhite_image.asset.taml new file mode 100644 index 000000000..1f37839f1 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/rightArrowWhite_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/rl_loadingbar_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/rl_loadingbar_image.asset.taml new file mode 100644 index 000000000..7d5b8dcc9 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/rl_loadingbar_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/save_all_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/save_all_d_image.asset.taml new file mode 100644 index 000000000..ee3c42ce6 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/save_all_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/save_all_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/save_all_h_image.asset.taml new file mode 100644 index 000000000..761f5f38f --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/save_all_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/save_all_i_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/save_all_i_image.asset.taml new file mode 100644 index 000000000..0341706a8 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/save_all_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/save_all_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/save_all_n_image.asset.taml new file mode 100644 index 000000000..19f0e97b7 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/save_all_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/save_as_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/save_as_d_image.asset.taml new file mode 100644 index 000000000..8f108d7e1 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/save_as_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/save_as_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/save_as_h_image.asset.taml new file mode 100644 index 000000000..8cd160804 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/save_as_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/save_as_i_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/save_as_i_image.asset.taml new file mode 100644 index 000000000..962be07b2 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/save_as_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/save_as_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/save_as_n_image.asset.taml new file mode 100644 index 000000000..4b9ce45ac --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/save_as_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/save_icon_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/save_icon_d_image.asset.taml new file mode 100644 index 000000000..8d20145ff --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/save_icon_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/save_icon_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/save_icon_h_image.asset.taml new file mode 100644 index 000000000..340a983d6 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/save_icon_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/save_icon_i_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/save_icon_i_image.asset.taml new file mode 100644 index 000000000..a1f197888 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/save_icon_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/save_icon_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/save_icon_n_image.asset.taml new file mode 100644 index 000000000..bd001ec87 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/save_icon_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/scrollBar_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/scrollBar_image.asset.taml new file mode 100644 index 000000000..92fe3c13d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/scrollBar_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/separator_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/separator_h_image.asset.taml new file mode 100644 index 000000000..ec8c67549 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/separator_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/separator_v_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/separator_v_image.asset.taml new file mode 100644 index 000000000..7558e847a --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/separator_v_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/slider_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/slider_image.asset.taml new file mode 100644 index 000000000..1e5d96486 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/slider_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/slider_w_box_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/slider_w_box_image.asset.taml new file mode 100644 index 000000000..6661f7999 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/slider_w_box_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/cross_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/stencilIcons/cross_image.asset.taml new file mode 100644 index 000000000..1f63217b5 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/stencilIcons/cross_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/filter_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/stencilIcons/filter_image.asset.taml new file mode 100644 index 000000000..3e7f0c542 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/stencilIcons/filter_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/gear_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/stencilIcons/gear_image.asset.taml new file mode 100644 index 000000000..3e6770888 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/stencilIcons/gear_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/import_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/stencilIcons/import_image.asset.taml new file mode 100644 index 000000000..d55d5c5af --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/stencilIcons/import_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/menuGrid_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/stencilIcons/menuGrid_d_image.asset.taml new file mode 100644 index 000000000..d00abc129 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/stencilIcons/menuGrid_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/menuGrid_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/stencilIcons/menuGrid_h_image.asset.taml new file mode 100644 index 000000000..d04214c29 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/stencilIcons/menuGrid_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/menuGrid_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/stencilIcons/menuGrid_image.asset.taml new file mode 100644 index 000000000..066003bba --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/stencilIcons/menuGrid_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/menuGrid_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/stencilIcons/menuGrid_n_image.asset.taml new file mode 100644 index 000000000..630d97cc3 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/stencilIcons/menuGrid_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/phone_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/stencilIcons/phone_image.asset.taml new file mode 100644 index 000000000..7e72b7a83 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/stencilIcons/phone_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/plus_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/stencilIcons/plus_image.asset.taml new file mode 100644 index 000000000..b46020070 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/stencilIcons/plus_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/previous_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/stencilIcons/previous_image.asset.taml new file mode 100644 index 000000000..6a77ded4e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/stencilIcons/previous_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/return_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/stencilIcons/return_image.asset.taml new file mode 100644 index 000000000..b7374d311 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/stencilIcons/return_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/warning_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/stencilIcons/warning_image.asset.taml new file mode 100644 index 000000000..b170b5a39 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/stencilIcons/warning_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/stencilIcons/zoom_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/stencilIcons/zoom_image.asset.taml new file mode 100644 index 000000000..944a41d9c --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/stencilIcons/zoom_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/tab_border_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/tab_border_image.asset.taml new file mode 100644 index 000000000..9d4db0d2d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/tab_border_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/tab_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/tab_image.asset.taml new file mode 100644 index 000000000..15c2b4b7b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/tab_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/textEditFrame_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/textEditFrame_image.asset.taml new file mode 100644 index 000000000..9cf86b9a6 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/textEditFrame_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/textEditSliderBox_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/textEditSliderBox_image.asset.taml new file mode 100644 index 000000000..77429e702 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/textEditSliderBox_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/textEdit_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/textEdit_image.asset.taml new file mode 100644 index 000000000..241e228c8 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/textEdit_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/thumbHightlightButton_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/thumbHightlightButton_image.asset.taml new file mode 100644 index 000000000..1ba4de6e0 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/thumbHightlightButton_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/toolbar_window_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/toolbar_window_image.asset.taml new file mode 100644 index 000000000..7ff0fdb41 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/toolbar_window_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/transp_grid_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/transp_grid_image.asset.taml new file mode 100644 index 000000000..d0a0e78aa --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/transp_grid_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/treeView_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/treeView_image.asset.taml new file mode 100644 index 000000000..965592144 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/treeView_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/treeview/hidden_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/treeview/hidden_image.asset.taml new file mode 100644 index 000000000..b1d3d6623 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/treeview/hidden_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/treeview/treeview_default_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/treeview/treeview_default_image.asset.taml new file mode 100644 index 000000000..9d4a8053d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/treeview/treeview_default_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/upDown_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/upDown_image.asset.taml new file mode 100644 index 000000000..7ced69b88 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/upDown_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/uv_editor_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/uv_editor_btn_d_image.asset.taml new file mode 100644 index 000000000..9a08396bb --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/uv_editor_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/uv_editor_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/uv_editor_btn_h_image.asset.taml new file mode 100644 index 000000000..898806dfa --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/uv_editor_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/uv_editor_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/uv_editor_btn_n_image.asset.taml new file mode 100644 index 000000000..9a5e2a335 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/uv_editor_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/visible_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/visible_d_image.asset.taml new file mode 100644 index 000000000..21363b6bf --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/visible_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/visible_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/visible_h_image.asset.taml new file mode 100644 index 000000000..37c83f0be --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/visible_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/visible_i_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/visible_i_image.asset.taml new file mode 100644 index 000000000..e95a45796 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/visible_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/visible_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/visible_n_image.asset.taml new file mode 100644 index 000000000..0f643c81d --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/visible_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/images/window_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/window_image.asset.taml new file mode 100644 index 000000000..c01f24895 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/images/window_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/gui/materialSelector.ed.gui b/Templates/BaseGame/game/tools/gui/materialSelector.ed.gui index b3ad85549..09bddd1dd 100644 --- a/Templates/BaseGame/game/tools/gui/materialSelector.ed.gui +++ b/Templates/BaseGame/game/tools/gui/materialSelector.ed.gui @@ -157,7 +157,7 @@ new GuiControl(MaterialSelectorOverlay, EditorGuiGroup) { Command = "MaterialSelector.showDeleteDialog();"; hovertime = "1000"; tooltip = "Delete Material"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -468,7 +468,7 @@ new GuiControl(MaterialSelectorOverlay, EditorGuiGroup) { profile = "ToolsGuiDefaultProfile"; position = "1 18"; extent = "148 148"; - bitmap = ""; + bitmapAsset = ""; }; }; new GuiTextCtrl(){ @@ -486,7 +486,7 @@ new GuiControl(MaterialSelectorOverlay, EditorGuiGroup) { profile = "ToolsGuiDefaultProfile"; position = "612 39"; extent = "150 150"; - bitmap = "tools/worldEditor/images/terrainpainter/terrain-painter-border-large"; + bitmapAsset = "ToolsModule:terrain_painter_border_large_image"; visible = false; }; new GuiTextCtrl(){ @@ -894,7 +894,7 @@ function MaterialSelector::buildStaticFilters( %this ) Command = "MaterialSelector_addFilterWindow.setVisible(1); MaterialSelectorOverlay.pushToBack(MaterialSelector_addFilterWindow);"; hovertime = "1000"; tooltip = "Create New Tag"; - bitmap = "tools/gui/images/new"; + bitmapAsset = "ToolsModule:new_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -914,7 +914,7 @@ function MaterialSelector::buildStaticFilters( %this ) Command = "MaterialSelector.clearMaterialFilters();"; hovertime = "1000"; tooltip = "Clear Selected Tag"; - bitmap = "tools/gui/images/clear-btn"; + bitmapAsset = "ToolsModule:clear_btn_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -1226,7 +1226,7 @@ function MaterialSelector::buildPreviewArray( %this, %material ) position = "7 4"; extent = "64 64"; buttonType = "PushButton"; - bitmap = ""; + bitmapAsset = ""; Command = ""; text = "Loading..."; useStates = false; @@ -1239,7 +1239,7 @@ function MaterialSelector::buildPreviewArray( %this, %material ) extent = "64 64"; Variable = ""; buttonType = "toggleButton"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; groupNum = "0"; text = ""; }; @@ -1662,7 +1662,7 @@ function MaterialSelector::createNewMaterial( %this ) extent = "64 64"; Variable = ""; buttonType = "toggleButton"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; groupNum = "0"; text = ""; }; diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/IODropdownDlg.asset.taml b/Templates/BaseGame/game/tools/gui/messageBoxes/IODropdownDlg.asset.taml new file mode 100644 index 000000000..b929c70b0 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/IODropdownDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/MessagePopupDlg.asset.taml b/Templates/BaseGame/game/tools/gui/messageBoxes/MessagePopupDlg.asset.taml new file mode 100644 index 000000000..542ae8aa4 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/MessagePopupDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxOKBuyDlg.asset.taml b/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxOKBuyDlg.asset.taml new file mode 100644 index 000000000..0afd54215 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxOKBuyDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxOKCancelDetailsDlg.asset.taml b/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxOKCancelDetailsDlg.asset.taml new file mode 100644 index 000000000..5c04165a6 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxOKCancelDetailsDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxOKCancelDlg.asset.taml b/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxOKCancelDlg.asset.taml new file mode 100644 index 000000000..8a358b9af --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxOKCancelDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxOKDlg.asset.taml b/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxOKDlg.asset.taml new file mode 100644 index 000000000..aa1fb6e0e --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxOKDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxYesNoCancelDlg.asset.taml b/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxYesNoCancelDlg.asset.taml new file mode 100644 index 000000000..e62a4e00f --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxYesNoCancelDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxYesNoDlg.asset.taml b/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxYesNoDlg.asset.taml new file mode 100644 index 000000000..21dc4a83b --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/messageBoxes/toolsMessageBoxYesNoDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/postFXEditor.asset.taml b/Templates/BaseGame/game/tools/gui/postFXEditor.asset.taml new file mode 100644 index 000000000..1574a69e7 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/postFXEditor.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/postFxEditor.gui b/Templates/BaseGame/game/tools/gui/postFxEditor.gui index 4827435da..4f1977bba 100644 --- a/Templates/BaseGame/game/tools/gui/postFxEditor.gui +++ b/Templates/BaseGame/game/tools/gui/postFxEditor.gui @@ -96,7 +96,7 @@ canSaveDynamicFields = "0"; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/iconAdd.png"; + bitmapAsset = "ToolsModule:iconAdd_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; @@ -122,7 +122,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/iconDelete.png"; + bitmapAsset = "ToolsModule:iconDelete_image"; bitmapMode = "Centered"; autoFitExtents = "0"; useModifiers = "0"; diff --git a/Templates/BaseGame/game/tools/gui/profiles.ed.tscript b/Templates/BaseGame/game/tools/gui/profiles.ed.tscript index 6e8c7b9ea..c95f2bc6a 100644 --- a/Templates/BaseGame/game/tools/gui/profiles.ed.tscript +++ b/Templates/BaseGame/game/tools/gui/profiles.ed.tscript @@ -60,7 +60,7 @@ new GuiControlProfile (ToolsGuiDefaultProfile) fontColorSEL= EditorSettings.value("Theme/fieldTextSELColor"); // bitmap information - bitmap = ""; + bitmapAsset = ""; bitmapBase = ""; textOffset = "0 0"; @@ -108,7 +108,7 @@ new GuiControlProfile( ToolsGuiGroupBorderProfile ) border = false; opaque = false; hasBitmapArray = true; - bitmap = "./images/group-border"; + bitmapAsset = "ToolsModule:group_border_image"; category = "Tools"; }; @@ -118,7 +118,7 @@ new GuiControlProfile( ToolsGuiTabBorderProfile ) border = false; opaque = false; hasBitmapArray = true; - bitmap = "./images/tab-border"; + bitmapAsset = "ToolsModule:tab_border_image"; category = "Tools"; }; @@ -170,7 +170,7 @@ new GuiControlProfile (ToolsGuiWindowProfile) bevelColorHL = "255 255 255"; bevelColorLL = "0 0 0"; text = "untitled"; - bitmap = "./images/window"; + bitmapAsset = "ToolsModule:window_image"; textOffset = "10 4"; hasBitmapArray = true; justify = "left"; @@ -180,7 +180,7 @@ new GuiControlProfile (ToolsGuiWindowProfile) if( !isObject( ToolsGuiToolbarWindowProfile ) ) new GuiControlProfile(ToolsGuiToolbarWindowProfile : ToolsGuiWindowProfile) { - bitmap = "./images/toolbar-window"; + bitmapAsset = "ToolsModule:toolbar_window_image"; text = ""; category = "Tools"; }; @@ -293,7 +293,7 @@ if( !isObject( ToolsGuiTextEditProfile ) ) new GuiControlProfile( ToolsGuiTextEditProfile ) { opaque = true; - bitmap = "./images/textEditFrame"; + bitmapAsset = "ToolsModule:textEditFrame_image"; hasBitmapArray = true; border = -2; // fix to display textEdit img //borderWidth = "1"; // fix to display textEdit img @@ -325,7 +325,7 @@ new GuiControlProfile( ToolsGuiNumericTextEditProfile : ToolsGuiTextEditProfile if( !isObject( ToolsGuiNumericDropSliderTextProfile ) ) new GuiControlProfile( ToolsGuiNumericDropSliderTextProfile : ToolsGuiTextEditProfile ) { - bitmap = "./images/textEditSliderBox"; + bitmapAsset = "ToolsModule:textEditSliderBox_image"; category = "Tools"; }; @@ -334,7 +334,7 @@ new GuiControlProfile( ToolsGuiRLProgressBitmapProfile ) { border = false; hasBitmapArray = true; - bitmap = "./images/rl-loadingbar"; + bitmapAsset = "ToolsModule:rl_loadingbar_image"; category = "Tools"; }; @@ -359,7 +359,7 @@ new GuiControlProfile( ToolsGuiButtonProfile ) fixedExtent = false; justify = "center"; canKeyFocus = false; - bitmap = "tools/gui/images/button"; + bitmapAsset = "ToolsModule:button_image"; hasBitmapArray = false; category = "Tools"; }; @@ -367,7 +367,7 @@ new GuiControlProfile( ToolsGuiButtonProfile ) if( !isObject( ToolsGuiThumbHighlightButtonProfile ) ) new GuiControlProfile( ToolsGuiThumbHighlightButtonProfile : ToolsGuiButtonProfile ) { - bitmap = "./images/thumbHightlightButton"; + bitmapAsset = "ToolsModule:thumbHightlightButton_image"; category = "Tools"; }; @@ -382,7 +382,7 @@ new GuiControlProfile( ToolsGuiIconButtonProfile ) fixedExtent = false; justify = "center"; canKeyFocus = false; - bitmap = "./images/iconbutton"; + bitmapAsset = "ToolsModule:iconbutton_image"; hasBitmapArray = true; category = "Tools"; }; @@ -390,7 +390,7 @@ new GuiControlProfile( ToolsGuiIconButtonProfile ) if( !isObject( ToolsGuiIconButtonSmallProfile ) ) new GuiControlProfile( ToolsGuiIconButtonSmallProfile : ToolsGuiIconButtonProfile ) { - bitmap = "./images/iconbuttonsmall"; + bitmapAsset = "ToolsModule:iconbuttonsmall_image"; category = "Tools"; }; @@ -406,7 +406,7 @@ new GuiControlProfile(ToolsGuiEditorTabPage) fixedExtent = false; justify = "left"; canKeyFocus = false; - bitmap = "./images/tab"; + bitmapAsset = "ToolsModule:tab_image"; hasBitmapArray = true; category = "Tools"; }; @@ -424,7 +424,7 @@ new GuiControlProfile( ToolsGuiCheckBoxProfile ) fontColorNA = EditorSettings.value("Theme/fieldTextSELColor"); fixedExtent = true; justify = "left"; - bitmap = "./images/checkbox"; + bitmapAsset = "ToolsModule:checkbox_image"; hasBitmapArray = true; category = "Tools"; }; @@ -432,14 +432,14 @@ new GuiControlProfile( ToolsGuiCheckBoxProfile ) if( !isObject( ToolsGuiCheckBoxListProfile ) ) new GuiControlProfile( ToolsGuiCheckBoxListProfile : ToolsGuiCheckBoxProfile) { - bitmap = "./images/checkbox-list"; + bitmapAsset = "ToolsModule:checkbox_list_image"; category = "Tools"; }; if( !isObject( ToolsGuiCheckBoxListFlipedProfile ) ) new GuiControlProfile( ToolsGuiCheckBoxListFlipedProfile : ToolsGuiCheckBoxProfile) { - bitmap = "./images/checkbox-list_fliped"; + bitmapAsset = "ToolsModule:checkbox_list_fliped_image"; category = "Tools"; }; @@ -457,7 +457,7 @@ new GuiControlProfile( ToolsGuiRadioProfile ) fontColor = EditorSettings.value("Theme/fieldTextColor"); fontColorHL = EditorSettings.value("Theme/fieldTextHLColor"); fixedExtent = true; - bitmap = "./images/radioButton"; + bitmapAsset = "ToolsModule:radioButton_image"; hasBitmapArray = true; category = "Tools"; }; @@ -471,7 +471,7 @@ new GuiControlProfile( ToolsGuiScrollProfile ) fontColorHL = EditorSettings.value("Theme/fieldTextHLColor"); borderColor = EditorSettings.value("Theme/dividerDarkColor"); border = true; - bitmap = "./images/scrollBar"; + bitmapAsset = "ToolsModule:scrollBar_image"; hasBitmapArray = true; category = "Tools"; }; @@ -479,7 +479,7 @@ new GuiControlProfile( ToolsGuiScrollProfile ) if( !isObject( ToolsGuiOverlayProfile ) ) new GuiControlProfile( ToolsGuiOverlayProfile ) { - opaque = true; + opaque = false; fillColor = EditorSettings.value("Theme/windowBackgroundColor"); fontColor = EditorSettings.value("Theme/fieldTextColor"); fontColorHL = EditorSettings.value("Theme/fieldTextGLColor"); @@ -489,14 +489,14 @@ new GuiControlProfile( ToolsGuiOverlayProfile ) if( !isObject( ToolsGuiSliderProfile ) ) new GuiControlProfile( ToolsGuiSliderProfile ) { - bitmap = "./images/slider"; + bitmapAsset = "ToolsModule:slider_image"; category = "Tools"; }; if( !isObject( ToolsGuiSliderBoxProfile ) ) new GuiControlProfile( ToolsGuiSliderBoxProfile ) { - bitmap = "./images/slider-w-box"; + bitmapAsset = "ToolsModule:slider_w_box_image"; category = "Tools"; }; @@ -511,7 +511,7 @@ new GuiControlProfile( ToolsGuiPopupMenuItemBorder : ToolsGuiButtonProfile ) fixedExtent = false; justify = "center"; canKeyFocus = false; - bitmap = "./images/button"; + bitmapAsset = "ToolsModule:button_image"; category = "Tools"; }; @@ -524,7 +524,7 @@ new GuiControlProfile( ToolsGuiPopUpMenuDefault : ToolsGuiDefaultProfile ) border = 0; borderThickness = 0; fixedExtent = true; - bitmap = "./images/scrollbar"; + bitmapAsset = "ToolsModule:scrollBar_image"; hasBitmapArray = true; profileForChildren = ToolsGuiPopupMenuItemBorder; fillColor = EditorSettings.value("Theme/fieldBGColor");//"255 255 255";//100 @@ -545,7 +545,7 @@ if( !isObject( ToolsGuiPopUpMenuProfile ) ) new GuiControlProfile( ToolsGuiPopUpMenuProfile : ToolsGuiPopUpMenuDefault ) { textOffset = "6 4"; - bitmap = "./images/dropDown"; + bitmapAsset = "ToolsModule:dropDown_image"; hasBitmapArray = true; border = 1; profileForChildren = ToolsGuiPopUpMenuDefault; @@ -555,7 +555,7 @@ new GuiControlProfile( ToolsGuiPopUpMenuProfile : ToolsGuiPopUpMenuDefault ) if( !isObject( ToolsGuiPopUpMenuTabProfile ) ) new GuiControlProfile( ToolsGuiPopUpMenuTabProfile : ToolsGuiPopUpMenuDefault ) { - bitmap = "./images/dropDown-tab"; + bitmapAsset = "ToolsModule:dropDown_tab_image"; textOffset = "6 4"; canKeyFocus = true; hasBitmapArray = true; @@ -569,7 +569,7 @@ new GuiControlProfile( ToolsGuiPopUpMenuEditProfile : ToolsGuiPopUpMenuDefault ) { textOffset = "6 4"; canKeyFocus = true; - bitmap = "./images/dropDown"; + bitmapAsset = "ToolsModule:dropDown_image"; hasBitmapArray = true; border = 1; profileForChildren = ToolsGuiPopUpMenuDefault; @@ -601,7 +601,7 @@ new GuiControlProfile( ToolsGuiTabBookProfile ) fontType = "Noto Sans"; fontSize = 14; justify = "center"; - bitmap = "./images/tab"; + bitmapAsset = "ToolsModule:tab_image"; tabWidth = 65; tabHeight = 25; tabPosition = "Top"; @@ -615,7 +615,7 @@ new GuiControlProfile( ToolsGuiTabBookProfile ) if( !isObject( ToolsGuiTabBookNoBitmapProfile ) ) new GuiControlProfile( ToolsGuiTabBookNoBitmapProfile : ToolsGuiTabBookProfile ) { - bitmap = ""; + bitmapAsset = ""; category = "Tools"; }; @@ -625,7 +625,7 @@ new GuiControlProfile( ToolsGuiTabPageProfile : ToolsGuiDefaultProfile ) fontType = "Noto Sans"; fontSize = 10; justify = "center"; - bitmap = "./images/tab"; + bitmapAsset = "ToolsModule:tab_image"; opaque = false; fillColor = "240 239 238"; category = "Tools"; @@ -634,7 +634,7 @@ new GuiControlProfile( ToolsGuiTabPageProfile : ToolsGuiDefaultProfile ) if( !isObject( ToolsGuiTreeViewProfile ) ) new GuiControlProfile( ToolsGuiTreeViewProfile ) { - bitmap = "./images/treeView"; + bitmapAsset = "ToolsModule:treeView_image"; autoSizeHeight = true; canKeyFocus = true; fillColor = EditorSettings.value("Theme/windowBackgroundColor"); @@ -687,7 +687,7 @@ new GuiControlProfile( ToolsGuiFormProfile : ToolsGuiTextProfile ) profileForChildren = ToolsGuiButtonProfile; opaque = false; hasBitmapArray = true; - bitmap = "./images/button"; + bitmapAsset = "ToolsModule:button_image"; category = "Tools"; }; @@ -704,7 +704,7 @@ singleton GuiControlProfile( GuiEditorClassProfile ) fontColorHL = "50 50 50"; fixedExtent = true; justify = "center"; - bitmap = "tools/gui/images/scrollBar"; + bitmapAsset = "ToolsModule:scrollBar_image"; hasBitmapArray = true; category = "Editor"; }; @@ -739,7 +739,7 @@ singleton GuiControlProfile( GuiControlListPopupProfile ) autoSizeHeight = true; tab = true; canKeyFocus = true; - bitmap = "tools/gui/images/scrollBar"; + bitmapAsset = "ToolsModule:scrollBar_image"; hasBitmapArray = true; category = "Editor"; }; @@ -794,7 +794,7 @@ singleton GuiControlProfile( GuiInspectorTextEditProfile ) }; singleton GuiControlProfile( GuiDropdownTextEditProfile : ToolsGuiTextEditProfile ) { - bitmap = "tools/gui/images/dropdown-textEdit"; + bitmapAsset = "ToolsModule:dropdown_textEdit_image"; category = "Editor"; }; singleton GuiControlProfile( GuiInspectorTextEditRightProfile : GuiInspectorTextEditProfile ) @@ -816,7 +816,7 @@ singleton GuiControlProfile( GuiInspectorGroupProfile ) opaque = false; border = false; - bitmap = "tools/editorClasses/gui/images/rollout"; + bitmapAsset = "ToolsModule:rollout_image"; textOffset = "20 0"; @@ -903,7 +903,7 @@ singleton GuiControlProfile( GuiRolloutProfile ) fontColorNA = EditorSettings.value("Theme/fieldTextSELColor"); hasBitmapArray = true; - bitmap = "tools/editorClasses/gui/images/rollout"; + bitmapAsset = "ToolsModule:rollout_image"; textoffset = "17 0"; category = "Editor"; @@ -927,7 +927,7 @@ singleton GuiControlProfile( GuiInspectorRolloutProfile0 ) borderColorHL = "156 156 156"; borderColorNA = "64 64 64"; - bitmap = "tools/editorclasses/gui/images/rollout_plusminus_header"; + bitmapAsset = "ToolsModule:rollout_plusminus_header_image"; textOffset = "20 0"; category = "Editor"; @@ -1017,7 +1017,7 @@ singleton GuiControlProfile( GuiInspectorColumnCtrlProfile : GuiInspectorFieldPr singleton GuiControlProfile( InspectorTypeEnumProfile : GuiInspectorFieldProfile ) { mouseOverSelected = true; - bitmap = "tools/gui/images/scrollBar"; + bitmapAsset = "ToolsModule:scrollBar_image"; hasBitmapArray = true; opaque=true; border=true; @@ -1027,7 +1027,7 @@ singleton GuiControlProfile( InspectorTypeEnumProfile : GuiInspectorFieldProfile singleton GuiControlProfile( InspectorTypeCheckboxProfile : GuiInspectorFieldProfile ) { - bitmap = "tools/gui/images/checkBox"; + bitmapAsset = "ToolsModule:checkBox_image"; hasBitmapArray = true; opaque=false; border=false; @@ -1098,7 +1098,7 @@ singleton GuiControlProfile( GuiEditorScrollProfile ) fillcolor = EditorSettings.value("Theme/windowBackgroundColor"); borderColor = EditorSettings.value("Theme/dividerDarkColor"); border = 1; - bitmap = "tools/gui/images/scrollBar"; + bitmapAsset = "ToolsModule:scrollBar_image"; hasBitmapArray = true; category = "Editor"; }; @@ -1147,7 +1147,7 @@ singleton GuiControlProfile( ToolsGuiMenuBarProfile ) opaque = true; mouseOverSelected = true; category = "Editor"; - bitmap = "tools/gui/images/checkbox-menubar"; + bitmapAsset = "ToolsModule:checkbox_menubar_image"; }; singleton GuiControlProfile( ToolsMenubarProfile : ToolsGuiDefaultProfile ) @@ -1240,4 +1240,4 @@ singleton GuiControlProfile (IconDropdownProfile) //bitmap = "./icon-dropdownbar"; fillColor = EditorSettings.value("Theme/headerColor"); -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/gui/scriptEditorDlg.ed.gui b/Templates/BaseGame/game/tools/gui/scriptEditorDlg.ed.gui index 2eca2d3ba..328a2f525 100644 --- a/Templates/BaseGame/game/tools/gui/scriptEditorDlg.ed.gui +++ b/Templates/BaseGame/game/tools/gui/scriptEditorDlg.ed.gui @@ -125,7 +125,7 @@ }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "tools/gui/images/iconCancel.png"; + bitmapAsset = "ToolsModule:iconCancel_image"; iconLocation = "Left"; sizeIconToButton = "0"; makeIconSquare = "0"; @@ -152,7 +152,7 @@ }; new GuiIconButtonCtrl() { buttonMargin = "4 4"; - iconBitmap = "tools/gui/images/iconAccept.png"; + bitmapAsset = "ToolsModule:iconAccept_image"; iconLocation = "Left"; sizeIconToButton = "0"; makeIconSquare = "0"; diff --git a/Templates/BaseGame/game/tools/gui/simViewDlg, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/gui/simViewDlg, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..3b664e559 --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/simViewDlg, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/simViewDlg.ed.gui b/Templates/BaseGame/game/tools/gui/simViewDlg.ed.gui index 14bc25b57..cc29e03e9 100644 --- a/Templates/BaseGame/game/tools/gui/simViewDlg.ed.gui +++ b/Templates/BaseGame/game/tools/gui/simViewDlg.ed.gui @@ -217,7 +217,7 @@ text = "Refresh"; groupNum = "-1"; buttonType = "PushButton"; - iconBitmap = "./images/iconRefresh.png"; + bitmapAsset = "ToolsModule:iconRefresh_image"; sizeIconToButton = "0"; textLocation = "Right"; textMargin = "4"; @@ -252,7 +252,7 @@ text = "Delete"; groupNum = "-1"; buttonType = "PushButton"; - iconBitmap = "./images/iconDelete.png"; + bitmapAsset = "ToolsModule:iconDelete_image"; sizeIconToButton = "0"; textLocation = "Right"; textMargin = "4"; diff --git a/Templates/BaseGame/game/tools/gui/toolsMessageBoxSaveChangesDlg, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/gui/toolsMessageBoxSaveChangesDlg, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..ddb78207c --- /dev/null +++ b/Templates/BaseGame/game/tools/gui/toolsMessageBoxSaveChangesDlg, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/gui/uvEditor.ed.gui b/Templates/BaseGame/game/tools/gui/uvEditor.ed.gui index 412111311..bddecffc3 100644 --- a/Templates/BaseGame/game/tools/gui/uvEditor.ed.gui +++ b/Templates/BaseGame/game/tools/gui/uvEditor.ed.gui @@ -180,7 +180,7 @@ new GuiControl(UVEditorOverlay, EditorGuiGroup) { position = "26 38"; extent = "256 256"; wrap = "0"; - bitmap = ""; + bitmapAsset = ""; }; new GuiRectHandles(){ internalName = "uvHandles"; @@ -499,37 +499,19 @@ function UVEditor::showDialog( %this, %applyCallback, %obj, %uv) // Get the preview bitmap. Code copied from Material Selector. %material = %obj.material; - if( %material.toneMap[0] $= "" && %material.diffuseMap[0] $= "" && !isObject(%material.cubemap) ) + if( %material.getToneMap(0) $= "" && %material.getDiffuseMap(0) $= "" && !isObject(%material.cubemap) ) { %previewImage = "core/images/warnmat"; } else { if( %material.toneMap[0] !$= "" ) - %previewImage = %material.toneMap[0]; - else if( %material.diffuseMap[0] !$= "" ) - %previewImage = %material.diffuseMap[0]; + %previewImage = %material.getToneMap(0); + else if( %material.getDiffuseMap(0) !$= "" ) + %previewImage = %material.getDiffuseMap(0); else if( %material.cubemap.cubeFace[0] !$= "" ) %previewImage = %material.cubemap.cubeFace[0]; - - %materialDiffuse = %previewImage; - %materialPath = %material.getFilename(); - if( strchr( %materialDiffuse, "/") $= "" ) - { - %k = 0; - while( strpos( %materialPath, "/", %k ) != -1 ) - { - %foo = strpos( %materialPath, "/", %k ); - %k = %foo + 1; } - - %foobar = getSubStr( %materialPath , %k , 99 ); - %previewImage = strreplace( %materialPath, %foobar, %previewImage ); - } - else - %previewImage = strreplace( %materialPath, %materialPath, %previewImage ); - } - UVEditor-->bitmapPreview.setBitmap(%previewImage); // Set up the color popup diff --git a/Templates/BaseGame/game/tools/guiEditor/gui/EditorChooseGUI, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/guiEditor/gui/EditorChooseGUI, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..411e3b14f --- /dev/null +++ b/Templates/BaseGame/game/tools/guiEditor/gui/EditorChooseGUI, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/guiEditor/gui/EditorChooseGUI.ed.gui b/Templates/BaseGame/game/tools/guiEditor/gui/EditorChooseGUI.ed.gui index 02d9e04b3..22974b57a 100644 --- a/Templates/BaseGame/game/tools/guiEditor/gui/EditorChooseGUI.ed.gui +++ b/Templates/BaseGame/game/tools/guiEditor/gui/EditorChooseGUI.ed.gui @@ -13,7 +13,7 @@ Visible = "1"; tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; - bitmap = "art/gui/background"; + bitmap = "data/ui/images/background.png"; useVariable = "0"; tile = "0"; diff --git a/Templates/BaseGame/game/tools/guiEditor/gui/GuiEditorGui, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/guiEditor/gui/GuiEditorGui, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..f2a04fab6 --- /dev/null +++ b/Templates/BaseGame/game/tools/guiEditor/gui/GuiEditorGui, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/guiEditor/gui/GuiEditorNewGuiDialog,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/guiEditor/gui/GuiEditorNewGuiDialog,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..e6729212d --- /dev/null +++ b/Templates/BaseGame/game/tools/guiEditor/gui/GuiEditorNewGuiDialog,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/guiEditor/gui/GuiEditorPrefsDlg, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/guiEditor/gui/GuiEditorPrefsDlg, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..4d986eb3b --- /dev/null +++ b/Templates/BaseGame/game/tools/guiEditor/gui/GuiEditorPrefsDlg, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/guiEditor/gui/GuiEditorSelectDlgContainer,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/guiEditor/gui/GuiEditorSelectDlgContainer,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..058d0677c --- /dev/null +++ b/Templates/BaseGame/game/tools/guiEditor/gui/GuiEditorSelectDlgContainer,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/guiEditor/gui/gridTiny2_image.asset.taml b/Templates/BaseGame/game/tools/guiEditor/gui/gridTiny2_image.asset.taml new file mode 100644 index 000000000..25eedc4cc --- /dev/null +++ b/Templates/BaseGame/game/tools/guiEditor/gui/gridTiny2_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/guiEditor/gui/guiEditor.ed.gui b/Templates/BaseGame/game/tools/guiEditor/gui/guiEditor.ed.gui index 9426a7fdd..a3fc69c28 100644 --- a/Templates/BaseGame/game/tools/guiEditor/gui/guiEditor.ed.gui +++ b/Templates/BaseGame/game/tools/guiEditor/gui/guiEditor.ed.gui @@ -71,7 +71,7 @@ canSaveDynamicFields = "0"; new GuiBitmapButtonCtrl(GHWorldEditor) { - bitmap = "tools/worldEditor/images/toolbar/world"; + bitmapAsset = "ToolsModule:world_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "0"; @@ -93,7 +93,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl(GHGuiEditor) { - bitmap = "tools/worldEditor/images/toolbar/gui"; + bitmapAsset = "ToolsModule:gui_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "0"; @@ -114,7 +114,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/worldEditor/images/toolbar/playbutton"; + bitmapAsset = "ToolsModule:playbutton_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "0"; @@ -135,14 +135,37 @@ hovertime = "1000"; canSaveDynamicFields = "0"; }; + new GuiBitmapButtonCtrl() { + canSaveDynamicFields = "0"; + internalName = AssetBrowserBtn; + Enabled = "1"; + isContainer = "0"; + Profile = "ToolsGuiButtonProfile"; + HorizSizing = "right"; + VertSizing = "bottom"; + position = "98 3"; + Extent = "29 27"; + MinExtent = "8 2"; + canSave = "1"; + Visible = "1"; + Command = "AssetBrowser.ShowDialog();"; + tooltipprofile = "ToolsGuiToolTipProfile"; + ToolTip = "Asset Browser"; + hovertime = "750"; + bitmapAsset = "ToolsModule:menuGrid_image"; + bitmapMode = "Stretched"; + buttonType = "PushButton"; + groupNum = "0"; + useMouseEvents = "0"; + }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; wrap = "0"; isContainer = "0"; profile = "ToolsGuiDefaultProfile"; horizSizing = "right"; vertSizing = "bottom"; - position = "98 3"; + position = "130 3"; extent = "2 26"; minExtent = "1 1"; canSave = "1"; @@ -157,7 +180,7 @@ profile = "ToolsGuiDefaultProfile"; horizSizing = "width"; vertSizing = "bottom"; - position = "99 0"; + position = "131 0"; extent = "723 32"; minExtent = "8 2"; canSave = "1"; @@ -219,7 +242,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; wrap = "0"; isContainer = "0"; profile = "ToolsGuiDefaultProfile"; @@ -249,7 +272,7 @@ canSaveDynamicFields = "0"; new GuiBitmapButtonCtrl(GuiEditorSnapCheckBox) { - bitmap = "tools/gui/images/GUI-editor/snap-grid"; + bitmapAsset = "ToolsModule:snap_grid_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "-1"; @@ -270,7 +293,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl(GuiEditorEdgeSnapping_btn) { - bitmap = "tools/gui/images/GUI-editor/edgesnap"; + bitmapAsset = "ToolsModule:edgesnap_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "-1"; @@ -292,7 +315,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl(GuiEditorCenterSnapping_btn) { - bitmap = "tools/gui/images/GUI-editor/centersnap"; + bitmapAsset = "ToolsModule:centersnap_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "-1"; @@ -315,7 +338,7 @@ }; }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; wrap = "0"; isContainer = "0"; profile = "ToolsGuiDefaultProfile"; @@ -345,7 +368,7 @@ canSaveDynamicFields = "0"; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/GUI-editor/align-left"; + bitmapAsset = "ToolsModule:align_left_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "-1"; @@ -367,7 +390,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/GUI-editor/vertical-center"; + bitmapAsset = "ToolsModule:vertical_center_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "-1"; @@ -389,7 +412,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/GUI-editor/align-right"; + bitmapAsset = "ToolsModule:align_right_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "-1"; @@ -426,7 +449,7 @@ canSaveDynamicFields = "0"; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/GUI-editor/align-top"; + bitmapAsset = "ToolsModule:align_top_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "-1"; @@ -448,7 +471,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/GUI-editor/horizontal-center"; + bitmapAsset = "ToolsModule:horizontal_center_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "-1"; @@ -470,7 +493,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/GUI-editor/align-bottom"; + bitmapAsset = "ToolsModule:align_bottom_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "-1"; @@ -493,7 +516,7 @@ }; }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; wrap = "0"; isContainer = "0"; profile = "ToolsGuiDefaultProfile"; @@ -509,7 +532,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; wrap = "0"; isContainer = "0"; profile = "ToolsGuiDefaultProfile"; @@ -539,7 +562,7 @@ canSaveDynamicFields = "0"; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/GUI-editor/send-to-back"; + bitmapAsset = "ToolsModule:send_to_back_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "-1"; @@ -561,7 +584,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/GUI-editor/bring-to-front"; + bitmapAsset = "ToolsModule:bring_to_front_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "-1"; @@ -598,7 +621,7 @@ canSaveDynamicFields = "0"; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/GUI-editor/distribute-horizontal"; + bitmapAsset = "ToolsModule:distribute_horizontal_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "-1"; @@ -620,7 +643,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/GUI-editor/distribute-vertical"; + bitmapAsset = "ToolsModule:distribute_vertical_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; groupNum = "-1"; @@ -720,7 +743,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/guiEditor/gui/gridTiny2"; + bitmapAsset = "ToolsModule:gridTiny2_image"; wrap = "1"; }; new GuiControl(GuiEditorContent) { @@ -863,7 +886,7 @@ }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/clear-icon"; + bitmapAsset = "ToolsModule:clear_icon_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -1176,7 +1199,7 @@ }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/clear-icon"; + bitmapAsset = "ToolsModule:clear_icon_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -1299,7 +1322,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/save-icon"; + bitmapAsset = "ToolsModule:save_icon_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -1319,7 +1342,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/save-as"; + bitmapAsset = "ToolsModule:save_as_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -1416,7 +1439,7 @@ }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -1435,7 +1458,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -1454,7 +1477,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -1473,7 +1496,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; diff --git a/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditor.ed.tscript b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditor.ed.tscript index 71988bf9a..3c5d36d89 100644 --- a/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/guiEditor/scripts/guiEditor.ed.tscript @@ -862,11 +862,11 @@ function GuiEditorTabBook::onTabSelected( %this, %text, %index ) %sidebar-->button3.setVisible( true ); %sidebar-->button4.setVisible( true ); - %sidebar-->button4.setBitmap( "tools/gui/images/delete" ); + %sidebar-->button4.setBitmap( "ToolsModule:iconDelete_image" ); %sidebar-->button4.command = "GuiEditor.deleteSelection();"; %sidebar-->button4.tooltip = "Delete Selected Control(s)"; - %sidebar-->button3.setBitmap( "tools/gui/images/visible" ); + %sidebar-->button3.setBitmap( "ToolsModule:visible_n_image" ); %sidebar-->button3.command = "GuiEditor.toggleHideSelection();"; %sidebar-->button3.tooltip = "Hide Selected Control(s)"; @@ -877,19 +877,19 @@ function GuiEditorTabBook::onTabSelected( %this, %text, %index ) %sidebar-->button3.setVisible( true ); %sidebar-->button4.setVisible( true ); - %sidebar-->button4.setBitmap( "tools/gui/images/delete" ); + %sidebar-->button4.setBitmap( "ToolsModule:iconDelete_image" ); %sidebar-->button4.command = "GuiEditor.showDeleteProfileDialog( GuiEditorProfilesTree.getSelectedProfile() );"; %sidebar-->button4.tooltip = "Delete Selected Profile"; - %sidebar-->button3.setBitmap( "tools/gui/images/new" ); + %sidebar-->button3.setBitmap( "ToolsModule:new_n_image" ); %sidebar-->button3.command = "GuiEditor.createNewProfile( \"Unnamed\" );"; %sidebar-->button3.tooltip = "Create New Profile with Default Values"; - %sidebar-->button2.setBitmap( "tools/gui/images/copy-btn" ); + %sidebar-->button2.setBitmap( "ToolsModule:copy_btn_n_image" ); %sidebar-->button2.command = "GuiEditor.createNewProfile( GuiEditorProfilesTree.getSelectedProfile().getName(), GuiEditorProfilesTree.getSelectedProfile() );"; %sidebar-->button2.tooltip = "Create New Profile by Copying the Selected Profile"; - %sidebar-->button1.setBitmap( "tools/gui/images/reset-icon" ); + %sidebar-->button1.setBitmap( "ToolsModule:reset_icon_n_image" ); %sidebar-->button1.command = "GuiEditor.revertProfile( GuiEditorProfilesTree.getSelectedProfile() );"; %sidebar-->button1.tooltip = "Revert Changes to the Selected Profile"; diff --git a/Templates/BaseGame/game/tools/levels/BlankRoom/probes/820461101_Irradiance_image.asset.taml b/Templates/BaseGame/game/tools/levels/BlankRoom/probes/820461101_Irradiance_image.asset.taml new file mode 100644 index 000000000..7a6cab1a5 --- /dev/null +++ b/Templates/BaseGame/game/tools/levels/BlankRoom/probes/820461101_Irradiance_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/levels/BlankRoom/probes/820461101_Prefilter_image.asset.taml b/Templates/BaseGame/game/tools/levels/BlankRoom/probes/820461101_Prefilter_image.asset.taml new file mode 100644 index 000000000..2e6fa240f --- /dev/null +++ b/Templates/BaseGame/game/tools/levels/BlankRoom/probes/820461101_Prefilter_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/levels/DefaultEditorLevel.asset.taml b/Templates/BaseGame/game/tools/levels/DefaultEditorLevel.asset.taml index 6f9c427a0..5fdb84bfc 100644 --- a/Templates/BaseGame/game/tools/levels/DefaultEditorLevel.asset.taml +++ b/Templates/BaseGame/game/tools/levels/DefaultEditorLevel.asset.taml @@ -6,5 +6,13 @@ LevelName="DefaultEditorLevel" isSubScene="false" description="An empty room" - staticObjectAssetDependency0="@Asset=Prototyping:FloorGray" + previewImageAsset0="@asset=ToolsModule:DefaultEditorLevel_preview_image" + previewImageAsset1="@asset=ToolsModule:DefaultEditorLevel_preview_image" + previewImageAsset2="@asset=ToolsModule:DefaultEditorLevel_preview_image" + previewImageAsset3="@asset=ToolsModule:DefaultEditorLevel_preview_image" + previewImageAsset4="@asset=ToolsModule:DefaultEditorLevel_preview_image" + previewImageAsset5="@asset=ToolsModule:DefaultEditorLevel_preview_image" + previewImageAsset6="@asset=ToolsModule:DefaultEditorLevel_preview_image" + staticObjectAssetDependency0="@asset=Prototyping:FloorGray" + staticObjectAssetDependency1="@asset=FPSGameplay:soldier_rigged" VersionId="1" /> diff --git a/Templates/BaseGame/game/tools/levels/DefaultEditorLevel_preview_image.asset.taml b/Templates/BaseGame/game/tools/levels/DefaultEditorLevel_preview_image.asset.taml new file mode 100644 index 000000000..dae7c2023 --- /dev/null +++ b/Templates/BaseGame/game/tools/levels/DefaultEditorLevel_preview_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/levels/EditorTemplateLevel.asset.taml b/Templates/BaseGame/game/tools/levels/EditorTemplateLevel.asset.taml new file mode 100644 index 000000000..439efbdf7 --- /dev/null +++ b/Templates/BaseGame/game/tools/levels/EditorTemplateLevel.asset.taml @@ -0,0 +1,15 @@ + diff --git a/Templates/BaseGame/game/tools/main.tscript b/Templates/BaseGame/game/tools/main.tscript index 36c7844c4..66a809bbb 100644 --- a/Templates/BaseGame/game/tools/main.tscript +++ b/Templates/BaseGame/game/tools/main.tscript @@ -38,6 +38,9 @@ if(!$Tools::loaded) new Settings(EditorSettings) { file = "tools/settings.xml"; }; EditorSettings.read(); + ModuleDatabase.scanModules( "tools", false ); + ModuleDatabase.LoadGroup( "Tools" ); + //We may need to lean on certain EditorSettings, and specifically default values if the settings.xml //isn't found exec("tools/worldEditor/scripts/editorPrefs.ed." @ $TorqueScriptFileExtension); diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/.asset.taml new file mode 100644 index 000000000..5711ba647 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorGui,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorGui,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..bb5d886b7 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorGui,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorToolbar.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorToolbar.asset.taml new file mode 100644 index 000000000..10ff5f277 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialEditorToolbar.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/MaterialInstanceViewCtrl.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialInstanceViewCtrl.asset.taml new file mode 100644 index 000000000..c1af79f34 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialInstanceViewCtrl.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/MaterialToolbar.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialToolbar.ed.gui index efc140578..e20674037 100644 --- a/Templates/BaseGame/game/tools/materialEditor/gui/MaterialToolbar.ed.gui +++ b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialToolbar.ed.gui @@ -40,7 +40,7 @@ position = "86 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -59,10 +59,10 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Select and Edit an Existing Material"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/materialSelectorIcon"; + bitmapAsset = "ToolsModule:materialSelectorIcon_n_image"; text = ""; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/Profiles.ed.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/Profiles.ed.tscript index fb70def29..f8711a2b0 100644 --- a/Templates/BaseGame/game/tools/materialEditor/gui/Profiles.ed.tscript +++ b/Templates/BaseGame/game/tools/materialEditor/gui/Profiles.ed.tscript @@ -50,7 +50,7 @@ singleton GuiControlProfile(GuiMatEdPopUpMenuProfile) /*borderThickness = 1;*/ fixedExtent = true; //bitmap = "./images/scrollbar"; - bitmap = "tools/editorClasses/gui/images/scroll"; + bitmapAsset = "ToolsModule:scroll_image"; hasBitmapArray = true; profileForChildren = GuiControlListPopupProfile; fillColor = "255 0 0 255"; diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_d_image.asset.taml new file mode 100644 index 000000000..8ae79c543 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_h_image.asset.taml new file mode 100644 index 000000000..ecb7bc53d --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_n_image.asset.taml new file mode 100644 index 000000000..cb1d90f21 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/change_material_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubeMapEd_previewMat_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cubeMapEd_previewMat_image.asset.taml new file mode 100644 index 000000000..e3c84de3e --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubeMapEd_previewMat_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_xNeg_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cube_xNeg_image.asset.taml new file mode 100644 index 000000000..8d1f001d1 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cube_xNeg_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_xPos_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cube_xPos_image.asset.taml new file mode 100644 index 000000000..6fd8c47ca --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cube_xPos_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_yNeg_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cube_yNeg_image.asset.taml new file mode 100644 index 000000000..81127cec7 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cube_yNeg_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_yPos_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cube_yPos_image.asset.taml new file mode 100644 index 000000000..ad6e59aae --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cube_yPos_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_zNeg_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cube_zNeg_image.asset.taml new file mode 100644 index 000000000..b991f09fe --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cube_zNeg_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cube_zPos_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cube_zPos_image.asset.taml new file mode 100644 index 000000000..a14e21149 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cube_zPos_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_d_image.asset.taml new file mode 100644 index 000000000..cfbbe2aaa --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_h_image.asset.taml new file mode 100644 index 000000000..634d963e5 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_i_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_i_image.asset.taml new file mode 100644 index 000000000..3e0ba29ce --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_n_image.asset.taml new file mode 100644 index 000000000..d35bb1b86 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubemapBtnBorder_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.asset.taml new file mode 100644 index 000000000..5fa868792 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.tscript new file mode 100644 index 000000000..f1486903a --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(cubemaped_cubepreviewdts) +{ + baseShapeAsset = "ToolsModule:cubemaped_cubepreview"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.asset.taml new file mode 100644 index 000000000..1af02afb2 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.tscript new file mode 100644 index 000000000..8d19aaf62 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(cubemaped_cylinderpreviewdts) +{ + baseShapeAsset = "ToolsModule:cubemaped_cylinderpreview"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.asset.taml new file mode 100644 index 000000000..a1ae966d9 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.tscript new file mode 100644 index 000000000..0d1674c32 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(cubemaped_spherepreviewdts) +{ + baseShapeAsset = "ToolsModule:cubemaped_spherepreview"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.asset.taml new file mode 100644 index 000000000..28c6e67ac --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.tscript new file mode 100644 index 000000000..e02588465 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(cubepreviewdts) +{ + baseShapeAsset = "ToolsModule:cubepreview"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.asset.taml new file mode 100644 index 000000000..3181d9231 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.tscript new file mode 100644 index 000000000..a657c2304 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(cylinderpreviewdts) +{ + baseShapeAsset = "ToolsModule:cylinderpreview"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui index 8882e1728..ef31efa50 100644 --- a/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui +++ b/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui @@ -112,7 +112,7 @@ Extent = "17 17"; HorizSizing = "left"; tooltip = "Swap material on the object with existing"; - bitmap = "tools/materialEditor/gui/change-material-btn"; + bitmapAsset = "ToolsModule:change_material_btn_n_image"; command = "materialSelector.showDialog(\"MaterialEditorGui.showMaterialChangeSaveDialog\");"; }; @@ -277,7 +277,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiBitmapButtonCtrl() { @@ -299,7 +299,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; new GuiTextCtrl() { canSaveDynamicFields = "0"; @@ -399,14 +399,14 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; }; }; new GuiBitmapCtrl(){ position="6 75"; extent ="175 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset = "ToolsModule:separator_v_image"; }; new GuiContainer(){ // Normal Map profile="ToolsGuiDefaultProfile"; @@ -429,7 +429,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiTextCtrl() { @@ -473,7 +473,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; new GuiTextCtrl() { canSaveDynamicFields = "0"; @@ -525,7 +525,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; }; }; }; @@ -747,7 +747,7 @@ }; }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-v"; + bitmapAsset = "ToolsModule:separator_v_image"; wrap = "0"; position = "6 75"; extent = "175 2"; @@ -784,7 +784,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiTextCtrl() { @@ -821,14 +821,14 @@ MinExtent = "8 2"; canSave = "1"; Visible = "1"; - Command = "MaterialEditorGui.updateORMConfigMap(1);"; + Command = "MaterialEditorGui.updateTextureMap(\"ORMConfig\",1);"; tooltipprofile = "ToolsGuiDefaultProfile"; ToolTip = "Change the packed spec map for this layer. \n Roughness (R), Ambient Occlusion (G), and Metalness(B))"; hovertime = "1000"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; new GuiTextCtrl() { canSaveDynamicFields = "0"; @@ -861,7 +861,7 @@ position = "134 34"; Extent = "40 16"; buttonType = "PushButton"; - command="MaterialEditorGui.updateORMConfigMap(1);"; + Command = "MaterialEditorGui.updateTextureMap(\"ORMConfig\",1);"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -875,16 +875,16 @@ MinExtent = "8 2"; canSave = "1"; Visible = "1"; - Command = "MaterialEditorGui.updateORMConfigMap(0);"; + Command = "MaterialEditorGui.updateTextureMap(\"ORMConfig\",0);"; hovertime = "1000"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; }; }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-v"; + bitmapAsset = "ToolsModule:separator_v_image"; wrap = "0"; position = "6 75"; extent = "175 2"; @@ -929,7 +929,7 @@ maxLength = "1024"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/save-icon"; + bitmapAsset = "ToolsModule:save_icon_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -954,7 +954,7 @@ }; }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-v"; + bitmapAsset = "ToolsModule:separator_v_image"; wrap = "0"; position = "6 75"; extent = "175 2"; @@ -992,7 +992,7 @@ canSaveDynamicFields = "0"; new GuiBitmapCtrl() { - bitmap = "tools/materialeditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; position = "1 1"; extent = "48 48"; @@ -1033,7 +1033,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -1049,7 +1049,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "MaterialEditorGui.updateroughMap(1);"; + Command = "MaterialEditorGui.updateTextureMap(\"rough\",1);"; tooltipProfile = "GuiToolTipProfile"; tooltip = "Change the Roughness map for this layer."; hovertime = "1000"; @@ -1094,7 +1094,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "MaterialEditorGui.updateroughMap(1);"; + Command = "MaterialEditorGui.updateTextureMap(\"rough\",1);"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -1102,7 +1102,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -1118,7 +1118,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "MaterialEditorGui.updateroughMap(0);"; + Command = "MaterialEditorGui.updateTextureMap(\"rough\",0);"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -1228,7 +1228,7 @@ canSaveDynamicFields = "0"; new GuiBitmapCtrl() { - bitmap = "tools/materialeditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; position = "1 1"; extent = "48 48"; @@ -1269,7 +1269,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -1285,7 +1285,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "MaterialEditorGui.updateaoMap(1);"; + Command = "MaterialEditorGui.updateTextureMap(\"ao\",1);"; tooltipProfile = "GuiToolTipProfile"; tooltip = "Change the AO map for this layer."; hovertime = "1000"; @@ -1330,7 +1330,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "MaterialEditorGui.updateaoMap(1);"; + Command = "MaterialEditorGui.updateTextureMap(\"ao\",1);"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -1338,7 +1338,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -1354,7 +1354,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "MaterialEditorGui.updateaoMap(0);"; + Command = "MaterialEditorGui.updateTextureMap(\"ao\",0);"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -1464,7 +1464,7 @@ canSaveDynamicFields = "0"; new GuiBitmapCtrl() { - bitmap = "tools/materialeditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; position = "1 1"; extent = "48 48"; @@ -1505,7 +1505,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -1521,7 +1521,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "MaterialEditorGui.updatemetalMap(1);"; + Command = "MaterialEditorGui.updateTextureMap(\"metal\",1);"; tooltipProfile = "GuiToolTipProfile"; tooltip = "Change the Metalness Map for this layer."; hovertime = "1000"; @@ -1566,7 +1566,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "MaterialEditorGui.updatemetalMap(1);"; + Command = "MaterialEditorGui.updateTextureMap(\"metal\",1);"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -1574,7 +1574,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -1590,7 +1590,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "MaterialEditorGui.updatemetalMap(0);"; + Command = "MaterialEditorGui.updateTextureMap(\"metal\",0);"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -1679,7 +1679,7 @@ }; }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-v"; + bitmapAsset = "ToolsModule:separator_v_image"; wrap = "0"; position = "6 75"; extent = "175 2"; @@ -1716,7 +1716,7 @@ canSave = "1"; canSaveDynamicFields = "0"; new GuiBitmapCtrl() { - bitmap = "tools/materialeditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; position = "1 1"; extent = "48 48"; @@ -1757,7 +1757,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -1773,7 +1773,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "MaterialEditorGui.updateglowMap(1);"; + Command = "MaterialEditorGui.updateTextureMap(\"glow\",1);"; tooltipProfile = "GuiToolTipProfile"; tooltip = "Change the glowness Map for this layer."; hovertime = "1000"; @@ -1818,7 +1818,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "MaterialEditorGui.updateglowMap(1);"; + Command = "MaterialEditorGui.updateTextureMap(\"glow\",1);"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -1826,7 +1826,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -1842,7 +1842,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "MaterialEditorGui.updateglowMap(0);"; + Command = "MaterialEditorGui.updateTextureMap(\"glow\",0);"; tooltipProfile = "GuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -1967,7 +1967,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiBitmapButtonCtrl() { @@ -1989,7 +1989,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; new GuiTextCtrl() { // Detailmap Scale text @@ -2081,14 +2081,14 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; }; }; new GuiBitmapCtrl(){ position="6 246"; extent ="175 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; new GuiContainer(){ // Detail Normal Map @@ -2112,7 +2112,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiBitmapButtonCtrl() { @@ -2134,7 +2134,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; new GuiTextCtrl() { // Detail Normal Map Strength text @@ -2226,14 +2226,14 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; }; }; new GuiBitmapCtrl(){ position="6 189"; extent ="175 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; new GuiContainer(){ // Overlay Map @@ -2257,7 +2257,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiBitmapButtonCtrl() { @@ -2279,7 +2279,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; new GuiTextCtrl() { canSaveDynamicFields = "0"; @@ -2353,14 +2353,14 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; }; }; new GuiBitmapCtrl(){ position="6 189"; extent ="175 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; new GuiContainer(){ // light Map profile="ToolsGuiDefaultProfile"; @@ -2383,7 +2383,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiTextCtrl() { @@ -2427,7 +2427,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; new GuiTextCtrl() { canSaveDynamicFields = "0"; @@ -2479,14 +2479,14 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; }; }; new GuiBitmapCtrl(){ position="6 303"; extent ="175 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; new GuiContainer(){ // tone Map profile="ToolsGuiDefaultProfile"; @@ -2509,7 +2509,7 @@ canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiTextCtrl() { @@ -2553,7 +2553,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; new GuiTextCtrl() { canSaveDynamicFields = "0"; @@ -2605,7 +2605,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; }; }; }; @@ -3525,14 +3525,14 @@ position = "136 20"; Extent = "48 48"; isContainer = true; - bitmap=""; + bitmapAsset=""; new GuiBitmapCtrl(){ HorizSizing = "right"; VertSizing = "bottom"; position = "0 0"; Extent = "48 48"; - bitmap="tools/materialEditor/gui/cubemapBtnBorder_n"; + bitmapAsset="ToolsModule:cubemapBtnBorder_n_image"; }; new GuiBitmapCtrl(){ //horizontal bar @@ -3542,7 +3542,7 @@ position = "20 20"; Extent = "7 7"; MinExtent = "0 0"; - bitmap="tools/gui/images/crosshair_blue"; + bitmapAsset="ToolsModule:crosshair_blue_image"; }; }; @@ -3742,14 +3742,14 @@ position = "136 20"; Extent = "48 48"; isContainer = true; - bitmap=""; + bitmapAsset=""; new GuiBitmapCtrl(){ HorizSizing = "right"; VertSizing = "bottom"; position = "0 0"; Extent = "48 48"; - bitmap="tools/materialEditor/gui/cubemapBtnBorder_n"; + bitmapAsset="ToolsModule:cubemapBtnBorder_n_image"; }; new GuiBitmapCtrl(){ //vertical bar HorizSizing = "right"; @@ -3757,7 +3757,7 @@ position = "20 20"; Extent = "7 7"; MinExtent = "7 7"; - bitmap="tools/gui/images/crosshair"; + bitmapAsset="ToolsModule:crosshair_image"; }; new GuiBitmapCtrl(){ //horizontal bar internalName = "ScrollCrosshair"; @@ -3766,7 +3766,7 @@ position = "20 20"; Extent = "7 7"; MinExtent = "0 0"; - bitmap="tools/gui/images/crosshair_blue"; + bitmapAsset="ToolsModule:crosshair_blue_image"; }; }; @@ -3892,7 +3892,7 @@ buttonType = "RadioButton"; position = "1 0"; Extent = "13 13"; - bitmap = "tools/materialEditor/gui/wav-sine"; + bitmapAsset = "ToolsModule:wav_sine_n_image"; command = "MaterialEditorGui.updateWaveType();"; tooltip="Sine Wave"; hovertime = "1000"; @@ -3904,7 +3904,7 @@ buttonType = "RadioButton"; position = "17 0"; Extent = "13 13"; - bitmap = "tools/materialEditor/gui/wav-triangle"; + bitmapAsset = "ToolsModule:wav_triangle_n_image"; command = "MaterialEditorGui.updateWaveType();"; tooltip="Triangle Wave"; hovertime = "1000"; @@ -3916,7 +3916,7 @@ buttonType = "RadioButton"; position = "33 0"; Extent = "13 13"; - bitmap = "tools/materialEditor/gui/wav-square"; + bitmapAsset = "ToolsModule:wav_square_n_image"; command = "MaterialEditorGui.updateWaveType();"; tooltip="Square Wave"; hovertime = "1000"; @@ -4452,7 +4452,7 @@ position="2 2"; extent ="192 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; // Reflection Properties Text new GuiTextCtrl(matEd_reflectionPropertiesText) { @@ -4530,7 +4530,7 @@ position="2 2"; extent ="192 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; new GuiTextCtrl() { text = "Effect Colors[0:1]"; @@ -4703,7 +4703,7 @@ Visible = "0"; //Command = "materialSelector.showDialog(\"MaterialEditorGui.switchMaterial\");"; hovertime = "1000"; - bitmap = "tools/gui/images/folderUp"; + bitmapAsset = "ToolsModule:folderUp_image"; tooltip = "Go back to previous editor"; groupNum = "-1"; buttonType = "PushButton"; @@ -4720,9 +4720,9 @@ MinExtent = "8 2"; canSave = "1"; Visible = "1"; - Command = "materialSelector.showDialog(\"MaterialEditorGui.switchMaterial\");"; + Command = "AssetBrowser.showDialog(\"MaterialAsset\", \"MaterialEditorGui.selectMaterialAsset\");"; hovertime = "1000"; - bitmap = "tools/gui/images/open-file"; + bitmapAsset = "ToolsModule:open_file_n_image"; tooltip = "Open Existing Material"; groupNum = "-1"; buttonType = "PushButton"; @@ -4748,7 +4748,7 @@ tooltip = "Create New Material"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/new"; + bitmap = "ToolsModule:new_n_image"; }; // Save Button new GuiBitmapButtonCtrl() { @@ -4770,7 +4770,7 @@ tooltip = "Save Material (ALT S)"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/save-icon"; + bitmapAsset = "ToolsModule:save_icon_n_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -4791,7 +4791,7 @@ tooltip = "Lookup Material Instances"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/visible"; + bitmapAsset = "ToolsModule:visible_n_image"; }; new GuiBitmapCtrl(){ position = "147 1"; @@ -4799,7 +4799,7 @@ minExtent = "2 16"; HorizSizing = "left"; VertSizing = "bottom"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; }; // Revert Material new GuiBitmapButtonCtrl() { @@ -4818,7 +4818,7 @@ hovertime = "1000"; tooltip = "Revert Material to Saved"; text = ""; - bitmap = "tools/gui/images/reset-icon"; + bitmapAsset = "ToolsModule:reset_icon_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -4840,7 +4840,7 @@ hovertime = "1000"; tooltip = "Clear All Material Properties"; text = ""; - bitmap = "tools/gui/images/clear-icon"; + bitmapAsset = "ToolsModule:clear_icon_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -4862,7 +4862,7 @@ hovertime = "1000"; tooltip = "Delete Material from File"; text = ""; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/gui_gridTiny2_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/gui_gridTiny2_image.asset.taml new file mode 100644 index 000000000..c22814db6 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/gui_gridTiny2_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_d_image.asset.taml new file mode 100644 index 000000000..d6cdec686 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_h_image.asset.taml new file mode 100644 index 000000000..2f4059df2 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_n_image.asset.taml new file mode 100644 index 000000000..c86629a5d --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_cylinderButt_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_mappedMat_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_mappedMat_image.asset.taml new file mode 100644 index 000000000..0fe538c31 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_mappedMat_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_d_image.asset.taml new file mode 100644 index 000000000..28b42a9e6 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_h_image.asset.taml new file mode 100644 index 000000000..43cb64541 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_n_image.asset.taml new file mode 100644 index 000000000..d73281208 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/matEd_sphereButt_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/materialInstancesView.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/materialInstancesView.ed.gui index ce5c683de..e7899e547 100644 --- a/Templates/BaseGame/game/tools/materialEditor/gui/materialInstancesView.ed.gui +++ b/Templates/BaseGame/game/tools/materialEditor/gui/materialInstancesView.ed.gui @@ -75,7 +75,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl(MaterialInstanceFilterBtn) { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_d_image.asset.taml new file mode 100644 index 000000000..0e8ee6aa9 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_h_image.asset.taml new file mode 100644 index 000000000..bb589ef00 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_n_image.asset.taml new file mode 100644 index 000000000..e51187ebc --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/materialSelectorIcon_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_d_image.asset.taml new file mode 100644 index 000000000..b5fbe6a7e --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_h_image.asset.taml new file mode 100644 index 000000000..de0c1539d --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_n_image.asset.taml new file mode 100644 index 000000000..27bbd4c78 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/mesh_selector_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/new_material_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/new_material_d_image.asset.taml new file mode 100644 index 000000000..acc27a79f --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/new_material_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/new_material_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/new_material_h_image.asset.taml new file mode 100644 index 000000000..5c2ef8da5 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/new_material_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/new_material_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/new_material_n_image.asset.taml new file mode 100644 index 000000000..f3a27e7b9 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/new_material_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.asset.taml new file mode 100644 index 000000000..b19cd5d3f --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.tscript new file mode 100644 index 000000000..c4d1e494f --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(pyramidpreviewdts) +{ + baseShapeAsset = "ToolsModule:pyramidpreview"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/screenFaded_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/screenFaded_image.asset.taml new file mode 100644 index 000000000..dccb70bd0 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/screenFaded_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/scrollBox_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/scrollBox_image.asset.taml new file mode 100644 index 000000000..479012a3d --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/scrollBox_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.asset.taml new file mode 100644 index 000000000..8e671498e --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.tscript new file mode 100644 index 000000000..738c1324e --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(spherepreviewdts) +{ + baseShapeAsset = "ToolsModule:spherepreview"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.asset.taml new file mode 100644 index 000000000..a7dae4aab --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.tscript new file mode 100644 index 000000000..8c8925c51 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(torusknotpreviewdts) +{ + baseShapeAsset = "ToolsModule:torusknotpreview"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.asset.taml new file mode 100644 index 000000000..a6c4f7403 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.tscript new file mode 100644 index 000000000..d648d51ba --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(torusknowpreviewdts) +{ + baseShapeAsset = "ToolsModule:torusknowpreview"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.asset.taml new file mode 100644 index 000000000..ab867d7ce --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.tscript new file mode 100644 index 000000000..a0ac93f16 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(toruspreviewdts) +{ + baseShapeAsset = "ToolsModule:toruspreview"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/unknownImage_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/unknownImage_image.asset.taml new file mode 100644 index 000000000..28ef1d679 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/unknownImage_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/unsavedWarn_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/unsavedWarn_image.asset.taml new file mode 100644 index 000000000..f9331dc49 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/unsavedWarn_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_d_image.asset.taml new file mode 100644 index 000000000..df0d29fce --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_h_image.asset.taml new file mode 100644 index 000000000..602d5d8f3 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_i_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_i_image.asset.taml new file mode 100644 index 000000000..ecce8c01e --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_n_image.asset.taml new file mode 100644 index 000000000..967253508 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_none_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_d_image.asset.taml new file mode 100644 index 000000000..c47c33421 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_h_image.asset.taml new file mode 100644 index 000000000..d566608c3 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_i_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_i_image.asset.taml new file mode 100644 index 000000000..e72ce9bf5 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_n_image.asset.taml new file mode 100644 index 000000000..db5f70a11 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_sine_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_d_image.asset.taml new file mode 100644 index 000000000..6343ab62a --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_h_image.asset.taml new file mode 100644 index 000000000..71e8fb853 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_i_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_i_image.asset.taml new file mode 100644 index 000000000..5ae57b707 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_n_image.asset.taml new file mode 100644 index 000000000..9f089e90c --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_square_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_d_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_d_image.asset.taml new file mode 100644 index 000000000..72fc63271 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_h_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_h_image.asset.taml new file mode 100644 index 000000000..c01537ced --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_i_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_i_image.asset.taml new file mode 100644 index 000000000..e4a405c4a --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_i_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_n_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_n_image.asset.taml new file mode 100644 index 000000000..ed68d4b6d --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/gui/wav_triangle_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/main.tscript b/Templates/BaseGame/game/tools/materialEditor/main.tscript index 5bca2fa6f..3b7fa5c4b 100644 --- a/Templates/BaseGame/game/tools/materialEditor/main.tscript +++ b/Templates/BaseGame/game/tools/materialEditor/main.tscript @@ -64,7 +64,7 @@ function MaterialEditorPlugin::onWorldEditorStartup( %this ) // Add ourselves to the ToolsToolbar %tooltip = "Material Editor (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "MaterialEditorPlugin", "MaterialEditorPalette", expandFilename("tools/worldEditor/images/toolbar/material-editor"), %tooltip ); + EditorGui.addToToolsToolbar( "MaterialEditorPlugin", "MaterialEditorPalette", "ToolsModule:material_editor_n_image", %tooltip ); //connect editor windows GuiWindowCtrl::attach( MaterialEditorPropertiesWindow, MaterialEditorPreviewWindow); @@ -163,4 +163,4 @@ function MaterialEditorPlugin::onDeactivated( %this ) %this.map.pop(); Parent::onDeactivated(%this); -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEd_justAlphaMaterial.asset.taml b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEd_justAlphaMaterial.asset.taml new file mode 100644 index 000000000..e567baec9 --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEd_justAlphaMaterial.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEd_previewMaterial.asset.taml b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEd_previewMaterial.asset.taml new file mode 100644 index 000000000..22c8bb0ee --- /dev/null +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEd_previewMaterial.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript index f0d99d579..af0e1879a 100644 --- a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript @@ -21,18 +21,19 @@ //----------------------------------------------------------------------------- // Material Editor originally created by Dave Calabrese and Travis Vroman of Gaslight Studios +$MaterialEditor::emptyMaterialImage = "ToolsModule:unknownImage_image"; function MaterialEditorGui::establishMaterials(%this) { //Cubemap used to preview other cubemaps in the editor. singleton CubemapData( matEdCubeMapPreviewMat ) { - cubeFace[0] = "tools/materialEditor/gui/cube_xNeg"; - cubeFace[1] = "tools/materialEditor/gui/cube_xPos"; - cubeFace[2] = "tools/materialEditor/gui/cube_ZNeg"; - cubeFace[3] = "tools/materialEditor/gui/cube_ZPos"; - cubeFace[4] = "tools/materialEditor/gui/cube_YNeg"; - cubeFace[5] = "tools/materialEditor/gui/cube_YPos"; + cubeMapFaceAsset[0] = "ToolsModule:cube_xNeg_image"; + cubeMapFaceAsset[1] = "ToolsModule:cube_xPos_image"; + cubeMapFaceAsset[2] = "ToolsModule:cube_zNeg_image"; + cubeMapFaceAsset[3] = "ToolsModule:cube_zPos_image"; + cubeMapFaceAsset[4] = "ToolsModule:cube_yNeg_image"; + cubeMapFaceAsset[5] = "ToolsModule:cube_yPos_image"; parentGroup = "RootGroup"; }; @@ -40,7 +41,7 @@ function MaterialEditorGui::establishMaterials(%this) singleton Material(materialEd_previewMaterial) { mapTo = "matEd_mappedMat"; - diffuseMap[0] = "tools/materialEditor/gui/matEd_mappedMat"; + diffuseMapAsset[0] = "ToolsModule:matEd_mappedMat_image"; }; singleton CustomMaterial( materialEd_justAlphaMaterial ) @@ -230,6 +231,11 @@ function MaterialEditorGui::openFile( %this, %fileType ) return makeRelativePath( %filename, getMainDotCsDir() ); } +function MaterialEditorGui::selectMaterialAsset(%this, %assetId) +{ + AssetBrowser.editAsset(%assetId); +} + //============================================================================== // SubMaterial(Material Target) -- Supports different ways to grab the // material from the dropdown list. We're here either because- @@ -253,7 +259,16 @@ function SubMaterialSelector::onSelect( %this ) // object does not have a valid method to grab a material if( !isObject( %material ) ) { - // look for a newMaterial name to grab + if(!AssetDatabase.isDeclaredAsset(%material)) + { + return; + } + else + { + %assetDef = AssetDatabase.acquireAsset(%material); + %material = %assetDef.materialDefinitionName; + } + /*// look for a newMaterial name to grab // addiitonally, convert "." to "_" in case we have something like: "base.texname" as a material name // at the end we will have generated material name: "base_texname_mat" %material = getUniqueName( strreplace(%material, ".", "_") @ "_mat" ); @@ -268,7 +283,7 @@ function SubMaterialSelector::onSelect( %this ) eval( "MaterialEditorGui.currentObject." @ strreplace(%this.getText(),".","_") @ " = " @ %material @ ";"); if( MaterialEditorGui.currentObject.isMethod("postApply") ) - MaterialEditorGui.currentObject.postApply(); + MaterialEditorGui.currentObject.postApply();*/ } MaterialEditorGui.prepareActiveMaterial( %material.getId() ); @@ -325,7 +340,7 @@ function MaterialEditorGui::prepareActiveObject( %this, %override ) { %fieldName = %obj.getField(%i); - if( %obj.getFieldType(%fieldName) !$= "TypeMaterialName" ) + if( %obj.getFieldType(%fieldName) !$= "TypeMaterialAssetId" /*&& %obj.getFieldType(%fieldName) !$= "TypeMaterialName"*/) continue; if( !%canSupportMaterial ) @@ -409,7 +424,8 @@ function MaterialEditorGui::prepareActiveMaterial(%this, %material, %override) { // If were not valid, grab the first valid material out of the materialSet if( !isObject(%material) ) - %material = MaterialSet.getObject(0); + return; + //%material = MaterialSet.getObject(0); // Check made in order to avoid loading the same material. Overriding // made in special cases @@ -448,7 +464,7 @@ function MaterialEditorGui::setActiveMaterial( %this, %material ) singleton Material(notDirtyMaterial) { mapTo = "matEd_mappedMat"; - diffuseMap[0] = "tools/materialEditor/gui/matEd_mappedMat"; + diffuseMapAsset[0] = "ToolsModule:matEd_mappedMat_image"; }; // Converts the texture files into absolute paths. @@ -501,7 +517,13 @@ function MaterialEditorGui::setMaterialDirty(%this) // materials created in the material selector are given that as its filename, so we run another check if( MaterialEditorGui.isMatEditorMaterial( MaterialEditorGui.currentMaterial ) ) { - if( MaterialEditorGui.currentMaterial.isAutoGenerated() ) + %currentMatFilename = MaterialEditorGui.currentMaterial.getFilename(); + + if(%currentMatFilename !$= "") + { + matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, %currentMatFilename); + } + else if( MaterialEditorGui.currentMaterial.isAutoGenerated() ) { %obj = MaterialEditorGui.currentObject; @@ -525,13 +547,9 @@ function MaterialEditorGui::setMaterialDirty(%this) matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, %savePath); } - else - { - matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, "art/materials." @ $TorqueScriptFileExtension); - } } else - matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial); + matEd_PersistMan.setDirty(MaterialEditorGui.currentMaterial, MaterialEditorGui.defaultMaterialFile); } function MaterialEditorGui::convertTextureFields(%this) @@ -539,88 +557,30 @@ function MaterialEditorGui::convertTextureFields(%this) // Find the absolute paths for the texture filenames so that // we can properly wire up the preview materials and controls. - for(%diffuseI = 0; %diffuseI < 4; %diffuseI++) - { - %diffuseMap = MaterialEditorGui.currentMaterial.diffuseMap[%diffuseI]; - %diffuseMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %diffuseMap); - MaterialEditorGui.currentMaterial.diffuseMap[%diffuseI] = %diffuseMap; + %this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "DiffuseMap"); + %this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "NormalMap"); + %this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "OverlayMap"); + %this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "DetailMap"); + %this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "LightMap"); + %this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "ToneMap"); + %this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "ORMConfigMap"); + %this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "RoughMap"); + %this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "AOMap"); + %this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "MetalMap"); + %this.convertMaterialTextureField(MaterialEditorGui.currentMaterial, "GlowMap"); } - for(%normalI = 0; %normalI < 4; %normalI++) +function MaterialEditorGui::convertMaterialTextureField(%this, %material, %mapName) { - %normalMap = MaterialEditorGui.currentMaterial.normalMap[%normalI]; - %normalMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %normalMap); - MaterialEditorGui.currentMaterial.normalMap[%normalI] = %normalMap; + for(%index = 0; %index < 4; %index++) + { + %mapFile = %material.call("get" @ %mapName, %index); + if(%mapFile !$= "" && !isFile(%mapFile)) + { + //see if we can't go finding it + %mapFile = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %mapFile); + MaterialEditorGui.currentMaterial.call("set" @ %mapName, %mapFile, %index); } - - for(%overlayI = 0; %overlayI < 4; %overlayI++) - { - %overlayMap = MaterialEditorGui.currentMaterial.overlayMap[%overlayI]; - %overlayMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %overlayMap); - MaterialEditorGui.currentMaterial.overlayMap[%overlayI] = %overlayMap; - } - - for(%detailI = 0; %detailI < 4; %detailI++) - { - %detailMap = MaterialEditorGui.currentMaterial.detailMap[%detailI]; - %detailMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %detailMap); - MaterialEditorGui.currentMaterial.detailMap[%detailI] = %detailMap; - } - - for(%detailNormalI = 0; %detailNormalI < 4; %detailNormalI++) - { - %detailNormalMap = MaterialEditorGui.currentMaterial.detailNormalMap[%detailNormalI]; - %detailNormalMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %detailNormalMap); - MaterialEditorGui.currentMaterial.detailNormalMap[%detailNormalI] = %detailNormalMap; - } - - for(%lightI = 0; %lightI < 4; %lightI++) - { - %lightMap = MaterialEditorGui.currentMaterial.lightMap[%lightI]; - %lightMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %lightMap); - MaterialEditorGui.currentMaterial.lightMap[%lightI] = %lightMap; - } - - for(%toneI = 0; %toneI < 4; %toneI++) - { - %toneMap = MaterialEditorGui.currentMaterial.toneMap[%toneI]; - %toneMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %toneMap); - MaterialEditorGui.currentMaterial.toneMap[%toneI] = %toneMap; - } - - for(%specI = 0; %specI < 4; %specI++) - { - %ORMConfigMap = MaterialEditorGui.currentMaterial.ORMConfigMap[%specI]; - %ORMConfigMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %ORMConfigMap); - MaterialEditorGui.currentMaterial.ORMConfigMap[%specI] = %ORMConfigMap; - } - - for(%roughI = 0; %roughI < 4; %roughI++) - { - %roughMap = MaterialEditorGui.currentMaterial.roughMap[%roughI]; - %roughMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %roughMap); - MaterialEditorGui.currentMaterial.roughMap[%specI] = %roughMap; - } - - for(%aoI = 0; %aoI < 4; %aoI++) - { - %aoMap = MaterialEditorGui.currentMaterial.aoMap[%aoI]; - %aoMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %aoMap); - MaterialEditorGui.currentMaterial.aoMap[%specI] = %aoMap; - } - - for(%metalI = 0; %metalI < 4; %metalI++) - { - %metalMap = MaterialEditorGui.currentMaterial.metalMap[%metalI]; - %metalMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %metalMap); - MaterialEditorGui.currentMaterial.metalMap[%metalI] = %metalMap; - } - - for(%glowI = 0; %glowI < 4; %glowI++) - { - %glowMap = MaterialEditorGui.currentMaterial.glowMap[%glowI]; - %glowMap = MaterialEditorGui.searchForTexture(MaterialEditorGui.currentMaterial, %glowMap); - MaterialEditorGui.currentMaterial.glowMap[%glowI] = %glowMap; } } @@ -629,6 +589,14 @@ function MaterialEditorGui::searchForTexture(%this,%material, %texture) { if( %texture !$= "" ) { + if(AssetDatabase.isDeclaredAsset(%texture)) + { + %assetDef = AssetDatabase.acquireAsset(%texture); + %imagePath = %assetDef.getImagePath(); + AssetDatabase.releaseAsset(%texture); + + return %imagePath; + } // set the find signal as false to start out with %isFile = false; // sete the formats we're going to be looping through if need be @@ -785,15 +753,6 @@ function MaterialEditorGui::guiSync( %this, %material ) MaterialEditorPropertiesWindow-->castShadows.setValue((%material).castShadows); MaterialEditorPropertiesWindow-->castDynamicShadows.setValue((%material).castDynamicShadows); MaterialEditorPropertiesWindow-->translucentCheckbox.setValue((%material).translucent); - /* - - MaterialEditorPropertiesWindow-->blendingTypePopUp.add(preMul,1); - MaterialEditorPropertiesWindow-->blendingTypePopUp.add(LerpAlpha,2); - MaterialEditorPropertiesWindow-->blendingTypePopUp.add(Mul,3); - MaterialEditorPropertiesWindow-->blendingTypePopUp.add(Add,4); - MaterialEditorPropertiesWindow-->blendingTypePopUp.add(AddAlpha,5); - MaterialEditorPropertiesWindow-->blendingTypePopUp.add(Sub,6); - */ switch$((%material).translucentBlendOp) { case "None": %selectedNum = 0; @@ -837,138 +796,174 @@ function MaterialEditorGui::guiSync( %this, %material ) //layer specific controls are located here %layer = MaterialEditorGui.currentLayer; - if((%material).diffuseMap[%layer] $= "") + //Diffuse + if((%material).getDiffuseMap(%layer) !$= "" && (%material).getDiffuseMapAsset(%layer) !$= $MaterialEditor::emptyMaterialImage) + { + %difAsset = (%material).getDiffuseMapAsset(%layer); + MaterialEditorPropertiesWindow-->diffuseMapNameText.setText( (%material).getDiffuseMapAsset(%layer) ); + MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( (%material).getDiffuseMap(%layer) ); + } + else { MaterialEditorPropertiesWindow-->diffuseMapNameText.setText( "None" ); - MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" ); - } - else - { - MaterialEditorPropertiesWindow-->diffuseMapNameText.setText( (%material).diffuseMap[%layer] ); - MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( (%material).diffuseMap[%layer] ); + MaterialEditorPropertiesWindow-->diffuseMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage ); } - if((%material).normalMap[%layer] $= "") + //Normal + if((%material).getNormalMap(%layer) !$= "" && (%material).getNormalMap(%layer) !$= $MaterialEditor::emptyMaterialImage) + { + MaterialEditorPropertiesWindow-->normalMapNameText.setText( (%material).getNormalMapAsset(%layer) ); + MaterialEditorPropertiesWindow-->normalMapDisplayBitmap.setBitmap( (%material).getNormalMap(%layer) ); + } + else { MaterialEditorPropertiesWindow-->normalMapNameText.setText( "None" ); - MaterialEditorPropertiesWindow-->normalMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" ); - } - else - { - MaterialEditorPropertiesWindow-->normalMapNameText.setText( (%material).normalMap[%layer] ); - MaterialEditorPropertiesWindow-->normalMapDisplayBitmap.setBitmap( (%material).normalMap[%layer] ); + MaterialEditorPropertiesWindow-->normalMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage ); } - if((%material).overlayMap[%layer] $= "") + //ORM Config + if((%material).getORMConfigMap(%layer) !$= "" && (%material).getORMConfigMap(%layer) !$= $MaterialEditor::emptyMaterialImage) { - MaterialEditorPropertiesWindow-->overlayMapNameText.setText( "None" ); - MaterialEditorPropertiesWindow-->overlayMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" ); - } - else - { - MaterialEditorPropertiesWindow-->overlayMapNameText.setText( (%material).overlayMap[%layer] ); - MaterialEditorPropertiesWindow-->overlayMapDisplayBitmap.setBitmap( (%material).overlayMap[%layer] ); - } - - if((%material).detailMap[%layer] $= "") - { - MaterialEditorPropertiesWindow-->detailMapNameText.setText( "None" ); - MaterialEditorPropertiesWindow-->detailMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" ); - } - else - { - MaterialEditorPropertiesWindow-->detailMapNameText.setText( (%material).detailMap[%layer] ); - MaterialEditorPropertiesWindow-->detailMapDisplayBitmap.setBitmap( (%material).detailMap[%layer] ); - } - - if((%material).detailNormalMap[%layer] $= "") - { - MaterialEditorPropertiesWindow-->detailNormalMapNameText.setText( "None" ); - MaterialEditorPropertiesWindow-->detailNormalMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" ); - } - else - { - MaterialEditorPropertiesWindow-->detailNormalMapNameText.setText( (%material).detailNormalMap[%layer] ); - MaterialEditorPropertiesWindow-->detailNormalMapDisplayBitmap.setBitmap( (%material).detailNormalMap[%layer] ); - } - - if((%material).lightMap[%layer] $= "") - { - MaterialEditorPropertiesWindow-->lightMapNameText.setText( "None" ); - MaterialEditorPropertiesWindow-->lightMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" ); - } - else - { - MaterialEditorPropertiesWindow-->lightMapNameText.setText( (%material).lightMap[%layer] ); - MaterialEditorPropertiesWindow-->lightMapDisplayBitmap.setBitmap( (%material).lightMap[%layer] ); - } - - if((%material).toneMap[%layer] $= "") - { - MaterialEditorPropertiesWindow-->toneMapNameText.setText( "None" ); - MaterialEditorPropertiesWindow-->toneMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" ); - } - else - { - MaterialEditorPropertiesWindow-->toneMapNameText.setText( (%material).toneMap[%layer] ); - MaterialEditorPropertiesWindow-->toneMapDisplayBitmap.setBitmap( (%material).toneMap[%layer] ); - } - MaterialEditorPropertiesWindow-->isSRGBCheckbox.setValue((%material).isSRGB[%layer]); - MaterialEditorPropertiesWindow-->invertRoughnessCheckbox.setValue((%material).invertRoughness[%layer]); + MaterialEditorPropertiesWindow-->ORMConfigMapNameText.setText( (%material).getORMConfigMapAsset(%layer) ); + MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap( (%material).getORMConfigMap(%layer) ); + //hide unused + MaterialEditorPropertiesWindow-->RoughnessTextEdit.setVisible(false); + MaterialEditorPropertiesWindow-->RoughnessSlider.setVisible(false); + MaterialEditorPropertiesWindow-->MetalnessTextEdit.setVisible(false); + MaterialEditorPropertiesWindow-->MetalnessSlider.setVisible(false); - if((%material).ORMConfigMap[%layer] $= "") + MaterialEditorPropertiesWindow-->isSRGBCheckbox.setValue((%material).isSRGB[%layer]); + MaterialEditorPropertiesWindow-->invertRoughnessCheckbox.setValue((%material).invertRoughness[%layer]); + //show used + MaterialEditorPropertiesWindow-->isSRGBCheckbox.setVisible(true); + MaterialEditorPropertiesWindow-->invertRoughnessCheckbox.setVisible(true); + + } + else { MaterialEditorPropertiesWindow-->ORMConfigMapNameText.setText( "None" ); - MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap( "tools/materialEditor/gui/unknownImage" ); - } - else - { - MaterialEditorPropertiesWindow-->ORMConfigMapNameText.setText( (%material).ORMConfigMap[%layer] ); - MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap( (%material).ORMConfigMap[%layer] ); + MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage ); + + MaterialEditorPropertiesWindow-->RoughnessTextEdit.setText((%material).Roughness[%layer]); + MaterialEditorPropertiesWindow-->RoughnessSlider.setValue((%material).Roughness[%layer]); + MaterialEditorPropertiesWindow-->MetalnessTextEdit.setText((%material).Metalness[%layer]); + MaterialEditorPropertiesWindow-->MetalnessSlider.setValue((%material).Metalness[%layer]); + //show used + MaterialEditorPropertiesWindow-->RoughnessTextEdit.setVisible(true); + MaterialEditorPropertiesWindow-->RoughnessSlider.setVisible(true); + MaterialEditorPropertiesWindow-->MetalnessTextEdit.setVisible(true); + MaterialEditorPropertiesWindow-->MetalnessSlider.setVisible(true); + + //hide unused + MaterialEditorPropertiesWindow-->isSRGBCheckbox.setVisible(false); + MaterialEditorPropertiesWindow-->invertRoughnessCheckbox.setVisible(false); } - if((%material).roughMap[%layer] $= "") + //AOMap + if((%material).getAOMap(%layer) !$= "" && (%material).getAOMap(%layer) !$= $MaterialEditor::emptyMaterialImage) { - MaterialEditorPropertiesWindow-->roughMapNameText.setText( "None" ); - MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" ); + MaterialEditorPropertiesWindow-->aoMapNameText.setText( (%material).getAOMapAsset(%layer) ); + MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap( (%material).getAOMap(%layer) ); } else - { - MaterialEditorPropertiesWindow-->roughMapNameText.setText( (%material).roughMap[%layer] ); - MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap( (%material).roughMap[%layer] ); - } - - if((%material).aoMap[%layer] $= "") { MaterialEditorPropertiesWindow-->aoMapNameText.setText( "None" ); - MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" ); + MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage ); + } + //RoughMap + if((%material).getRoughMap(%layer) !$= "" && (%material).getRoughMap(%layer) !$= $MaterialEditor::emptyMaterialImage) + { + MaterialEditorPropertiesWindow-->roughMapNameText.setText( (%material).getRoughMapAsset(%layer) ); + MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap( (%material).getRoughMap(%layer) ); } else { - MaterialEditorPropertiesWindow-->aoMapNameText.setText( (%material).aoMap[%layer] ); - MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap( (%material).aoMap[%layer] ); + MaterialEditorPropertiesWindow-->roughMapNameText.setText( "None" ); + MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage ); } - if((%material).metalMap[%layer] $= "") + //MetalMap + if((%material).getMetalMap(%layer) !$= "" && (%material).getMetalMap(%layer) !$= $MaterialEditor::emptyMaterialImage) + { + MaterialEditorPropertiesWindow-->metalMapNameText.setText( (%material).getMetalMapAsset(%layer) ); + MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap( (%material).getMetalMap(%layer) ); + } + else { MaterialEditorPropertiesWindow-->metalMapNameText.setText( "None" ); - MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" ); - } - else - { - MaterialEditorPropertiesWindow-->metalMapNameText.setText( (%material).metalMap[%layer] ); - MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap( (%material).metalMap[%layer] ); + MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage ); } - if((%material).glowMap[%layer] $= "") + //GlowMap + if((%material).getGlowMap(%layer) !$= "" && (%material).getGlowMap(%layer) !$= $MaterialEditor::emptyMaterialImage) { - MaterialEditorPropertiesWindow-->glowMapNameText.setText( "None" ); - MaterialEditorPropertiesWindow-->glowMapDisplayBitmap.setBitmap( "tools/materialeditor/gui/unknownImage" ); + MaterialEditorPropertiesWindow-->glowMapNameText.setText( (%material).getGlowMapAsset(%layer) ); + MaterialEditorPropertiesWindow-->glowMapDisplayBitmap.setBitmap( (%material).getGlowMap(%layer) ); } else { - MaterialEditorPropertiesWindow-->glowMapNameText.setText( (%material).glowMap[%layer] ); - MaterialEditorPropertiesWindow-->glowMapDisplayBitmap.setBitmap( (%material).glowMap[%layer] ); + MaterialEditorPropertiesWindow-->glowMapNameText.setText( "None" ); + MaterialEditorPropertiesWindow-->glowMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage ); + } + + //Overlay + if((%material).getOverlayMap(%layer) !$= "" && (%material).getOverlayMap(%layer) !$= $MaterialEditor::emptyMaterialImage) + { + MaterialEditorPropertiesWindow-->overlayMapNameText.setText( (%material).getOverlayMapAsset(%layer) ); + MaterialEditorPropertiesWindow-->overlayMapDisplayBitmap.setBitmap( (%material).getOverlayMap(%layer) ); + } + else + { + MaterialEditorPropertiesWindow-->overlayMapNameText.setText( "None" ); + MaterialEditorPropertiesWindow-->overlayMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage ); + } + + //Detail + if((%material).getDetailMap(%layer) !$= "" && (%material).getDetailMap(%layer) !$= $MaterialEditor::emptyMaterialImage) + { + MaterialEditorPropertiesWindow-->detailMapNameText.setText( (%material).getDetailMapAsset(%layer) ); + MaterialEditorPropertiesWindow-->detailMapDisplayBitmap.setBitmap( (%material).getDetailMap(%layer) ); + } + else + { + MaterialEditorPropertiesWindow-->detailMapNameText.setText( "None" ); + MaterialEditorPropertiesWindow-->detailMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage ); + } + + //Detail Normal + if((%material).getDetailNormalMap(%layer) !$= "" && (%material).getDetailNormalMap(%layer) !$= $MaterialEditor::emptyMaterialImage) + { + MaterialEditorPropertiesWindow-->detailNormalMapNameText.setText( (%material).getDetailNormalMapAsset(%layer) ); + MaterialEditorPropertiesWindow-->detailNormalMapDisplayBitmap.setBitmap( (%material).getDetailNormalMap(%layer) ); + } + else + { + MaterialEditorPropertiesWindow-->detailNormalMapNameText.setText( "None" ); + MaterialEditorPropertiesWindow-->detailNormalMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage ); + } + + //Light + if((%material).getLightMap(%layer) !$= "" && (%material).getLightMap(%layer) !$= $MaterialEditor::emptyMaterialImage) + { + MaterialEditorPropertiesWindow-->lightMapNameText.setText( (%material).getLightMapAsset(%layer) ); + MaterialEditorPropertiesWindow-->lightMapDisplayBitmap.setBitmap( (%material).getLightMap(%layer) ); + } + else + { + MaterialEditorPropertiesWindow-->lightMapNameText.setText( "None" ); + MaterialEditorPropertiesWindow-->lightMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage ); + } + + //Tone + if((%material).getToneMap(%layer) !$= "" && (%material).getToneMap(%layer) !$= $MaterialEditor::emptyMaterialImage) + { + MaterialEditorPropertiesWindow-->toneMapNameText.setText( (%material).getToneMapAsset(%layer) ); + MaterialEditorPropertiesWindow-->toneMapDisplayBitmap.setBitmap( (%material).getToneMap(%layer) ); + } + else + { + MaterialEditorPropertiesWindow-->toneMapNameText.setText( "None" ); + MaterialEditorPropertiesWindow-->toneMapDisplayBitmap.setBitmap( $MaterialEditor::emptyMaterialImage ); } MaterialEditorPropertiesWindow-->accuScaleTextEdit.setText((%material).accuScale[%layer]); @@ -988,10 +983,6 @@ function MaterialEditorGui::guiSync( %this, %material ) MaterialEditorPropertiesWindow-->colorTintSwatch.color = (%material).diffuseColor[%layer]; MaterialEditorPropertiesWindow-->specularColorSwatch.color = (%material).specular[%layer]; - MaterialEditorPropertiesWindow-->RoughnessTextEdit.setText((%material).Roughness[%layer]); - MaterialEditorPropertiesWindow-->RoughnessSlider.setValue((%material).Roughness[%layer]); - MaterialEditorPropertiesWindow-->MetalnessTextEdit.setText((%material).Metalness[%layer]); - MaterialEditorPropertiesWindow-->MetalnessSlider.setValue((%material).Metalness[%layer]); MaterialEditorPropertiesWindow-->glowMulTextEdit.setText((%material).glowMul[%layer]); MaterialEditorPropertiesWindow-->glowMulSlider.setValue((%material).glowMul[%layer]); MaterialEditorPropertiesWindow-->glowCheckbox.setValue((%material).glow[%layer]); @@ -1235,29 +1226,56 @@ function MaterialEditorGui::updateTextureMap( %this, %type, %action ) { %layer = MaterialEditorGui.currentLayer; + %this.updatingTextureType = %type; + %bitmapCtrl = MaterialEditorPropertiesWindow.findObjectByInternalName( %type @ "MapDisplayBitmap", true ); %textCtrl = MaterialEditorPropertiesWindow.findObjectByInternalName( %type @ "MapNameText", true ); if( %action ) { - %texture = MaterialEditorGui.openFile("texture"); - if( %texture !$= "" ) - { - %bitmapCtrl.setBitmap(%texture); - - %bitmap = %bitmapCtrl.bitmap; - %bitmap = strreplace(%bitmap,"tools/materialEditor/scripts/",""); - %bitmapCtrl.setBitmap(%bitmap); - %textCtrl.setText(%bitmap); - MaterialEditorGui.updateActiveMaterial(%type @ "Map[" @ %layer @ "]","\"" @ %bitmap @ "\""); - } + AssetBrowser.showDialog("ImageAsset", %this@".doUpdateTextureMap"); } else { %textCtrl.setText("None"); - %bitmapCtrl.setBitmap("tools/materialEditor/gui/unknownImage"); + %bitmapCtrl.setBitmap($MaterialEditor::emptyMaterialImage); MaterialEditorGui.updateActiveMaterial(%type @ "Map[" @ %layer @ "]",""); + MaterialEditorGui.updateActiveMaterial(%type @ "MapAsset[" @ %layer @ "]",""); } + MaterialEditorGui.guiSync( materialEd_previewMaterial ); +} + +function MaterialEditorGui::doUpdateTextureMap( %this, %assetId ) +{ + if(%assetId !$= "") +{ + %layer = MaterialEditorGui.currentLayer; + + %type = %this.updatingTextureType; + + %bitmapCtrl = MaterialEditorPropertiesWindow.findObjectByInternalName( %type @ "MapDisplayBitmap", true ); + %textCtrl = MaterialEditorPropertiesWindow.findObjectByInternalName( %type @ "MapNameText", true ); + + %assetDef = AssetDatabase.acquireAsset(%assetId); + + %texture = %assetDef.getImagePath(); + + //%texture = MaterialEditorGui.openFile("texture"); + if( %texture !$= "" ) + { + %bitmapCtrl.setBitmap(%texture); + + %bitmap = %bitmapCtrl.getBitmap(); + %bitmap = strreplace(%bitmap,"tools/materialEditor/scripts/",""); + %bitmapCtrl.setBitmap(%bitmap); + %textCtrl.setText(%assetId); + MaterialEditorGui.updateActiveMaterial(%type @ "Map[" @ %layer @ "]","\"\""); + MaterialEditorGui.updateActiveMaterial(%type @ "MapAsset[" @ %layer @ "]","\"" @ %assetId @ "\""); + } + } + + %this.updatingTextureType = ""; + MaterialEditorGui.guiSync( materialEd_previewMaterial ); } function MaterialEditorGui::updateDetailScale(%this,%newScale) @@ -1266,8 +1284,8 @@ function MaterialEditorGui::updateDetailScale(%this,%newScale) %detailScale = "\"" @ %newScale SPC %newScale @ "\""; MaterialEditorGui.updateActiveMaterial("detailScale[" @ %layer @ "]", %detailScale); -} - + } + function MaterialEditorGui::updateDetailNormalStrength(%this,%newStrength) { %layer = MaterialEditorGui.currentLayer; @@ -1276,148 +1294,6 @@ function MaterialEditorGui::updateDetailNormalStrength(%this,%newStrength) MaterialEditorGui.updateActiveMaterial("detailNormalMapStrength[" @ %layer @ "]", %detailStrength); } -function MaterialEditorGui::updateORMConfigMap(%this,%action) -{ - %layer = MaterialEditorGui.currentLayer; - - if( %action ) - { - %texture = MaterialEditorGui.openFile("texture"); - if( %texture !$= "" ) - { - MaterialEditorGui.updateActiveMaterial("pixelSpecular[" @ MaterialEditorGui.currentLayer @ "]", 0); - - MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap(%texture); - - %bitmap = MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.bitmap; - %bitmap = strreplace(%bitmap,"tools/materialEditor/scripts/",""); - MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap(%bitmap); - MaterialEditorPropertiesWindow-->ORMConfigMapNameText.setText(%bitmap); - MaterialEditorGui.updateActiveMaterial("ORMConfigMap[" @ %layer @ "]","\"" @ %bitmap @ "\""); - } - } - else - { - MaterialEditorPropertiesWindow-->ORMConfigMapNameText.setText("None"); - MaterialEditorPropertiesWindow-->ORMConfigMapDisplayBitmap.setBitmap("tools/materialEditor/gui/unknownImage"); - MaterialEditorGui.updateActiveMaterial("ORMConfigMap[" @ %layer @ "]",""); - } - - MaterialEditorGui.guiSync( materialEd_previewMaterial ); -} - -function MaterialEditorGui::updateRoughMap(%this,%action) -{ - %layer = MaterialEditorGui.currentLayer; - - if( %action ) - { - %texture = MaterialEditorGui.openFile("texture"); - if( %texture !$= "" ) - { - MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap(%texture); - - %bitmap = MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.bitmap; - %bitmap = strreplace(%bitmap,"tools/materialEditor/scripts/",""); - MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap(%bitmap); - MaterialEditorPropertiesWindow-->roughMapNameText.setText(%bitmap); - MaterialEditorGui.updateActiveMaterial("roughMap[" @ %layer @ "]","\"" @ %bitmap @ "\""); - } - } - else - { - MaterialEditorPropertiesWindow-->roughMapNameText.setText("None"); - MaterialEditorPropertiesWindow-->roughMapDisplayBitmap.setBitmap("tools/materialeditor/gui/unknownImage"); - MaterialEditorGui.updateActiveMaterial("roughMap[" @ %layer @ "]",""); - } - - MaterialEditorGui.guiSync( materialEd_previewMaterial ); -} - -function MaterialEditorGui::updateaoMap(%this,%action) -{ - %layer = MaterialEditorGui.currentLayer; - - if( %action ) - { - %texture = MaterialEditorGui.openFile("texture"); - if( %texture !$= "" ) - { - MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap(%texture); - - %bitmap = MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.bitmap; - %bitmap = strreplace(%bitmap,"tools/materialEditor/scripts/",""); - MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap(%bitmap); - MaterialEditorPropertiesWindow-->aoMapNameText.setText(%bitmap); - MaterialEditorGui.updateActiveMaterial("aoMap[" @ %layer @ "]","\"" @ %bitmap @ "\""); - } - } - else - { - MaterialEditorPropertiesWindow-->aoMapNameText.setText("None"); - MaterialEditorPropertiesWindow-->aoMapDisplayBitmap.setBitmap("tools/materialeditor/gui/unknownImage"); - MaterialEditorGui.updateActiveMaterial("aoMap[" @ %layer @ "]",""); - } - - MaterialEditorGui.guiSync( materialEd_previewMaterial ); -} - -function MaterialEditorGui::updatemetalMap(%this,%action) -{ - %layer = MaterialEditorGui.currentLayer; - - if( %action ) - { - %texture = MaterialEditorGui.openFile("texture"); - if( %texture !$= "" ) - { - MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap(%texture); - - %bitmap = MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.bitmap; - %bitmap = strreplace(%bitmap,"tools/materialEditor/scripts/",""); - MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap(%bitmap); - MaterialEditorPropertiesWindow-->metalMapNameText.setText(%bitmap); - MaterialEditorGui.updateActiveMaterial("metalMap[" @ %layer @ "]","\"" @ %bitmap @ "\""); - } - } - else - { - MaterialEditorPropertiesWindow-->metalMapNameText.setText("None"); - MaterialEditorPropertiesWindow-->metalMapDisplayBitmap.setBitmap("tools/materialeditor/gui/unknownImage"); - MaterialEditorGui.updateActiveMaterial("metalMap[" @ %layer @ "]",""); - } - - MaterialEditorGui.guiSync( materialEd_previewMaterial ); -} - -function MaterialEditorGui::updateGlowMap(%this,%action) -{ - %layer = MaterialEditorGui.currentLayer; - - if( %action ) - { - %texture = MaterialEditorGui.openFile("texture"); - if( %texture !$= "" ) - { - MaterialEditorPropertiesWindow-->GlowMapDisplayBitmap.setBitmap(%texture); - - %bitmap = MaterialEditorPropertiesWindow-->GlowMapDisplayBitmap.bitmap; - %bitmap = strreplace(%bitmap,"tools/materialEditor/scripts/",""); - MaterialEditorPropertiesWindow-->GlowMapDisplayBitmap.setBitmap(%bitmap); - MaterialEditorPropertiesWindow-->GlowMapNameText.setText(%bitmap); - MaterialEditorGui.updateActiveMaterial("glowMap[" @ %layer @ "]","\"" @ %bitmap @ "\""); - } - } - else - { - MaterialEditorPropertiesWindow-->GlowMapNameText.setText("None"); - MaterialEditorPropertiesWindow-->GlowMapDisplayBitmap.setBitmap("tools/materialeditor/gui/unknownImage"); - MaterialEditorGui.updateActiveMaterial("glowMap[" @ %layer @ "]",""); - } - - MaterialEditorGui.guiSync( materialEd_previewMaterial ); -} - function MaterialEditorGui::updateRotationOffset(%this, %isSlider, %onMouseUp) { %layer = MaterialEditorGui.currentLayer; @@ -1599,12 +1475,6 @@ function MaterialEditorGui::updateColorMultiply(%this,%color) %this.syncGuiColor(MaterialEditorPropertiesWindow-->colorTintSwatch, %propName, %color); } -function MaterialEditorGui::updateSpecularCheckbox(%this,%value) -{ - MaterialEditorGui.updateActiveMaterial("pixelSpecular[" @ MaterialEditorGui.currentLayer @ "]", %value); - MaterialEditorGui.guiSync( materialEd_previewMaterial ); -} - function MaterialEditorGui::updateSpecular(%this, %color) { %propName = "specular[" @ MaterialEditorGui.currentLayer @ "]"; @@ -1830,12 +1700,12 @@ function MaterialEditorGui::createNewCubemap( %this, %cubemap ) new CubemapData(%cubemap) { - cubeFace[0] = "tools/materialEditor/gui/cube_xNeg"; - cubeFace[1] = "tools/materialEditor/gui/cube_xPos"; - cubeFace[2] = "tools/materialEditor/gui/cube_ZNeg"; - cubeFace[3] = "tools/materialEditor/gui/cube_ZPos"; - cubeFace[4] = "tools/materialEditor/gui/cube_YNeg"; - cubeFace[5] = "tools/materialEditor/gui/cube_YPos"; + cubeMapFaceAsset[0] = "ToolsModule:cube_xNeg_image"; + cubeMapFaceAsset[1] = "ToolsModule:cube_xPos_image"; + cubeMapFaceAsset[2] = "ToolsModule:cube_zNeg_image"; + cubeMapFaceAsset[3] = "ToolsModule:cube_zPos_image"; + cubeMapFaceAsset[4] = "ToolsModule:cube_yNeg_image"; + cubeMapFaceAsset[5] = "ToolsModule:cube_yPos_image"; parentGroup = RootGroup; }; @@ -2164,6 +2034,16 @@ function MaterialEditorGui::save( %this ) function MaterialEditorGui::createNewMaterial( %this ) { + AssetBrowser_SelectModule.showDialog("MaterialEditorGui.pickedNewMaterialTargetModule"); + AssetBrowser_SelectModuleWindow.selectWindow(); +} + +function MaterialEditorGui::pickedNewMaterialTargetModule( %this, %module ) +{ + %moduleDef = ModuleDatabase.findModule(%module); + PE_EmitterEditor.targetModule = %module; + MaterialEditorGui.defaultMaterialFile = %moduleDef.ModulePath @ "/scripts/managedData/materials." @ $TorqueScriptFileExtension; + %action = %this.createUndo(ActionCreateNewMaterial, "Create New Material"); %action.object = ""; @@ -2571,10 +2451,10 @@ function MaterialEditorGui::saveCompositeMap(%this) %material = %this.currentMaterial; %layer = %this.currentLayer; - %roughMap = %material.roughMap[%layer]; - %aoMap = %material.aoMap[%layer]; - %metalMap = %material.metalMap[%layer]; - %glowMap = %material.glowMap[%layer]; + %roughMap = %material.getRoughMap(%layer); + %aoMap = %material.getAOMap(%layer); + %metalMap = %material.getMetalMap(%layer); + %glowMap = %material.getGlowMap(%layer); %roughness = %material.RoughnessChan[%layer]; %ao = %material.AOChan[%layer]; diff --git a/Templates/BaseGame/game/tools/meshRoadEditor/MeshRoadEditorGui,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/meshRoadEditor/MeshRoadEditorGui,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..4fc244d25 --- /dev/null +++ b/Templates/BaseGame/game/tools/meshRoadEditor/MeshRoadEditorGui,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/meshRoadEditor/MeshRoadEditorSettingsTab,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/meshRoadEditor/MeshRoadEditorSettingsTab,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..435f526e7 --- /dev/null +++ b/Templates/BaseGame/game/tools/meshRoadEditor/MeshRoadEditorSettingsTab,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/meshRoadEditor/MeshRoadEditorToolbar,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/meshRoadEditor/MeshRoadEditorToolbar,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..e1b63506d --- /dev/null +++ b/Templates/BaseGame/game/tools/meshRoadEditor/MeshRoadEditorToolbar,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/meshRoadEditor/main.tscript b/Templates/BaseGame/game/tools/meshRoadEditor/main.tscript index 3f5df2c7e..de5ed8197 100644 --- a/Templates/BaseGame/game/tools/meshRoadEditor/main.tscript +++ b/Templates/BaseGame/game/tools/meshRoadEditor/main.tscript @@ -76,7 +76,7 @@ function MeshRoadEditorPlugin::onWorldEditorStartup( %this ) // Add ourselves to the ToolsToolbar %tooltip = "Mesh Road Editor (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "MeshRoadEditorPlugin", "MeshRoadEditorPalette", expandFilename("tools/worldEditor/images/toolbar/mesh-road-editor"), %tooltip ); + EditorGui.addToToolsToolbar( "MeshRoadEditorPlugin", "MeshRoadEditorPalette", "ToolsModule:mesh_road_editor_n_image", %tooltip ); //connect editor windows GuiWindowCtrl::attach( MeshRoadEditorOptionsWindow, MeshRoadEditorTreeWindow); @@ -223,4 +223,4 @@ function MeshRoadEditorPlugin::writeSettings( %this ) EditorSettings.setValue( "SideMaterialName", MeshRoadEditorGui.sideMaterialName ); EditorSettings.endGroup(); -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui b/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui index 14444b62d..08d006a2b 100644 --- a/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui +++ b/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui @@ -52,7 +52,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; toolTip = "Show Spline (Z)"; - bitmap = "tools/worldEditor/images/road-river/menubar/show-spline"; + bitmapAsset = "ToolsModule:show_spline_n_image"; groupNum = "7"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -75,7 +75,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; toolTip = "Show Wireframe (X)"; - bitmap = "tools/worldEditor/images/road-river/menubar/show-wireframe"; + bitmapAsset = "ToolsModule:menubar_show_wireframe_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -98,7 +98,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; toolTip = "Show Road Texture (V)"; - bitmap = "tools/worldEditor/images/road-river/menubar/show-texture"; + bitmapAsset = "ToolsModule:show_texture_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -121,7 +121,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; toolTip = "Show Road Profile (P)"; - bitmap = "tools/worldEditor/images/road-river/menubar/show-profile"; + bitmapAsset = "ToolsModule:show_profile_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -203,7 +203,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; }; }; new GuiControl(MeshRoadDefaultDepthTextEditContainer) { @@ -281,7 +281,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; }; }; }; @@ -342,4 +342,4 @@ new GuiMouseEventCtrl(MeshRoadDefaultDepthSliderCtrlContainer, EditorGuiGroup) { ticks = "0"; value = "10"; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/missionAreaEditor/MissionAreaEditorGui, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/missionAreaEditor/MissionAreaEditorGui, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..6b8971ecd --- /dev/null +++ b/Templates/BaseGame/game/tools/missionAreaEditor/MissionAreaEditorGui, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/missionAreaEditor/images/DefaultHandle_image.asset.taml b/Templates/BaseGame/game/tools/missionAreaEditor/images/DefaultHandle_image.asset.taml new file mode 100644 index 000000000..43ba9de1d --- /dev/null +++ b/Templates/BaseGame/game/tools/missionAreaEditor/images/DefaultHandle_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/missionAreaEditor/images/mission_area_d_image.asset.taml b/Templates/BaseGame/game/tools/missionAreaEditor/images/mission_area_d_image.asset.taml new file mode 100644 index 000000000..14037e672 --- /dev/null +++ b/Templates/BaseGame/game/tools/missionAreaEditor/images/mission_area_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/missionAreaEditor/images/mission_area_h_image.asset.taml b/Templates/BaseGame/game/tools/missionAreaEditor/images/mission_area_h_image.asset.taml new file mode 100644 index 000000000..5bcdd2b98 --- /dev/null +++ b/Templates/BaseGame/game/tools/missionAreaEditor/images/mission_area_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/missionAreaEditor/images/mission_area_n_image.asset.taml b/Templates/BaseGame/game/tools/missionAreaEditor/images/mission_area_n_image.asset.taml new file mode 100644 index 000000000..a547a868d --- /dev/null +++ b/Templates/BaseGame/game/tools/missionAreaEditor/images/mission_area_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/missionAreaEditor/main.tscript b/Templates/BaseGame/game/tools/missionAreaEditor/main.tscript index 2fabe6d59..bb69b4b35 100644 --- a/Templates/BaseGame/game/tools/missionAreaEditor/main.tscript +++ b/Templates/BaseGame/game/tools/missionAreaEditor/main.tscript @@ -57,7 +57,7 @@ function MissionAreaEditorPlugin::onWorldEditorStartup( %this ) // Add ourselves to the ToolsToolbar %tooltip = "Mission Area Editor (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "MissionAreaEditorPlugin", "MissionAreaEditorPalette", expandFilename("tools/missionAreaEditor/images/mission-area"), %tooltip ); + EditorGui.addToToolsToolbar( "MissionAreaEditorPlugin", "MissionAreaEditorPalette", "ToolsModule:mission_area_n_image", %tooltip ); //connect editor windows GuiWindowCtrl::attach( MissionAreaEditorPropertiesWindow, MissionAreaEditorTerrainWindow); diff --git a/Templates/BaseGame/game/tools/missionAreaEditor/missionAreaEditorGui.ed.gui b/Templates/BaseGame/game/tools/missionAreaEditor/missionAreaEditorGui.ed.gui index 03e8fdfe5..022801589 100644 --- a/Templates/BaseGame/game/tools/missionAreaEditor/missionAreaEditorGui.ed.gui +++ b/Templates/BaseGame/game/tools/missionAreaEditor/missionAreaEditorGui.ed.gui @@ -104,7 +104,7 @@ squareBitmap = "1"; enableEditing = "0"; renderCamera = "1"; - handleBitmap = "tools/missionAreaEditor/images/DefaultHandle.png"; + handleBitmapAsset = "ToolsModule:DefaultHandle_image"; }; }; }; diff --git a/Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.asset.taml b/Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.asset.taml new file mode 100644 index 000000000..2d8f5b905 --- /dev/null +++ b/Templates/BaseGame/game/tools/navEditor/CreateNewNavMeshDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/navEditor/ENavEditorSettingsPage.asset.taml b/Templates/BaseGame/game/tools/navEditor/ENavEditorSettingsPage.asset.taml new file mode 100644 index 000000000..9967e80bb --- /dev/null +++ b/Templates/BaseGame/game/tools/navEditor/ENavEditorSettingsPage.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/navEditor/NavEditorConsoleDlg.asset.taml b/Templates/BaseGame/game/tools/navEditor/NavEditorConsoleDlg.asset.taml new file mode 100644 index 000000000..aac67f55a --- /dev/null +++ b/Templates/BaseGame/game/tools/navEditor/NavEditorConsoleDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/navEditor/NavEditorGui, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/navEditor/NavEditorGui, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..cc65ed4c9 --- /dev/null +++ b/Templates/BaseGame/game/tools/navEditor/NavEditorGui, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/navEditor/NavEditorToolbar,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/navEditor/NavEditorToolbar,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..af259374f --- /dev/null +++ b/Templates/BaseGame/game/tools/navEditor/NavEditorToolbar,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/navEditor/images/nav_cover_d_image.asset.taml b/Templates/BaseGame/game/tools/navEditor/images/nav_cover_d_image.asset.taml new file mode 100644 index 000000000..62a2e5c65 --- /dev/null +++ b/Templates/BaseGame/game/tools/navEditor/images/nav_cover_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/navEditor/images/nav_cover_h_image.asset.taml b/Templates/BaseGame/game/tools/navEditor/images/nav_cover_h_image.asset.taml new file mode 100644 index 000000000..93d90bf6f --- /dev/null +++ b/Templates/BaseGame/game/tools/navEditor/images/nav_cover_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/navEditor/images/nav_cover_n_image.asset.taml b/Templates/BaseGame/game/tools/navEditor/images/nav_cover_n_image.asset.taml new file mode 100644 index 000000000..59d729fd1 --- /dev/null +++ b/Templates/BaseGame/game/tools/navEditor/images/nav_cover_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/navEditor/images/nav_editor_d_image.asset.taml b/Templates/BaseGame/game/tools/navEditor/images/nav_editor_d_image.asset.taml new file mode 100644 index 000000000..e84c6c68f --- /dev/null +++ b/Templates/BaseGame/game/tools/navEditor/images/nav_editor_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/navEditor/images/nav_editor_h_image.asset.taml b/Templates/BaseGame/game/tools/navEditor/images/nav_editor_h_image.asset.taml new file mode 100644 index 000000000..6cec611fc --- /dev/null +++ b/Templates/BaseGame/game/tools/navEditor/images/nav_editor_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/navEditor/images/nav_editor_n_image.asset.taml b/Templates/BaseGame/game/tools/navEditor/images/nav_editor_n_image.asset.taml new file mode 100644 index 000000000..23b10a1cb --- /dev/null +++ b/Templates/BaseGame/game/tools/navEditor/images/nav_editor_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/navEditor/images/nav_link_d_image.asset.taml b/Templates/BaseGame/game/tools/navEditor/images/nav_link_d_image.asset.taml new file mode 100644 index 000000000..0c105fac3 --- /dev/null +++ b/Templates/BaseGame/game/tools/navEditor/images/nav_link_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/navEditor/images/nav_link_h_image.asset.taml b/Templates/BaseGame/game/tools/navEditor/images/nav_link_h_image.asset.taml new file mode 100644 index 000000000..bdf0e33f3 --- /dev/null +++ b/Templates/BaseGame/game/tools/navEditor/images/nav_link_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/navEditor/images/nav_link_n_image.asset.taml b/Templates/BaseGame/game/tools/navEditor/images/nav_link_n_image.asset.taml new file mode 100644 index 000000000..abaa28413 --- /dev/null +++ b/Templates/BaseGame/game/tools/navEditor/images/nav_link_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/navEditor/main.tscript b/Templates/BaseGame/game/tools/navEditor/main.tscript index 03b0bb2b6..2aa987baa 100644 --- a/Templates/BaseGame/game/tools/navEditor/main.tscript +++ b/Templates/BaseGame/game/tools/navEditor/main.tscript @@ -83,7 +83,7 @@ function NavEditorPlugin::onWorldEditorStartup(%this) // Add ourselves to the ToolsToolbar. %tooltip = "Navigation Editor (" @ %accel @ ")"; - EditorGui.addToToolsToolbar("NavEditorPlugin", "NavEditorPalette", expandFilename("tools/navEditor/images/nav-editor"), %tooltip); + EditorGui.addToToolsToolbar("NavEditorPlugin", "NavEditorPalette", "ToolsModule:nav_editor_n_image", %tooltip); GuiWindowCtrl::attach(NavEditorOptionsWindow, NavEditorTreeWindow); diff --git a/Templates/BaseGame/game/tools/particleEditor/PE_Window.asset.taml b/Templates/BaseGame/game/tools/particleEditor/PE_Window.asset.taml new file mode 100644 index 000000000..7dda90976 --- /dev/null +++ b/Templates/BaseGame/game/tools/particleEditor/PE_Window.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/particleEditor/ParticleEditor.ed.gui b/Templates/BaseGame/game/tools/particleEditor/ParticleEditor.ed.gui index e24bc379a..7864a7f00 100644 --- a/Templates/BaseGame/game/tools/particleEditor/ParticleEditor.ed.gui +++ b/Templates/BaseGame/game/tools/particleEditor/ParticleEditor.ed.gui @@ -214,7 +214,7 @@ $PE_guielement_ext_colorpicker = "18 18"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/new"; + bitmap = "ToolsModule:new_image"; tooltip = "Create New Emitter"; }; new GuiBitmapButtonCtrl() { @@ -234,7 +234,7 @@ $PE_guielement_ext_colorpicker = "18 18"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/save-icon"; + bitmapAsset = "ToolsModule:save_icon_n_image"; command = "PE_EmitterEditor.saveEmitter( " @ PE_EmitterEditor.currEmitter @ " ); PE_ParticleEditor.saveParticle( PE_ParticleEditor.currParticle );"; tooltip = "Save Current Emitter"; }; @@ -255,7 +255,7 @@ $PE_guielement_ext_colorpicker = "18 18"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; tooltip = "Delete Current Emitter"; }; }; @@ -447,7 +447,7 @@ $PE_guielement_ext_colorpicker = "18 18"; isContainer = "1"; HorizSizing = "width"; Position = "0 0"; Extent = "194 8"; new GuiBitmapCtrl(){ position="0 3"; extent ="188 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; };// end spacer ---------------------------------------- @@ -704,7 +704,7 @@ $PE_guielement_ext_colorpicker = "18 18"; isContainer = "1"; HorizSizing = "width"; Position = "0 0"; Extent = "194 8"; new GuiBitmapCtrl(){ position="0 3"; extent ="188 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; };// end spacer ---------------------------------------- @@ -862,7 +862,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+4 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "0 Degrees ( Up )"; }; new GuiBitmapCtrl(){ // 90 Degrees @@ -870,7 +870,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/4)+1 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "90 Degrees ( Left )"; }; new GuiBitmapCtrl(){ // 180 Degrees @@ -878,7 +878,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/2)-1 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "180 Degrees ( Down )"; }; new GuiBitmapCtrl(){ // 270 Degrees @@ -886,7 +886,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/2+mCeil(getWord($PE_guielement_ext_slider,0)/4))-4 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "270 Degrees ( Right )"; }; new GuiBitmapCtrl(){ // 360 Degrees @@ -894,7 +894,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0))-5 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "360 Degrees ( Up )"; }; @@ -949,7 +949,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+4 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "0 Degrees ( Up )"; }; new GuiBitmapCtrl(){ // 90 Degrees @@ -957,7 +957,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/4)+1 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "90 Degrees ( Left )"; }; new GuiBitmapCtrl(){ // 180 Degrees @@ -965,7 +965,7 @@ $PE_guielement_ext_colorpicker = "18 18"; minExtent = "0 0"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/2)-1 SPC "0"; Extent = "2 18"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "180 Degrees ( Down )"; }; new GuiBitmapCtrl(){ // 270 Degrees @@ -973,7 +973,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/2+mCeil(getWord($PE_guielement_ext_slider,0)/4))-4 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "270 Degrees ( Right )"; }; new GuiBitmapCtrl(){ // 360 Degrees @@ -981,7 +981,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0))-5 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "360 Degrees ( Up )"; }; @@ -1037,7 +1037,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+4 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "0 Degrees ( Up )"; }; new GuiBitmapCtrl(){ // 90 Degrees @@ -1045,7 +1045,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/4)+1 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "45 Degrees"; }; new GuiBitmapCtrl(){ // 180 Degrees @@ -1053,7 +1053,7 @@ $PE_guielement_ext_colorpicker = "18 18"; minExtent = "0 0"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/2)-1 SPC "0"; Extent = "2 18"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "90 Degrees"; }; new GuiBitmapCtrl(){ // 270 Degrees @@ -1061,7 +1061,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/2+mCeil(getWord($PE_guielement_ext_slider,0)/4))-4 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "135 Degrees"; }; new GuiBitmapCtrl(){ // 360 Degrees @@ -1069,7 +1069,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0))-5 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "180 Degrees"; }; @@ -1116,7 +1116,7 @@ $PE_guielement_ext_colorpicker = "18 18"; isContainer = "1"; HorizSizing = "width"; Position = "0 0"; Extent = "194 8"; new GuiBitmapCtrl(){ position="0 3"; extent ="188 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; };// end spacer ---------------------------------------- @@ -1363,7 +1363,7 @@ $PE_guielement_ext_colorpicker = "18 18"; hovertime = "1000"; tooltip = "Clear Particle 2 from Emitter"; text = ""; - bitmap = "tools/gui/images/clear-icon"; + bitmapAsset = "ToolsModule:clear_icon_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -1411,7 +1411,7 @@ $PE_guielement_ext_colorpicker = "18 18"; hovertime = "1000"; tooltip = "Clear Particle 3 from Emitter"; text = ""; - bitmap = "tools/gui/images/clear-icon"; + bitmapAsset = "ToolsModule:clear_icon_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -1459,7 +1459,7 @@ $PE_guielement_ext_colorpicker = "18 18"; hovertime = "1000"; tooltip = "Clear Particle 4 from Emitter"; text = ""; - bitmap = "tools/gui/images/clear-icon"; + bitmapAsset = "ToolsModule:clear_icon_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -1625,7 +1625,7 @@ $PE_guielement_ext_colorpicker = "18 18"; isContainer = "1"; HorizSizing = "width"; Position = "0 0"; Extent = "194 8"; new GuiBitmapCtrl(){ position="0 3"; extent ="188 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; };// end spacer ---------------------------------------- @@ -1876,7 +1876,7 @@ $PE_guielement_ext_colorpicker = "18 18"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/new"; + bitmapAsset = "ToolsModule:new_n_image"; tooltip = "Add New Particle To Current Emitter"; useModifiers = "1"; }; @@ -1896,7 +1896,7 @@ $PE_guielement_ext_colorpicker = "18 18"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/save-icon"; + bitmapAsset = "ToolsModule:save_icon_n_image"; command = "PE_ParticleEditor.saveParticle( PE_ParticleEditor.currParticle );"; tooltip = "Save Current Particle"; }; @@ -1917,7 +1917,7 @@ $PE_guielement_ext_colorpicker = "18 18"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; tooltip = "Delete Current Particle"; }; }; @@ -1976,7 +1976,7 @@ $PE_guielement_ext_colorpicker = "18 18"; canSave = "1"; Visible = "1"; hovertime = "1000"; - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; wrap = "0"; }; new GuiTextCtrl() { @@ -2021,7 +2021,7 @@ $PE_guielement_ext_colorpicker = "18 18"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -2042,7 +2042,7 @@ $PE_guielement_ext_colorpicker = "18 18"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; Command = "PE_ParticleEditor.updateParticleTexture(1);"; }; new GuiCheckBoxCtrl() { @@ -2095,7 +2095,7 @@ $PE_guielement_ext_colorpicker = "18 18"; //visible = false; new GuiBitmapCtrl(){ position="0 3"; extent ="188 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; };// end spacer ---------------------------------------- @@ -2353,7 +2353,7 @@ $PE_guielement_ext_colorpicker = "18 18"; isContainer = "1"; HorizSizing = "width"; Position = "0 0"; Extent = "194 8"; new GuiBitmapCtrl(){ position="0 3"; extent ="188 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; };// end spacer ---------------------------------------- @@ -2370,7 +2370,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/2)-1 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "0 Gravity"; }; @@ -2554,7 +2554,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/2)-1 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "No Spin"; }; @@ -2609,7 +2609,7 @@ $PE_guielement_ext_colorpicker = "18 18"; position = getWord($PE_guielement_pos_slider,0)+mCeil(getWord($PE_guielement_ext_slider,0)/2)-1 SPC "0"; Extent = "2 18"; minExtent = "0 0"; - bitmap = "tools/gui/images/separator-h"; + bitmapAsset = "ToolsModule:separator_h_image"; tooltip = "No Spin"; }; @@ -2656,7 +2656,7 @@ $PE_guielement_ext_colorpicker = "18 18"; isContainer = "1"; HorizSizing = "width"; Position = "0 0"; Extent = "194 8"; new GuiBitmapCtrl(){ position="0 3"; extent ="188 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; };// end spacer ---------------------------------------- @@ -3078,7 +3078,7 @@ $PE_guielement_ext_colorpicker = "18 18"; isContainer = "1"; HorizSizing = "width"; Position = "0 0"; Extent = "194 8"; new GuiBitmapCtrl(){ position="0 3"; extent ="188 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; };// end spacer ---------------------------------------- @@ -3463,7 +3463,7 @@ $PE_guielement_ext_colorpicker = "18 18"; isContainer = "1"; HorizSizing = "width"; Position = "0 0"; Extent = "194 8"; new GuiBitmapCtrl(){ position="0 3"; extent ="188 2"; HorizSizing = "width"; - bitmap ="tools/gui/images/separator-v"; + bitmapAsset ="ToolsModule:separator_v_image"; }; };// end spacer ---------------------------------------- @@ -3865,7 +3865,7 @@ $PE_guielement_ext_colorpicker = "18 18"; tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Play Particle Effect from Start"; hovertime = "1000"; - bitmap = "tools/particleEditor/images/play_btn"; + bitmapAsset = "ToolsModule:play_btn_n_image"; buttonType = "PushButton"; groupNum = "-1"; text = ""; @@ -3888,7 +3888,7 @@ $PE_guielement_ext_colorpicker = "18 18"; tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Drops Particle Effect in front of the Camera"; hovertime = "1000"; - bitmap = "tools/classIcons/camera"; + bitmapAsset = "ToolsModule:camera_image"; buttonType = "PushButton"; groupNum = "-1"; text = ""; diff --git a/Templates/BaseGame/game/tools/particleEditor/images/play_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/particleEditor/images/play_btn_d_image.asset.taml new file mode 100644 index 000000000..3708b3d15 --- /dev/null +++ b/Templates/BaseGame/game/tools/particleEditor/images/play_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/particleEditor/images/play_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/particleEditor/images/play_btn_h_image.asset.taml new file mode 100644 index 000000000..984885af9 --- /dev/null +++ b/Templates/BaseGame/game/tools/particleEditor/images/play_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/particleEditor/images/play_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/particleEditor/images/play_btn_n_image.asset.taml new file mode 100644 index 000000000..27f2d6fb1 --- /dev/null +++ b/Templates/BaseGame/game/tools/particleEditor/images/play_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/particleEditor/main.tscript b/Templates/BaseGame/game/tools/particleEditor/main.tscript index d00645623..f09f2f747 100644 --- a/Templates/BaseGame/game/tools/particleEditor/main.tscript +++ b/Templates/BaseGame/game/tools/particleEditor/main.tscript @@ -80,7 +80,7 @@ function ParticleEditorPlugin::onWorldEditorStartup( %this ) // Add ourselves to the ToolsToolbar %tooltip = "Particle Editor (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "ParticleEditorPlugin", "ParticleEditorPalette", expandFilename("tools/worldEditor/images/toolbar/particleeditor"), %tooltip ); + EditorGui.addToToolsToolbar( "ParticleEditorPlugin", "ParticleEditorPalette", "ToolsModule:particleeditor_n_image", %tooltip ); } //--------------------------------------------------------------------------------------------- diff --git a/Templates/BaseGame/game/tools/particleEditor/particleEmitterEditor.ed.tscript b/Templates/BaseGame/game/tools/particleEditor/particleEmitterEditor.ed.tscript index f3825cfe2..ecd6c0209 100644 --- a/Templates/BaseGame/game/tools/particleEditor/particleEmitterEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/particleEditor/particleEmitterEditor.ed.tscript @@ -21,7 +21,7 @@ //----------------------------------------------------------------------------- -$PE_EMITTEREDITOR_DEFAULT_FILENAME = "art/particles/managedParticleEmitterData." @ $TorqueScriptFileExtension; +$PE_EMITTEREDITOR_DEFAULT_FILENAME = "data/managedParticleEmitterData." @ $TorqueScriptFileExtension; //============================================================================================= @@ -499,8 +499,10 @@ function PE_EmitterEditor::setEmitterDirty( %this ) PE_EmitterEditor.dirty = true; %emitter = PE_EmitterEditor.currEmitter; + %filename = %emitter.getFilename(); + %editorFilename = "tools/particleEditor/particleEmitterEditor.ed." @ $TorqueScriptFileExtension; - if( %emitter.getFilename() $= "" || %emitter.getFilename() $= "tools/particleEditor/particleEmitterEditor.ed." @ $TorqueScriptFileExtension ) + if( %filename $= "" || %filename $= %editorFilename ) PE_EmitterSaver.setDirty( %emitter, $PE_EMITTEREDITOR_DEFAULT_FILENAME ); else PE_EmitterSaver.setDirty( %emitter ); @@ -551,6 +553,16 @@ function PE_EmitterEditor::showNewDialog( %this ) function PE_EmitterEditor::createEmitter( %this ) { + AssetBrowser_SelectModule.showDialog("PE_EmitterEditor.pickedNewEmitterTargetModule"); + AssetBrowser_SelectModuleWindow.selectWindow(); +} + +function PE_EmitterEditor::pickedNewEmitterTargetModule( %this, %module ) +{ + %moduleDef = ModuleDatabase.findModule(%module); + PE_EmitterEditor.targetModule = %module; + $PE_EMITTEREDITOR_DEFAULT_FILENAME = %moduleDef.ModulePath @ "/scripts/managedData/managedParticleEmitterData." @ $TorqueScriptFileExtension; + // Create a new emitter. %emitter = getUniqueName( "newEmitter" ); datablock ParticleEmitterData( %emitter : DefaultEmitter ) diff --git a/Templates/BaseGame/game/tools/particleEditor/particleParticleEditor.ed.tscript b/Templates/BaseGame/game/tools/particleEditor/particleParticleEditor.ed.tscript index 2dd764ce7..ff6f4cd5f 100644 --- a/Templates/BaseGame/game/tools/particleEditor/particleParticleEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/particleEditor/particleParticleEditor.ed.tscript @@ -21,7 +21,7 @@ //----------------------------------------------------------------------------- -$PE_PARTICLEEDITOR_DEFAULT_FILENAME = "art/particles/managedParticleData." @ $TorqueScriptFileExtension; +$PE_PARTICLEEDITOR_DEFAULT_FILENAME = "data/managedParticleData." @ $TorqueScriptFileExtension; //============================================================================================= @@ -57,11 +57,16 @@ function PE_ParticleEditor::guiSync( %this ) %popup.sort(); %popup.setSelected( %data ); - %bitmap = MaterialEditorGui.searchForTexture( %data.getName(), %data.textureName ); + %bitmap = %data.getTexture();//MaterialEditorGui.searchForTexture( %data.getName(), %data.getTexture() ); if( %bitmap !$= "" ) { PE_ParticleEditor-->PEP_previewImage.setBitmap( %bitmap ); - PE_ParticleEditor-->PEP_previewImageName.setText( %bitmap ); + + %text = %data.getTextureAsset(); + if(%text $= "") + %text = %bitmap; + + PE_ParticleEditor-->PEP_previewImageName.setText( %text ); PE_ParticleEditor-->PEP_previewImageName.tooltip = %bitmap; } else @@ -215,15 +220,7 @@ function PE_ParticleEditor::updateParticleTexture( %this, %action ) { if( %action ) { - %texture = MaterialEditorGui.openFile("texture"); - if( %texture !$= "" ) - { - PE_ParticleEditor-->PEP_previewImage.setBitmap(%texture); - PE_ParticleEditor-->PEP_previewImageName.setText(%texture); - PE_ParticleEditor-->PEP_previewImageName.tooltip = %texture; - - PE_ParticleEditor.updateParticle( "textureName", %texture ); - } + AssetBrowser.showDialog("ImageAsset", "PE_ParticleEditor.onImageAssetSelected"); } else { @@ -235,6 +232,18 @@ function PE_ParticleEditor::updateParticleTexture( %this, %action ) } } +function PE_ParticleEditor::onImageAssetSelected(%this, %assetId) +{ + if( AssetDatabase.isDeclaredAsset(%assetId) ) + { + PE_ParticleEditor-->PEP_previewImage.setBitmap(%assetId); + PE_ParticleEditor-->PEP_previewImageName.setText(%assetId); + PE_ParticleEditor-->PEP_previewImageName.tooltip = %assetId; + + PE_ParticleEditor.updateParticle( "textureAsset", %assetId ); + } +} + //--------------------------------------------------------------------------------------------- function PE_ParticleEditor::updateLifeFields( %this, %isRandom, %value, %isSlider, %onMouseUp ) @@ -389,11 +398,18 @@ function PE_ParticleEditor::loadNewParticle( %this, %particle ) PE_ParticleEditor.currParticle = %particle; + error("PE_ParticleEditor::loadNewParticle() - Loading particle: " @ %particle.getName()); + error("Particle TextureName: " @ %particle.getTexture()); + + error("ReloadingParticle..."); %particle.reload(); PE_ParticleEditor_NotDirtyParticle.assignFieldsFrom( %particle ); PE_ParticleEditor_NotDirtyParticle.originalName = %particle.getName(); + error("Post duplicate Particle TextureName: " @ %particle.getTexture()); + error("Post duplicate PE_ParticleEditor_NotDirtyParticle TextureName: " @ PE_ParticleEditor_NotDirtyParticle.getTexture()); + PE_ParticleEditor.guiSync(); PE_ParticleEditor.setParticleNotDirty(); } @@ -406,8 +422,10 @@ function PE_ParticleEditor::setParticleDirty( %this ) PE_ParticleEditor.dirty = true; %particle = PE_ParticleEditor.currParticle; + %filename = %particle.getFilename(); + %editorFilename = "tools/particleEditor/particleParticleEditor.ed." @ $TorqueScriptFileExtension; - if( %particle.getFilename() $= "" || %particle.getFilename() $= "tools/particleEditor/particleParticleEditor.ed." @ $TorqueScriptFileExtension ) + if( %filename $= "" || %filename $= %editorFilename ) PE_ParticleSaver.setDirty( %particle, $PE_PARTICLEEDITOR_DEFAULT_FILENAME ); else PE_ParticleSaver.setDirty( %particle ); @@ -462,6 +480,24 @@ function PE_ParticleEditor::createParticle( %this, %replaceSlot ) else %particleIndex = %replaceSlot - 1; + PE_ParticleEditor.newParticleSlot = %particleIndex; + + if(%replaceSlot $= "" || %replaceSlot != 0) + { + AssetBrowser_SelectModule.showDialog("PE_ParticleEditor.pickedNewParticleTargetModule"); + AssetBrowser_SelectModuleWindow.selectWindow(); + } + else + { + PE_ParticleEditor.pickedNewParticleTargetModule(PE_EmitterEditor.targetModule); + } +} + +function PE_ParticleEditor::pickedNewParticleTargetModule(%this, %module) +{ + %moduleDef = ModuleDatabase.findModule(%module); + $PE_PARTICLEEDITOR_DEFAULT_FILENAME = %moduleDef.ModulePath @ "/scripts/managedData/managedParticleData." @ $TorqueScriptFileExtension; + // Create the particle datablock and add to the emitter. %newParticle = getUniqueName( "newParticle" ); @@ -474,8 +510,8 @@ function PE_ParticleEditor::createParticle( %this, %replaceSlot ) %action = ParticleEditor.createUndo( ActionCreateNewParticle, "Create New Particle" ); %action.particle = %newParticle.getId(); - %action.particleIndex = %particleIndex; - %action.prevParticle = ( "PEE_EmitterParticleSelector" @ ( %particleIndex + 1 ) ).getSelected(); + %action.particleIndex = PE_ParticleEditor.newParticleSlot; + %action.prevParticle = ( "PEE_EmitterParticleSelector" @ ( PE_ParticleEditor.newParticleSlot + 1 ) ).getSelected(); %action.emitter = PE_EmitterEditor.currEmitter; ParticleEditor.submitUndo( %action ); diff --git a/Templates/BaseGame/game/tools/projectImporter/guis/ProjectImportCtrl.asset.taml b/Templates/BaseGame/game/tools/projectImporter/guis/ProjectImportCtrl.asset.taml new file mode 100644 index 000000000..c569034b1 --- /dev/null +++ b/Templates/BaseGame/game/tools/projectImporter/guis/ProjectImportCtrl.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/projectImporter/guis/projectImporter.gui b/Templates/BaseGame/game/tools/projectImporter/guis/projectImporter.gui new file mode 100644 index 000000000..b308feed3 --- /dev/null +++ b/Templates/BaseGame/game/tools/projectImporter/guis/projectImporter.gui @@ -0,0 +1,987 @@ +//--- OBJECT WRITE BEGIN --- +%guiContent = new GuiControl(ProjectImportCtrl) { + position = "0 0"; + extent = "1024 768"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiDefaultNonModalProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "1"; + + new GuiWindowCtrl(ProjectImportWindow) { + text = "Import Project"; + resizeWidth = "0"; + resizeHeight = "0"; + canMove = "1"; + canClose = "1"; + canMinimize = "0"; + canMaximize = "0"; + canCollapse = "0"; + closeCommand = "Canvas.popDialog(ProjectImportCtrl);"; + edgeSnap = "0"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "241 133"; + extent = "541 502"; + minExtent = "48 92"; + horizSizing = "center"; + vertSizing = "center"; + profile = "ToolsGuiWindowProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiSplitContainer() { + orientation = "Vertical"; + splitterSize = "2"; + splitPoint = "152 100"; + fixedPanel = "FirstPanel"; + fixedSize = "100"; + docking = "None"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "6 24"; + extent = "531 445"; + minExtent = "64 64"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiSolidDefaultProfile"; + 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 = "150 445"; + 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 = "dynamic"; + 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 = "0 0"; + extent = "150 445"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "height"; + profile = "ToolsGuiScrollProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiTextListCtrl() { + columns = "0"; + fitParentWidth = "1"; + clipColumnText = "0"; + rowHeightPadding = "2"; + position = "1 1"; + extent = "135 128"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "height"; + profile = "ToolsGuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "stepsList"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiControl() { + position = "1 1"; + extent = "150 445"; + minExtent = "8 2"; + horizSizing = "right"; + 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 = "154 0"; + extent = "377 445"; + minExtent = "16 16"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "panel2"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiScrollCtrl() { + willFirstRespond = "1"; + hScrollBar = "dynamic"; + 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 = "0 0"; + extent = "377 445"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "height"; + profile = "ToolsGuiScrollProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiContainer(ProjectImportWizardPage0) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "1 1"; + extent = "365 429"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "page0"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + text = "Welcome! This project importer will assist you in importing in legacy projects into this build of Torque3D."; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "23 21"; + extent = "328 28"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiMLTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + text = "To continue, click Next."; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "23 77"; + extent = "328 14"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiMLTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiContainer(ProjectImportWizardPage1) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "1 1"; + extent = "365 429"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "page1"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + text = "First, you must select what version of Torque3D the prior project\'s content is coming from."; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "23 21"; + extent = "328 28"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiMLTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiPopUpMenuCtrl() { + maxPopupHeight = "200"; + sbUsesNAColor = "0"; + reverseTextList = "0"; + bitmapBounds = "16 16"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "50 104"; + extent = "268 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiPopUpMenuProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "previousContentVersionPopup"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + text = "Now that that\'s selected, press Next to continue."; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "23 181"; + extent = "328 14"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiMLTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiContainer(ProjectImportWizardPage2) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "1 1"; + extent = "365 429"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "page2"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + text = "Next, where is the previous project\'s content?"; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "23 21"; + extent = "328 14"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiMLTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiRadioCtrl() { + text = "Existing folder in current project\'s data/ folder"; + groupNum = "-1"; + buttonType = "RadioButton"; + useMouseEvents = "0"; + position = "22 53"; + extent = "320 52"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiRadioProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "internalFolderBtn"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiRadioCtrl() { + text = "Existing folder not in the current project\'s data/ folder"; + groupNum = "-1"; + buttonType = "RadioButton"; + useMouseEvents = "0"; + position = "22 109"; + extent = "320 52"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiRadioProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "externalFolderBtn"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiRadioCtrl() { + text = "Core and Tools"; + groupNum = "-1"; + buttonType = "RadioButton"; + useMouseEvents = "0"; + position = "22 157"; + extent = "320 52"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiRadioProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "coreAndToolsBtn"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + text = "Now, point to the folder to be imported."; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "23 221"; + extent = "328 14"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiMLTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Find Folder"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "19 246"; + extent = "330 30"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + command = "ProjectImportWindow.selectOGFolder();"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "selectOriginalContentFolderBtn"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "23 341"; + extent = "328 14"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiMLTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "targetImportingPath"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiContainer(ProjectImportWizardPage3) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "1 1"; + extent = "365 429"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "page3"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + text = "Under normal circumstances, all game content in Torque3D is grouped together in packages named Modules. These are placed into the game\'s data/ directory, which the system automatically scans on start. "; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "23 21"; + extent = "328 56"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiMLTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + text = "To port your legacy content, first we need a module to port the content into. Please provide a module name in the text field below, and the importer will create a new module folder for you."; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "23 85"; + extent = "325 42"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiMLTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + text = "For your convenience, we\'ve pre-populated the field with the name of the folder you\'d selected to import, but you can change it to whatever you want the module to be!"; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "23 157"; + extent = "325 42"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiMLTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + password = "0"; + passwordMask = "*"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "79 215"; + extent = "209 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiTextEditProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "newModuleName"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiContainer(ProjectImportWizardPage4) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "1 1"; + extent = "365 429"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "page4"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "23 21"; + extent = "328 14"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiMLTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "fileCopyText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiContainer(ProjectImportWizardPage5) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "1 1"; + extent = "365 429"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "page5"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + text = "Now we actually run the import of the files and content. This will process the original files into assets, and updating any references in scripts to utilize the new AssetIDs."; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "23 21"; + extent = "328 42"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiMLTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + text = "Processing..."; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "64 141"; + extent = "245 14"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "processingText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiContainer(ProjectImportWizardPage6) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "1 1"; + extent = "365 429"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "page6"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + text = "We\'ll now go through and process any script files to ensure they use the currently designated extension."; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "23 21"; + extent = "328 28"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiMLTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + text = "Processing..."; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "64 141"; + extent = "245 14"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "processingText"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiContainer(ProjectImportWizardPage7) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "1 1"; + extent = "365 429"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "GuiDefaultProfile"; + visible = "0"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + internalName = "page7"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiMLTextCtrl() { + lineSpacing = "2"; + allowColorChars = "0"; + maxChars = "-1"; + text = "And with that, your legacy project content has been imported in as a Torque3D 4.0 ready module!"; + useURLMouseCursor = "0"; + useTypeOverTime = "0"; + typeOverTimeSpeedMS = "10"; + typeoutSoundRate = "-1"; + position = "23 141"; + extent = "328 28"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiMLTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "GuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + }; + }; + }; + new GuiButtonCtrl() { + text = "Back"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "11 473"; + extent = "64 22"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "top"; + profile = "ToolsGuiButtonProfile"; + visible = "0"; + active = "0"; + command = "ProjectImportWindow.previousStep();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "backButton"; + hidden = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Next"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "465 473"; + extent = "64 22"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "top"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + command = "ProjectImportWindow.nextStep();"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "nextButton"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiBitmapButtonCtrl() { + bitmapAsset = "ToolsModule:iconInformation_image"; + bitmapMode = "Centered"; + autoFitExtents = "0"; + useModifiers = "0"; + useStates = "1"; + masked = "0"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "-187 555"; + extent = "22 22"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + command = "ImportAssetWindow.toggleLogWindow();"; + tooltipProfile = "GuiToolTipProfile"; + tooltip = "View Import Log"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; +}; +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/projectImporter/main.tscript b/Templates/BaseGame/game/tools/projectImporter/main.tscript new file mode 100644 index 000000000..2766b4bad --- /dev/null +++ b/Templates/BaseGame/game/tools/projectImporter/main.tscript @@ -0,0 +1,58 @@ +//----------------------------------------------------------------------------- +// 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 initializeProjectImporter() +{ + echo(" % - Initializing Project Importer"); + + exec("./scripts/projectImporter." @ $TorqueScriptFileExtension); + + //Versioned actions + exec("./scripts/pre40/T3Dpre4ProjectImporter." @ $TorqueScriptFileExtension); + + + exec("./guis/projectImporter.gui"); + + new ScriptObject( ProjectImporterPlugin ) + { + superClass = "EditorPlugin"; + }; + + //Input::GetEventManager().subscribe( ProjectImportCtrl, "BeginDropFiles" ); + //Input::GetEventManager().subscribe( ProjectImportCtrl, "DropFile" ); + //Input::GetEventManager().subscribe( ProjectImportCtrl, "EndDropFiles" ); + + $ProjectImporter::importer = new AssetImporter(); + + %importConfig = new AssetImportConfig(); + %importConfig.loadImportConfig(AssetImportSettings, "LegacyProjectImport"); + $ProjectImporter::importer.setImportConfig(%importConfig); + $ProjectImporter::assetQuery = new AssetQuery(); + + ProjectImporterPlugin.initSettings(); +} + +function ProjectImporterPlugin::initSettings( %this ) +{ + EditorSettings.beginGroup( "ProjectImporter", true ); + + EditorSettings.endGroup(); +} diff --git a/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript b/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript new file mode 100644 index 000000000..4f795bee3 --- /dev/null +++ b/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript @@ -0,0 +1,1123 @@ +function T3Dpre4ProjectImporter::setupModule(%this) +{ + %newModuleName = $ProjectImporter::moduleName; + + echo("Creating a new Module named: " @ %newModuleName); + + %moduleFilePath = "data/" @ %newModuleName; + %moduleDefinitionFilePath = %moduleFilePath @ "/" @ %newModuleName @ ".module"; + %moduleScriptFilePath = %moduleFilePath @ "/" @ %newModuleName @ "." @ $TorqueScriptFileExtension; + + %newModule = new ModuleDefinition() + { + ModuleId = %newModuleName; + versionId = 1; + ScriptFile = %newModuleName @ "." @ $TorqueScriptFileExtension; + CreateFunction="onCreate"; + DestroyFunction="onDestroy"; + Group = "Game"; + + new DeclaredAssets() + { + Extension = "asset.taml"; + Recurse = true; + }; + }; + + TAMLWrite(%newModule, %moduleDefinitionFilePath); + + //Now generate the script file for it + %file = new FileObject(); + %templateFile = new FileObject(); + + %moduleTemplateCodeFilePath = AssetBrowser.templateFilesPath @ "module.tscript.template"; + + if(%file.openForWrite(%moduleScriptFilePath) && %templateFile.openForRead(%moduleTemplateCodeFilePath)) + { + while( !%templateFile.isEOF() ) + { + %line = %templateFile.readline(); + %line = strreplace( %line, "@@", %newModuleName ); + + %file.writeline(%line); + echo(%line); + } + + %file.close(); + %templateFile.close(); + } + else + { + %file.close(); + %templateFile.close(); + + warnf("CreateNewModule - Something went wrong and we couldn't write the script file!"); + } + + //force a refresh of our modules list + ModuleDatabase.ignoreLoadedGroups(true); + ModuleDatabase.scanModules( "data", false ); + %success = ModuleDatabase.loadExplicit(%newModuleName, 1); + ModuleDatabase.ignoreLoadedGroups(false); + + //force a reload of the Module lists + AssetBrowser.refresh(); +} + +function T3Dpre4ProjectImporter::copyFiles(%this) +{ + %currentPage = ProjectImportWindow.getCurrentPage(); + + %currentPage-->fileCopyText.setText("Beginning copy of files to new module folder now. This may take a few minutes..."); + Canvas.repaint(); + + %file = findFirstFileMultiExpr( $ProjectImporter::sourceContentFolder @ "/*.*", true); + + while( %file !$= "" ) + { + %filePath = filePath(%file); + %fileName = fileName(%file); + %fileExt = fileExt(%file); + + if(%fileExt $= ".dll" || %fileExt $= ".log" || %fileExt $= ".exe" || %fileExt $= ".manifest"|| %fileExt $= ".h" || + %fileExt $= ".cpp" || %fileExt $= ".so" || %fileExt $= ".do" || %fileExt $= ".lib" ||%fileExt $= ".exp") + { + %file = findNextFileMultiExpr( $ProjectImporter::sourceContentFolder @ "/*.*" ); + continue; + } + + //filter out some unneeded folders + %slashCount = getTokenCount(%filePath, "/"); + %topFolder = getToken(%filePath, "/", %slashCount-1); + if(%topFolder $= "") + %topFolder = getToken(%filePath, "/", %slashCount-2); + + if(%topFolder $= "creator" || %topFolder $= "tools" || %topFolder $= "web") + { + %file = findNextFileMultiExpr( $ProjectImporter::sourceContentFolder @ "/*.*" ); + continue; + } + + %targetFilePath = strReplace(%file, $ProjectImporter::sourceContentFolder, $ProjectImporter::modulePath); + %targetFolder = filePath(%targetFilePath); + + if(!isDirectory(%targetFolder)) + { + DirectoryHandler::createFolder(0, %targetFolder); + } + + if(!pathCopy(%file, %targetFilePath, false)) + { + error("Legacy Project Importer, failed to copy file: " @ %file @ " to destination: " @ %targetFilePath); + } + + %file = findNextFileMultiExpr( $ProjectImporter::sourceContentFolder @ "/*.*" ); + } + + // + //Now that we've done that, we'll load and scan the module for asset defs + %file = findFirstFileMultiExpr( $ProjectImporter::modulePath @ "/*.asset.taml", true); + + while( %file !$= "" ) + { + %moduleName = AssetBrowser.dirHandler.getModuleFromAddress(%file).ModuleId; + %moduleDef = ModuleDatabase.findModule(%moduleName, 1); + + AssetDatabase.addDeclaredAsset(%moduleDef, %file); + + %file = findNextFileMultiExpr( $ProjectImporter::modulePath @ "/*.asset.taml" ); + } + // + + %currentPage-->fileCopyText.setValue("File copy done! Press Next to continue."); + + ProjectImportWindow-->nextButton.setActive(true); + Canvas.repaint(); +} + +function T3Dpre4ProjectImporter::processImportedFiles(%this) +{ + if($ProjectImporter::importMode $= "CoreAndTools") + { + $ProjectImporter::modulePath = "Core"; + %this.doImport(); + + $ProjectImporter::modulePath = "Tools"; + %this.doImport(); + } + else + { + %this.doImport(); + } + + %currentPage = ProjectImportWindow.getCurrentPage(); + + %currentPage-->processingText.setText("Processing of files done! Press Next to continue."); + ProjectImportWindow-->nextButton.setActive(true); + Canvas.repaint(); +} + +function T3Dpre4ProjectImporter::doImport(%this) +{ + //Store off the current default import config + %defaultConfig = EditorSettings.value("Assets/AssetImporDefaultConfig", ""); + EditorSettings.setValue("Assets/AssetImporDefaultConfig", "LegacyProjectImport"); + + //Update asset content + beginImageImport(); + + %this.beginMaterialFilesImport(); + + beginShapeImport(); + beginTerrainImport(); + beginLevelImport(); + beginGUIImport(); + + %this.beginCodeFilesImport(); + + EditorSettings.setValue("Assets/AssetImporDefaultConfig", %defaultConfig); +} + +function T3Dpre4ProjectImporter::beginMaterialFilesImport(%this) +{ + %currentPage = ProjectImportWindow.getCurrentPage(); + + //First, wipe out any files inside the folder first + %file = findFirstFileMultiExpr( $ProjectImporter::modulePath @ "/*/materials.*", true); + + %objectClassStack = new ArrayObject(); + %fileOutputLines = new ArrayObject(); + + echo("Legacy Project Importer - Beginning processing of imported code files"); + + //Walk through and process all code files to update references + while( %file !$= "" ) + { + %fileWasChanged = false; + + %filename = fileName(%file); + %fileBase = fileBase(%file); + %fileExt = fileExt(%file); + %filePath = filePath(%file); + + $ProjectImporter::currentFilePath = %filePath @ "/"; + + %currentPage-->processingText.setText("Processing material script file: " @ %file); + Canvas.repaint(); + + if ( $ProjectImporter::fileObject.openForRead( %file ) ) + { + echo("Legacy Project Importer - Beginning process of file: " @ %file); + %lineNum = 0; + while ( !$ProjectImporter::fileObject.isEOF() ) + { + %line = $ProjectImporter::fileObject.readLine(); + %trimmedLine = trim(%line); + + if(strIsMatchExpr("*new*(*)*", %line)) + { + %className = findObjectClass(%line, "new"); + + if(%className !$= "Material" && %className !$= "CustomMaterial" && %className !$= "TerrainMaterial" && %className !$= "CubemapData") + { + %lineNum++; + %fileOutputLines.push_back(%line); + continue; + } + + %objectClassStack.push_back(%className); + + %objectName = findObjectName(%line, "new"); + + if(%objectName $= "" && %className $= "TerrainMaterial") + { + %intName = findObjectField("internalName"); + %objectName = %intName @ "_terrainMat"; + %line = strReplace(%line, "()", "(" @ %intName @ ")"); + + %fileWasChanged = true; + } + else if(%objectName $= "" && %className $= "Material") + { + %mapToName = findObjectField("mapTo"); + %objectName = %mapToName @ "_mat"; + %line = strReplace(%line, "()", "(" @ %mapToName @ ")"); + + %fileWasChanged = true; + } + + if(%objectClassStack.count() == 1) + { + %currentObjClass = %objectClassStack.getKey(%objectClassStack.count()-1); + + //we only process top-level objects directly + %inheritanceList = getClassHierarchy(%currentObjClass); + for (%classDepth =0; %classDepthprocessingText.setText("Processing file: " @ %file); + Canvas.repaint(); + + if ( $ProjectImporter::fileObject.openForRead( %file ) ) + { + echo("Legacy Project Importer - Beginning process of file: " @ %file); + %lineNum = 0; + while ( !$ProjectImporter::fileObject.isEOF() ) + { + %line = $ProjectImporter::fileObject.readLine(); + %trimmedLine = trim(%line); + + if(strIsMatchExpr("*new*(*)*", %line)) + { + %className = findObjectClass(%line, "new"); + + %objectClassStack.push_back(%className); + + %objectName = findObjectName(%line, "new"); + + if(%objectName !$= "") + { + if(%objectClassStack.count() == 1) + { + %currentObjClass = %objectClassStack.getKey(%objectClassStack.count()-1); + + //we only process top-level objects directly + %inheritanceList = getClassHierarchy(%currentObjClass); + for (%classDepth =0; %classDepthprocessingText.setText("Processing material script file: " @ %file); + Canvas.repaint(); + + %targetFilePath = %filePath @ "/" @ %fileBase @ "." @ $TorqueScriptFileExtension; + if(!pathCopy(%file, %targetFilePath)) + { + error("T3Dpre4ProjectImporter::processScriptExtensions() - Failed to create renamed script file for file: " @ %file); + } + else + { + if(!fileDelete(%file)) + { + error("T3Dpre4ProjectImporter::processScriptExtensions() - Failed to remove old script file for rename: " @ %file); + } + } + + if($TorqueScriptFileExtension $= "tscript") + %file = findNextFileMultiExpr( $ProjectImporter::modulePath @ "/*/*.cs"); + else + %file = findNextFileMultiExpr( $ProjectImporter::modulePath @ "/*/*.tscript"); + } + + %currentPage = ProjectImportWindow.getCurrentPage(); + + %currentPage-->processingText.setText("Processing of script files done! Press Next to continue."); + ProjectImportWindow-->nextButton.setActive(true); + Canvas.repaint(); + + echo("Legacy Project Importer - Beginning processing of script files extensions complete"); +} + +//To implement a custom class to have it's fields processed, just utilize this template function +//and replace the class/field spaces as appropriate +/* +function T3Dpre4ProjectImporter::processLine(%this, %line) +{ + %outLine = processLegacyField(%line, "", ""); + + if(%outLine !$= %line) + return %outLine; + else + return %line; +} +*/ +//============================================================================== +// Misc Object Classes +//============================================================================== +function T3Dpre4ProjectImporter::genProcessor(%classType, %conversionMap) +{ + %stryng = "function T3Dpre4ProjectImporter::process" @%classType@ "Line(%this, %line){\n"; + %count = getWordCount(%conversionMap); + for (%i = 0; %i<%count; %i+=2) + { + %stryng = %stryng @ " %outLine = processLegacyField(%line,\""@ getWord(%conversionMap,%i)@ "\",\""@ getWord(%conversionMap,%i+1)@"\");\n"; + %stryng = %stryng @ " if(%outLine !$= %line) return %outLine;\n"; + } + %stryng = %stryng @ " return %line;\n}"; + eval(%stryng); +} + +T3Dpre4ProjectImporter::genProcessor("TSShapeConstructor", "baseShape baseShapeAsset shapeName shapeAsset"); +T3Dpre4ProjectImporter::genProcessor("BasicClouds", "texture textureAsset"); +T3Dpre4ProjectImporter::genProcessor("CloudLayer", "texture textureAsset"); +T3Dpre4ProjectImporter::genProcessor("DecalRoad", "material materialAsset"); +T3Dpre4ProjectImporter::genProcessor("MeshRoad", "topMaterial topMaterialAsset bottomMaterial bottomMaterialAsset sideMaterial sideMaterialAsset"); +T3Dpre4ProjectImporter::genProcessor("ScatterSky", "moonMat moonMatAsset"); +T3Dpre4ProjectImporter::genProcessor("Sun", "coronaMaterial coronaMaterialAsset"); +T3Dpre4ProjectImporter::genProcessor("VolumetricFog", "shape ShapeAsset texture textureAsset"); +T3Dpre4ProjectImporter::genProcessor("WaterObject", "rippleTex rippleTexAsset foamTex foamTexAsset depthGradientTex depthGradientTexAsset"); +T3Dpre4ProjectImporter::genProcessor("ConvexShape", "material materialAsset"); +T3Dpre4ProjectImporter::genProcessor("RenderMesh", "material materialAsset"); +T3Dpre4ProjectImporter::genProcessor("RenderShape", "shape shapeAsset"); +T3Dpre4ProjectImporter::genProcessor("GroundCover", "material materialAsset shape shapeAsset shapeFilename shapeAsset"); +T3Dpre4ProjectImporter::genProcessor("GroundPlane", "material materialAsset"); +T3Dpre4ProjectImporter::genProcessor("LevelInfo", "accuTexture accuTextureAsset"); +T3Dpre4ProjectImporter::genProcessor("TSStatic", "shape shapeAsset shapeName shapeAsset"); +T3Dpre4ProjectImporter::genProcessor("TSForestItemData", "shape shapeAsset shapeName shapeAsset shapeFile shapeAsset"); +//============================================================================== +// Levels +//============================================================================== +function T3Dpre4ProjectImporter::processMissionGroupLine(%this, %line, %missionName) +{ + %outline = strreplace(%line, "SimGroup(MissionGroup)", "Scene(" @ %missionName @ ")"); + + if(%outLine !$= %line) + return %outLine; + else + return %line; +} + +function T3Dpre4ProjectImporter::processLevelInfoLine(%this, %line) +{ + %outline = strreplace(%line, "ScriptObject(MissionInfo)", "LevelInfo(theLevelInfo)"); + + if(%outLine !$= %line) + return %outLine; + else + return %line; +} + +function T3Dpre4ProjectImporter::processSkyLine(%this, %line) +{ + %outline = strreplace(%line, "Sky", "Skybox"); + + if(%outLine !$= %line) + return %outLine; + else + return %line; +} + +function T3Dpre4ProjectImporter::processWaterLine(%this, %line) +{ + %outline = strreplace(%line, "Water", "WaterPlane"); + + if(%outLine !$= %line) + return %outLine; + else + return %line; +} + +//============================================================================== +// GUIs +//============================================================================== +T3Dpre4ProjectImporter::genProcessor("GuiIconButtonCtrl", "bitmap bitmapAsset iconBitmap bitmapAsset"); +T3Dpre4ProjectImporter::genProcessor("GuiToolboxButtonCtrl", "normalBitmap normalBitmapAsset loweredBitmap loweredBitmapAsset hoverBitmap hoverBitmapAsset"); +T3Dpre4ProjectImporter::genProcessor("GuiBitmapCtrl", "bitmap bitmapAsset"); +T3Dpre4ProjectImporter::genProcessor("GuiMaterialCtrl", "material materialAsset"); +T3Dpre4ProjectImporter::genProcessor("GuiCursor", "bitmap bitmapAsset"); +T3Dpre4ProjectImporter::genProcessor("GuiChunkedBitmapCtrl", "bitmap bitmapAsset"); +T3Dpre4ProjectImporter::genProcessor("GuiProgressBitmap", "bitmap bitmapAsset"); +T3Dpre4ProjectImporter::genProcessor("GuiMissionArea", "handleBitmap handleBitmapAsset"); +T3Dpre4ProjectImporter::genProcessor("WorldEditor", "selectHandle selectHandleAsset defaultHandle defaultHandleAsset lockedHandle lockedHandleAsset"); +T3Dpre4ProjectImporter::genProcessor("GuiControlProfile", "bitmap bitmapAsset"); + +function T3Dpre4ProjectImporter::processGuiBitmapButtonCtrlLine(%this, %line) +{ + %outLine = processGuiBitmapButtonCtrlField(%line, "bitmap", "bitmapAsset"); + if(%outLine !$= %line) return %outLine; + + return %line; +} + +//============================================================================== +// Datablocks +//============================================================================== +T3Dpre4ProjectImporter::genProcessor("ForestItemData", "shape shapeAsset"); +T3Dpre4ProjectImporter::genProcessor("CubeMapData", "cubemapFace cubeMapFaceAsset cubemap cubemapAsset cubeFace cubeMapFaceAsset"); +T3Dpre4ProjectImporter::genProcessor("DebrisData", "shape shapeAsset shapeFile shapeAsset"); +T3Dpre4ProjectImporter::genProcessor("DecalData", "material materialAsset"); +T3Dpre4ProjectImporter::genProcessor("ExplosionData", "explosionShape explosionShapeAsset"); +T3Dpre4ProjectImporter::genProcessor("ParticleData", "texture textureAsset textureName textureAsset textureExt textureExtAsset textureExtName textureExtAsset"); +T3Dpre4ProjectImporter::genProcessor("PrecipitationData", "drop dropAsset dropTexture dropAsset splash splashAsset splashTexture splashAsset"); +T3Dpre4ProjectImporter::genProcessor("SplashData", "texture textureAsset"); +T3Dpre4ProjectImporter::genProcessor("LightFlareData", "flareTexture flareTextureAsset"); +T3Dpre4ProjectImporter::genProcessor("PhysicsDebrisData", "shape shapeAsset shapeFile shapeAsset"); +T3Dpre4ProjectImporter::genProcessor("PhysicsShapeData", "shape shapeAsset"); +T3Dpre4ProjectImporter::genProcessor("PlayerData", "shapeFP shapeFPAsset shapeNameFP shapeFPAsset"); +T3Dpre4ProjectImporter::genProcessor("ProjectileData", "projectileShape projectileShapeAsset projectileShapeName projectileShapeAsset"); +T3Dpre4ProjectImporter::genProcessor("ShapeBaseData", "shapeFile shapeAsset shape shapeAsset debrisShape debrisShapeAsset debrisShapeName debrisShapeAsset"); +T3Dpre4ProjectImporter::genProcessor("ShapeBaseImageData", "shape shapeAsset[0] shapeFP shapeAsset[1] shapeFile shapeAsset[0] shapeFileFP shapeAsset[1]"); +T3Dpre4ProjectImporter::genProcessor("WheeledVehicleTire", "shape shapeAsset shapeFile shapeAsset"); +//============================================================================== +// Materials +//============================================================================== +//long form of the result of T3Dpre4ProjectImporter::genProcessor since that would result in a rediculously long oneliner +function T3Dpre4ProjectImporter::processMaterialLine(%this, %line) +{ + %outLine = processLegacyField(%line, "baseTex", "diffuseMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "diffuseMap", "diffuseMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "lightMap", "lightMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "toneMap", "toneMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "detailTex", "detailMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "detailMap", "detailMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "overlayTex", "overlayMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "overlayMap", "overlayMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "bumpTex", "normalMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "normalMap", "normalMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "ormConfigMap", "ormConfigMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "roughMap", "roughMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "aoMap", "aoMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "metalMap", "metalMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "glowMap", "glowMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "detailNormalMap", "detailNormalMapAsset"); + if(%outLine !$= %line) return %outLine; + return %line; +} + +function T3Dpre4ProjectImporter::processMaterialObject(%this, %file, %objectName) +{ + %matAsset = MaterialAsset::getAssetIdByMaterialName(%objectName); + + if(%matAsset $= "" || %matAsset $= "Core_Rendering:NoMaterial") + { + %assetName = %objectName; + + %moduleName = AssetBrowser.dirHandler.getModuleFromAddress(%file).ModuleId; + + %assetPath = filePath(%file) @ "/"; + + %tamlpath = %assetPath @ %assetName @ ".asset.taml"; + + if(isFile(%tamlpath)) + { + error("T3Dpre4ProjectImporter::processMaterialObject() - Failed to create as taml file already exists: " @ %file); + return false; + } + + %asset = new MaterialAsset() + { + AssetName = %assetName; + versionId = 1; + shaderData = ""; + materialDefinitionName = %assetName; + scriptFile = fileBase(%file); + }; + + TamlWrite(%asset, %tamlpath); + + %moduleDef = ModuleDatabase.findModule(%moduleName, 1); + %success = AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath); + + if(!%success) + return false; + } + + return false; +} + +function T3Dpre4ProjectImporter::processTerrainMaterialLine(%this, %line) +{ + %outLine = processLegacyField(%line, "diffuseMap", "diffuseMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "normalMap", "normalMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "detailMap", "detailMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "ORMConfigMap", "ORMConfigMapAsset"); + if(%outLine !$= %line) return %outLine; + %outLine = processLegacyField(%line, "macroMap", "macroMapAsset"); + if(%outLine !$= %line) return %outLine; + return %line; +} + +function T3Dpre4ProjectImporter::processTerrainMaterialObject(%this, %file, %objectName) +{ + %matAsset = TerrainMaterialAsset::getAssetIdByMaterialName(%objectName); + + if(%matAsset $= "" || %matAsset $= "Core_Rendering:noMaterial") + { + %assetName = %objectName; + + %moduleName = AssetBrowser.dirHandler.getModuleFromAddress(%file).ModuleId; + + %assetPath = filePath(%file) @ "/"; + + %tamlpath = %assetPath @ %assetName @ ".asset.taml"; + + if(isFile(%tamlpath)) + { + error("T3Dpre4ProjectImporter::processTerrainMaterialObject() - Failed to create as taml file already exists: " @ %file); + return false; + } + + %asset = new TerrainMaterialAsset() + { + AssetName = %assetName; + versionId = 1; + shaderData = ""; + materialDefinitionName = %objectName; + scriptFile = fileName(%file); + }; + + TamlWrite(%asset, %tamlpath); + + %moduleDef = ModuleDatabase.findModule(%moduleName, 1); + %success = AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath); + + if(!%success) + return false; + } + + return false; +} +//============================================================================== +// PostEffects +//============================================================================== +T3Dpre4ProjectImporter::genProcessor("PostEffect", "texture textureAsset"); + + +//============================================================================== +// Misc Utility functions +//============================================================================== +//This is functionally identical to processLegacyField, but we have to special-snowflake our asset lookups +//due to it using suffix-based indirections +function processGuiBitmapButtonCtrlField(%line, %originalFieldName, %newFieldName) +{ + if(!strIsMatchExpr("*"@%originalFieldName@"=*\"*\";*", %line) && + !strIsMatchExpr("*"@%originalFieldName@"[*=*\"*\";*", %line) && + !strIsMatchExpr("*"@%originalFieldName@" *=*\"*\";*", %line)) + return %line; + + %outLine = strreplace(%line, %originalFieldName, %newFieldName); + + //get the value + %value = ""; + %pos = strpos(%outLine, "= \""); + if(%pos != -1) + { + %endPos = strpos(%outLine, "\";", %pos); + + %value = getSubStr(%outLine, %pos+3, %endPos-%pos-3); + } + else + { + %pos = strpos(%outLine, "=\""); + if(%pos != -1) + { + %endPos = strpos(%outLine, "\";", %pos); + + %value = getSubStr(%outLine, %pos+2, %endPos-%pos-2); + } + } + + if(%outLine !$= %line && %pos != -1 && %endPos != -1 && %value !$= "") + { + echo("Legacy Project Importer - processing legacy field line: " @ %line); + + if(startsWith(%value, "$") || startsWith(%value, "#")) + { + //These are going to be texture/render targets, and we can leave them alone + return %line; + } + //find any assets with that filename + else if(startsWith(%value, "./")) + { + %targetFilename = strReplace(%value, "./", $ProjectImporter::currentFilePath @ "/"); + } + else if(startsWith(%value, "../")) + { + %slashPos = strposr($ProjectImporter::currentFilePath, "/"); + if(%slashPos == strlen($ProjectImporter::currentFilePath)-1) //if it's right at the end, we'll get the next one up + { + %slashPos = strposr($ProjectImporter::currentFilePath, "/", 2); + } + + %parentPath = getSubStr($ProjectImporter::currentFilePath, 0, %slashPos); + %targetFilename = strReplace(%value, "../", %parentPath @ "/"); + } + else if(startsWith(%value, "~")) + { + %targetFilename = strReplace(%value, "~", $ProjectImporter::modulePath @ "/"); + if(!isFile(%targetFilename)) + { + %targetFilename = strReplace(%value, "~", $ProjectImporter::modulePath @ "/main/"); + } + } + else if ((strpos(%value,"/") == -1)&&(strpos(%value,"\\") == -1)) + { + %targetFilename = $ProjectImporter::currentFilePath @ %value; + } + else if(!startsWith(%value, $ProjectImporter::modulePath @ "/")) + { + %targetFilename = $ProjectImporter::modulePath @ "/" @ %value; + } + else + { + %targetFilename = %value; + } + + %targetFilename = strReplace(%targetFilename, "//", "/"); + %targetFilename = testFilenameExtensions(%targetFilename); + + if(!isFile(%targetFilename)) //if our presumed file target is bad, just bail out + { + //Now we test for a suffix + %targetPath = filePath(%targetFilename); + %targetName = fileBase(%targetFilename); + %targetExt = fileExt(%targetFilename); + + %targetFilename = %targetPath @ "/" @ %targetName @ "_n" @ %targetExt; + %targetFilename = strReplace(%targetFilename, "//", "/"); + %targetFilename = testFilenameExtensions(%targetFilename); + } + + //If we still have nothing, then we fail it out + if(!isFile(%targetFilename)) + { + error("Legacy Project Importer - file described in line could not be found/is not valid"); + return %line; + } + + $ProjectImporter::assetQuery.clear(); + %foundAssets = AssetDatabase.findAssetLooseFile($ProjectImporter::assetQuery, %targetFilename); + if(%foundAssets != 0) + { + %assetId = $ProjectImporter::assetQuery.getAsset(0); + echo("Legacy Project Importer - processing of legacy field line's value: " @ %value @ " has found a matching AssetId: " @ %assetId); + } + + if(%assetId !$= "" && AssetDatabase.isDeclaredAsset(%assetId)) + { + //if (%assetId.getStatusString() $= "Ok") + %outLine = strReplace(%outLine, %value, %assetId); + //else + // error("Asset assignment failure:", %assetId, getStatusString()); + } + } + + if(%outLine !$= %line) + { + echo("Legacy Project Importer - processing of legacy line: " @ %line @ " has been updated to: " @ %outLine); + return %outLine; + } + else + { + return %line; + } +} + diff --git a/Templates/BaseGame/game/tools/projectImporter/scripts/projectImporter.tscript b/Templates/BaseGame/game/tools/projectImporter/scripts/projectImporter.tscript new file mode 100644 index 000000000..eff77c7d4 --- /dev/null +++ b/Templates/BaseGame/game/tools/projectImporter/scripts/projectImporter.tscript @@ -0,0 +1,1282 @@ +$ProjectImporter::rootDir = "tools"; + +function ProjectImporter::beginProjectImport() +{ + Canvas.pushDialog(ProjectImportCtrl); +} + +function ProjectImportWindow::onWake(%this) +{ + if(!isObject($ProjectImporter::fileObject)) + $ProjectImporter::fileObject = new FileObject(); + + %this.importStepNumber = 0; + %this-->stepsList.clear(); + %this-->stepsList.addRow(0, "Welcome"); + %this-->stepsList.addRow(1, "Previous Project Ver."); + %this-->stepsList.addRow(2, "Locate Previous Project Content"); + %this-->stepsList.addRow(3, "Set New Module Name"); + %this-->stepsList.addRow(4, "Copy Old Files"); + %this-->stepsList.addRow(5, "Update Script Extensions"); + %this-->stepsList.addRow(6, "Import"); + %this-->stepsList.addRow(7, "Done"); + + %this.stepCount = %this-->stepsList.rowCount()-1; + + %this.showPage(0); +} + +function ProjectImportWindow::previousStep(%this) +{ + if(%this.importStepNumber == 0) + return; + + %this.importStepNumber--; + + %this.showPage(%this.importStepNumber); +} + +function ProjectImportWindow::nextStep(%this) +{ + if(%this.importStepNumber == %this.stepCount) + { + Canvas.popDialog(ProjectImportCtrl); + return; + } + + %this.importStepNumber++; + + %this.showPage(%this.importStepNumber); +} + +function ProjectImportWindow::setStep(%this, %stepNum) +{ + if(%stepNum >= %this.stepCount) + { + Canvas.popDialog(ProjectImportCtrl); + return; + } + + if(%stepNum < 0) + return; + + %this.importStepNumber = %stepNum; + + %this.showPage(%this.importStepNumber); +} + +function ProjectImportWindow::selectOGFolder(%this) +{ + %dlg = new OpenFolderDialog() + { + Title = "Select Export Folder"; + Filters = %filter; + DefaultFile = "data/"; + ChangePath = false; + MustExist = true; + MultipleFiles = false; + }; + + //if(filePath( %currentFile ) !$= "") + %dlg.DefaultPath = "data/"; + + if(%dlg.Execute()) + { + %path = makeFullPath(%dlg.FileName); + %this-->targetImportingPath.setText("Folder: " @ %path); + $ProjectImporter::sourceContentFolder = %path; + } + + %dlg.delete(); +} + +function ProjectImportWindow::showPage(%this, %pageIndex) +{ + if(%pageIndex < 0 || %pageIndex > %this.stepCount) + return; + + %this.importStepNumber = %pageIndex; + %this-->stepsList.clearSelection(); + %this-->stepsList.setSelectedById(%this.importStepNumber); + + for(%i=0; %i < %this-->stepsList.rowCount(); %i++) + { + (ProjectImportWizardPage @ %i).setHidden(true); + } + + (ProjectImportWizardPage @ %this.importStepNumber).setHidden(false); + (ProjectImportWizardPage @ %this.importStepNumber).openPage(); +} + +function ProjectImportWindow::getCurrentPage(%this) +{ + return (ProjectImportWizardPage @ %this.importStepNumber); +} + +function ProjectImportWizardPage0::openPage(%this) +{ + ProjectImportWindow-->backButton.setHidden(true); +} + +function ProjectImportWizardPage0::processPage(%this) +{ +} + +function ProjectImportWizardPage1::openPage(%this) +{ + ProjectImportWindow-->backButton.setHidden(false); + + %this-->previousContentVersionPopup.clear(); + //this-->previousContentVersionPopup.add("Torque Game Engine"); + //%this-->previousContentVersionPopup.add("Torque Shader Engine"); + %this-->previousContentVersionPopup.add("Torque 3D Pre-4.0"); +} + +function ProjectImportWizardPage1::processPage(%this) +{ +} + +function ProjectImportWizardPage2::openPage(%this) +{ + %version = ProjectImportWizardPage1-->previousContentVersionPopup.getSelected(); + if(ProjectImportWizardPage1-->previousContentVersionPopup.getText() $= "") + { + ProjectImportWindow.previousStep(); + toolsMessageBoxOK("Version Required", "You must select a project version to continue."); + return; + } + + ProjectImportWizardPage2-->internalFolderBtn.setStateOn(false); + ProjectImportWizardPage2-->externalFolderBtn.setStateOn(false); + ProjectImportWizardPage2-->coreAndToolsBtn.setStateOn(false); + $ProjectImporter::sourceContentFolder = ""; + %this-->targetImportingPath.setText(""); + + Canvas.repaint(); //force it to refresh the page so we're up to date. + + switch$(%version) + { + case 0: + $ProjectImporter::versionMode = "T3Dpre4Project"; + default: + $ProjectImporter::versionMode = "T3Dpre4Project"; + } + + if(isObject($ProjectImporter::importTool)) + $ProjectImporter::importTool.delete(); + + $ProjectImporter::importTool = new ScriptObject($ProjectImporter::versionMode @ "Importer"); +} + +function ProjectImportWizardPage2::processPage(%this) +{ +} + +function ProjectImportWizardPage3::openPage(%this) +{ + if(ProjectImportWizardPage2-->internalFolderBtn.isStateOn()) + { + $ProjectImporter::importMode = "InternalFolder"; + } + else if(ProjectImportWizardPage2-->externalFolderBtn.isStateOn()) + { + $ProjectImporter::importMode = "ExternalFolder"; + } + else if(ProjectImportWizardPage2-->coreAndToolsBtn.isStateOn()) + { + $ProjectImporter::importMode = "CoreAndTools"; + } + else + { + ProjectImportWindow.previousStep(); + toolsMessageBoxOK("Folder Type Required", "You must indicate if the folder is an internal or external folder."); + return; + } + + if($ProjectImporter::sourceContentFolder $= "" && $ProjectImporter::importMode !$= "CoreAndTools") + { + ProjectImportWindow.previousStep(); + toolsMessageBoxOK("Source Folder Required", "You must select the original folder to import files from."); + return; + } + + if($ProjectImporter::importMode $= "InternalFolder") + { + %moduleDef = AssetBrowser.dirHandler.getModuleFromAddress(makeRelativePath($ProjectImporter::sourceContentFolder)); + if(isObject(%moduleDef)) + { + //already a valid module in place so just skip this step + $ProjectImporter::useExistingModule = true; + $ProjectImporter::moduleName = %moduleDef.moduleId; + $ProjectImporter::modulePath = "data/" @ $ProjectImporter::moduleName; + ProjectImportWindow.setStep(4); + } + } + else if($ProjectImporter::importMode $= "ExternalFolder") + { + %slashCount = getTokenCount($ProjectImporter::sourceContentFolder, "/"); + %topFolder = getToken($ProjectImporter::sourceContentFolder, "/", %slashCount-1); + if(%topFolder $= "") + %topFolder = getToken($ProjectImporter::sourceContentFolder, "/", %slashCount-2); + + //clean up invalid characters and stuff + %topFolder = strReplace(%topFolder, " ", ""); + %topFolder = strReplace(%topFolder, "!", ""); + %topFolder = strReplace(%topFolder, "-", ""); + %topFolder = strReplace(%topFolder, ".", ""); + + $ProjectImporter::useExistingModule = false; + $ProjectImporter::moduleName = %topFolder; //preseed the module name + $ProjectImporter::modulePath = "data/" @ $ProjectImporter::moduleName; + + ProjectImportWizardPage3-->newModuleName.setText($ProjectImporter::moduleName); + } + else if($ProjectImporter::importMode $= "CoreAndTools") + { + ProjectImportWindow.setStep(5); + } +} + +function ProjectImportWizardPage3::processPage(%this) +{ +} + +function ProjectImportWizardPage4::openPage(%this) +{ + ProjectImportWindow-->backButton.setHidden(true); + ProjectImportWindow-->nextButton.setActive(false); + + if(!$ProjectImporter::useExistingModule) + $ProjectImporter::moduleName = ProjectImportWizardPage3-->newModuleName.getText(); + + $ProjectImporter::modulePath = "data/" @ $ProjectImporter::moduleName; + + if(!$ProjectImporter::useExistingModule) + $ProjectImporter::importTool.setupModule(); + + //Do some sanity checking here to sidestep the copy if we're already in-place + %sourcePath = $ProjectImporter::sourceContentFolder; + %targetPath = makeFullPath($ProjectImporter::modulePath); + + //If the source path starts with the module target path at all, we're already that folder, or a subfolder in it, so skip filecopy + if(!startsWith(%sourcePath, %targetPath)) + $ProjectImporter::importTool.copyFiles(); + else + ProjectImportWindow.nextStep(); + + //if we gen'd a new module setup, double check we didn't copy over a module script file under a legacy extension + if(!$ProjectImporter::useExistingModule) + { + %newModuleName = $ProjectImporter::moduleName; + %moduleFilePath = "data/" @ %newModuleName; + + if($TorqueScriptFileExtension !$= "cs") + { + %moduleScriptFilePath = %moduleFilePath @ "/" @ %newModuleName @ ".cs"; + if(isFile(%moduleScriptFilePath)) + { + //yep, that exists, so we'll assume it was the file we wanted, so remove the generated one + fileDelete(%moduleFilePath @ "/" @ %newModuleName @ "." @ $TorqueScriptFileExtension); + } + } + } +} + +function ProjectImportWizardPage4::processPage(%this) +{ +} + +function ProjectImportWizardPage5::openPage(%this) +{ + ProjectImportWindow-->nextButton.setActive(false); + Canvas.repaint(); + + $ProjectImporter::importTool.processImportedFiles(); +} + +function ProjectImportWizardPage5::processPage(%this) +{ +} + +function ProjectImportWizardPage6::openPage(%this) +{ + ProjectImportWindow-->nextButton.setActive(false); + Canvas.repaint(); + + if($ProjectImporter::importMode $= "CoreAndTools") + { + $ProjectImporter::modulePath = "Core"; + $ProjectImporter::importTool.processScriptExtensions(); + + $ProjectImporter::modulePath = "Tools"; + $ProjectImporter::importTool.processScriptExtensions(); + } + else + { + $ProjectImporter::importTool.processScriptExtensions(); + } +} + +function ProjectImportWizardPage6::processPage(%this) +{ +} + +function ProjectImportWizardPage7::openPage(%this) +{ +} + +function beginProjectImport() +{ + echo("==========================================="); + echo("Beginning Project Import"); + echo("==========================================="); + + $ProjectImporter::assetQuery = new AssetQuery(); + $ProjectImporter::importer = new AssetImporter(); + $ProjectImporter::persistMgr = new PersistenceManager(); + + //beginMaterialImport(); + + //beginTerrainMaterialImport(); + + //beginShapeImport(); + + beginImageImport(); + + beginDatablockImport(); + + beginGUIImport(); + + beginTerrainImport(); + + //postFX imports'll need to look up render target names and ensure assets for those exist + //otherwise they need to be generated + beginPostFXImport(); + + beginMiscObjectImport(); + + $ProjectImporter::assetQuery.delete(); + $ProjectImporter::importer.delete(); + $ProjectImporter::persistMgr.delete(); + + echo("==========================================="); + echo("Finished Project Import"); + echo("==========================================="); + + AssetBrowser.refresh(); //update the AB just in case +} + +function testFilenameExtensions(%filename) +{ + %ext = fileExt(%filename); + if(%ext !$= "") + return %filename; + + if(isFile(%filename @ ".png")) + return %filename @ ".png"; + else if(isFile(%filename @ ".jpg")) + return %filename @ ".jpg"; + else if(isFile(%filename @ ".jpeg")) + return %filename @ ".jpeg"; + else if(isFile(%filename @ ".dds")) + return %filename @ ".dds"; + else if(isFile(%filename @ ".bmp")) + return %filename @ ".bmp"; + else if(isFile(%filename @ ".cached.dts")) + return %filename @ ".cached.dts"; + else if(isFile(%filename @ ".dts")) + return %filename @ ".dts"; + else if(isFile(%filename @ ".dae")) + return %filename @ ".dae"; + else if(isFile(%filename @ ".dds")) + return %filename @ ".dds"; + + return %filename; +} + +function processLegacyField(%line, %originalFieldName, %newFieldName) +{ + if(!strIsMatchExpr("*"@%originalFieldName@"=*\"*\";*", %line) && + !strIsMatchExpr("*"@%originalFieldName@"[*=*\"*\";*", %line) && + !strIsMatchExpr("*"@%originalFieldName@" *=*\"*\";*", %line)) + return %line; + + %outLine = strreplace(%line, %originalFieldName, %newFieldName); + + //get the value + %value = ""; + %pos = strpos(%outLine, "= \""); + if(%pos != -1) + { + %endPos = strpos(%outLine, "\";", %pos); + + %value = getSubStr(%outLine, %pos+3, %endPos-%pos-3); + } + else + { + %pos = strpos(%outLine, "=\""); + if(%pos != -1) + { + %endPos = strpos(%outLine, "\";", %pos); + + %value = getSubStr(%outLine, %pos+2, %endPos-%pos-2); + } + } + + if(%outLine !$= %line && %pos != -1 && %endPos != -1 && %value !$= "") + { + echo("Legacy Project Importer - processing legacy field line: " @ %line); + + if(startsWith(%value, "$") || startsWith(%value, "#")) + { + //These are going to be texture/render targets, and we can leave them alone + return %line; + } + //find any assets with that filename + else if(startsWith(%value, "./")) + { + %targetFilename = strReplace(%value, "./", $ProjectImporter::currentFilePath @ "/"); + } + else if(startsWith(%value, "../")) + { + %slashPos = strposr($ProjectImporter::currentFilePath, "/"); + if(%slashPos == strlen($ProjectImporter::currentFilePath)-1) //if it's right at the end, we'll get the next one up + { + %slashPos = strposr($ProjectImporter::currentFilePath, "/", 2); + } + + %parentPath = getSubStr($ProjectImporter::currentFilePath, 0, %slashPos); + %targetFilename = strReplace(%value, "../", %parentPath @ "/"); + } + else if(startsWith(%value, "~")) + { + %targetFilename = strReplace(%value, "~", $ProjectImporter::modulePath @ "/"); + if(!isFile(%targetFilename)) + { + %targetFilename = strReplace(%value, "~", $ProjectImporter::modulePath @ "/main/"); + } + } + else if ((strpos(%value,"/") == -1)&&(strpos(%value,"\\") == -1)) + { + %targetFilename = $ProjectImporter::currentFilePath @ %value; + } + else if(!startsWith(%value, $ProjectImporter::modulePath @ "/")) + { + %targetFilename = $ProjectImporter::modulePath @ "/" @ %value; + } + else + { + %targetFilename = %value; + } + + %targetFilename = strReplace(%targetFilename, "//", "/"); + %targetFilename = testFilenameExtensions(%targetFilename); + + if(!isFile(%targetFilename)) //if our presumed file target is bad, just bail out + { + error("Legacy Project Importer - file described in line could not be found/is not valid"); + return %line; + } + + $ProjectImporter::assetQuery.clear(); + %foundAssets = AssetDatabase.findAssetLooseFile($ProjectImporter::assetQuery, %targetFilename); + if(%foundAssets != 0) + { + %assetId = $ProjectImporter::assetQuery.getAsset(0); + echo("Legacy Project Importer - processing of legacy field line's value: " @ %value @ " has found a matching AssetId: " @ %assetId); + } + + if(%assetId !$= "" && AssetDatabase.isDeclaredAsset(%assetId)) + { + //if (%assetId.getStatusString() $= "Ok") + %outLine = strReplace(%outLine, %value, %assetId); + //else + // error("Asset assignment failure:", %assetId, getStatusString()); + } + } + + if(%outLine !$= %line) + { + echo("Legacy Project Importer - processing of legacy line: " @ %line @ " has been updated to: " @ %outLine); + return %outLine; + } + else + { + return %line; + } +} + +function processLegacyShapeConstructorField(%line) +{ + if(!strIsMatchExpr("*%this.addSequence(\"*);", %line)) + return %line; + + %outLine = %line; + + %animSourceStart = strPos(%line, "%this.addSequence(\"") + 19; + %animSourceEnd = strPos(%line, "\",", %animSourceStart); + %animationSource = getSubstr(%line, %animSourceStart, %animSourceEnd-%animSourceStart); + %animSourcePath = getWord(%animationSource, 0); + %animSourceName = getWord(%animationSource, 1); + + //already uses an asset, so we'll skip + if(strPos(%animSourcePath, ":") != -1) + return %line; + + //otherwise, try and see if we've got an animation source file here + if(startsWith(%animSourcePath, "./")) + { + %targetFilename = strReplace(%animSourcePath, "./", $ProjectImporter::currentFilePath @ "/"); + } + else if(startsWith(%animSourcePath, "../")) + { + %slashPos = strposr($ProjectImporter::currentFilePath, "/"); + if(%slashPos == strlen($ProjectImporter::currentFilePath)-1) //if it's right at the end, we'll get the next one up + { + %slashPos = strposr($ProjectImporter::currentFilePath, "/", 2); + } + + %parentPath = getSubStr($ProjectImporter::currentFilePath, 0, %slashPos); + %targetFilename = strReplace(%animSourcePath, "../", %parentPath @ "/"); + } + else if(startsWith(%animSourcePath, "~")) + { + %targetFilename = strReplace(%animSourcePath, "~", $ProjectImporter::modulePath @ "/"); + if(!isFile(%targetFilename)) + { + %targetFilename = strReplace(%animSourcePath, "~", $ProjectImporter::modulePath @ "/main/"); + } + } + else if ((strpos(%animSourcePath,"/") == -1)&&(strpos(%animSourcePath,"\\") == -1)) + { + %targetFilename = $ProjectImporter::currentFilePath @ %animSourcePath; + } + else if(!startsWith(%animSourcePath, $ProjectImporter::modulePath @ "/")) + { + %targetFilename = $ProjectImporter::modulePath @ "/" @ %animSourcePath; + } + else + { + %targetFilename = %animSourcePath; + } + + %targetFilename = strReplace(%targetFilename, "//", "/"); + %targetFilename = testFilenameExtensions(%targetFilename); + + if(!isFile(%targetFilename)) + { + return %line; + } + + $ProjectImporter::assetQuery.clear(); + %foundAssets = AssetDatabase.findAssetLooseFile($ProjectImporter::assetQuery, %targetFilename); + if(%foundAssets != 0) + { + %assetId = $ProjectImporter::assetQuery.getAsset(0); + echo("Legacy Project Importer - processing of legacy shape constructor addSequence line's value: " @ %value @ " has found a matching AssetId: " @ %assetId); + } + + if(%assetId !$= "" && AssetDatabase.isDeclaredAsset(%assetId)) + { + //if (%assetId.getStatusString() $= "Ok") + %outLine = strReplace(%line, %animSourcePath, %assetId); + //else + // error("Asset assignment failure:", %assetId, getStatusString()); + } + + if(%outLine !$= %line) + { + echo("Legacy Project Importer - processing of legacy shape constructor addSequence line: " @ %line @ " has been updated to: " @ %outLine); + return %outLine; + } + else + { + return %line; + } +} + +function findObjectClass(%line, %createWord) +{ + //we have a new object, add it to the stack + //substr to peel the class name + %start = strpos(%line, %createWord @ " "); + %end = strpos(%line, "(", %start); + %createLen = strlen(%createWord @ " "); + + if(%start != -1 && %end != -1) + { + %className = getSubStr(%line, %start + %createLen, %end-%start-%createLen); + + %className = trim(%className); + + return %className; + } + + return ""; +} + +function findObjectName(%line, %createWord) +{ + //we have a new object, add it to the stack + //substr to peel the class name + %start = strpos(%line, %createWord @ " "); + %end = strpos(%line, "(", %start); + + %nameEnd = strpos(%line, ")", %end); + + %objectName = getSubStr(%line, %end+1, %nameEnd-%end-1); + + if(%objectName !$= "") + { + if(strpos(%objectName, ":") != -1) + { + %objectName = getSubStr(%objectName, 0, strpos(%objectName, ":")); + } + + if(strpos(%objectName, ",") != -1) + { + %objectName = getSubStr(%objectName, 0, strpos(%objectName, ",")); + } + + %objectName = trim(%objectName); + } + + return %objectName; +} + +function findObjectField(%fieldName) +{ + %value = ""; + %peekLineOffset = 0; + %peekLine = $ProjectImporter::fileObject.peekLine(%peekLineOffset); + while(!strIsMatchExpr("*};*", %peekLine) && + !strIsMatchExpr("*singleton*(*)*", %peekLine) && + !strIsMatchExpr("*new*(*)*", %peekLine) && + !strIsMatchExpr("*datablock*(*)*", %peekLine)&& + !strIsMatchExpr("\n", %peekLine) && + !strIsMatchExpr("\r", %peekLine)) + { + if(strpos(%peekLine, %fieldName) != -1) + { + %value = ""; + %pos = strpos(%peekLine, "= \""); + if(%pos != -1) + { + %endPos = strpos(%peekLine, "\";", %pos); + + %value = getSubStr(%peekLine, %pos+3, %endPos-%pos-3); + break; + } + else + { + %pos = strpos(%peekLine, "=\""); + if(%pos != -1) + { + %endPos = strpos(%peekLine, "\";", %pos); + + %value = getSubStr(%peekLine, %pos+2, %endPos-%pos-2); + break; + } + } + } + + %peekLineOffset++; + %peekLine = $ProjectImporter::fileObject.peekLine(%peekLineOffset); + } + + return %value; +} + +//============================================================================== +//Shape Importing +//============================================================================== +function beginShapeImport() +{ + echo("==========================================="); + echo("Importing 3D Shape files"); + echo("==========================================="); + //First, we need to go through and process all loose shape files. This will + //get us shape assets, material assets image, assets and animation assets. + %currentAddress = $ProjectImporter::modulePath; + + //First, wipe out any files inside the folder first + %file = findFirstFileMultiExpr( %currentAddress @ "/*.*", true); + + while( %file !$= "" ) + { + if(endsWith(%file, "cached.dts")) + { + %file = findNextFileMultiExpr( %currentAddress @ "/*.*" ); + continue; + } + + %filename = fileName(%file); + %fileExt = fileExt(%file); + %filePath = filePath(%file); + + //Specific exclusions + if(endsWith(%filename, "cached.dts")) + { + %file = findNextFileMultiExpr( %currentAddress @ "/*.*" ); + continue; + } + + if(isShapeFormat(%fileExt)) + { + $ProjectImporter::assetQuery.clear(); + %assetsFound = AssetDatabase.findAssetLooseFile($ProjectImporter::assetQuery, %file); + if(%assetsFound == 0) + { + ProjectImportWizardPage5-->processingText.setText("Processing Shape Asset file: " @ %file); + Canvas.repaint(); + + //No asset found associated to this fileas far as we can determine, so time to import it + + warn("Importing 3D Shape file: " @ %file); + %assetId = $ProjectImporter::importer.autoImportFile(%file); + + if(%assetId !$= "") + { + warn("Finished importing 3D Shape file, resulting in asset with an id of: " @ %assetId); + } + } + } + + %file = findNextFileMultiExpr( %currentAddress @ "/*.*" ); + } + + echo("==========================================="); + echo("Finished Importing 3D Shape files"); + echo("==========================================="); +} +//============================================================================== + +//============================================================================== +//Image Importing +//============================================================================== +function beginImageImport() +{ + echo("==========================================="); + echo("Importing Image files"); + echo("==========================================="); + //First, we need to go through and process all loose image files. This will + //get us image assets, and if the import config deigns, material assets. + %currentAddress = $ProjectImporter::modulePath; + + //First, wipe out any files inside the folder first + %file = findFirstFileMultiExpr( %currentAddress @ "/*.*", true); + + while( %file !$= "" ) + { + %filename = fileName(%file); + %fileExt = fileExt(%file); + %filePath = filePath(%file); + + if(isImageFormat(%fileExt)) + { + if(%filename $= "skybox_1.png") + { + %aefgadfg = true; + } + + $ProjectImporter::assetQuery.clear(); + %assetsFound = AssetDatabase.findAssetLooseFile($ProjectImporter::assetQuery, %file); + if(%assetsFound == 0) + { + ProjectImportWizardPage5-->processingText.setText("Processing Image Asset file: " @ %file); + Canvas.repaint(); + + //No asset found associated to this fileas far as we can determine, so time to import it + + warn("Importing Image file: " @ %file); + %assetId = $ProjectImporter::importer.autoImportFile(%file); + + if(%assetId !$= "") + { + warn("Finished importing Image file, resulting in asset with an id of: " @ %assetId); + } + } + } + + %file = findNextFileMultiExpr( %currentAddress @ "/*.*" ); + } + + echo("==========================================="); + echo("Finished Importing Image files"); + echo("==========================================="); +} +//============================================================================== + +//============================================================================== +//Terrain Importing +//============================================================================== +function beginTerrainImport() +{ + echo("==========================================="); + echo("Importing Terrain files"); + echo("==========================================="); + + %currentAddress = $ProjectImporter::modulePath; + + //First, wipe out any files inside the folder first + %file = findFirstFileMultiExpr( %currentAddress @ "/*.*", true); + + while( %file !$= "" ) + { + %fileName = fileName(%file); + %fileExt = fileExt(%file); + %filePath = filePath(%file); + if(%fileExt $= ".ter") + { + $ProjectImporter::assetQuery.clear(); + %assetsFound = AssetDatabase.findAssetLooseFile($ProjectImporter::assetQuery, %file); + if(%assetsFound == 0) + { + ProjectImportWizardPage5-->processingText.setText("Processing Terrain Asset file: " @ %file); + Canvas.repaint(); + + warn("Importing Terrain file: " @ %file); + + %moduleDef = AssetBrowser.dirHandler.getModuleFromAddress(%file); + %moduleName = %moduleDef.ModuleID; + %modulePath = %moduleDef.ModulePath; + + //test import config here for forcing type suffixes + %assetName = fileBase(%file); + + %assetPath = %filePath @ "/"; + + %tamlpath = %assetPath @ %assetName @ ".asset.taml"; + + %asset = new TerrainAsset() + { + AssetName = %assetName; + versionId = 1; + terrainFile = %fileName; + }; + + if(TamlWrite(%asset, %tamlpath)) + { + AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath); + + warn("Finished importing Terrain file, resulting in asset with an id of: " @ %moduleName @ ":" @ %assetName); + } + } + } + + %file = findNextFileMultiExpr( %currentAddress @ "/*.*" ); + } + + echo("==========================================="); + echo("Finished Importing Terrain files"); + echo("==========================================="); +} +//============================================================================== + +//============================================================================== +//Sound Importing +//============================================================================== + +//============================================================================== + +//============================================================================== +//Gui Importing +//============================================================================== +function beginGUIImport() +{ + echo("==========================================="); + echo("Importing GUIs"); + echo("==========================================="); + + %currentAddress = $ProjectImporter::modulePath; + + //First, wipe out any files inside the folder first + %file = findFirstFileMultiExpr( %currentAddress @ "/*.*", true); + + while( %file !$= "" ) + { + %fileName = fileName(%file); + %fileExt = fileExt(%file); + %filePath = filePath(%file); + if(%fileExt $= ".gui") + { + $ProjectImporter::assetQuery.clear(); + %assetsFound = AssetDatabase.findAssetLooseFile($ProjectImporter::assetQuery, %file); + if(%assetsFound == 0) + { + ProjectImportWizardPage5-->processingText.setText("Processing GUI Asset file: " @ %file); + Canvas.repaint(); + + if ( $ProjectImporter::fileObject.openForRead( %file ) ) + { + while ( !$ProjectImporter::fileObject.isEOF() ) + { + %line = $ProjectImporter::fileObject.readLine(); + + if(strIsMatchExpr("*new*(*)*", %line)) + { + %start = strpos(%line, "new "); + %end = strpos(%line, "(", %start); + + if(%start != -1 && %end != -1) + { + %className = getSubStr(%line, %start + 4, %end-%start-4); + } + + %nameEnd = strpos(%line, ")", %end); + + %objectName = getSubStr(%line, %end+1, %nameEnd-%end-1); + + if(%objectName !$= "") + { + if(strpos(%objectName, ":") != -1) + { + %objectName = getSubStr(%objectName, 0, strpos(%objectName, ":")); + } + } + + processGUIntoAsset(%objectName, %file); + break; + } + } + } + + $ProjectImporter::fileObject.close(); + } + } + + %file = findNextFileMultiExpr( %currentAddress @ "/*.*" ); + } + + echo("==========================================="); + echo("Finished Importing GUIs"); + echo("==========================================="); +} + +function processGUIntoAsset(%guiName, %file) +{ + warn("Processing GUI into asset: " @ %guiName @ ", file: " @ %file); + + %filePath = filePath(%file); + %moduleDef = AssetBrowser.dirHandler.getModuleFromAddress(%file); + %moduleName = %moduleDef.ModuleId; + %modulePath = %moduleDef.ModulePath; + + %assetName = %guiName; + + %assetPath = %filePath @ "/"; + + %tamlpath = %assetPath @ %assetName @ ".asset.taml"; + + %scriptFile = ""; + if(isFile(%filePath @ "/" @ %fileName @ ".cs")) + { + %scriptFile = %fileName @ ".cs"; + } + + %asset = new GUIAsset() + { + AssetName = %assetName; + versionId = 1; + scriptFile = %scriptFile; + guiFile = fileName(%file); + }; + + TamlWrite(%asset, %tamlpath); + + AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath); + + return %tamlpath; +} +//============================================================================== + +//============================================================================== +//Misc Object Type Converion +//============================================================================== + +//============================================================================== + +//============================================================================== +//PostFX conversion +//============================================================================== +function beginPostFXImport() +{ + echo("==========================================="); + echo("Importing PostFXs"); + echo("==========================================="); + + %count = PostFXManager.Count(); + for(%i=0; %i < %count; %i++) + { + %postEffect = PostFXManager.getKey(%i); + + if(isObject(%postEffect)) + { + echo("Processing import of PostFX: " @ %postEffect.getName()); + + //$ProjectImporter::persistMgr.setDirty(%gui); + } + } + + //$ProjectImporter::persistMgr.saveDirty(); + + echo("==========================================="); + echo("Finished Importing PostFXs"); + echo("==========================================="); +} +//============================================================================== + +//============================================================================== +//Level Importing +//============================================================================== +function beginLevelImport() +{ + echo("==========================================="); + echo("Importing Level files"); + echo("==========================================="); + + %currentAddress = $ProjectImporter::modulePath; + + //First, wipe out any files inside the folder first + %file = findFirstFileMultiExpr( %currentAddress @ "/*.*", true); + + while( %file !$= "" ) + { + %fileName = fileName(%file); + %fileExt = fileExt(%file); + %filePath = filePath(%file); + %fileBase = fileBase(%file); + + if(%fileExt $= ".mis") + { + %newAsset = false; + + $ProjectImporter::assetQuery.clear(); + %assetsFound = AssetDatabase.findAssetLooseFile($ProjectImporter::assetQuery, %file); + if(%assetsFound == 0) + { + ProjectImportWizardPage5-->processingText.setText("Processing Level Asset file: " @ %file); + Canvas.repaint(); + + warn("Importing Level file: " @ %file); + + %moduleName = AssetBrowser.dirHandler.getModuleFromAddress(%file).ModuleId; + + %assetName = %fileBase; + + %assetName = strreplace(%assetName, " ", ""); + + if(AssetDatabase.isDeclaredAsset(%moduleName @ ":" @ %assetName)) + { + warn("Legacy Project Importer - trying to process a level into an asset that already exists"); + return false; + } + + %assetPath = %filePath @ "/"; + %tamlpath = %assetPath @ %assetName @ ".asset.taml"; + + %asset = new LevelAsset() + { + AssetName = %assetName; + versionId = 1; + levelFile = %fileName; + levelName = %assetName; + }; + + %newAsset = true; + } + else + { + %assetId = $ProjectImporter::assetQuery.getAsset(0); + %asset = AssetDatabase.acquireAsset(%assetId); + %tamlpath = AssetDatabase.getAssetFilePath(%assetId); + } + + //Time to process the associated files + if(isFile(%filePath @ "/" @ %fileBase @ ".decal")) + { + %asset.decalsFile = %fileBase @ ".decal"; + } + if(isFile(%filePath @ "/" @ %fileBase @ ".forest")) + { + %asset.forestFile = %fileBase @ ".forest"; + } + if(isFile(%filePath @ "/" @ %fileBase @ ".nav")) + { + %asset.decalsFile = %fileBase @ ".nav"; + } + if(isFile(%filePath @ "/" @ %fileBase @ ".postfx.preset")) + { + %asset.postFXPresetFile = %fileBase @ ".postfx.preset"; + } + + if(isFile(%filePath @ "/" @ %fileBase @ ".png")) + %previewImageAsset = ImageAsset::getAssetIdByFilename(%filePath @ "/" @ %fileBase @ ".png"); + else if(isFile(%filePath @ "/" @ %fileBase @ "_preview.png")) + %previewImageAsset = ImageAsset::getAssetIdByFilename(%filePath @ "/" @ %fileBase @ "_preview.png"); + else if(isFile(%filePath @ "/" @ %fileBase @ ".dds")) + %previewImageAsset = ImageAsset::getAssetIdByFilename(%filePath @ "/" @ %fileBase @ ".dds"); + else if(isFile(%filePath @ "/" @ %fileBase @ "_preview.dds")) + %previewImageAsset = ImageAsset::getAssetIdByFilename(%filePath @ "/" @ %fileBase @ "_preview.dds"); + else if(isFile(%filePath @ "/" @ %fileBase @ ".jpg")) + %previewImageAsset = ImageAsset::getAssetIdByFilename(%filePath @ "/" @ %fileBase @ ".jpg"); + else if(isFile(%filePath @ "/" @ %fileBase @ "_preview.jpg")) + %previewImageAsset = ImageAsset::getAssetIdByFilename(%filePath @ "/" @ %fileBase @ "_preview.jpg"); + else if(isFile(%filePath @ "/" @ %fileBase @ ".jpeg")) + %previewImageAsset = ImageAsset::getAssetIdByFilename(%filePath @ "/" @ %fileBase @ ".jpeg"); + else if(isFile(%filePath @ "/" @ %fileBase @ "_preview.jpeg")) + %previewImageAsset = ImageAsset::getAssetIdByFilename(%filePath @ "/" @ %fileBase @ "_preview.jpeg"); + + if(%previewImageAsset !$= "") + { + %asset.addAssetDependencyField(previewImageAsset, %previewImageAsset); + } + + TamlWrite(%asset, %tamlpath); + + if(%newAsset) + { + %moduleDef = ModuleDatabase.findModule(%moduleName, 1); + %success = AssetDatabase.addDeclaredAsset(%moduleDef, %tamlpath); + } + else + { + %asset.refreshAsset(); + } + } + + %file = findNextFileMultiExpr( %currentAddress @ "/*.*" ); + } + + echo("==========================================="); + echo("Finished Importing Level files"); + echo("==========================================="); +} +//============================================================================== + +function deleteAssetDefinitions() +{ + %dlg = new OpenFolderDialog() + { + Title = "Select Folder"; + Filters = %filter; + DefaultFile = "data/"; + ChangePath = false; + MustExist = true; + MultipleFiles = false; + }; + + if(%dlg.Execute()) + { + %path = makeFullPath(%dlg.FileName); + ProjectImporter::deleteAssetDefinitions(%path); + } + + %dlg.delete(); +} + +function ProjectImporter::deleteAssetDefinitions(%targetFolder) +{ + if(%targetFolder $= "") + { + toolsMessageBoxOK("Must select valid folder", "You must select a valid project folder.", ""); + return; + } + + $deleteAssetDefsTargetFolder = %targetFolder; + toolsMessageBoxOKCancel("Delete Asset Definitions", "This will delete all asset definitions in the folder " @ %targetFolder @ ". Do you wish to continue?", "doDeleteAssetDefinitions();", ""); +} + +function doDeleteAssetDefinitions() +{ + echo("==========================================="); + echo("Deleting Asset Definitions"); + echo("==========================================="); + + %currentAddress = $deleteAssetDefsTargetFolder; + + //First, wipe out any files inside the folder first + %file = findFirstFileMultiExpr( %currentAddress @ "/*.asset.taml", true); + + while( %file !$= "" ) + { + %fileName = fileName(%file); + %fileExt = fileExt(%file); + %filePath = filePath(%file); + if(endsWith(%file, ".asset.taml")) + { + if(fileDelete(%file)) + { + echo("File: " @ %file @ " deleted successfully."); + } + else + { + error("File: " @ %file @ " failed to delete."); + } + } + + %file = findNextFileMultiExpr( %currentAddress @ "/*.asset.taml" ); + } + + echo("==========================================="); + echo("Finished Deleting Asset Definitions"); + echo("==========================================="); +} + +function scanForDuplicateFiles(%toTestFile) +{ + echo("==========================================="); + echo("Scanning for duplicate files!"); + echo("==========================================="); + + //First, wipe out any files inside the folder first + %file = findFirstFileMultiExpr( "*/*.*", true); + + while( %file !$= "" ) + { + //We only really care about content files for this + if(!endsWith(%file, "dts") && + !endsWith(%file, "dae") && + !endsWith(%file, "fbx") && + !endsWith(%file, "ter") && + !endsWith(%file, "png") && + !endsWith(%file, "jpg") && + !endsWith(%file, "jpeg") && + !endsWith(%file, "dds")) + { + %file = findNextFileMultiExpr( "*/*.*" ); + continue; + } + + %filename = fileName(%file); + %fileExt = fileExt(%file); + %filePath = filePath(%file); + + if(%toTestFile $= "") + { + scanForDuplicateFiles(%file); + } + else + { + %testFilename = fileName(%toTestFile); + %testFileExt = fileExt(%toTestFile); + %testFilePath = filePath(%toTestFile); + + if(%testFilename $= %filename && %testFileExt $= %fileExt) + { + //name matches, lets double check it'd actually cause a collision via the module it'd be in + %moduleName = AssetBrowser.dirHandler.getModuleFromAddress(%file).ModuleId; + %testModuleName = AssetBrowser.dirHandler.getModuleFromAddress(%testFilename).ModuleId; + + if(%moduleName !$= "" && %testModuleName !$= "" && %moduleName $= %testModuleName) + { + //report the probable duplicate + error("Probable duplicate asset detected!"); + error("Files: " @ %file @ " and " @ %toTestFile @ " have matching names and exist within the same module!"); + } + } + } + + %file = findNextFileMultiExpr( "*/*.*" ); + } +} \ No newline at end of file diff --git a/Templates/BaseGame/game/tools/resources/ReflectProbeSphere.asset.taml b/Templates/BaseGame/game/tools/resources/ReflectProbeSphere.asset.taml new file mode 100644 index 000000000..dfdd62395 --- /dev/null +++ b/Templates/BaseGame/game/tools/resources/ReflectProbeSphere.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/resources/ReflectProbeSphere.tscript b/Templates/BaseGame/game/tools/resources/ReflectProbeSphere.tscript new file mode 100644 index 000000000..649009a49 --- /dev/null +++ b/Templates/BaseGame/game/tools/resources/ReflectProbeSphere.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(ReflectProbeSpheredae) +{ + baseShapeAsset = "ToolsModule:ReflectProbeSphere"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/tools/resources/checkerboard_image.asset.taml b/Templates/BaseGame/game/tools/resources/checkerboard_image.asset.taml new file mode 100644 index 000000000..5d892650a --- /dev/null +++ b/Templates/BaseGame/game/tools/resources/checkerboard_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/riverEditor/RiverEditorGui, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/riverEditor/RiverEditorGui, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..6a6f455d2 --- /dev/null +++ b/Templates/BaseGame/game/tools/riverEditor/RiverEditorGui, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/riverEditor/RiverEditorGui.gui b/Templates/BaseGame/game/tools/riverEditor/RiverEditorGui.gui index 1a6831489..4d4812152 100644 --- a/Templates/BaseGame/game/tools/riverEditor/RiverEditorGui.gui +++ b/Templates/BaseGame/game/tools/riverEditor/RiverEditorGui.gui @@ -90,7 +90,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "World Editor"; hovertime = "1000"; - bitmap = "tools/gui/images/lock"; + bitmapAsset = "ToolsModule:lock_n_image"; buttonType = "ToggleButton"; groupNum = "-1"; text = ""; @@ -114,7 +114,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "World Editor"; hovertime = "1000"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; buttonType = "PushButton"; groupNum = "-1"; text = ""; diff --git a/Templates/BaseGame/game/tools/riverEditor/RiverEditorSettingsTab,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/riverEditor/RiverEditorSettingsTab,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..24fecfe99 --- /dev/null +++ b/Templates/BaseGame/game/tools/riverEditor/RiverEditorSettingsTab,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..e6b9a0e53 --- /dev/null +++ b/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar.gui b/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar.gui index 141e577d1..358225ce8 100644 --- a/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar.gui +++ b/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar.gui @@ -52,7 +52,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; toolTip = "Show Spline"; - bitmap = "tools/worldEditor/images/road-river/menubar/show-spline"; + bitmapAsset = "ToolsModule:show_spline_n_image"; groupNum = "7"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -76,7 +76,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; toolTip = "Show Wireframe"; - bitmap = "tools/worldEditor/images/road-river/menubar/show-wireframe"; + bitmapAsset = "ToolsModule:menubar_show_wireframe_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -99,7 +99,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; toolTip = "Show River Texture"; - bitmap = "tools/worldEditor/images/road-river/menubar/show-texture"; + bitmapAsset = "ToolsModule:show_texture_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -181,7 +181,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; }; }; new GuiControl(RiverDefaultDepthTextEditContainer) { @@ -259,7 +259,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; }; }; }; @@ -320,4 +320,4 @@ new GuiMouseEventCtrl(RiverDefaultDepthSliderCtrlContainer, EditorGuiGroup) { ticks = "0"; value = "10"; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/riverEditor/main.tscript b/Templates/BaseGame/game/tools/riverEditor/main.tscript index 19070038f..bbc85b926 100644 --- a/Templates/BaseGame/game/tools/riverEditor/main.tscript +++ b/Templates/BaseGame/game/tools/riverEditor/main.tscript @@ -76,7 +76,7 @@ function RiverEditorPlugin::onWorldEditorStartup( %this ) // Add ourselves to the ToolsToolbar %tooltip = "River Editor (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "RiverEditorPlugin", "RiverEditorPalette", expandFilename("tools/worldEditor/images/toolbar/river-editor"), %tooltip ); + EditorGui.addToToolsToolbar( "RiverEditorPlugin", "RiverEditorPalette", "ToolsModule:river_editor_n_image", %tooltip ); //connect editor windows GuiWindowCtrl::attach( RiverEditorOptionsWindow, RiverEditorTreeWindow); diff --git a/Templates/BaseGame/game/tools/roadEditor/RoadEditorGui.asset.taml b/Templates/BaseGame/game/tools/roadEditor/RoadEditorGui.asset.taml new file mode 100644 index 000000000..ad9f237c3 --- /dev/null +++ b/Templates/BaseGame/game/tools/roadEditor/RoadEditorGui.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/roadEditor/RoadEditorGui.gui b/Templates/BaseGame/game/tools/roadEditor/RoadEditorGui.gui index 7f9eba0f6..9348f1559 100644 --- a/Templates/BaseGame/game/tools/roadEditor/RoadEditorGui.gui +++ b/Templates/BaseGame/game/tools/roadEditor/RoadEditorGui.gui @@ -91,7 +91,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "World Editor"; hovertime = "1000"; - bitmap = "tools/gui/images/lock"; + bitmapAsset = "ToolsModule:lock_n_image"; buttonType = "ToggleButton"; groupNum = "-1"; text = ""; @@ -115,7 +115,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "World Editor"; hovertime = "1000"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; buttonType = "PushButton"; groupNum = "-1"; text = ""; diff --git a/Templates/BaseGame/game/tools/roadEditor/RoadEditorSettingsTab,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/roadEditor/RoadEditorSettingsTab,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..9eef6d2fb --- /dev/null +++ b/Templates/BaseGame/game/tools/roadEditor/RoadEditorSettingsTab,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.asset.taml b/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.asset.taml new file mode 100644 index 000000000..76a495849 --- /dev/null +++ b/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.gui b/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.gui index bfa2e0513..e43257e16 100644 --- a/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.gui +++ b/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.gui @@ -52,7 +52,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; toolTip = "Show Spline"; - bitmap = "tools/worldEditor/images/road-river/menubar/show-spline"; + bitmapAsset = "ToolsModule:show_spline_n_image"; groupNum = "7"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -75,7 +75,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; toolTip = "Show Wireframe"; - bitmap = "tools/worldEditor/images/road-river/menubar/show-wireframe"; + bitmapAsset = "ToolsModule:menubar_show_wireframe_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -98,7 +98,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; toolTip = "Show Road Texture"; - bitmap = "tools/worldEditor/images/road-river/menubar/show-texture"; + bitmapAsset = "ToolsModule:show_texture_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -180,7 +180,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; }; }; /*new GuiTextEditSliderCtrl(RoadEditorDefaultWidthSlider) { @@ -270,4 +270,4 @@ new GuiMouseEventCtrl(RoadDefaultWidthSliderCtrlContainer, EditorGuiGroup) { ticks = "0"; value = "10"; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/roadEditor/main.tscript b/Templates/BaseGame/game/tools/roadEditor/main.tscript index f54976c62..98fd44286 100644 --- a/Templates/BaseGame/game/tools/roadEditor/main.tscript +++ b/Templates/BaseGame/game/tools/roadEditor/main.tscript @@ -75,7 +75,7 @@ function RoadEditorPlugin::onWorldEditorStartup( %this ) // Add ourselves to the ToolsToolbar %tooltip = "Road Editor (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "RoadEditorPlugin", "RoadEditorPalette", expandFilename("tools/worldEditor/images/toolbar/road-path-editor"), %tooltip ); + EditorGui.addToToolsToolbar( "RoadEditorPlugin", "RoadEditorPalette", "ToolsModule:road_path_editor_n_image", %tooltip ); //connect editor windows GuiWindowCtrl::attach( RoadEditorOptionsWindow, RoadEditorTreeWindow); diff --git a/Templates/BaseGame/game/tools/settings.xml b/Templates/BaseGame/game/tools/settings.xml index 0addb2094..225b2d67e 100644 --- a/Templates/BaseGame/game/tools/settings.xml +++ b/Templates/BaseGame/game/tools/settings.xml @@ -1,268 +1,496 @@ - - Small + + Small - - TestConfig - 1 - <AssetType>/<SpecialAssetTag>/ - <AssetType>/ - <AssetType>/OtherFolder/ - <AssetType>/<AssetName>/ - <AssetType>/ - <AssetType>/<SpecialAssetTag>/ - <AssetType>/ - <AssetType>/ - <AssetType>/ + + TestConfig + 1 + <AssetType>/<SpecialAssetTag>/ + <AssetType>/ + <AssetType>/OtherFolder/ + <AssetType>/<AssetName>/ + <AssetType>/ + <AssetType>/<SpecialAssetTag>/ + <AssetType>/ + <AssetType>/ + <AssetType>/ - - DefaultImportConfig - 1 - - 1 + + DefaultImportConfig + 1 + + 1 + 1 + 1 - - 100 - 0.8 - 0.8 - 1 - 0 - 15 - 0 - - 1 - 255 255 255 20 - 1 1 1 - 500 - 0 - 0 - 0 + + 100 + 0.8 + 0.8 + 1 + 0 + 15 + 0 + + 1 + 255 255 255 20 + 1 1 1 + 500 + 0 + 0 + 0 - - Grid_512_Orange + + Prototyping:WallOrange - - 1 + + 1 - - tools/RPGDialogEditor/gui - 1024 768 - - 0 - 0 - 0 + + tools/RPGDialogEditor/gui + 1024 768 + + 0 + 0 + 0 - - ../../../Documentation/Official Documentation.html - ../../../Documentation/Torque 3D - Script Manual.chm - http://www.garagegames.com/products/torque-3d/documentation/user + + ../../../Documentation/Official Documentation.html + ../../../Documentation/Torque 3D - Script Manual.chm + http://www.garagegames.com/products/torque-3d/documentation/user - - Categorized + + Categorized - - 1 - 1 + + 1 + 1 - - 0 + + 0 - - 2 - 0 - 8 - 1 - 1 - 1 - 1 - 1 + + 2 + 0 + 8 + 1 + 1 + 1 + 1 + 1 - - data/FPSGameplay/levels - - - 25 + + data/FPSGameplay/levels + + + 25 - - 25 + + 25 - - 25 + + 25 - - 25 + + 25 - - 5 + + 5 - - 0 0 1 - 10 - 255 0 0 255 - 0 255 0 255 - DefaultRoadMaterialOther - DefaultRoadMaterialTop + + 0 0 1 + 10 + 255 0 0 255 + 0 255 0 255 + DefaultRoadMaterialOther + DefaultRoadMaterialTop - - 1 - AIPlayer - DefaultPlayerData + + 1 + AIPlayer + DefaultPlayerData - - 5 - 0 0 1 - 10 - 255 255 255 255 - 255 0 0 255 - 0 255 0 255 + + 5 + 0 0 1 + 10 + 255 255 255 255 + 255 0 0 255 + 0 255 0 255 - - 10 - 255 255 255 255 - DefaultDecalRoadMaterial - 0 255 0 255 + + 10 + 255 255 255 255 + DefaultDecalRoadMaterial + 0 255 0 255 - - 1 - 0 0 0 100 - 40 40 - 0.1 - 1 - 0 - 1 - 0 - 1 - 1 - 1 - 180 180 180 255 - 45 - 135 - 255 255 255 255 + + 1 + 0 0 0 100 + 40 40 + 0.1 + 1 + 0 + 1 + 0 + 1 + 1 + 1 + 180 180 180 255 + 45 + 135 + 255 255 255 255 - - lowerHeight - - 10 - 1 - 1 - 100 - 90 - 0 - 0.1 - 1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000 - 1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000 - 50 + + lowerHeight + + 10 + 1 + 1 + 100 + 90 + 0 + 0.1 + 1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000 + 1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000 + 50 - - 1 - 40 40 - 1 - ellipse - 40 40 + + 1 + 40 40 + 1 + ellipse + 40 40 - - 17 16 15 255 - 96 94 92 255 - 50 49 48 255 - 59 58 57 255 - 72 70 68 255 - 100 98 96 255 - 178 175 172 255 - 234 232 230 255 - 120 120 120 255 - 255 255 255 255 - 50 49 48 255 - 236 234 232 255 - 37 36 35 255 - 50 49 48 255 - 59 58 57 255 - 43 43 43 255 - 72 70 68 255 - 255 255 255 255 - 32 31 30 255 + + 17 16 15 255 + 96 94 92 255 + 50 49 48 255 + 59 58 57 255 + 72 70 68 255 + 100 98 96 255 + 178 175 172 255 + 234 232 230 255 + 120 120 120 255 + 255 255 255 255 + 50 49 48 255 + 236 234 232 255 + 37 36 35 255 + 50 49 48 255 + 59 58 57 255 + 43 43 43 255 + 72 70 68 255 + 255 255 255 255 + 32 31 30 255 - - WorldEditorInspectorPlugin - 6 - screenCenter - Modern - 0 - 1 - FPSGameplay:EmptyLevel - 50 - 1 - FPSGameplay:EmptyLevel,FPSGameplay:EmptyTerrain,pbr:PbrMatTestLevel,TTR:DasBootLevel - Blank Level - AssetWork_Debug.exe - 40 - - 255 255 0 255 - 255 255 255 255 - 0 255 0 255 - 0 0 255 255 - 255 0 0 255 - 100 100 100 255 - 255 255 0 255 + + WorldEditorInspectorPlugin + 6 + screenCenter + Modern + 0 + 1 + FPSGameplay:EmptyLevel + 4.60158 + 1 + FPSGameplay:EmptyLevel,FPSGameplay:EmptyTerrain,pbr:PbrMatTestLevel,TTR:DasBootLevel + Blank Level + AssetWork_Debug.exe + 40 + + 255 255 0 255 + 255 255 255 255 + 0 255 0 255 + 0 0 255 255 + 255 0 0 255 + 100 100 100 255 + 255 255 0 255 - - ../../../Documentation/Official Documentation.html - ../../../Documentation/Torque 3D - Script Manual.chm - http://www.garagegames.com/products/torque-3d/documentation/user - http://www.garagegames.com/products/torque-3d/forums + + ../../../Documentation/Official Documentation.html + ../../../Documentation/Torque 3D - Script Manual.chm + http://www.garagegames.com/products/torque-3d/documentation/user + http://www.garagegames.com/products/torque-3d/forums - - 102 102 102 100 - 51 51 51 100 - 255 255 255 100 - 1 - 0 + + 102 102 102 100 + 51 51 51 100 + 255 255 255 100 + 1 + 0 - - tools/worldEditor/images/DefaultHandle - tools/worldEditor/images/LockedHandle - tools/worldEditor/images/SelectHandle + + tools/worldEditor/images/DefaultHandle + tools/worldEditor/images/LockedHandle + tools/worldEditor/images/SelectHandle - - Classic + + Classic - - 1 - 0 - 20 - 255 - 8 + + 1 + 0 + 20 + 255 + 8 - - 1 - 1 - 1 - 1 - 1 + + 1 + 1 + 1 + 1 + 1 - - 50 50 50 255 - 48 48 48 255 - 180 180 180 255 - 215 215 215 255 - 255 255 255 255 + + 50 50 50 255 + 48 48 48 255 + 180 180 180 255 + 215 215 215 255 + 255 255 255 255 - - 0 - 100 - 1 - 1 - 0.01 - 0 - 0 - 2 - 0 + + 0 + 100 + 1 + 1 + 0.01 + 0 + 0 + 2 + 0 diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/gui/.asset.taml new file mode 100644 index 000000000..8bf949aa2 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/Profiles.ed.tscript b/Templates/BaseGame/game/tools/shapeEditor/gui/Profiles.ed.tscript index 74a871479..9b7385e6b 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/Profiles.ed.tscript +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/Profiles.ed.tscript @@ -48,12 +48,12 @@ singleton GuiControlProfile(GuiShapeEdTextListProfile : ToolsGuiTextListProfile) singleton GuiControlProfile(GuiShapeEdRolloutProfile : GuiInspectorRolloutProfile0) { - bitmap = "tools/editorClasses/gui/images/rollout"; + bitmapAsset = "ToolsModule:rollout_image"; category = "Editor"; }; singleton GuiControlProfile( GuiShapeEdTransitionSliderProfile ) { - bitmap = "tools/shapeEditor/images/transition_slider"; + bitmapAsset = "ToolsModule:transition_slider_image"; category = "Core"; }; diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEdAdvancedWindow, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEdAdvancedWindow, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..89f64f65f --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEdAdvancedWindow, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEdAnimWindow.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEdAnimWindow.asset.taml new file mode 100644 index 000000000..865109caf --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEdAnimWindow.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEdPropWindow.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEdPropWindow.asset.taml new file mode 100644 index 000000000..fc1c7b548 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEdPropWindow.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorSettingsTab,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorSettingsTab,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..4cdac65da --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorSettingsTab,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorToolbar, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorToolbar, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..94aa65a90 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorToolbar, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorToolbar.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorToolbar.ed.gui index ccaaf03fb..8d5ab47d6 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorToolbar.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorToolbar.ed.gui @@ -52,7 +52,7 @@ position = "94 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -70,7 +70,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Show grid"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/show-grid"; + bitmapAsset = "ToolsModule:show_grid_n_image"; text = ""; groupNum = "-1"; buttonType = "ToggleButton"; @@ -92,7 +92,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Fit Camera to Shape (F)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/fit-selection"; + bitmapAsset = "ToolsModule:fit_selection_n_image"; text = ""; groupNum = "-1"; buttonType = "PushButton"; @@ -114,7 +114,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Orbit the selected node"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/orbit-cam"; + bitmapAsset = "ToolsModule:orbit_cam_n_image"; text = ""; groupNum = "-1"; buttonType = "ToggleButton"; @@ -125,7 +125,7 @@ position = "202 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -143,7 +143,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Show Nodes (N)"; hovertime = "1000"; - bitmap = "tools/shapeEditor/images/shownodes_btn"; + bitmapAsset = "ToolsModule:shownodes_btn_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -164,7 +164,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Toggle shape transparency in the preview window (T)"; hovertime = "1000"; - bitmap = "tools/shapeEditor/images/ghost_btn"; + bitmapAsset = "ToolsModule:ghost_btn_n_image"; buttonType = "ToggleButton"; groupNum = "0"; useMouseEvents = "0"; @@ -185,7 +185,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Toggle shape wireframe in the preview window (R)"; hovertime = "1000"; - bitmap = "tools/shapeEditor/images/show-wireframe"; + bitmapAsset = "ToolsModule:show_wireframe_n_image"; buttonType = "ToggleButton"; groupNum = "0"; useMouseEvents = "0"; @@ -195,7 +195,7 @@ position = "309 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -214,7 +214,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Toggle shape bounding box in the preview window"; hovertime = "1000"; - bitmap = "tools/shapeEditor/images/object-bounds"; + bitmapAsset = "ToolsModule:object_bounds_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -236,7 +236,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Toggle selected object bounding box in the preview window"; hovertime = "1000"; - bitmap = "tools/shapeEditor/images/object-fit-bounds"; + bitmapAsset = "ToolsModule:object_fit_bounds_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -258,7 +258,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Toggle rendering of collision meshes in the preview window"; hovertime = "1000"; - bitmap = "tools/shapeEditor/images/collision-shape"; + bitmapAsset = "ToolsModule:collision_shape_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -268,7 +268,7 @@ position = "415 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiBitmapButtonCtrl() { internalName = "showAdvanced"; @@ -286,7 +286,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Toggle Advanced Properties Window"; hovertime = "1000"; - bitmap = "tools/shapeEditor/images/detail-levels_btn"; + bitmapAsset = "ToolsModule:detail_levels_btn_n_image"; buttonType = "ToggleButton"; groupNum = "0"; useMouseEvents = "0"; diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui index 405ce3ebc..bd76ee516 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui @@ -157,7 +157,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapCtrl(){ - bitmap = "tools/gui/images/inactive-overlay"; + bitmapAsset = "ToolsModule:inactive_overlay_image"; position = "57 19"; Extent = "122 20"; tooltip = "Levels needs to be selected to enable the detail level slider"; @@ -690,7 +690,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapCtrl(){ - bitmap = "tools/gui/images/inactive-overlay"; + bitmapAsset = "ToolsModule:inactive_overlay_image"; position = "4 18"; Extent = "193 64"; tooltip = "Imposters must be enabled, and an imposter detail level selected to edit these properties"; @@ -846,7 +846,7 @@ profile = "ToolsGuiTextProfile"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -865,7 +865,7 @@ isContainer = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/new"; + bitmapAsset = "ToolsModule:new_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -989,7 +989,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/shapeEditor/images/playfwd_btn"; + bitmapAsset = "ToolsModule:playfwd_btn_n_image"; groupNum = "0"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -1171,7 +1171,7 @@ }; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -1190,7 +1190,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/new"; + bitmapAsset = "ToolsModule:new_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -1229,7 +1229,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/shapeEditor/images/playbkwd_btn"; + bitmapAsset = "ToolsModule:playbkwd_btn_n_image"; groupNum = "0"; buttonType = "RadioButton"; useMouseEvents = "0"; @@ -1250,7 +1250,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/shapeEditor/images/pause_btn"; + bitmapAsset = "ToolsModule:pause_btn_n_image"; groupNum = "0"; buttonType = "RadioButton"; useMouseEvents = "0"; @@ -1271,7 +1271,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/shapeEditor/images/playfwd_btn"; + bitmapAsset = "ToolsModule:playfwd_btn_n_image"; groupNum = "0"; buttonType = "RadioButton"; useMouseEvents = "0"; @@ -1747,7 +1747,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/inactive-overlay"; + bitmapAsset = "ToolsModule:inactive_overlay_image"; position = "0 47"; extent = "199 175"; horizSizing = "right"; diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui index 8785db315..624214dea 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui @@ -207,7 +207,7 @@ groupNum = "0"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/shapeEditor/images/back_btn"; + bitmapAsset = "ToolsModule:back_btn_n_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -227,7 +227,7 @@ groupNum = "0"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/shapeEditor/images/stepback_btn"; + bitmapAsset = "ToolsModule:stepback_btn_n_image"; internalName = "stepBkwdBtn"; }; new GuiControl() { @@ -263,7 +263,7 @@ groupNum = "0"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/shapeEditor/images/playbkwd_btn"; + bitmapAsset = "ToolsModule:playbkwd_btn_n_image"; }; new GuiBitmapButtonCtrl() { internalName = "pauseBtn"; @@ -284,7 +284,7 @@ groupNum = "0"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/shapeEditor/images/pause_btn"; + bitmapAsset = "ToolsModule:pause_btn_n_image"; }; new GuiBitmapButtonCtrl() { internalName = "playFwdBtn"; @@ -305,7 +305,7 @@ groupNum = "0"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/shapeEditor/images/playfwd_btn"; + bitmapAsset = "ToolsModule:playfwd_btn_n_image"; }; }; new GuiBitmapButtonCtrl() { @@ -326,7 +326,7 @@ groupNum = "0"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/shapeEditor/images/stepfwd_btn"; + bitmapAsset = "ToolsModule:stepfwd_btn_n_image"; internalName = "stepFwdBtn"; }; new GuiBitmapButtonCtrl() { @@ -347,7 +347,7 @@ groupNum = "0"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/shapeEditor/images/fwd_btn"; + bitmapAsset = "ToolsModule:fwd_btn_n_image"; }; new GuiButtonCtrl() { canSaveDynamicFields = "0"; @@ -388,7 +388,7 @@ groupNum = "0"; buttonType = "ToggleButton"; useMouseEvents = "0"; - bitmap = "tools/shapeEditor/images/pingpong_btn"; + bitmapAsset = "ToolsModule:pingpong_btn_n_image"; }; new GuiTextEditCtrl() { internalName = "timeScale"; @@ -417,7 +417,7 @@ position = "39 0"; Extent = "8 13"; MinExtent = "1 1"; - bitmap = "tools/shapeEditor/images/seq_bar-in"; + bitmapAsset = "ToolsModule:seq_bar_in_n_image"; ToolTip = "Set the In Point to the Current Frame"; Command = "ShapeEdSequences.onEditSeqInOut(\"in\", ShapeEdSeqSlider.getValue());"; }; @@ -429,7 +429,7 @@ position = "765 0"; Extent = "8 13"; MinExtent = "1 1"; - bitmap = "tools/shapeEditor/images/seq_bar-out"; + bitmapAsset = "ToolsModule:seq_bar_out_n_image"; ToolTip = "Set the Out Point to the Current Frame"; Command = "ShapeEdSequences.onEditSeqInOut(\"out\", ShapeEdSeqSlider.getValue());"; }; diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui index 52d581366..bbd266004 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui @@ -430,7 +430,7 @@ groupNum = "0"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/new"; + bitmapAsset = "ToolsModule:new_n_image"; }; new GuiBitmapButtonCtrl() { internalName = "deleteTriggerBtn"; @@ -451,7 +451,7 @@ groupNum = "0"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; }; // Trigger list new GuiControl() { @@ -617,7 +617,7 @@ treeView = ShapeEdNodeTreeView; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/clear-icon"; + bitmapAsset = "ToolsModule:clear_icon_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -838,7 +838,7 @@ buttonType = "RadioButton"; useMouseEvents = "0"; buttonMargin = "0 4"; - iconBitmap = "tools/gui/images/menubar/world-transform_n"; + bitmapAsset = "ToolsModule:world_transform_n_image"; textMargin = "25"; }; new GuiIconButtonCtrl() { @@ -862,7 +862,7 @@ buttonType = "RadioButton"; useMouseEvents = "0"; buttonMargin = "0 4"; - iconBitmap = "tools/gui/images/menubar/object-transform_n"; + bitmapAsset = "ToolsModule:object_transform_n_image"; textMargin = "26"; }; new GuiTextEditCtrl() { @@ -1137,7 +1137,7 @@ internalName = "objectNode"; }; new GuiBitmapCtrl(){ - bitmap = "tools/gui/images/inactive-overlay"; + bitmapAsset = "ToolsModule:inactive_overlay_image"; position = "4 45"; extent = "193 42"; tooltip = "A mesh must be selected to edit these properties"; @@ -1353,7 +1353,7 @@ buttonType = "PushButton"; useMouseEvents = "0"; buttonMargin = "0 4"; - iconBitmap = "tools/worldEditor/images/toolbar/material-editor_n"; + bitmapAsset = "ToolsModule:material_editor_n_image"; textMargin = "25"; }; new GuiCheckBoxCtrl() { @@ -1393,7 +1393,7 @@ groupNum = "0"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/save-icon"; + bitmapAsset = "ToolsModule:save_icon_n_image"; }; new GuiBitmapButtonCtrl() { internalName = "newBtn"; @@ -1414,7 +1414,7 @@ groupNum = "0"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/new"; + bitmapAsset = "ToolsModule:new_n_image"; }; new GuiBitmapButtonCtrl() { internalName = "deleteBtn"; @@ -1435,7 +1435,7 @@ groupNum = "0"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; }; }; //--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui index eb7a3225a..71cc4339e 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui @@ -213,7 +213,7 @@ groupNum = "0"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/folderUp"; + bitmapAsset = "ToolsModule:folderUp_image"; }; new GuiPopUpMenuCtrl(ShapeEdSelectMenu) { canSaveDynamicFields = "0"; diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/back_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/back_btn_d_image.asset.taml new file mode 100644 index 000000000..3f4b36a32 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/back_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/back_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/back_btn_h_image.asset.taml new file mode 100644 index 000000000..5bd49dcbc --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/back_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/back_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/back_btn_n_image.asset.taml new file mode 100644 index 000000000..edfe0ee90 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/back_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/collision_shape_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/collision_shape_d_image.asset.taml new file mode 100644 index 000000000..00bbcb637 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/collision_shape_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/collision_shape_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/collision_shape_h_image.asset.taml new file mode 100644 index 000000000..299cd36d6 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/collision_shape_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/collision_shape_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/collision_shape_n_image.asset.taml new file mode 100644 index 000000000..b72e461b5 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/collision_shape_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/detail_levels_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/detail_levels_btn_d_image.asset.taml new file mode 100644 index 000000000..ab576d9e3 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/detail_levels_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/detail_levels_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/detail_levels_btn_h_image.asset.taml new file mode 100644 index 000000000..5792d97a3 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/detail_levels_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/detail_levels_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/detail_levels_btn_n_image.asset.taml new file mode 100644 index 000000000..251cdfa57 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/detail_levels_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_d_image.asset.taml new file mode 100644 index 000000000..de637d606 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_h_image.asset.taml new file mode 100644 index 000000000..4261fe5bd --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_n_image.asset.taml new file mode 100644 index 000000000..d42be4186 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/fwd_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_d_image.asset.taml new file mode 100644 index 000000000..90aee6927 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_h_image.asset.taml new file mode 100644 index 000000000..3e2d7e91d --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_n_image.asset.taml new file mode 100644 index 000000000..e6420dd61 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/ghost_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/highlight_material_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/highlight_material_image.asset.taml new file mode 100644 index 000000000..3bb7ea45f --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/highlight_material_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/object_bounds_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/object_bounds_d_image.asset.taml new file mode 100644 index 000000000..2345078bf --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/object_bounds_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/object_bounds_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/object_bounds_h_image.asset.taml new file mode 100644 index 000000000..27caf508c --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/object_bounds_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/object_bounds_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/object_bounds_n_image.asset.taml new file mode 100644 index 000000000..2af9f1ec1 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/object_bounds_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/object_fit_bounds_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/object_fit_bounds_d_image.asset.taml new file mode 100644 index 000000000..ae130c40e --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/object_fit_bounds_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/object_fit_bounds_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/object_fit_bounds_h_image.asset.taml new file mode 100644 index 000000000..177ed3cfd --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/object_fit_bounds_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/object_fit_bounds_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/object_fit_bounds_n_image.asset.taml new file mode 100644 index 000000000..e7246be71 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/object_fit_bounds_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_d_image.asset.taml new file mode 100644 index 000000000..aef67ecbb --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_h_image.asset.taml new file mode 100644 index 000000000..bb07bdb51 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_n_image.asset.taml new file mode 100644 index 000000000..710b74c80 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/pause_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_d_image.asset.taml new file mode 100644 index 000000000..1dc0a5a91 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_h_image.asset.taml new file mode 100644 index 000000000..65a13c53a --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_n_image.asset.taml new file mode 100644 index 000000000..6561ff39e --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/pingpong_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_d_image.asset.taml new file mode 100644 index 000000000..dac2a2c3b --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_h_image.asset.taml new file mode 100644 index 000000000..27e604f5b --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_n_image.asset.taml new file mode 100644 index 000000000..e54744239 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/playbkwd_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_d_image.asset.taml new file mode 100644 index 000000000..7d8a8ac98 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_h_image.asset.taml new file mode 100644 index 000000000..a0b4be67b --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_n_image.asset.taml new file mode 100644 index 000000000..93cce33c3 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/playfwd_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_in_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_in_d_image.asset.taml new file mode 100644 index 000000000..799c379a2 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_in_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_in_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_in_h_image.asset.taml new file mode 100644 index 000000000..2d736b29e --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_in_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_in_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_in_n_image.asset.taml new file mode 100644 index 000000000..c0d22bbd1 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_in_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_out_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_out_d_image.asset.taml new file mode 100644 index 000000000..ecad063b1 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_out_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_out_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_out_h_image.asset.taml new file mode 100644 index 000000000..5c42b2f64 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_out_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_out_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_out_n_image.asset.taml new file mode 100644 index 000000000..0ef815a73 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/seq_bar_out_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/show_wireframe_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/show_wireframe_d_image.asset.taml new file mode 100644 index 000000000..6d085943d --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/show_wireframe_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/show_wireframe_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/show_wireframe_h_image.asset.taml new file mode 100644 index 000000000..5dbbb4f4d --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/show_wireframe_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/show_wireframe_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/show_wireframe_n_image.asset.taml new file mode 100644 index 000000000..031bb379c --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/show_wireframe_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_d_image.asset.taml new file mode 100644 index 000000000..bf12594b9 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_h_image.asset.taml new file mode 100644 index 000000000..ea8929f47 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_n_image.asset.taml new file mode 100644 index 000000000..f69929f05 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/shownodes_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_d_image.asset.taml new file mode 100644 index 000000000..4c22557d2 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_h_image.asset.taml new file mode 100644 index 000000000..fa879457c --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_n_image.asset.taml new file mode 100644 index 000000000..fe82c92f1 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/stepback_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_d_image.asset.taml new file mode 100644 index 000000000..764a588f3 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_h_image.asset.taml new file mode 100644 index 000000000..3fb470ff9 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_n_image.asset.taml new file mode 100644 index 000000000..9e9517817 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/stepfwd_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/sun_btn_d_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/sun_btn_d_image.asset.taml new file mode 100644 index 000000000..0b0859561 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/sun_btn_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/sun_btn_h_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/sun_btn_h_image.asset.taml new file mode 100644 index 000000000..b663656e9 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/sun_btn_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/sun_btn_n_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/sun_btn_n_image.asset.taml new file mode 100644 index 000000000..8a0365fb3 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/sun_btn_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/transition_slider_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/transition_slider_image.asset.taml new file mode 100644 index 000000000..890006443 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/transition_slider_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/images/trigger_marker_image.asset.taml b/Templates/BaseGame/game/tools/shapeEditor/images/trigger_marker_image.asset.taml new file mode 100644 index 000000000..93b6a87fd --- /dev/null +++ b/Templates/BaseGame/game/tools/shapeEditor/images/trigger_marker_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/shapeEditor/main.tscript b/Templates/BaseGame/game/tools/shapeEditor/main.tscript index ac3f972a0..76353b548 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/main.tscript +++ b/Templates/BaseGame/game/tools/shapeEditor/main.tscript @@ -117,7 +117,7 @@ function ShapeEditorPlugin::onWorldEditorStartup(%this) // Add ourselves to the ToolsToolbar %tooltip = "Shape Editor (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "ShapeEditorPlugin", "ShapeEditorPalette", expandFilename("tools/worldEditor/images/toolbar/shape-editor"), %tooltip ); + EditorGui.addToToolsToolbar( "ShapeEditorPlugin", "ShapeEditorPalette", "ToolsModule:shape_editor_n_image", %tooltip ); // Add ourselves to the Editor Settings window exec( "./gui/ShapeEditorSettingsTab.gui" ); @@ -148,17 +148,17 @@ function ShapeEditorPlugin::onWorldEditorStartup(%this) function ShapeEditorPlugin::openShapeAsset(%this, %assetDef) { %this.selectedAssetDef = %assetDef; - %this.open(makeRelativePath(%this.selectedAssetDef.getShapeFile())); + %this.open(%this.selectedAssetDef); } function ShapeEditorPlugin::openShapeAssetId(%this, %assetId) { %this.selectedAssetDef = AssetDatabase.acquireAsset(%assetId); //%this.selectedAssetDef = %assetDef; - %this.open(makeRelativePath(%this.selectedAssetDef.getShapeFile())); + %this.open(%this.selectedAssetDef); } -function ShapeEditorPlugin::open(%this, %filename) +function ShapeEditorPlugin::open(%this, %shapeAsset) { if ( !%this.isActivated ) { @@ -210,14 +210,14 @@ function ShapeEditorPlugin::open(%this, %filename) } // Select the new shape - if (isObject(ShapeEditor.shape) && (ShapeEditor.shape.baseShape $= %filename)) + if (isObject(ShapeEditor.shape) && (ShapeEditor.shape.baseShapeAsset $= %shapeAsset)) { // Shape is already selected => re-highlight the selected material if necessary ShapeEdMaterials.updateSelectedMaterial(ShapeEdMaterials-->highlightMaterial.getValue()); } - else if (%filename !$= "") + else if (%shapeAsset !$= "") { - ShapeEditor.selectShape(%filename, ShapeEditor.isDirty()); + ShapeEditor.selectShape(%shapeAsset, ShapeEditor.isDirty()); // 'fitToShape' only works after the GUI has been rendered, so force a repaint first Canvas.repaint(); diff --git a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript index 6959226c0..b8e7061e2 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript @@ -242,18 +242,22 @@ function ShapeEditor::findConstructor( %this, %path ) return -1; } -function ShapeEditor::createConstructor( %this, %path ) +function ShapeEditor::createConstructor( %this, %assetId ) { - %name = strcapitalise( fileBase( %path ) ) @ strcapitalise( getSubStr( fileExt( %path ), 1, 3 ) ); - %name = strreplace( %name, "-", "_" ); - %name = strreplace( %name, ".", "_" ); + %name = AssetDatabase.getAssetName(%assetId); + //%name = strcapitalise( fileBase( %path ) ) @ strcapitalise( getSubStr( fileExt( %path ), 1, 3 ) ); + //%name = strreplace( %name, "-", "_" ); + //%name = strreplace( %name, ".", "_" ); %name = getUniqueName( %name ); - return new TSShapeConstructor( %name ) { baseShape = %path; }; + return new TSShapeConstructor( %name ) { baseShapeAsset = %assetId; }; } function ShapeEditor::saveConstructor( %this, %constructor ) { - %savepath = filePath( %constructor.baseShape ) @ "/" @ fileBase( %constructor.baseShape ) @ "." @ $TorqueScriptFileExtension; + %assetDef = AssetDatabase.acquireAsset(%constructor.baseShapeAsset); + %savepath = %assetDef.getShapeConstructorFilePath(); + AssetDatabase.releaseAsset(%constructor.baseShapeAsset); + new PersistenceManager( shapeEd_perMan ); shapeEd_perMan.setDirty( %constructor, %savepath ); shapeEd_perMan.saveDirtyObject( %constructor ); @@ -266,8 +270,9 @@ function ShapeEdSelectWindow::onSelect( %this, %path ) // Prompt user to save the old shape if it is dirty if ( ShapeEditor.isDirty() ) { - %cmd = "showImportDialog( \"" @ %path @ "\", \"ShapeEditor.selectShape( \\\"" @ %path @ "\\\", "; - toolsMessageBoxYesNoCancel( "Shape Modified", "Would you like to save your changes?", %cmd @ "true );\" );", %cmd @ "false );\" );" ); + %cmdY = "showImportDialog( \"" @ %path @ "\", \"ShapeEditor.selectShape( \"" @ %path @ "\", true)\" );"; + %cmdN = "showImportDialog( \"" @ %path @ "\", \"ShapeEditor.selectShape( \"" @ %path @ "\", false)\" );"; + toolsMessageBoxYesNoCancel( "Shape Modified", "Would you like to save your changes?", %cmdY, %cmdN,"" ); } else { @@ -276,7 +281,7 @@ function ShapeEdSelectWindow::onSelect( %this, %path ) } } -function ShapeEditor::selectShape( %this, %path, %saveOld ) +function ShapeEditor::selectShape( %this, %shapeAsset, %saveOld ) { ShapeEdShapeView.setModel( "" ); @@ -288,7 +293,7 @@ function ShapeEditor::selectShape( %this, %path, %saveOld ) else if ( ShapeEditor.isDirty() ) { // Purge all unsaved changes - %oldPath = ShapeEditor.shape.baseShape; + %oldPath = ShapeEditor.shape.baseShapeAsset; ShapeEditor.shape.delete(); ShapeEditor.shape = 0; @@ -296,9 +301,9 @@ function ShapeEditor::selectShape( %this, %path, %saveOld ) } // Initialise the shape preview window - if ( !ShapeEdShapeView.setModel( %path ) ) + if ( !ShapeEdShapeView.setShapeAsset( %shapeAsset.getAssetId() ) ) { - toolsMessageBoxOK( "Error", "Failed to load '" @ %path @ "'. Check the console for error messages." ); + toolsMessageBoxOK( "Error", "Failed to load '" @ %shapeAsset.getAssetId() @ "'. Check the console for error messages." ); return; } ShapeEdShapeView.fitToShape(); @@ -307,13 +312,13 @@ function ShapeEditor::selectShape( %this, %path, %saveOld ) ShapeEditor.setDirty( false ); // Get ( or create ) the TSShapeConstructor object for this shape - ShapeEditor.shape = ShapeEditor.findConstructor( %path ); + ShapeEditor.shape = findShapeConstructorByAssetId( %shapeAsset.getAssetId() ); if ( ShapeEditor.shape <= 0 ) { - ShapeEditor.shape = %this.createConstructor( %path ); + ShapeEditor.shape = %this.createConstructor( %shapeAsset ); if ( ShapeEditor.shape <= 0 ) { - error( "ShapeEditor: Error - could not select " @ %path ); + error( "ShapeEditor: Error - could not select " @ %shapeAsset.getAssetId() ); return; } } @@ -330,7 +335,7 @@ function ShapeEditor::selectShape( %this, %path, %saveOld ) ShapeEdSelectWindow.updateHints(); // Update editor status bar - EditorGuiStatusBar.setSelection( %path ); + EditorGuiStatusBar.setSelection( %shapeAsset.getAssetId() ); } // Handle a selection in the MissionGroup shape selector @@ -1761,7 +1766,8 @@ function ShapeEdSeqFromMenu::onSelect( %this, %id, %text ) %this.setText( %seqFrom ); // Allow the user to browse for an external source of animation data - getLoadFormatFilename( %this @ ".onBrowseSelect", %this.lastPath ); + //getLoadFormatFilename( %this @ ".onBrowseSelect", %this.lastPath ); + AssetBrowser.showDialog("ShapeAsset", %this @ ".onBrowseSelect"); } else { @@ -1769,12 +1775,17 @@ function ShapeEdSeqFromMenu::onSelect( %this, %id, %text ) } } -function ShapeEdSeqFromMenu::onBrowseSelect( %this, %path ) +function ShapeEdSeqFromMenu::onBrowseSelect( %this, %assetId ) { - %path = makeRelativePath( %path, getMainDotCSDir() ); - %this.lastPath = %path; - %this.setText( %path ); - ShapeEdSequences.onEditSequenceSource( %path ); + //%path = makeRelativePath( %path, getMainDotCSDir() ); + //%this.lastPath = %path; + %this.setText( %assetId ); + + %assetDef = AssetDatabase.acquireAsset(%assetId); + %shapePath = %assetDef.getShapeFile(); + AssetDatabase.releaseAsset(%assetId); + + ShapeEdSequences.onEditSequenceSource( %shapePath ); } //------------------------------------------------------------------------------ @@ -2168,7 +2179,7 @@ function ShapeEdTriggerList::addItem( %this, %frame, %state ) VertSizing = "bottom"; position = %pos SPC "0"; Extent = "2 12"; - bitmap = "tools/shapeEditor/images/trigger_marker"; + bitmapAsset = "ToolsModule:trigger_marker_image"; }; ShapeEdAnimWindow.getObject(0).addGuiControl( %ctrl ); %this.triggerId++; @@ -2342,7 +2353,7 @@ function ShapeEdMaterials::editSelectedMaterial( %this ) // materials. pushInstantGroup(); %this.tempShape = new TSStatic() { - shapeName = ShapeEditor.shape.baseShape; + shapeAsset = ShapeEditor.shape.baseShapeAsset; collisionType = "None"; }; popInstantGroup(); @@ -2886,16 +2897,16 @@ function ShapeEdDetails::onSetObjectNode( %this ) } } -function ShapeEdDetails::onAddMeshFromFile( %this, %path ) +function ShapeEdDetails::onAddMeshFromFile( %this, %assetId ) { - if ( %path $= "" ) + if ( %assetId $= "" ) { - getLoadFormatFilename( %this @ ".onAddMeshFromFile", %this.lastPath ); + AssetBrowser.showDialog("ShapeAsset", %this @ ".onAddMeshFromFile", "", "", ""); return; } - %path = makeRelativePath( %path, getMainDotCSDir() ); - %this.lastPath = %path; + //%path = makeRelativePath( %path, getMainDotCSDir() ); + //%this.lastPath = %path; // Determine the detail level to use for the new geometry if ( %this-->addGeomTo.getText() $= "current detail" ) @@ -2904,8 +2915,8 @@ function ShapeEdDetails::onAddMeshFromFile( %this, %path ) } else { + %base = AssetDatabase.getAssetName(%assetId); // Check if the file has an LODXXX hint at the end of it - %base = fileBase( %path ); %pos = strstr( %base, "_LOD" ); if ( %pos > 0 ) %size = getSubStr( %base, %pos + 4, strlen( %base ) ) + 0; @@ -2917,7 +2928,7 @@ function ShapeEdDetails::onAddMeshFromFile( %this, %path ) %size++; } - ShapeEditor.doAddMeshFromFile( %path, %size ); + ShapeEditor.doAddMeshFromFile( %assetId, %size ); } function ShapeEdDetails::onDeleteMesh( %this ) @@ -2996,7 +3007,11 @@ function ShapeEditor::autoAddDetails( %this, %dest ) // // Determine the base name of the input file (MyShape_LOD in the example above) // and use that to find any other shapes in the set. - %base = fileBase( %dest.baseShape ); + %assetDef = AssetDatabase.acquireAsset(%dest.baseShapeAsset); + %shapeFile = %assetDef.getShapeFile(); + AssetDatabase.releaseAsset(%dest.baseShapeAsset); + + %base = fileBase( %shapeFile ); %pos = strstr( %base, "_LOD" ); if ( %pos < 0 ) { @@ -3008,7 +3023,7 @@ function ShapeEditor::autoAddDetails( %this, %dest ) echo( "Base is: " @ %base ); - %filePatterns = filePath( %dest.baseShape ) @ "/" @ %base @ "*" @ fileExt( %dest.baseShape ); + %filePatterns = filePath( %shapeFile ) @ "/" @ %base @ "*" @ fileExt( %shapeFile ); echo( "Pattern is: " @ %filePatterns ); @@ -3017,7 +3032,7 @@ function ShapeEditor::autoAddDetails( %this, %dest ) { %fullPath = makeRelativePath( %fullPath, getMainDotCSDir() ); - if ( %fullPath !$= %dest.baseShape ) + if ( %fullPath !$= %shapeFile ) { echo( "Found LOD shape file: " @ %fullPath ); @@ -3037,15 +3052,19 @@ function ShapeEditor::autoAddDetails( %this, %dest ) } } -function ShapeEditor::addLODFromFile( %this, %dest, %filename, %size, %allowUnmatched ) +function ShapeEditor::addLODFromFile( %this, %dest, %assetId, %size, %allowUnmatched ) { + %assetDef = AssetDatabase.acquireAsset(%assetId); + %csPath = %assetDef.getShapeConstructorFilePath(); + %filename = %assetDef.getShapeFile(); + AssetDatabase.releaseAsset(%assetId); + // Get (or create) a TSShapeConstructor object for the source shape. Need to // exec the script manually as the resource may not have been loaded yet - %csPath = filePath( %filename ) @ "/" @ fileBase( %filename ) @ "." @ $TorqueScriptFileExtension; if ( isFile( %csPath ) ) exec( %csPath ); - %source = ShapeEditor.findConstructor( %filename ); + %source = findShapeConstructorByAssetId( %assetId ); if ( %source == -1 ) %source = ShapeEditor.createConstructor( %filename ); %source.lodType = "SingleSize"; @@ -3053,7 +3072,7 @@ function ShapeEditor::addLODFromFile( %this, %dest, %filename, %size, %allowUnma // Create a temporary TSStatic to ensure the resource is loaded %temp = new TSStatic() { - shapeName = %filename; + shapeAsset = %assetId; collisionType = "None"; }; @@ -3254,7 +3273,7 @@ function ShapeEdMountWindow::update_onMountSelectionChanged( %this ) %this-->mountSeq.clear(); %this-->mountSeq.add( "", 0 ); - %tss = ShapeEditor.findConstructor( %shapePath ); + %tss = findShapeConstructorByFilename( %shapePath ); if ( !isObject( %tss ) ) %tss = ShapeEditor.createConstructor( %shapePath ); if ( isObject( %tss ) ) diff --git a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript index a5b213424..55d6f9483 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript +++ b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript @@ -361,7 +361,7 @@ function ActionAddSequence::doit( %this ) //We adjust due to the list "header" row as well %idx -= 1; - %animSet = "ShapeEditorPlugin.selectedAssetDef.animationSequence"@%idx@"=\"@Asset="@%moduleName@":"@%assetDef.assetName@"\";"; + %animSet = "ShapeEditorPlugin.selectedAssetDef.animationSequence"@%idx@"=\"@asset="@%moduleName@":"@%assetDef.assetName@"\";"; eval(%animSet); %assetPath = AssetDatabase.getAssetFilePath(ShapeEditorPlugin.selectedAssetId); @@ -1007,10 +1007,10 @@ function ActionRemoveMesh::undo( %this ) //------------------------------------------------------------------------------ // Add meshes from file -function ShapeEditor::doAddMeshFromFile( %this, %filename, %size ) +function ShapeEditor::doAddMeshFromFile( %this, %assetId, %size ) { %action = %this.createAction( ActionAddMeshFromFile, "Add mesh from file" ); - %action.filename = %filename; + %action.assetId = %assetId; %action.size = %size; %this.doAction( %action ); @@ -1018,7 +1018,7 @@ function ShapeEditor::doAddMeshFromFile( %this, %filename, %size ) function ActionAddMeshFromFile::doit( %this ) { - %this.meshList = ShapeEditor.addLODFromFile( ShapeEditor.shape, %this.filename, %this.size, 1 ); + %this.meshList = ShapeEditor.addLODFromFile( ShapeEditor.shape, %this.assetId, %this.size, 1 ); if ( %this.meshList !$= "" ) { %count = getFieldCount( %this.meshList ); diff --git a/Templates/BaseGame/game/tools/shapes/unit_capsule.asset.taml b/Templates/BaseGame/game/tools/shapes/unit_capsule.asset.taml new file mode 100644 index 000000000..cfa70436d --- /dev/null +++ b/Templates/BaseGame/game/tools/shapes/unit_capsule.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/shapes/unit_capsule.tscript b/Templates/BaseGame/game/tools/shapes/unit_capsule.tscript new file mode 100644 index 000000000..9464cb795 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapes/unit_capsule.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(unit_capsuledts2) +{ + baseShapeAsset = "ToolsModule:unit_capsule"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/tools/shapes/unit_cube.asset.taml b/Templates/BaseGame/game/tools/shapes/unit_cube.asset.taml new file mode 100644 index 000000000..281f67ac9 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapes/unit_cube.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/shapes/unit_cube.tscript b/Templates/BaseGame/game/tools/shapes/unit_cube.tscript new file mode 100644 index 000000000..121a75007 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapes/unit_cube.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(unit_cubedts2) +{ + baseShapeAsset = "ToolsModule:unit_cube"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/tools/shapes/unit_sphere.asset.taml b/Templates/BaseGame/game/tools/shapes/unit_sphere.asset.taml new file mode 100644 index 000000000..8072d7569 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapes/unit_sphere.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/shapes/unit_sphere.tscript b/Templates/BaseGame/game/tools/shapes/unit_sphere.tscript new file mode 100644 index 000000000..475a102e8 --- /dev/null +++ b/Templates/BaseGame/game/tools/shapes/unit_sphere.tscript @@ -0,0 +1,11 @@ + +singleton TSShapeConstructor(unit_spheredts2) +{ + baseShapeAsset = "ToolsModule:unit_sphere"; + singleDetailSize = "0"; + flipUVCoords = "0"; + JoinIdenticalVerts = "0"; + reverseWindingOrder = "0"; + removeRedundantMats = "0"; + animFPS = "2"; +}; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/.asset.taml new file mode 100644 index 000000000..36b7991fa --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/.asset.taml @@ -0,0 +1,6 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/AL_ShadowVizOverlayCtrl.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/AL_ShadowVizOverlayCtrl.asset.taml new file mode 100644 index 000000000..ab14cd613 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/AL_ShadowVizOverlayCtrl.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/AddFMODProjectDlg,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/AddFMODProjectDlg,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..a38ac0145 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/AddFMODProjectDlg,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/AxisGizmoSettingsTab,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/AxisGizmoSettingsTab,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..5474e2f5e --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/AxisGizmoSettingsTab,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/CameraSettingsTab,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/CameraSettingsTab,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..6e9f6bae0 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/CameraSettingsTab,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/CreateNewTerrainGui, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/CreateNewTerrainGui, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..4ea563194 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/CreateNewTerrainGui, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ESelectObjectsWindowContainer,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ESelectObjectsWindowContainer,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..fa9c951fb --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ESelectObjectsWindowContainer,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/EWTerrainEditToolbar,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/EWTerrainEditToolbar,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..070a7be92 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/EWTerrainEditToolbar,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/EWTerrainPainterToolbar,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/EWTerrainPainterToolbar,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..4bca12af2 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/EWTerrainPainterToolbar,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/EWToolsToolbar.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/EWToolsToolbar.asset.taml new file mode 100644 index 000000000..42bf08204 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/EWToolsToolbar.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/EWorldEditorToolbar, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/EWorldEditorToolbar, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..119aa3199 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/EWorldEditorToolbar, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/EditorChooseLevelGui, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/EditorChooseLevelGui, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..b9af8ab02 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/EditorChooseLevelGui, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/EditorChooseLevelGui.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/EditorChooseLevelGui.ed.gui index a384f59e7..06a8f7599 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/EditorChooseLevelGui.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/EditorChooseLevelGui.ed.gui @@ -28,7 +28,7 @@ Visible = "1"; tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; - bitmap = "art/gui/background"; + bitmap = "data/ui/images/background.png"; useVariable = "0"; tile = "0"; }; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..4c570f529 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui index c2330f6de..298404b55 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui @@ -50,7 +50,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Open the WorldEditor"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/toolbar/world"; + bitmapAsset = "ToolsModule:world_image"; groupNum = "0"; buttonType = "RadioButton"; useMouseEvents = "0"; @@ -71,7 +71,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Open the GuiEditor"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/toolbar/gui"; + bitmapAsset = "ToolsModule:gui_image"; groupNum = "0"; buttonType = "RadioButton"; useMouseEvents = "0"; @@ -92,7 +92,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Play Game"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/toolbar/playbutton"; + bitmapAsset = "ToolsModule:playbutton_n_image"; groupNum = "0"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -104,7 +104,7 @@ position = "98 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiBitmapButtonCtrl(EWorldEditorToggleCamera) { @@ -123,7 +123,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Toggle Camera Modes"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/toolbar/player"; + bitmapAsset = "ToolsModule:player_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -134,7 +134,7 @@ Position = getWord(EWorldEditorToggleCamera.extent, 0)-6 SPC getWord(EWorldEditorToggleCamera.extent, 1)-6; Extent = "4 4"; MinExtent = "4 4"; - bitmap = "tools/gui/images/dropdown-button-arrow"; + bitmapAsset = "ToolsModule:dropdown_button_arrow_image"; }; }; new GuiControl(CameraSpeedDropdownContainer, EditorGuiGroup) { @@ -212,7 +212,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; }; }; /*new GuiPopUpMenuCtrl(EWorldEditorCameraSpeed) { @@ -257,7 +257,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Toggle Visibility Modes (ALT V)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/visibility-toggle"; + bitmapAsset = "ToolsModule:visibility_toggle_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -268,7 +268,7 @@ Position = getWord(visibilityToggleBtn.extent, 0)-6 SPC getWord(visibilityToggleBtn.extent, 1)-6; Extent = "4 4"; MinExtent = "4 4"; - bitmap = "tools/gui/images/dropdown-button-arrow"; + bitmapAsset = "ToolsModule:dropdown_button_arrow_image"; }; }; @@ -278,7 +278,7 @@ position = "303 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiPopUpMenuCtrl(EWorldEditorAlignPopup) { @@ -353,7 +353,7 @@ position = "465 8"; Extent = "2 18"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiTextCtrl(EWorldEditorStatusBarSelection) { @@ -387,7 +387,7 @@ position = "645 8"; Extent = "2 18"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiPopUpMenuCtrl(EWorldEditorStatusBarCamera) { @@ -419,7 +419,7 @@ position = "800 2"; Extent = "2 18"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; }; @@ -481,9 +481,9 @@ selectionBoxColor = "255 255 0 255"; selectionLocked = "0"; toggleIgnoreList = "0"; - selectHandle = "tools/worldEditor/images/SelectHandle.png"; - defaultHandle = "tools/worldEditor/images/DefaultHandle.png"; - lockedHandle = "tools/worldEditor/images/LockedHandle.png"; + selectHandle = "ToolsModule:SelectHandle_image"; + defaultHandle = "ToolsModule:DefaultHandle_image"; + lockedHandleAsset = "ToolsModule:LockedHandle_image"; }; new TerrainEditor(ETerrainEditor) { canSaveDynamicFields = "0"; @@ -889,7 +889,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Free Camera"; hovertime = "1000"; - iconBitmap = "tools/worldEditor/images/toolbar/camera_n"; + bitmapAsset = "ToolsModule:camera_n_image"; groupNum = "0"; text="Free Camera"; buttonMargin = "0 4"; @@ -915,7 +915,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Toggle Orbit Cam"; hovertime = "1000"; - iconBitmap = "tools/gui/images/menubar/orbit-cam_n"; + bitmapAsset = "ToolsModule:orbit_cam_n_image"; groupNum = "0"; text="Orbit Camera"; buttonMargin = "0 4"; @@ -942,7 +942,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Player Camera"; hovertime = "1000"; - iconBitmap = "tools/worldEditor/images/toolbar/player_n"; + bitmapAsset = "ToolsModule:player_n_image"; groupNum = "0"; text="Player Camera"; buttonMargin = "0 4"; @@ -968,7 +968,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "3rd Person Camera"; hovertime = "1000"; - iconBitmap = "tools/worldEditor/images/toolbar/3rd-person-camera_n"; + bitmapAsset = "ToolsModule:3rd_person_camera_n_image"; groupNum = "0"; text="3rd Person Cam"; buttonMargin = "0 4"; @@ -994,7 +994,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Toggle Newtonian Cam"; hovertime = "1000"; - iconBitmap = "tools/gui/images/menubar/smooth-cam_n"; + bitmapAsset = "ToolsModule:smooth_cam_n_image"; groupNum = "0"; text="Smooth Camera"; buttonMargin = "0 4"; @@ -1020,7 +1020,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Toggle Smooth Camera with Smooth Rotation"; hovertime = "1000"; - iconBitmap = "tools/gui/images/menubar/smooth-cam-rot_n"; + bitmapAsset = "ToolsModule:smooth_cam_rot_n_image"; groupNum = "0"; text="Smooth Rotate"; buttonMargin = "0 4"; @@ -1238,7 +1238,7 @@ new GuiMouseEventCtrl(CameraSpeedDropdownCtrlContainer, EditorGuiGroup) { new GuiBitmapCtrl(){ // Fast position = "105 15"; extent = "2 8"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; Profile = "ToolsGuiDefaultProfile"; HorizSizing = "right"; VertSizing = "bottom"; @@ -1246,7 +1246,7 @@ new GuiMouseEventCtrl(CameraSpeedDropdownCtrlContainer, EditorGuiGroup) { new GuiBitmapCtrl(){ // normal position = "73 15"; extent = "2 8"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; Profile = "ToolsGuiDefaultProfile"; HorizSizing = "right"; VertSizing = "bottom"; @@ -1254,7 +1254,7 @@ new GuiMouseEventCtrl(CameraSpeedDropdownCtrlContainer, EditorGuiGroup) { new GuiBitmapCtrl(){ // slow position = "41 15"; extent = "2 8"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; Profile = "ToolsGuiDefaultProfile"; HorizSizing = "right"; VertSizing = "bottom"; @@ -1299,4 +1299,4 @@ new GuiMouseEventCtrl(CameraSpeedDropdownCtrlContainer, EditorGuiGroup) { }; }; }; -//--- OBJECT WRITE END --- \ No newline at end of file +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/EditorSettingsWindow,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/EditorSettingsWindow,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..f9f52ce07 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/EditorSettingsWindow,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/GeneralSettingsTab,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/GeneralSettingsTab,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..311ba905b --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/GeneralSettingsTab,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/GenericPromptDialog.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/GenericPromptDialog.asset.taml new file mode 100644 index 000000000..c6e202606 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/GenericPromptDialog.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ManageBookmarksContainer, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ManageBookmarksContainer, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..276580874 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ManageBookmarksContainer, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ManageBookmarksWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ManageBookmarksWindow.ed.gui index c5f4ff469..46195d0d7 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ManageBookmarksWindow.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ManageBookmarksWindow.ed.gui @@ -81,7 +81,7 @@ setFirstResponder = "0"; modal = "1"; command = "ManageBookmarksContainer.onOK();"; - bitmap = "tools/gui/images/new"; + bitmapAsset = "ToolsModule:new_n_image"; helpTag = "0"; text = "Create"; tooltip = "Create New Camera Bookmark"; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ManageSFXParametersContainer,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ManageSFXParametersContainer,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..2b5e2d7c8 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ManageSFXParametersContainer,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ManageSFXParametersWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ManageSFXParametersWindow.ed.gui index 29c55dc74..95081790f 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ManageSFXParametersWindow.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ManageSFXParametersWindow.ed.gui @@ -112,7 +112,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/new"; + bitmapAsset = "ToolsModule:new_n_image"; autoFit = "0"; text = "Create"; groupNum = "-1"; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ObjectBuilderGui, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ObjectBuilderGui, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..20e2a5bb3 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ObjectBuilderGui, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ObjectEditorSettingsTab,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ObjectEditorSettingsTab,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..984b7a7f5 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ObjectEditorSettingsTab,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ObjectSnapOptionsContainer, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ObjectSnapOptionsContainer, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..e0bf82a16 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ObjectSnapOptionsContainer, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui index 9805d31dd..ebf204880 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ObjectSnapOptionsWindow.ed.gui @@ -213,7 +213,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; text = "- X Axis"; - iconBitmap = "tools/gui/images/axis-icon_-x"; + bitmapAsset = "ToolsModule:axis_icon__x_image"; textMargin = "24"; groupNum = "1"; buttonType = "RadioButton"; @@ -238,7 +238,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; text = "+ X Axis"; - iconBitmap = "tools/gui/images/axis-icon_x"; + bitmapAsset = "ToolsModule:axis_icon_x_image"; textMargin = "24"; groupNum = "1"; buttonType = "RadioButton"; @@ -263,7 +263,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; text = "- Y Axis"; - iconBitmap = "tools/gui/images/axis-icon_-y"; + bitmapAsset = "ToolsModule:axis_icon__y_image"; textMargin = "24"; groupNum = "1"; buttonType = "RadioButton"; @@ -288,7 +288,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; text = "+ Y Axis"; - iconBitmap = "tools/gui/images/axis-icon_y"; + bitmapAsset = "ToolsModule:axis_icon_y_image"; textMargin = "24"; groupNum = "1"; buttonType = "RadioButton"; @@ -313,7 +313,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; text = "- Z Axis"; - iconBitmap = "tools/gui/images/axis-icon_-z"; + bitmapAsset = "ToolsModule:axis_icon__z_image"; textMargin = "24"; groupNum = "1"; buttonType = "RadioButton"; @@ -338,7 +338,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; text = "+ Z Axis"; - iconBitmap = "tools/gui/images/axis-icon_z"; + bitmapAsset = "ToolsModule:axis_icon_z_image"; textMargin = "24"; groupNum = "1"; buttonType = "RadioButton"; @@ -573,7 +573,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; text = "- X Axis"; - iconBitmap = "tools/gui/images/axis-icon_-x"; + bitmapAsset = "ToolsModule:axis_icon__x_image"; textMargin = "24"; groupNum = "1"; buttonType = "RadioButton"; @@ -598,7 +598,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; text = "+ X Axis"; - iconBitmap = "tools/gui/images/axis-icon_x"; + bitmapAsset = "ToolsModule:axis_icon_x_image"; textMargin = "24"; groupNum = "1"; buttonType = "RadioButton"; @@ -623,7 +623,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; text = "- Y Axis"; - iconBitmap = "tools/gui/images/axis-icon_-y"; + bitmapAsset = "ToolsModule:axis_icon__y_image"; textMargin = "24"; groupNum = "1"; buttonType = "RadioButton"; @@ -648,7 +648,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; text = "+ Y Axis"; - iconBitmap = "tools/gui/images/axis-icon_y"; + bitmapAsset = "ToolsModule:axis_icon_y_image"; textMargin = "24"; groupNum = "1"; buttonType = "RadioButton"; @@ -673,7 +673,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; text = "- Z Axis"; - iconBitmap = "tools/gui/images/axis-icon_-z"; + bitmapAsset = "ToolsModule:axis_icon__z_image"; textMargin = "24"; groupNum = "1"; buttonType = "RadioButton"; @@ -698,7 +698,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; text = "+ Z Axis"; - iconBitmap = "tools/gui/images/axis-icon_z"; + bitmapAsset = "ToolsModule:axis_icon_z_image"; textMargin = "24"; groupNum = "1"; buttonType = "RadioButton"; @@ -890,4 +890,4 @@ useMouseEvents = "0"; }; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ProbeBakeDlg.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ProbeBakeDlg.asset.taml new file mode 100644 index 000000000..ca7cafcce --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ProbeBakeDlg.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ProceduralTerrainPainterGui.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ProceduralTerrainPainterGui.asset.taml new file mode 100644 index 000000000..a99c70601 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ProceduralTerrainPainterGui.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainBrushSoftnessCurveDlg, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainBrushSoftnessCurveDlg, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..e80592cb0 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainBrushSoftnessCurveDlg, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditToolbar.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditToolbar.ed.gui index cc9d6983b..3c53c7c9f 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditToolbar.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditToolbar.ed.gui @@ -67,7 +67,7 @@ groupNum = "0"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/circleBrush"; + bitmapAsset = "ToolsModule:circleBrush_n_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -89,7 +89,7 @@ groupNum = "0"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/boxBrush"; + bitmapAsset = "ToolsModule:boxBrush_n_image"; }; /* @@ -113,7 +113,7 @@ groupNum = "0"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/maskBrush"; + bitmapAsset = "ToolsModule:maskBrush_n_image"; }; */ }; @@ -124,7 +124,7 @@ position = "152 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiControl(TerrainBrushSizeTextEditContainer) { @@ -203,7 +203,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; }; }; new GuiBitmapCtrl() { @@ -212,7 +212,7 @@ position = "272 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiControl(TerrainBrushPressureTextEditContainer) { @@ -290,7 +290,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; }; }; new GuiBitmapCtrl() { @@ -299,7 +299,7 @@ position = "412 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiControl(TerrainBrushSoftnessTextEditContainer) { @@ -377,7 +377,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; }; }; @@ -400,7 +400,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/softCurve"; + bitmapAsset = "ToolsModule:softCurve_n_image"; }; new GuiBitmapCtrl() { @@ -409,7 +409,7 @@ position = "589 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiControl(TerrainSetHeightTextEditContainer) { @@ -487,7 +487,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; }; }; }; @@ -612,4 +612,4 @@ new GuiMouseEventCtrl(TerrainSetHeightSliderCtrlContainer,EditorGuiGroup) { value = "100"; }; }; -//--- OBJECT WRITE END --- \ No newline at end of file +//--- OBJECT WRITE END --- diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditorSettingsTab,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditorSettingsTab,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..6d0c5ce75 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditorSettingsTab,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditorValuesSettingsGui, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditorValuesSettingsGui, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..c0b96815d --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditorValuesSettingsGui, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainExportGui, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainExportGui, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..7c8df3569 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainExportGui, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainImportGui, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainImportGui, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..052d013f8 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainImportGui, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainMaterialDlg,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainMaterialDlg,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..f07f0d14a --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainMaterialDlg,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterContainer,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterContainer,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..2f96d8728 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterContainer,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui index ca4126330..bffa0d9d4 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui @@ -67,7 +67,7 @@ groupNum = "0"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/circleBrush"; + bitmapAsset = "ToolsModule:circleBrush_n_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -89,7 +89,7 @@ groupNum = "0"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/boxBrush"; + bitmapAsset = "ToolsModule:boxBrush_n_image"; }; /* @@ -113,7 +113,7 @@ groupNum = "0"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/maskBrush"; + bitmapAsset = "ToolsModule:maskBrush_n_image"; }; */ }; @@ -124,7 +124,7 @@ position = "152 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiControl(PaintBrushSizeTextEditContainer) { @@ -203,7 +203,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; }; }; @@ -213,7 +213,7 @@ position = "230 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiControl(PaintBrushSlopeControl) { @@ -301,7 +301,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; Command = "Canvas.pushDialog(PaintBrushSlopeMinContainer);"; }; new GuiTextCtrl() { @@ -362,7 +362,7 @@ tooltip = "Max terrain angle that will be paintable"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; Command = "Canvas.pushDialog(PaintBrushSlopeMaxContainer);"; }; }; @@ -373,7 +373,7 @@ position = "445 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiControl(PaintBrushPressureTextEditContainer,EditorGuiGroup) { @@ -451,7 +451,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; }; }; @@ -461,7 +461,7 @@ position = "618 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiControl(TerrainTextureSettingsButtonContainer,EditorGuiGroup) { diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterWindow.ed.gui index a08c05841..8e6192515 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterWindow.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterWindow.ed.gui @@ -158,7 +158,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; wrap = "0"; - bitmap= "tools/materialEditor/gui/unknownImage"; + bitmapAsset= "ToolsModule:unknownImage_image"; }; new GuiBitmapCtrl(ETerrainMaterialSelectedBorder) { canSaveDynamicFields = "0"; @@ -175,7 +175,7 @@ Visible = "1"; tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/terrainpainter/terrain-painter-border-large"; + bitmapAsset = "ToolsModule:terrain_painter_border_large_image"; wrap = "0"; }; }; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainTextureSettingsDlg, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainTextureSettingsDlg, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..a2de349dc --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainTextureSettingsDlg, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TimeAdjustGui, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/TimeAdjustGui, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..e291bd9b3 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/TimeAdjustGui, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..2accefdbf --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette.ed.gui index e32cdfb4a..654ec029f 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette.ed.gui @@ -28,7 +28,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Select Arrow (1)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/arrow"; + bitmapAsset = "ToolsModule:arrow_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; Command = "GlobalGizmoProfile.mode = \"None\";"; @@ -50,7 +50,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Move Selection (2)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/translate"; + bitmapAsset = "ToolsModule:translate_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; Command = "GlobalGizmoProfile.mode = \"Move\";"; @@ -72,7 +72,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Rotate Selection (3)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/rotate"; + bitmapAsset = "ToolsModule:rotate_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; Command = "GlobalGizmoProfile.mode = \"Rotate\";"; @@ -94,9 +94,9 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Scale Selection (4)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/scale"; + bitmapAsset = "ToolsModule:scale_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; Command = "GlobalGizmoProfile.mode = \"Scale\";"; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..98953e6a8 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette.ed.gui index 1e4053c8e..1cad1df01 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette.ed.gui @@ -29,7 +29,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Select Decal (1)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/arrow"; + bitmapAsset = "ToolsModule:arrow_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -51,7 +51,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Move Decal (2)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/move-point"; + bitmapAsset = "ToolsModule:move_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -72,7 +72,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Rotate Decal (3)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/rotate-point"; + bitmapAsset = "ToolsModule:rotate_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -93,7 +93,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Scale Decal (4)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/scale-point"; + bitmapAsset = "ToolsModule:scale_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -114,8 +114,8 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Add Decal (5)"; hovertime = "1000"; - bitmap = "tools/decalEditor/add-decal"; + bitmapAsset = "ToolsModule:add_decal_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..539644c8a --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette.ed.gui index a1cc96ef5..fd6d9620a 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette.ed.gui @@ -29,7 +29,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Select Item (1)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/arrow"; + bitmapAsset = "ToolsModule:arrow_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -50,7 +50,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Move Item (2)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/translate"; + bitmapAsset = "ToolsModule:translate_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -71,7 +71,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Rotate Item (3)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/rotate"; + bitmapAsset = "ToolsModule:rotate_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -92,7 +92,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Scale Item (4)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/scale"; + bitmapAsset = "ToolsModule:scale_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -113,7 +113,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Paint (5)"; hovertime = "1000"; - bitmap = "tools/forestEditor/images/paint-forest-btn"; + bitmapAsset = "ToolsModule:paint_forest_btn_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -134,7 +134,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Erase (6)"; hovertime = "1000"; - bitmap = "tools/forestEditor/images/erase-all-btn"; + bitmapAsset = "ToolsModule:erase_all_btn_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -156,8 +156,8 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Erase Selected (7)"; hovertime = "1000"; - bitmap = "tools/forestEditor/images/erase-element-btn"; + bitmapAsset = "ToolsModule:erase_element_btn_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..f61489fa4 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette.ed.gui index b005ac958..ab4056d4a 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette.ed.gui @@ -29,7 +29,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Select Mesh Road (1)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/arrow"; + bitmapAsset = "ToolsModule:arrow_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -51,7 +51,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Move Point (2)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/move-point"; + bitmapAsset = "ToolsModule:move_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -72,7 +72,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Rotate Point (3)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/rotate-point"; + bitmapAsset = "ToolsModule:rotate_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -93,7 +93,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Scale Point (4)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/scale-point"; + bitmapAsset = "ToolsModule:scale_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -114,7 +114,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Create Road (5)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/add-mesh-road"; + bitmapAsset = "ToolsModule:add_mesh_road_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -135,7 +135,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Insert Point (+)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/add-point"; + bitmapAsset = "ToolsModule:add_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -156,8 +156,8 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Remove Point (-)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/subtract-point"; + bitmapAsset = "ToolsModule:subtract_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..333db900e --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui index a18e3f4ba..7209b76a4 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui @@ -31,7 +31,7 @@ ToolTip = "View NavMesh (1)."; DetailedDesc = ""; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/visibility-toggle"; + bitmapAsset = "ToolsModule:visibility_toggle_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -54,7 +54,7 @@ ToolTip = "Create off-mesh links (2)."; DetailedDesc = "Click to select/add. Shift-click to add multiple end points."; hovertime = "1000"; - bitmap = "tools/navEditor/images/nav-link"; + bitmapAsset = "ToolsModule:nav_link_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -77,7 +77,7 @@ ToolTip = "Edit cover (3)."; DetailedDesc = ""; hovertime = "1000"; - bitmap = "tools/navEditor/images/nav-cover"; + bitmapAsset = "ToolsModule:nav_cover_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -100,7 +100,7 @@ ToolTip = "View tiles (4)."; DetailedDesc = "Click to select."; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/select-bounds"; + bitmapAsset = "ToolsModule:select_bounds_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -123,8 +123,8 @@ ToolTip = "Test pathfinding (5)."; DetailedDesc = "Click to select/move character, CTRL-click to spawn, SHIFT-click to deselect."; hovertime = "1000"; - bitmap = "tools/worldEditor/images/toolbar/3rd-person-camera"; + bitmapAsset = "ToolsModule:3rd_person_camera_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..e460fd7c5 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette.ed.gui index 5fea48b1b..bb6034f46 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette.ed.gui @@ -29,7 +29,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Select River (1)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/arrow"; + bitmapAsset = "ToolsModule:arrow_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -50,7 +50,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Move Point (2)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/move-point"; + bitmapAsset = "ToolsModule:move_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -71,7 +71,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Rotate Point (3)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/rotate-point"; + bitmapAsset = "ToolsModule:rotate_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -92,7 +92,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Scale Point (4)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/scale-point"; + bitmapAsset = "ToolsModule:scale_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -113,7 +113,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Create River (5)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/add-river"; + bitmapAsset = "ToolsModule:add_river_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -134,7 +134,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Insert Point (+)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/add-point"; + bitmapAsset = "ToolsModule:add_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -156,8 +156,8 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Remove Point (-)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/subtract-point"; + bitmapAsset = "ToolsModule:subtract_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..35169eed9 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette.ed.gui index 712ea774f..3478d5b0d 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette.ed.gui @@ -29,7 +29,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Select Road (1)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/arrow"; + bitmapAsset = "ToolsModule:arrow_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -51,7 +51,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Move Point (2)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/move-point"; + bitmapAsset = "ToolsModule:move_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -73,7 +73,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Scale Point (4)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/scale-point"; + bitmapAsset = "ToolsModule:scale_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -94,7 +94,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Create Road (5)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/add-road-path"; + bitmapAsset = "ToolsModule:add_road_path_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -115,7 +115,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Insert Point (+)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/add-point"; + bitmapAsset = "ToolsModule:add_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -137,8 +137,8 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Remove Point (-)"; hovertime = "1000"; - bitmap = "tools/worldEditor/images/road-river/subtract-point"; + bitmapAsset = "ToolsModule:subtract_point_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..954f567c7 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette.ed.gui index e8dfaf0e9..3291f1454 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette.ed.gui @@ -29,7 +29,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Select Arrow (1)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/arrow"; + bitmapAsset = "ToolsModule:arrow_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -51,7 +51,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Move Selection (2)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/translate"; + bitmapAsset = "ToolsModule:translate_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -73,7 +73,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Rotate Selection (3)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/rotate"; + bitmapAsset = "ToolsModule:rotate_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -95,7 +95,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Rotate sun"; hovertime = "1000"; - bitmap = "tools/shapeEditor/images/sun-btn"; + bitmapAsset = "ToolsModule:sun_btn_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui index 0ab8f2b1e..d794d38ab 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui @@ -32,7 +32,7 @@ text = "Button"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/brushAdjustHeight"; + bitmapAsset = "ToolsModule:brushAdjustHeight_n_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -54,7 +54,7 @@ text = "Button"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/raiseHeight"; + bitmapAsset = "ToolsModule:raiseHeight_n_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -76,7 +76,7 @@ text = "Button"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/lowerHeight"; + bitmapAsset = "ToolsModule:lowerHeight_n_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -98,7 +98,7 @@ text = "Button"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/smoothHeight"; + bitmapAsset = "ToolsModule:smoothHeight_n_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -120,7 +120,7 @@ text = "Button"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/softCurve"; + bitmapAsset = "ToolsModule:softCurve_n_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -142,7 +142,7 @@ text = "Button"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/brushPaintNoise"; + bitmapAsset = "ToolsModule:brushPaintNoise_n_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -164,7 +164,7 @@ text = "Button"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/flattenHeight"; + bitmapAsset = "ToolsModule:flattenHeight_n_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -186,7 +186,7 @@ text = "Button"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/setHeight"; + bitmapAsset = "ToolsModule:setHeight_n_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -208,7 +208,7 @@ text = "Button"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/setEmpty"; + bitmapAsset = "ToolsModule:setEmpty_n_image"; }; new GuiBitmapButtonCtrl() { canSaveDynamicFields = "0"; @@ -230,6 +230,6 @@ text = "Button"; buttonType = "RadioButton"; useMouseEvents = "0"; - bitmap = "tools/worldEditor/images/clearEmpty"; + bitmapAsset = "ToolsModule:clearEmpty_n_image"; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditorPalette,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditorPalette,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..b59ccc28b --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditorPalette,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainPainterPalette,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainPainterPalette,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..1a1159393 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainPainterPalette,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorInspectorPalette, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorInspectorPalette, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..0a38555bd --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorInspectorPalette, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorPalette.ed.gui index 421b52fe4..7dd2ed44e 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorPalette.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorPalette.ed.gui @@ -28,7 +28,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Select Arrow (1)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/arrow"; + bitmapAsset = "ToolsModule:arrow_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -49,7 +49,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Move Selection (2)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/translate"; + bitmapAsset = "ToolsModule:translate_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -70,7 +70,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Rotate Selection (3)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/rotate"; + bitmapAsset = "ToolsModule:rotate_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; @@ -91,8 +91,8 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Scale Selection (4)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/scale"; + bitmapAsset = "ToolsModule:scale_n_image"; buttonType = "RadioButton"; useMouseEvents = "0"; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/init.tscript b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/init.tscript index 637739745..0f312633a 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/init.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/init.tscript @@ -99,4 +99,4 @@ function EWToolsPaletteWindow::togglePalette(%this, %paletteName) EWToolsPaletteWindow.visible = 1; EWToolsPaletteWindow.extent = getWord(EWToolsPaletteWindow.extent, 0) SPC (16 + 26 * %windowMultiplier); } -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsToolbar.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsToolbar.ed.gui index 1f15e5310..330807ae4 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsToolbar.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsToolbar.ed.gui @@ -54,7 +54,7 @@ hovertime = "750"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/collapse-toolbar"; + bitmapAsset = "ToolsModule:collapse_toolbar_n_image"; }; new GuiDecoyCtrl(EWToolsToolbarDecoy) { profile = "ToolsGuiDefaultProfile"; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TransformSelectionContainer, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/TransformSelectionContainer, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..dc19c8e08 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/TransformSelectionContainer, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TransformSelectionWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/TransformSelectionWindow.ed.gui index 26324ea74..67cb15d51 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/TransformSelectionWindow.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/TransformSelectionWindow.ed.gui @@ -265,7 +265,7 @@ position = "0 0"; Extent = "100 2"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-v.png"; + bitmapAsset = "ToolsModule:separator_v_image"; }; new GuiControl() { @@ -459,7 +459,7 @@ position = "0 0"; Extent = "100 2"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-v.png"; + bitmapAsset = "ToolsModule:separator_v_image"; }; new GuiTabBookCtrl() { @@ -1023,4 +1023,4 @@ }; }; -}; \ No newline at end of file +}; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/VisibilityLayerContainer, EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/VisibilityLayerContainer, EditorGuiGroup.asset.taml new file mode 100644 index 000000000..e400bc2a0 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/VisibilityLayerContainer, EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorMissionInspector,EditorGuiGroup.asset.taml b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorMissionInspector,EditorGuiGroup.asset.taml new file mode 100644 index 000000000..abede8a19 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorMissionInspector,EditorGuiGroup.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorToolbar.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorToolbar.ed.gui index f736e8555..0940617c6 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorToolbar.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorToolbar.ed.gui @@ -52,7 +52,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Fit View To Selection (F)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/fit-selection"; + bitmapAsset = "ToolsModule:fit_selection_n_image"; text = ""; groupNum = "-1"; buttonType = "PushButton"; @@ -65,7 +65,7 @@ position = "34 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiTextCtrl() { @@ -109,7 +109,7 @@ buttonType = "ToggleButton"; useMouseEvents = "0"; buttonMargin = "0 0"; - bitmap = "tools/gui/images/menubar/snapping-settings"; + bitmapAsset = "ToolsModule:snapping_settings_n_image"; new GuiBitmapCtrl(){ HorizSizing = "left"; @@ -117,7 +117,7 @@ Position = "23 21"; Extent = "4 4"; MinExtent = "4 4"; - bitmap = "tools/gui/images/dropdown-button-arrow"; + bitmapAsset = "ToolsModule:dropdown_button_arrow_image"; }; }; @@ -142,7 +142,7 @@ buttonType = "toggleButton"; useMouseEvents = "0"; groupNum = "-1"; - bitmap = "tools/gui/images/menubar/snap-grid"; + bitmapAsset = "ToolsModule:menubar_snap_grid_n_image"; textMargin = "4"; }; new GuiBitmapButtonCtrl() { @@ -166,7 +166,7 @@ buttonType = "toggleButton"; useMouseEvents = "0"; groupNum = "-1"; - bitmap = "tools/gui/images/menubar/snap-terrain"; + bitmapAsset = "ToolsModule:snap_terrain_n_image"; textMargin = "4"; }; new GuiBitmapButtonCtrl() { @@ -190,7 +190,7 @@ buttonType = "toggleButton"; useMouseEvents = "0"; groupNum = "-1"; - bitmap = "tools/gui/images/menubar/snap-objects"; + bitmapAsset = "ToolsModule:snap_objects_n_image"; textMargin = "4"; }; }; @@ -249,7 +249,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - bitmap = "tools/gui/images/dropslider"; + bitmapAsset = "ToolsModule:dropslider_n_image"; }; }; new GuiBitmapCtrl() { @@ -258,7 +258,7 @@ position = "269 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiBitmapButtonCtrl() { @@ -279,7 +279,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Object bounds selection toggle (V)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/select-bounds"; + bitmapAsset = "ToolsModule:select_bounds_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -291,7 +291,7 @@ position = "307 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiControl(ToggleButtonBar){ @@ -317,7 +317,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Toggles object center (O) and bounds center (P)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/object-center"; + bitmapAsset = "ToolsModule:object_center_n_image"; text = "Button"; groupNum = "-1"; buttonType = "ToggleButton"; @@ -329,7 +329,7 @@ Position = "23 21"; Extent = "4 4"; MinExtent = "4 4"; - bitmap = "tools/gui/images/dropdown-button-arrow"; + bitmapAsset = "ToolsModule:dropdown_button_arrow_image"; }; }; @@ -350,7 +350,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Toggles object transform (K) and world transform (L)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/world-transform"; + bitmapAsset = "ToolsModule:world_transform_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; text = ""; @@ -361,7 +361,7 @@ Position = "23 21"; Extent = "4 4"; MinExtent = "4 4"; - bitmap = "tools/gui/images/dropdown-button-arrow"; + bitmapAsset = "ToolsModule:dropdown_button_arrow_image"; }; }; }; @@ -372,7 +372,7 @@ position = "379 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiControl(ToggleNodeBar){ @@ -399,7 +399,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Enables Render of Object Node Icons (N)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/object-node-icon"; + bitmapAsset = "ToolsModule:object_node_icon_n_image"; groupNum = "-1"; buttonType = "ToggleButton"; useMouseEvents = "0"; @@ -422,7 +422,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Enables Render of Object Node Lables (SHIFT N)"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/object-node-lable"; + bitmapAsset = "ToolsModule:object_node_lable_n_image"; text = ""; groupNum = "-1"; buttonType = "ToggleButton"; @@ -436,7 +436,7 @@ position = "379 3"; Extent = "2 26"; MinExtent = "1 1"; - bitmap = "tools/gui/images/separator-h.png"; + bitmapAsset = "ToolsModule:separator_h_image"; }; new GuiControl(PrefabBar){ @@ -464,7 +464,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Make the Selection a Prefab."; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/selection-to-prefab"; + bitmapAsset = "ToolsModule:selection_to_prefab_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -487,7 +487,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Explode the Selected Prefab."; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/explode-prefab"; + bitmapAsset = "ToolsModule:explode_prefab_n_image"; text = ""; groupNum = "-1"; buttonType = "PushButton"; @@ -513,7 +513,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Update Reflection Probes"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/probe"; + bitmapAsset = "ToolsModule:probe_n_image"; text = ""; groupNum = "-1"; buttonType = "PushButton"; @@ -538,7 +538,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Open Editor Settings"; hovertime = "1000"; - bitmap = "tools/gui/images/menubar/settings"; + bitmapAsset = "ToolsModule:settings_n_image"; text = ""; groupNum = "-1"; buttonType = "PushButton"; @@ -569,7 +569,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Use object defined center (O)"; hovertime = "1000"; - iconBitmap = "tools/gui/images/menubar/object-center_n"; + bitmapAsset = "ToolsModule:object_center_n_image"; text = "Object Center"; buttonMargin = "0 4"; textMargin = "38"; @@ -594,7 +594,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Use bounding box center (P)"; hovertime = "1000"; - iconBitmap = "tools/gui/images/menubar/bounds-center_n"; + bitmapAsset = "ToolsModule:bounds_center_n_image"; text = "Bounds Center"; buttonMargin = "0 4"; textMargin = "38"; @@ -641,7 +641,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Use world normal for transformations (L)"; hovertime = "1000"; - iconBitmap = "tools/gui/images/menubar/world-transform_n"; + bitmapAsset = "ToolsModule:world_transform_n_image"; text = "World Transform"; buttonMargin = "0 4"; textMargin = "38"; @@ -667,7 +667,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Use object normal for transformations (K)"; hovertime = "1000"; - iconBitmap = "tools/gui/images/menubar/object-transform_n"; + bitmapAsset = "ToolsModule:object_transform_n_image"; text = "Object Transform"; buttonMargin = "0 4"; textMargin = "38"; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorTreeWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorTreeWindow.ed.gui index 297336551..a360e9d8d 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorTreeWindow.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorTreeWindow.ed.gui @@ -102,7 +102,7 @@ }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/clear-icon"; + bitmapAsset = "ToolsModule:clear_icon_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -351,7 +351,7 @@ groupNum = "0"; buttonType = "PushButton"; - Bitmap = "tools/gui/images/folderUp"; + Bitmap = "ToolsModule:folderUp_image"; autoSize = "0"; }; new GuiPopUpMenuCtrl(CreatorPopupMenu) { @@ -519,7 +519,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Lock Selection"; hovertime = "1000"; - bitmap = "tools/gui/images/lock"; + bitmapAsset = "ToolsModule:lock_n_image"; buttonType = "ToggleButton"; groupNum = "-1"; text = ""; @@ -542,7 +542,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Add Sim Group"; hovertime = "1000"; - bitmap = "tools/gui/images/add-simgroup-btn"; + bitmapAsset = "ToolsModule:add_simgroup_btn_n_image"; buttonType = "PushButton"; groupNum = "-1"; text = ""; @@ -567,7 +567,7 @@ tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = "Delete Selection"; hovertime = "1000"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; buttonType = "PushButton"; groupNum = "-1"; text = ""; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainImportGui.gui b/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainImportGui.gui index c013cba61..796f6a337 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainImportGui.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainImportGui.gui @@ -246,7 +246,7 @@ Visible = "1"; tooltipprofile = "ToolsGuiToolTipProfile"; hovertime = "1000"; - bitmap = "tools/gui/images/separator-v"; + bitmapAsset = "ToolsModule:separator_v_image"; wrap = "0"; }; new GuiTextCtrl() { diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui index 0d4339eae..4e92d9a80 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui @@ -32,8 +32,8 @@ anchorBottom = "0"; anchorLeft = "0"; anchorRight = "0"; - position = "315 127"; - extent = "394 514"; + position = "315 118"; + extent = "394 532"; minExtent = "358 452"; horizSizing = "center"; vertSizing = "center"; @@ -91,7 +91,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/new"; + bitmapAsset = "ToolsModule:new_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -116,7 +116,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -149,7 +149,7 @@ anchorLeft = "1"; anchorRight = "0"; position = "202 26"; - extent = "185 445"; + extent = "185 463"; minExtent = "8 2"; horizSizing = "left"; vertSizing = "height"; @@ -164,7 +164,7 @@ canSaveDynamicFields = "0"; new GuiBitmapCtrl() { - bitmap = "core/gui/images/separator-v"; + bitmap = "ToolsModule:separator_v_image"; color = "White"; wrap = "0"; position = "1 0"; @@ -256,7 +256,7 @@ canSave = "1"; canSaveDynamicFields = "0"; }; - new GuiContainer() { + new GuiContainer(BaseMapContainer) { margin = "0 0 0 0"; padding = "0 0 0 0"; anchorTop = "1"; @@ -298,7 +298,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapCtrl() { - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; color = "255 255 255 255"; wrap = "0"; position = "1 1"; @@ -312,12 +312,12 @@ tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; - internalName = "baseTexCtrl"; + internalName = "texBaseMap"; canSave = "1"; canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -334,7 +334,7 @@ profile = "ToolsGuiDefaultProfile"; visible = "1"; active = "1"; - command = "TerrainMaterialDlg.changeBase();"; + command = "TerrainMaterialDlg.updateTextureMap(\"BaseMap\");"; tooltipProfile = "ToolsGuiDefaultProfile"; tooltip = "Change the Active Diffuse Map for this layer"; hovertime = "1000"; @@ -385,6 +385,7 @@ tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; + internalName = "diffuseMapAssetId"; canSave = "1"; canSaveDynamicFields = "0"; }; @@ -401,7 +402,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "TerrainMaterialDlg.changeBase();"; + command = "TerrainMaterialDlg.updateTextureMap(\"BaseMap\");"; tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -409,7 +410,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -426,7 +427,7 @@ profile = "ToolsGuiDefaultProfile"; visible = "1"; active = "1"; - command = "TerrainMaterialDlg-->baseTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");"; + command = "TerrainMaterialDlg.clearTextureMap(\"BaseMap\");"; tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -462,6 +463,7 @@ sinkAllKeyEvents = "0"; password = "0"; passwordMask = "*"; + text = "200"; maxLength = "1024"; margin = "0 0 0 0"; padding = "0 0 0 0"; @@ -486,7 +488,7 @@ }; }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-v"; + bitmapAsset = "ToolsModule:separator_v_image"; color = "255 255 255 255"; wrap = "0"; position = "6 116"; @@ -503,7 +505,7 @@ canSave = "1"; canSaveDynamicFields = "0"; }; - new GuiContainer() { + new GuiContainer(DetailMapContainer) { margin = "0 0 0 0"; padding = "0 0 0 0"; anchorTop = "1"; @@ -525,7 +527,7 @@ canSaveDynamicFields = "0"; new GuiBitmapCtrl() { - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; color = "255 255 255 255"; wrap = "0"; position = "1 1"; @@ -539,35 +541,12 @@ tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; - internalName = "normTexCtrl"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "Normal"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 -3"; - extent = "39 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "EditorTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; + internalName = "texDetailMap"; canSave = "1"; canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -584,578 +563,7 @@ profile = "ToolsGuiDefaultProfile"; visible = "1"; active = "1"; - command = "TerrainMaterialDlg.changeNormal();"; - tooltipProfile = "ToolsGuiDefaultProfile"; - tooltip = "Change the active Normal Map for this layer."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "None"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 15"; - extent = "116 17"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { - text = "Edit"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "116 0"; - extent = "40 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - command = "TerrainMaterialDlg.changeNormal();"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - masked = "0"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "159 0"; - extent = "16 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - command = "TerrainMaterialDlg-->normTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "Parallax Scale"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "92 34"; - extent = "77 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextEditCtrl() { - historySize = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - password = "0"; - passwordMask = "*"; - text = "0.00"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "0"; - anchorBottom = "0"; - anchorLeft = "0"; - anchorRight = "0"; - position = "55 33"; - extent = "34 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiTextEditProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "parallaxScaleCtrl"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(TerrainMaterialDlgBlendHeightBaseSlider) { - range = "-0.5 0.5"; - ticks = "0"; - snap = "0"; - value = "0.5"; - useFillBar = "0"; - fillBarColor = "255 255 255 255"; - renderTicks = "1"; - position = "39 61"; - extent = "70 14"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiSliderProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "blendHeightBaseSliderCtrl"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "Blend Height"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "115 61"; - extent = "58 15"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextEditCtrl(TerrainMaterialDlgBlendHeightBaseTextEdit) { - historySize = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - password = "0"; - passwordMask = "*"; - text = "0.3"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "0"; - anchorBottom = "0"; - anchorLeft = "0"; - anchorRight = "0"; - position = "1 59"; - extent = "35 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiTextEditProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "blendHeightBaseTextEditCtrl"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiSliderCtrl(TerrainMaterialDlgBlendHeightContrastSlider) { - range = "0.0 5.0"; - ticks = "0"; - snap = "0"; - value = "1.0"; - useFillBar = "0"; - fillBarColor = "255 255 255 255"; - renderTicks = "1"; - position = "39 81"; - extent = "70 14"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiSliderProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "blendHeightContrastSliderCtrl"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "Blend Contrast"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "115 81"; - extent = "58 15"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextEditCtrl(TerrainMaterialDlgBlendHeightContrastTextEdit) { - historySize = "0"; - tabComplete = "0"; - sinkAllKeyEvents = "0"; - password = "0"; - passwordMask = "*"; - text = "0.3"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "0"; - anchorBottom = "0"; - anchorLeft = "0"; - anchorRight = "0"; - position = "1 79"; - extent = "35 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiTextEditProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "blendHeightContrastTextEditCtrl"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-v"; - color = "255 255 255 255"; - wrap = "0"; - position = "6 222"; - extent = "175 2"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiContainer() { - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "6 229"; - extent = "185 64"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiBitmapCtrl() { - bitmap = "tools/materialEditor/gui/unknownImage"; - color = "255 255 255 255"; - wrap = "0"; - position = "1 1"; - extent = "47 47"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "ormConfigTexCtrl"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "ORM Config"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 -3"; - extent = "64 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "EditorTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - masked = "0"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "1 1"; - extent = "48 48"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - command = "TerrainMaterialDlg.changeormConfig();"; - tooltipProfile = "ToolsGuiDefaultProfile"; - tooltip = "Change the active ORM Config Map for this layer."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "None"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 15"; - extent = "116 17"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiButtonCtrl() { - text = "Edit"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "116 0"; - extent = "40 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiButtonProfile"; - visible = "1"; - active = "1"; - command = "TerrainMaterialDlg.changeormConfig();"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - masked = "0"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "159 0"; - extent = "16 16"; - minExtent = "8 2"; - horizSizing = "left"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - command = "TerrainMaterialDlg-->ormConfigTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiCheckBoxCtrl() { - text = " Is sRGB"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "55 32"; - extent = "119 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiCheckBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "isSRGb"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiCheckBoxCtrl() { - text = " Invert Roughness"; - groupNum = "-1"; - buttonType = "ToggleButton"; - useMouseEvents = "0"; - position = "55 48"; - extent = "119 16"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiCheckBoxProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "invertRoughness"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - }; - new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-v"; - color = "255 255 255 255"; - wrap = "0"; - position = "6 299"; - extent = "175 2"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiContainer() { - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "6 306"; - extent = "185 72"; - minExtent = "8 2"; - horizSizing = "width"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "1"; - canSave = "1"; - canSaveDynamicFields = "0"; - - new GuiBitmapCtrl() { - bitmap = "tools/materialEditor/gui/unknownImage"; - color = "255 255 255 255"; - wrap = "0"; - position = "1 1"; - extent = "47 47"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; - hovertime = "1000"; - isContainer = "0"; - internalName = "detailTexCtrl"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiBitmapButtonCtrl() { - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; - bitmapMode = "Stretched"; - autoFitExtents = "0"; - useModifiers = "0"; - useStates = "1"; - masked = "0"; - groupNum = "-1"; - buttonType = "PushButton"; - useMouseEvents = "0"; - position = "1 1"; - extent = "48 48"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; - visible = "1"; - active = "1"; - command = "TerrainMaterialDlg.changeDetail();"; + command = "TerrainMaterialDlg.updateTextureMap(\"DetailMap\");"; tooltipProfile = "ToolsGuiDefaultProfile"; tooltip = "Change the active Detail Map for this layer."; hovertime = "1000"; @@ -1206,6 +614,7 @@ tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; + internalName = "detailMapAssetId"; canSave = "1"; canSaveDynamicFields = "0"; }; @@ -1222,7 +631,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "TerrainMaterialDlg.changeDetail();"; + command = "TerrainMaterialDlg.updateTextureMap(\"DetailMap\");"; tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -1230,7 +639,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -1247,7 +656,7 @@ profile = "ToolsGuiDefaultProfile"; visible = "1"; active = "1"; - command = "TerrainMaterialDlg-->detailTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");"; + command = "TerrainMaterialDlg.clearTextureMap(\"DetailMap\");"; tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -1283,6 +692,7 @@ sinkAllKeyEvents = "0"; password = "0"; passwordMask = "*"; + text = "2"; maxLength = "1024"; margin = "0 0 0 0"; padding = "0 0 0 0"; @@ -1334,6 +744,7 @@ sinkAllKeyEvents = "0"; password = "0"; passwordMask = "*"; + text = "1"; maxLength = "1024"; margin = "0 0 0 0"; padding = "0 0 0 0"; @@ -1385,6 +796,7 @@ sinkAllKeyEvents = "0"; password = "0"; passwordMask = "*"; + text = "50"; maxLength = "1024"; margin = "0 0 0 0"; padding = "0 0 0 0"; @@ -1407,15 +819,413 @@ canSave = "1"; canSaveDynamicFields = "0"; }; - new GuiContainer() { + }; + new GuiBitmapCtrl() { + bitmapAsset = "ToolsModule:separator_v_image"; + color = "255 255 255 255"; + wrap = "0"; + position = "6 198"; + extent = "175 2"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "bottom"; + profile = "ToolsGuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiContainer(NormalMapContainer) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "6 205"; + extent = "185 100"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "bottom"; + profile = "ToolsGuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + + new GuiBitmapCtrl() { + bitmapAsset = "ToolsModule:unknownImage_image"; + color = "255 255 255 255"; + wrap = "0"; + position = "1 1"; + extent = "47 47"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "texNormalMap"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Normal"; + maxLength = "1024"; margin = "0 0 0 0"; padding = "0 0 0 0"; anchorTop = "1"; anchorBottom = "0"; anchorLeft = "1"; anchorRight = "0"; - position = "6 216"; - extent = "174 53"; + position = "56 -3"; + extent = "39 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "EditorTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiBitmapButtonCtrl() { + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; + bitmapMode = "Stretched"; + autoFitExtents = "0"; + useModifiers = "0"; + useStates = "1"; + masked = "0"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "1 1"; + extent = "48 48"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiDefaultProfile"; + visible = "1"; + active = "1"; + command = "TerrainMaterialDlg.updateTextureMap(\"NormalMap\");"; + tooltipProfile = "ToolsGuiDefaultProfile"; + tooltip = "Change the active Normal Map for this layer."; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "None"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "56 15"; + extent = "116 17"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "bottom"; + profile = "ToolsGuiTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "normalMapAssetId"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiButtonCtrl() { + text = "Edit"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "116 0"; + extent = "40 16"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "ToolsGuiButtonProfile"; + visible = "1"; + active = "1"; + command = "TerrainMaterialDlg.updateTextureMap(\"NormalMap\");"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiBitmapButtonCtrl() { + bitmapAsset = "ToolsModule:delete_n_image"; + bitmapMode = "Stretched"; + autoFitExtents = "0"; + useModifiers = "0"; + useStates = "1"; + masked = "0"; + groupNum = "-1"; + buttonType = "PushButton"; + useMouseEvents = "0"; + position = "159 0"; + extent = "16 16"; + minExtent = "8 2"; + horizSizing = "left"; + vertSizing = "bottom"; + profile = "ToolsGuiDefaultProfile"; + visible = "1"; + active = "1"; + command = "TerrainMaterialDlg.clearTextureMap(\"NormalMap\");"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Parallax Scale"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "92 34"; + extent = "77 16"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl() { + historySize = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + password = "0"; + passwordMask = "*"; + text = "0"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "0"; + anchorBottom = "0"; + anchorLeft = "0"; + anchorRight = "0"; + position = "55 33"; + extent = "34 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiTextEditProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "parallaxScaleCtrl"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl(TerrainMaterialDlgBlendHeightBaseSlider) { + range = "-0.5 0.5"; + ticks = "0"; + snap = "0"; + value = "0"; + useFillBar = "0"; + fillBarColor = "255 255 255 255"; + renderTicks = "1"; + position = "39 61"; + extent = "70 14"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiSliderProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "blendHeightBaseSliderCtrl"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Blend Height"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "115 61"; + extent = "58 15"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl(TerrainMaterialDlgBlendHeightBaseTextEdit) { + historySize = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + password = "0"; + passwordMask = "*"; + text = "0"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "0"; + anchorBottom = "0"; + anchorLeft = "0"; + anchorRight = "0"; + position = "1 59"; + extent = "35 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiTextEditProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "blendHeightBaseTextEditCtrl"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiSliderCtrl(TerrainMaterialDlgBlendHeightContrastSlider) { + range = "0 5"; + ticks = "0"; + snap = "0"; + value = "1"; + useFillBar = "0"; + fillBarColor = "255 255 255 255"; + renderTicks = "1"; + position = "39 81"; + extent = "70 14"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiSliderProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "blendHeightContrastSliderCtrl"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "Blend Contrast"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "115 81"; + extent = "58 15"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "1"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextEditCtrl(TerrainMaterialDlgBlendHeightContrastTextEdit) { + historySize = "0"; + tabComplete = "0"; + sinkAllKeyEvents = "0"; + password = "0"; + passwordMask = "*"; + text = "1"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "0"; + anchorBottom = "0"; + anchorLeft = "0"; + anchorRight = "0"; + position = "1 79"; + extent = "35 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiTextEditProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "blendHeightContrastTextEditCtrl"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + }; + new GuiBitmapCtrl() { + bitmapAsset = "ToolsModule:separator_v_image"; + color = "255 255 255 255"; + wrap = "0"; + position = "6 307"; + extent = "175 2"; + minExtent = "8 2"; + horizSizing = "width"; + vertSizing = "bottom"; + profile = "ToolsGuiDefaultProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiContainer(ORMMapContainer) { + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "6 314"; + extent = "185 64"; minExtent = "8 2"; horizSizing = "width"; vertSizing = "bottom"; @@ -1429,7 +1239,7 @@ canSaveDynamicFields = "0"; new GuiBitmapCtrl() { - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; color = "255 255 255 255"; wrap = "0"; position = "1 1"; @@ -1443,12 +1253,35 @@ tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; - internalName = "compositeTexCtrl"; + internalName = "texORMConfigMap"; + canSave = "1"; + canSaveDynamicFields = "0"; + }; + new GuiTextCtrl() { + text = "ORM Config"; + maxLength = "1024"; + margin = "0 0 0 0"; + padding = "0 0 0 0"; + anchorTop = "1"; + anchorBottom = "0"; + anchorLeft = "1"; + anchorRight = "0"; + position = "56 -3"; + extent = "64 18"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "EditorTextProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; canSave = "1"; canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -1465,32 +1298,9 @@ profile = "ToolsGuiDefaultProfile"; visible = "1"; active = "1"; - command = "TerrainMaterialDlg.changecomposite();"; + command = "TerrainMaterialDlg.updateTextureMap(\"ORMConfigMap\");"; tooltipProfile = "ToolsGuiDefaultProfile"; - tooltip = "Change the active composite Map for this layer."; - hovertime = "1000"; - isContainer = "0"; - canSave = "1"; - canSaveDynamicFields = "0"; - }; - new GuiTextCtrl() { - text = "Composite"; - maxLength = "1024"; - margin = "0 0 0 0"; - padding = "0 0 0 0"; - anchorTop = "1"; - anchorBottom = "0"; - anchorLeft = "1"; - anchorRight = "0"; - position = "56 -3"; - extent = "61 18"; - minExtent = "8 2"; - horizSizing = "right"; - vertSizing = "bottom"; - profile = "EditorTextProfile"; - visible = "1"; - active = "1"; - tooltipProfile = "ToolsGuiToolTipProfile"; + tooltip = "Change the active ORM Config Map for this layer."; hovertime = "1000"; isContainer = "0"; canSave = "1"; @@ -1505,8 +1315,8 @@ anchorBottom = "0"; anchorLeft = "1"; anchorRight = "0"; - position = "56 17"; - extent = "79 17"; + position = "56 15"; + extent = "116 17"; minExtent = "8 2"; horizSizing = "width"; vertSizing = "bottom"; @@ -1516,6 +1326,7 @@ tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; + internalName = "ORMMapAssetId"; canSave = "1"; canSaveDynamicFields = "0"; }; @@ -1524,7 +1335,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - position = "111 0"; + position = "116 0"; extent = "40 16"; minExtent = "8 2"; horizSizing = "left"; @@ -1532,7 +1343,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "TerrainMaterialDlg.changecomposite();"; + command = "TerrainMaterialDlg.updateTextureMap(\"OrmConfigMap\");"; tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -1540,7 +1351,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -1549,7 +1360,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - position = "154 0"; + position = "159 0"; extent = "16 16"; minExtent = "8 2"; horizSizing = "left"; @@ -1557,35 +1368,56 @@ profile = "ToolsGuiDefaultProfile"; visible = "1"; active = "1"; - command = "TerrainMaterialDlg-->compositeTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");"; + command = "TerrainMaterialDlg.clearTextureMap(\"ORMConfigMap\");"; tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; canSave = "1"; canSaveDynamicFields = "0"; }; - new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-v"; - color = "255 255 255 255"; - wrap = "0"; - position = "4 51"; - extent = "148 2"; + new GuiCheckBoxCtrl() { + text = " Is sRGB"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "55 32"; + extent = "119 16"; minExtent = "8 2"; - horizSizing = "width"; + horizSizing = "right"; vertSizing = "bottom"; - profile = "ToolsGuiDefaultProfile"; + profile = "ToolsGuiCheckBoxProfile"; visible = "1"; active = "1"; tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; + internalName = "isSRGB"; canSave = "1"; canSaveDynamicFields = "0"; }; + new GuiCheckBoxCtrl() { + text = " Invert Roughness"; + groupNum = "-1"; + buttonType = "ToggleButton"; + useMouseEvents = "0"; + position = "55 48"; + extent = "119 16"; + minExtent = "8 2"; + horizSizing = "right"; + vertSizing = "bottom"; + profile = "ToolsGuiCheckBoxProfile"; + visible = "1"; + active = "1"; + tooltipProfile = "ToolsGuiToolTipProfile"; + hovertime = "1000"; + isContainer = "0"; + internalName = "invertRoughness"; + canSave = "1"; + canSaveDynamicFields = "0"; }; }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/separator-v"; + bitmapAsset = "ToolsModule:separator_v_image"; color = "255 255 255 255"; wrap = "0"; position = "6 381"; @@ -1602,7 +1434,7 @@ canSave = "1"; canSaveDynamicFields = "0"; }; - new GuiContainer() { + new GuiContainer(MacroMapContainer) { margin = "0 0 0 0"; padding = "0 0 0 0"; anchorTop = "1"; @@ -1624,7 +1456,7 @@ canSaveDynamicFields = "0"; new GuiBitmapCtrl() { - bitmap = "tools/materialEditor/gui/unknownImage"; + bitmapAsset = "ToolsModule:unknownImage_image"; color = "255 255 255 255"; wrap = "0"; position = "1 1"; @@ -1638,12 +1470,12 @@ tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; - internalName = "macroTexCtrl"; + internalName = "texMacroMap"; canSave = "1"; canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/materialEditor/gui/cubemapBtnBorder"; + bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -1660,7 +1492,7 @@ profile = "ToolsGuiDefaultProfile"; visible = "1"; active = "1"; - command = "TerrainMaterialDlg.changeMacro();"; + command = "TerrainMaterialDlg.updateTextureMap(\"MacroMap\");"; tooltipProfile = "ToolsGuiDefaultProfile"; tooltip = "Change the active Macro Map for this layer."; hovertime = "1000"; @@ -1711,6 +1543,7 @@ tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; + internalName = "macroMapAssetId"; canSave = "1"; canSaveDynamicFields = "0"; }; @@ -1727,7 +1560,7 @@ profile = "ToolsGuiButtonProfile"; visible = "1"; active = "1"; - command = "TerrainMaterialDlg.changeMacro();"; + command = "TerrainMaterialDlg.updateTextureMap(\"MacroMap\");"; tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -1735,7 +1568,7 @@ canSaveDynamicFields = "0"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; bitmapMode = "Stretched"; autoFitExtents = "0"; useModifiers = "0"; @@ -1752,7 +1585,7 @@ profile = "ToolsGuiDefaultProfile"; visible = "1"; active = "1"; - command = "TerrainMaterialDlg-->macroTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");"; + command = "TerrainMaterialDlg.clearTextureMap(\"MacroMap\");"; tooltipProfile = "ToolsGuiToolTipProfile"; hovertime = "1000"; isContainer = "0"; @@ -1788,6 +1621,7 @@ sinkAllKeyEvents = "0"; password = "0"; passwordMask = "*"; + text = "200"; maxLength = "1024"; margin = "0 0 0 0"; padding = "0 0 0 0"; @@ -1839,6 +1673,7 @@ sinkAllKeyEvents = "0"; password = "0"; passwordMask = "*"; + text = "0.7"; maxLength = "1024"; margin = "0 0 0 0"; padding = "0 0 0 0"; @@ -1890,6 +1725,7 @@ sinkAllKeyEvents = "0"; password = "0"; passwordMask = "*"; + text = "500"; maxLength = "1024"; margin = "0 0 0 0"; padding = "0 0 0 0"; @@ -1916,7 +1752,7 @@ }; new GuiControl() { position = "6 42"; - extent = "189 455"; + extent = "189 473"; minExtent = "8 2"; horizSizing = "width"; vertSizing = "height"; @@ -1945,7 +1781,7 @@ anchorLeft = "1"; anchorRight = "0"; position = "0 0"; - extent = "189 436"; + extent = "189 454"; minExtent = "8 2"; horizSizing = "width"; vertSizing = "height"; @@ -1981,7 +1817,7 @@ canRenameObjects = "1"; renameInternal = "0"; position = "1 1"; - extent = "136 798"; + extent = "136 147"; minExtent = "8 2"; horizSizing = "right"; vertSizing = "bottom"; @@ -2003,7 +1839,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - position = "202 476"; + position = "202 494"; extent = "98 22"; minExtent = "8 2"; horizSizing = "left"; @@ -2023,7 +1859,7 @@ groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; - position = "307 476"; + position = "307 494"; extent = "80 22"; minExtent = "8 2"; horizSizing = "left"; @@ -2039,11 +1875,11 @@ canSaveDynamicFields = "0"; }; new GuiBitmapCtrl() { - bitmap = "tools/gui/images/inactive-overlay"; + bitmapAsset = "ToolsModule:inactive_overlay_image"; color = "255 255 255 255"; wrap = "0"; position = "199 23"; - extent = "190 349"; + extent = "190 367"; minExtent = "8 2"; horizSizing = "left"; vertSizing = "height"; @@ -2067,7 +1903,7 @@ anchorBottom = "0"; anchorLeft = "1"; anchorRight = "0"; - position = "0 132"; + position = "0 151"; extent = "190 64"; minExtent = "8 2"; horizSizing = "width"; diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/objectBuilderGui.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/objectBuilderGui.ed.gui index fada5f6f8..8341ebc7f 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/objectBuilderGui.ed.gui +++ b/Templates/BaseGame/game/tools/worldEditor/gui/objectBuilderGui.ed.gui @@ -299,7 +299,120 @@ function ObjectBuilderGui::gotTerrainAsset(%this, %name) //%this.controls[%this.currentControl].setValue(%name); } //------------------------------------------------------------------------------ +function ObjectBuilderGui::createImageAssetType(%this, %index) +{ + if(%index >= %this.numFields || %this.field[%index, name] $= "") + { + error("ObjectBuilderGui::createImageAssetType: invalid field"); + return; + } + // + if(%this.field[%index, text] $= "") + %name = %this.field[%index, name]; + else + %name = %this.field[%index, text]; + + // + /*%this.textControls[%this.numControls] = new GuiTextCtrl() { + profile = "ToolsGuiTextRightProfile"; + internalName = "assetText"; + text = %name; + extent = %this.fieldNameExtent; + position = %this.curXPos @ " " @ %this.curYPos; + modal = "1"; + }; + + // + %this.controls[%this.numControls] = new GuiButtonCtrl() { + HorizSizing = "width"; + profile = "ToolsGuiButtonProfile"; + internalName = "assetButton"; + extent = %this.fileButtonExtent; + position = %this.curXPos + %this.columnOffset @ " " @ %this.curYPos; + modal = "1"; + command = %this @ ".getImageAsset(" @ %index @ ");"; + }; + + %val = %this.field[%index, value]; + %this.controls[%this.numControls].setText(fileBase(%val) @ fileExt(%val));*/ + + %this.textControls[%this.numControls] = new GuiTextCtrl() { + profile = "ToolsGuiTextRightProfile"; + text = %name; + extent = %this.fieldNameExtent; + position = %this.curXPos @ " " @ %this.curYPos; + modal = "1"; + }; + + // + %this.controls[%this.numControls] = new GuiControl() { + HorizSizing = "width"; + profile = "ToolsGuiDefaultProfile"; + extent = %this.textEditExtent; + position = %this.curXPos + %this.columnOffset @ " " @ %this.curYPos; + modal = "1"; + }; + + %text = new GuiTextEditCtrl() { + class = ObjectBuilderGuiTextEditCtrl; + internalName = "assetText"; + HorizSizing = "width"; + profile = "ToolsGuiTextEditProfile"; + extent = getWord(%this.textEditExtent,0) - getWord(%this.matButtonExtent,0) - 2 @ " " @ getWord(%this.textEditExtent,1); + text = %this.field[%index, value]; + position = "0 0"; + modal = "1"; + }; + %this.controls[%this.numControls].addGuiControl(%text); + + %button = new GuiBitmapButtonCtrl() { + internalName = "assetButton"; + HorizSizing = "left"; + profile = "ToolsGuiButtonProfile"; + extent = %this.matButtonExtent; + position = getWord(%this.textEditExtent,0) - getWord(%this.matButtonExtent,0) @ " 0"; + modal = "1"; + command = %this @ ".getImageAsset(" @ %index @ ");"; + }; + %button.setBitmap("tools/materialEditor/gui/change-material-btn"); + %this.controls[%this.numControls].addGuiControl(%button); + + %this.numControls++; + %this.curYPos += %this.defaultFieldStep; +} + +function ObjectBuilderGui::getImageAsset(%this, %index) +{ + if(%index >= %this.numFields || %this.field[%index, name] $= "") + { + error("ObjectBuilderGui::getImageAsset: invalid field"); + return; + } + + %val = %this.field[%index, ext]; + + //%path = filePath(%val); + //%ext = fileExt(%val); + + %this.currentControl = %index; + AssetBrowser.showDialog("ImageAsset", %this @ ".gotImageAsset", "", "", ""); + //getLoadFilename( %val @ "|" @ %val, %this @ ".gotFileName", %this.lastPath ); +} + +function ObjectBuilderGui::gotImageAsset(%this, %name) +{ + %index = %this.currentControl; + + %this.field[%index, value] = %name; + %this.controls[%this.currentControl]-->assetText.setText(%name); + + %this.lastPath = %name; + + // This doesn't work for button controls as getValue returns their state! + //%this.controls[%this.currentControl].setValue(%name); +} +//------------------------------------------------------------------------------ function ObjectBuilderGui::createMaterialNameType(%this, %index) { if(%index >= %this.numFields || %this.field[%index, name] $= "") @@ -564,6 +677,9 @@ function ObjectBuilderGui::process(%this) case "TypeTerrainAsset": %this.createTerrainAssetType(%i); + case "TypeImageAsset": + %this.createImageAssetType(%i); + case "TypeMaterialName": %this.createMaterialNameType(%i); @@ -636,6 +752,12 @@ function ObjectBuilderGui::onOK(%this) %this.field[%i, value] = %this.controls[%i]-->MatText.getValue(); continue; } + if (%this.field[%i, type] $= "TypeImageAsset" || + %this.field[%i, type] $= "TypeTerrainAsset") + { + %this.field[%i, value] = %this.controls[%i]-->assetText.getText(); + continue; + } %this.field[%i, value] = %this.controls[%i].getValue(); } @@ -736,7 +858,7 @@ function ObjectBuilderGui::buildScatterSky( %this, %dontWarnAboutSun ) // This is a trick... any fields added after process won't show // up as controls, but will be applied to the created object. %this.addField( "flareType", "TypeLightFlareDataPtr", "Flare", "ScatterSkyFlareExample" ); - %this.addField( "moonMat", "TypeMaterialName", "Moon Material", "Moon_Glow_Mat" ); + %this.addField( "moonMatAsset", "TypeMaterialAsset", "Moon Material", "Core_Rendering:moon_wglow" ); %this.addField( "nightCubemap", "TypeCubemapName", "Night Cubemap", "NightCubemap" ); %this.addField( "useNightCubemap", "TypeBool", "Use Night Cubemap", "true" ); @@ -746,7 +868,8 @@ function ObjectBuilderGui::buildCloudLayer(%this) { OBObjectName.setValue( "" ); %this.objectClassName = "CloudLayer"; - %this.addField( "texture", "TypeImageFilename", "Texture", "core/rendering/images/clouds_normal_displacement" ); + %this.addField( "textureAsset", "TypeImageAsset", "Image", "Core_Rendering:clouds_normal_displacement_image" ); + //%this.addField( "textureFile", "TypeImageFilename", "Texture", "core/rendering/images/clouds_normal_displacement" ); %this.process(); } diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/profiles.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/gui/profiles.ed.tscript index c03e56a9c..00a6e8507 100644 --- a/Templates/BaseGame/game/tools/worldEditor/gui/profiles.ed.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/gui/profiles.ed.tscript @@ -64,7 +64,7 @@ singleton GuiControlProfile (EditorScrollProfile) border = 3; borderThickness = 2; borderColor = "0 0 0"; - bitmap = "tools/gui/images/scrollBar"; + bitmapAsset = "ToolsModule:scrollBar_image"; hasBitmapArray = true; category = "Editor"; }; @@ -80,7 +80,7 @@ singleton GuiControlProfile (GuiEditorClassProfile) fontColorHL = "50 50 50"; fixedExtent = true; justify = "center"; - bitmap = "tools/gui/images/scrollBar"; + bitmapAsset = "ToolsModule:scrollBar_image"; hasBitmapArray = true; category = "Editor"; }; diff --git a/Templates/BaseGame/game/tools/worldEditor/images/CUR_3darrow_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3darrow_image.asset.taml new file mode 100644 index 000000000..3ea6f520a --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3darrow_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/CUR_3ddiagleft_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3ddiagleft_image.asset.taml new file mode 100644 index 000000000..4d957b90f --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3ddiagleft_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/CUR_3ddiagright_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3ddiagright_image.asset.taml new file mode 100644 index 000000000..6cbc1e611 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3ddiagright_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/CUR_3dleftright_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3dleftright_image.asset.taml new file mode 100644 index 000000000..4fc98310a --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3dleftright_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/CUR_3dupdown_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3dupdown_image.asset.taml new file mode 100644 index 000000000..ae8f93b93 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/CUR_3dupdown_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/CUR_grab_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/CUR_grab_image.asset.taml new file mode 100644 index 000000000..86bd7e429 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/CUR_grab_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/CUR_hand_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/CUR_hand_image.asset.taml new file mode 100644 index 000000000..b10c6ca09 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/CUR_hand_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/CUR_rotate_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/CUR_rotate_image.asset.taml new file mode 100644 index 000000000..c2f1bb8ab --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/CUR_rotate_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/LockedHandle_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/LockedHandle_image.asset.taml new file mode 100644 index 000000000..7154702dc --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/LockedHandle_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/SelectHandle_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/SelectHandle_image.asset.taml new file mode 100644 index 000000000..98ea4f73a --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/SelectHandle_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/boxBrush_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/boxBrush_d_image.asset.taml new file mode 100644 index 000000000..f9f6eb9b8 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/boxBrush_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/boxBrush_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/boxBrush_h_image.asset.taml new file mode 100644 index 000000000..67f8e00a5 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/boxBrush_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/boxBrush_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/boxBrush_n_image.asset.taml new file mode 100644 index 000000000..3a67c78e0 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/boxBrush_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_d_image.asset.taml new file mode 100644 index 000000000..a5a5bbe32 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_h_image.asset.taml new file mode 100644 index 000000000..0ced2cc4e --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_n_image.asset.taml new file mode 100644 index 000000000..184c1a69e --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/brushAdjustHeight_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_d_image.asset.taml new file mode 100644 index 000000000..32fc88c1b --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_h_image.asset.taml new file mode 100644 index 000000000..44e6b3b70 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_n_image.asset.taml new file mode 100644 index 000000000..82d6a01b7 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/brushPaintNoise_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion_d_image.asset.taml new file mode 100644 index 000000000..33c6ba5b3 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion_h_image.asset.taml new file mode 100644 index 000000000..227588229 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion_image.asset.taml new file mode 100644 index 000000000..22fbd4ba2 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/brushThermalErosion_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/circleBrush_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/circleBrush_d_image.asset.taml new file mode 100644 index 000000000..2fa762a8d --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/circleBrush_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/circleBrush_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/circleBrush_h_image.asset.taml new file mode 100644 index 000000000..38b6b165a --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/circleBrush_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/circleBrush_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/circleBrush_n_image.asset.taml new file mode 100644 index 000000000..ca8989190 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/circleBrush_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_d_image.asset.taml new file mode 100644 index 000000000..233d12fe9 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_h_image.asset.taml new file mode 100644 index 000000000..2302e9801 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_n_image.asset.taml new file mode 100644 index 000000000..593e37c58 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/clearEmpty_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/depthviz_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/depthviz_image.asset.taml new file mode 100644 index 000000000..4e42e6845 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/depthviz_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_d_image.asset.taml new file mode 100644 index 000000000..48d49d490 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_h_image.asset.taml new file mode 100644 index 000000000..9367b6bb0 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_n_image.asset.taml new file mode 100644 index 000000000..013496913 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/flattenHeight_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/images_DefaultHandle_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/images_DefaultHandle_image.asset.taml new file mode 100644 index 000000000..680536f67 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/images_DefaultHandle_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_d_image.asset.taml new file mode 100644 index 000000000..acbe60b8d --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_h_image.asset.taml new file mode 100644 index 000000000..fbac68e31 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_n_image.asset.taml new file mode 100644 index 000000000..d28a500d8 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/lowerHeight_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/maskBrush_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/maskBrush_d_image.asset.taml new file mode 100644 index 000000000..e687b3079 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/maskBrush_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/maskBrush_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/maskBrush_h_image.asset.taml new file mode 100644 index 000000000..b443ed982 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/maskBrush_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/maskBrush_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/maskBrush_n_image.asset.taml new file mode 100644 index 000000000..98f958389 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/maskBrush_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_d_image.asset.taml new file mode 100644 index 000000000..fd3438b88 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_h_image.asset.taml new file mode 100644 index 000000000..b0e2fbf9d --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_n_image.asset.taml new file mode 100644 index 000000000..7a9b69dda --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/raiseHeight_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_mesh_road_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_mesh_road_d_image.asset.taml new file mode 100644 index 000000000..19a5d3a5b --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_mesh_road_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_mesh_road_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_mesh_road_h_image.asset.taml new file mode 100644 index 000000000..5d36f13dc --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_mesh_road_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_mesh_road_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_mesh_road_n_image.asset.taml new file mode 100644 index 000000000..bdab3c75c --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_mesh_road_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_point_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_point_d_image.asset.taml new file mode 100644 index 000000000..928eccb65 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_point_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_point_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_point_h_image.asset.taml new file mode 100644 index 000000000..32d4b1cd1 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_point_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_point_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_point_n_image.asset.taml new file mode 100644 index 000000000..01fd873f3 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_point_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_river_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_river_d_image.asset.taml new file mode 100644 index 000000000..b87c2a278 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_river_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_river_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_river_h_image.asset.taml new file mode 100644 index 000000000..0ac1636ce --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_river_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_river_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_river_n_image.asset.taml new file mode 100644 index 000000000..c31605af8 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_river_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_road_path_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_road_path_d_image.asset.taml new file mode 100644 index 000000000..5e628bc49 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_road_path_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_road_path_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_road_path_h_image.asset.taml new file mode 100644 index 000000000..60fbb19b6 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_road_path_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_road_path_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_road_path_n_image.asset.taml new file mode 100644 index 000000000..6d945cd45 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/add_road_path_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_d_image.asset.taml new file mode 100644 index 000000000..ec645e6d5 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_h_image.asset.taml new file mode 100644 index 000000000..6b71a6c9f --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_n_image.asset.taml new file mode 100644 index 000000000..676c27b02 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_profile_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_profile_d_image.asset.taml new file mode 100644 index 000000000..9c0ec7a27 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_profile_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_profile_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_profile_h_image.asset.taml new file mode 100644 index 000000000..6f454997d --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_profile_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_profile_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_profile_n_image.asset.taml new file mode 100644 index 000000000..3be72edaa --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_profile_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_spline_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_spline_d_image.asset.taml new file mode 100644 index 000000000..0793189a9 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_spline_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_spline_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_spline_h_image.asset.taml new file mode 100644 index 000000000..33f2f3224 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_spline_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_spline_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_spline_n_image.asset.taml new file mode 100644 index 000000000..22afda04b --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_spline_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_texture_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_texture_d_image.asset.taml new file mode 100644 index 000000000..bc825132f --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_texture_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_texture_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_texture_h_image.asset.taml new file mode 100644 index 000000000..23684173c --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_texture_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_texture_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_texture_n_image.asset.taml new file mode 100644 index 000000000..d60f6fd28 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/show_texture_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/move_point_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/move_point_d_image.asset.taml new file mode 100644 index 000000000..c80bb52ce --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/move_point_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/move_point_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/move_point_h_image.asset.taml new file mode 100644 index 000000000..4c2dc66a7 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/move_point_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/move_point_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/move_point_n_image.asset.taml new file mode 100644 index 000000000..6667cd549 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/move_point_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate_point_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate_point_d_image.asset.taml new file mode 100644 index 000000000..5b812d06a --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate_point_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate_point_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate_point_h_image.asset.taml new file mode 100644 index 000000000..24ba7e00c --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate_point_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate_point_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate_point_n_image.asset.taml new file mode 100644 index 000000000..feca820dc --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/rotate_point_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/scale_point_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/scale_point_d_image.asset.taml new file mode 100644 index 000000000..8a5a9d35c --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/scale_point_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/scale_point_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/scale_point_h_image.asset.taml new file mode 100644 index 000000000..ed46c2645 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/scale_point_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/scale_point_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/scale_point_n_image.asset.taml new file mode 100644 index 000000000..35d27e9b6 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/scale_point_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract_point_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract_point_d_image.asset.taml new file mode 100644 index 000000000..17130afee --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract_point_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract_point_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract_point_h_image.asset.taml new file mode 100644 index 000000000..1caa3f710 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract_point_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract_point_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract_point_n_image.asset.taml new file mode 100644 index 000000000..a7886b7aa --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/subtract_point_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/setEmpty_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/setEmpty_d_image.asset.taml new file mode 100644 index 000000000..f4ef93ac3 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/setEmpty_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/setEmpty_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/setEmpty_h_image.asset.taml new file mode 100644 index 000000000..e298151ec --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/setEmpty_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/setEmpty_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/setEmpty_n_image.asset.taml new file mode 100644 index 000000000..b5ca5559d --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/setEmpty_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/setHeight_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/setHeight_d_image.asset.taml new file mode 100644 index 000000000..50b15f65b --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/setHeight_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/setHeight_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/setHeight_h_image.asset.taml new file mode 100644 index 000000000..9d5f2fb07 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/setHeight_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/setHeight_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/setHeight_n_image.asset.taml new file mode 100644 index 000000000..376203b09 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/setHeight_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_d_image.asset.taml new file mode 100644 index 000000000..e1bee01c4 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_h_image.asset.taml new file mode 100644 index 000000000..5016be488 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_n_image.asset.taml new file mode 100644 index 000000000..5648ccc00 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/smoothHeight_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/softCurve_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/softCurve_d_image.asset.taml new file mode 100644 index 000000000..744ad1f67 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/softCurve_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/softCurve_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/softCurve_h_image.asset.taml new file mode 100644 index 000000000..99344fa54 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/softCurve_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/softCurve_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/softCurve_n_image.asset.taml new file mode 100644 index 000000000..5e1c0c96d --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/softCurve_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/new_layer_icon_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/new_layer_icon_image.asset.taml new file mode 100644 index 000000000..be88d0fcc --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/new_layer_icon_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_d_image.asset.taml new file mode 100644 index 000000000..8eeb20a5e --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_h_image.asset.taml new file mode 100644 index 000000000..9c2a18bd9 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_large_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_large_image.asset.taml new file mode 100644 index 000000000..2cc58eaf0 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_large_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_n_image.asset.taml new file mode 100644 index 000000000..73ddf687d --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_new_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_new_h_image.asset.taml new file mode 100644 index 000000000..cbedb4db7 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_new_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_new_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_new_n_image.asset.taml new file mode 100644 index 000000000..36980b9da --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/terrainpainter/terrain_painter_border_new_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd_person_camera_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd_person_camera_d_image.asset.taml new file mode 100644 index 000000000..fc55fcc26 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd_person_camera_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd_person_camera_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd_person_camera_h_image.asset.taml new file mode 100644 index 000000000..930f11ee6 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd_person_camera_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd_person_camera_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd_person_camera_n_image.asset.taml new file mode 100644 index 000000000..79515e254 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/3rd_person_camera_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_d_image.asset.taml new file mode 100644 index 000000000..bd2b058d1 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_h_image.asset.taml new file mode 100644 index 000000000..e97c8f3b0 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_n_image.asset.taml new file mode 100644 index 000000000..47fbbb589 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/camera_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock_editor_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock_editor_d_image.asset.taml new file mode 100644 index 000000000..f52a2c309 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock_editor_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock_editor_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock_editor_h_image.asset.taml new file mode 100644 index 000000000..cd810e238 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock_editor_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock_editor_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock_editor_n_image.asset.taml new file mode 100644 index 000000000..0cefa6991 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/datablock_editor_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui_d_image.asset.taml new file mode 100644 index 000000000..b8845e1cd --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui_h_image.asset.taml new file mode 100644 index 000000000..a2660d674 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui_image.asset.taml new file mode 100644 index 000000000..02004402f --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/gui_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/material_editor_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/material_editor_d_image.asset.taml new file mode 100644 index 000000000..44089d2c9 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/material_editor_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/material_editor_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/material_editor_h_image.asset.taml new file mode 100644 index 000000000..06a92c886 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/material_editor_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/material_editor_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/material_editor_n_image.asset.taml new file mode 100644 index 000000000..ce5198aee --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/material_editor_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh_road_editor_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh_road_editor_d_image.asset.taml new file mode 100644 index 000000000..2a949ad60 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh_road_editor_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh_road_editor_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh_road_editor_h_image.asset.taml new file mode 100644 index 000000000..e63949286 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh_road_editor_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh_road_editor_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh_road_editor_n_image.asset.taml new file mode 100644 index 000000000..0f45b9ee6 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/mesh_road_editor_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea_editor_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea_editor_d_image.asset.taml new file mode 100644 index 000000000..b339490e2 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea_editor_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea_editor_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea_editor_h_image.asset.taml new file mode 100644 index 000000000..2a3d851a9 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea_editor_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea_editor_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea_editor_n_image.asset.taml new file mode 100644 index 000000000..b05d3b2e7 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/missionarea_editor_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint_terrain_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint_terrain_d_image.asset.taml new file mode 100644 index 000000000..50dd085a8 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint_terrain_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint_terrain_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint_terrain_h_image.asset.taml new file mode 100644 index 000000000..9ccb49098 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint_terrain_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint_terrain_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint_terrain_n_image.asset.taml new file mode 100644 index 000000000..16246fe91 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/paint_terrain_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_d_image.asset.taml new file mode 100644 index 000000000..bdd815ca8 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_h_image.asset.taml new file mode 100644 index 000000000..2628868d3 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_n_image.asset.taml new file mode 100644 index 000000000..e761ea22d --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/particleeditor_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_d_image.asset.taml new file mode 100644 index 000000000..712648c05 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_h_image.asset.taml new file mode 100644 index 000000000..8d577f919 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_n_image.asset.taml new file mode 100644 index 000000000..4dfaf5c5a --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/playbutton_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_d_image.asset.taml new file mode 100644 index 000000000..174506aca --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_h_image.asset.taml new file mode 100644 index 000000000..67ac7db78 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_n_image.asset.taml new file mode 100644 index 000000000..d244507c9 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/player_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/river_editor_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/river_editor_d_image.asset.taml new file mode 100644 index 000000000..7dbe9c3a8 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/river_editor_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/river_editor_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/river_editor_h_image.asset.taml new file mode 100644 index 000000000..24716026f --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/river_editor_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/river_editor_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/river_editor_n_image.asset.taml new file mode 100644 index 000000000..1a63b1064 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/river_editor_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/road_path_editor_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/road_path_editor_d_image.asset.taml new file mode 100644 index 000000000..a1552429e --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/road_path_editor_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/road_path_editor_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/road_path_editor_h_image.asset.taml new file mode 100644 index 000000000..fbfc057e7 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/road_path_editor_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/road_path_editor_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/road_path_editor_n_image.asset.taml new file mode 100644 index 000000000..e096a2e44 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/road_path_editor_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt_terrain_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt_terrain_d_image.asset.taml new file mode 100644 index 000000000..cc073951b --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt_terrain_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt_terrain_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt_terrain_h_image.asset.taml new file mode 100644 index 000000000..3562075b4 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt_terrain_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt_terrain_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt_terrain_n_image.asset.taml new file mode 100644 index 000000000..2aa9f68df --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/sculpt_terrain_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape_editor_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape_editor_d_image.asset.taml new file mode 100644 index 000000000..1d2fe11b2 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape_editor_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape_editor_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape_editor_h_image.asset.taml new file mode 100644 index 000000000..093d4aa8a --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape_editor_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape_editor_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape_editor_n_image.asset.taml new file mode 100644 index 000000000..10c02ef78 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/shape_editor_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform_objects_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform_objects_d_image.asset.taml new file mode 100644 index 000000000..9aa8c0cf6 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform_objects_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform_objects_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform_objects_h_image.asset.taml new file mode 100644 index 000000000..04d7cc6c1 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform_objects_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform_objects_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform_objects_n_image.asset.taml new file mode 100644 index 000000000..15ba0a376 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/transform_objects_n_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/world_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/world_d_image.asset.taml new file mode 100644 index 000000000..f126e672a --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/world_d_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/world_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/world_h_image.asset.taml new file mode 100644 index 000000000..75f129d51 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/world_h_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/images/toolbar/world_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/world_image.asset.taml new file mode 100644 index 000000000..d0e202d4e --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/images/toolbar/world_image.asset.taml @@ -0,0 +1,8 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript index ee4e7bfb2..70e8f9968 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript @@ -223,7 +223,7 @@ function EditorGui::init(%this) %this.setMenuDefaultState(); - EWorldEditorToggleCamera.setBitmap("tools/worldEditor/images/toolbar/player"); + EWorldEditorToggleCamera.setBitmap("ToolsModule:player_n_image"); /* EWorldEditorCameraSpeed.clear(); @@ -366,7 +366,7 @@ function EditorGui::addToEditorsMenu( %this, %displayName, %accel, %newPlugin ) return %accel; } -function EditorGui::addToToolsToolbar( %this, %pluginName, %internalName, %bitmap, %tooltip ) +function EditorGui::addToToolsToolbar( %this, %pluginName, %internalName, %imageAsset, %tooltip ) { %count = ToolsToolbarArray.getCount(); @@ -401,7 +401,7 @@ function EditorGui::addToToolsToolbar( %this, %pluginName, %internalName, %bitma tooltipprofile = "ToolsGuiToolTipProfile"; ToolTip = %tooltip; hovertime = "750"; - bitmap = %bitmap; + bitmapAsset = %imageAsset; buttonType = "RadioButton"; groupNum = "0"; useMouseEvents = "0"; @@ -800,14 +800,14 @@ function EditorGui::syncCameraGui( %this ) if(LocalClientConnection.camera.newtonRotation == true) { EditorGui-->NewtonianRotationCamera.setStateOn(true); - EWorldEditorToggleCamera.setBitmap("tools/gui/images/menubar/smooth-cam-rot"); + EWorldEditorToggleCamera.setBitmap("ToolsModule:smooth_cam_rot_n_image"); %flyModeRadioItem = 4; EditorGuiStatusBar.setCamera("Smooth Rot Camera"); } else { EditorGui-->NewtonianCamera.setStateOn(true); - EWorldEditorToggleCamera.setBitmap("tools/gui/images/menubar/smooth-cam"); + EWorldEditorToggleCamera.setBitmap("ToolsModule:smooth_cam_n_image"); %flyModeRadioItem = 3; EditorGuiStatusBar.setCamera("Smooth Camera"); } @@ -815,14 +815,14 @@ function EditorGui::syncCameraGui( %this ) else if(%mode $= "EditOrbit") { EditorGui-->OrbitCamera.setStateOn(true); - EWorldEditorToggleCamera.setBitmap("tools/gui/images/menubar/orbit-cam"); + EWorldEditorToggleCamera.setBitmap("ToolsModule:orbit_cam_n_image"); %flyModeRadioItem = 1; EditorGuiStatusBar.setCamera("Orbit Camera"); } else // default camera mode { EditorGui-->StandardCamera.setStateOn(true); - EWorldEditorToggleCamera.setBitmap("tools/worldEditor/images/toolbar/camera"); + EWorldEditorToggleCamera.setBitmap("ToolsModule:camera_n_image"); %flyModeRadioItem = 0; EditorGuiStatusBar.setCamera("Standard Camera"); } @@ -835,7 +835,7 @@ function EditorGui::syncCameraGui( %this ) else if (!$isFirstPersonVar) // if 3rd person { EditorGui-->trdPersonCamera.setStateOn(true); - EWorldEditorToggleCamera.setBitmap("tools/worldEditor/images/toolbar/3rd-person-camera"); + EWorldEditorToggleCamera.setBitmap("ToolsModule:3rd_person_camera_n_image"); %flyModeRadioItem = 1; //quick way select menu bar options %this.findMenu( "Camera" ).checkRadioItem( 0, 1, 1 ); @@ -845,7 +845,7 @@ function EditorGui::syncCameraGui( %this ) else if ($isFirstPersonVar) // if 1st Person { EditorGui-->PlayerCamera.setStateOn(true); - EWorldEditorToggleCamera.setBitmap("tools/worldEditor/images/toolbar/player"); + EWorldEditorToggleCamera.setBitmap("ToolsModule:player_n_image"); %flyModeRadioItem = 0; //quick way select menu bar options %this.findMenu( "Camera" ).checkRadioItem( 0, 1, 1 ); @@ -918,7 +918,7 @@ function WorldEditorInspectorPlugin::onWorldEditorStartup( %this ) // Add ourselves to the ToolsToolbar %tooltip = "Object Editor (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "WorldEditorInspectorPlugin", "WorldEditorInspectorPalette", expandFilename("tools/worldEditor/images/toolbar/transform-objects"), %tooltip ); + EditorGui.addToToolsToolbar( "WorldEditorInspectorPlugin", "WorldEditorInspectorPalette", "ToolsModule:transform_objects_n_image", %tooltip ); //connect editor windows GuiWindowCtrl::attach( EWInspectorWindow, EWTreeWindow); @@ -1026,7 +1026,7 @@ function TerrainEditorPlugin::onWorldEditorStartup( %this ) // Add ourselves to the ToolsToolbar %tooltip = "Terrain Editor (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "TerrainEditorPlugin", "TerrainEditorPalette", expandFilename("tools/worldEditor/images/toolbar/sculpt-terrain"), %tooltip ); + EditorGui.addToToolsToolbar( "TerrainEditorPlugin", "TerrainEditorPalette", "ToolsModule:sculpt_terrain_n_image", %tooltip ); %map = new ActionMap(); %map.bindCmd( keyboard, "1", "ToolsPaletteArray->brushAdjustHeight.performClick();", "" ); //Grab Terrain @@ -1175,7 +1175,7 @@ function TerrainPainterPlugin::onWorldEditorStartup( %this ) // Add ourselves to the ToolsToolbar %tooltip = "Terrain Painter (" @ %accel @ ")"; - EditorGui.addToToolsToolbar( "TerrainPainterPlugin", "TerrainPainterPalette", expandFilename("tools/worldEditor/images/toolbar/paint-terrain"), %tooltip ); + EditorGui.addToToolsToolbar( "TerrainPainterPlugin", "TerrainPainterPalette", "ToolsModule:paint_terrain_n_image", %tooltip ); %map = new ActionMap(); %map.bindCmd( keyboard, "v", "EWTerrainPainterToolbarBrushType->ellipse.performClick();", "" );// Circle Brush @@ -1390,12 +1390,12 @@ function EWorldEditor::areAllSelectedObjectsOfType( %this, %className ) //----------------------------------------------------------------------------- function EWorldEditorToggleCamera::toggleBitmap(%this) { - %currentImage = %this.bitmap; + %currentImage = %this.getBitmapAsset(); - if ( %currentImage $= "tools/worldEditor/images/toolbar/player" ) - %image = "tools/worldEditor/images/toolbar/camera"; + if ( %currentImage $= "ToolsModule:player_n_image" ) + %image = "ToolsModule:camera_n_image"; else - %image = "tools/worldEditor/images/toolbar/player"; + %image = "ToolsModule:player_n_image"; %this.setBitmap( %image ); } @@ -2043,24 +2043,24 @@ function EWorldEditor::syncGui( %this ) if( EWorldEditor.objectsUseBoxCenter ) { - EWorldEditorToolbar-->centerObject.setBitmap("tools/gui/images/menubar/bounds-center"); + EWorldEditorToolbar-->centerObject.setBitmap("ToolsModule:bounds_center_n_image"); objectCenterDropdown-->objectBoundsBtn.setStateOn( 1 ); } else { - EWorldEditorToolbar-->centerObject.setBitmap("tools/gui/images/menubar/object-center"); + EWorldEditorToolbar-->centerObject.setBitmap("ToolsModule:object_center_n_image"); objectCenterDropdown-->objectBoxBtn.setStateOn( 1 ); } if( GlobalGizmoProfile.getFieldValue(alignment) $= "Object" ) { - EWorldEditorToolbar-->objectTransform.setBitmap("tools/gui/images/menubar/object-transform"); + EWorldEditorToolbar-->objectTransform.setBitmap("ToolsModule:object_transform_n_image"); objectTransformDropdown-->objectTransformBtn.setStateOn( 1 ); } else { - EWorldEditorToolbar-->objectTransform.setBitmap("tools/gui/images/menubar/world-transform"); + EWorldEditorToolbar-->objectTransform.setBitmap("ToolsModule:world_transform_n_image"); objectTransformDropdown-->worldTransformBtn.setStateOn( 1 ); } @@ -2446,7 +2446,7 @@ function EWToolsToolbar::reset( %this ) EWToolsToolbarDecoy.setVisible(false); EWToolsToolbarDecoy.setExtent((29 + 4) * %count + 4, 31); - %this-->resizeArrow.setBitmap( "tools/gui/images/collapse-toolbar" ); + %this-->resizeArrow.setBitmap( "ToolsModule:collapse_toolbar_n_image" ); } function EWToolsToolbar::toggleSize( %this, %useDynamics ) @@ -2457,7 +2457,7 @@ function EWToolsToolbar::toggleSize( %this, %useDynamics ) if ( %this.isClosed == 0 ) { - %image = "tools/gui/images/expand-toolbar"; + %image = "ToolsModule:expand_toolbar_n_image"; for( %i = 0 ; %i < ToolsToolbarArray.getCount(); %i++ ) { @@ -2478,7 +2478,7 @@ function EWToolsToolbar::toggleSize( %this, %useDynamics ) } else { - %image = "tools/gui/images/collapse-toolbar"; + %image = "ToolsModule:collapse_toolbar_n_image"; %count = ToolsToolbarArray.getCount(); for( %i = 0 ; %i < %count; %i++ ) @@ -2717,4 +2717,4 @@ function EditorDropdownSliderContainer::onMouseDown(%this) function EditorDropdownSliderContainer::onRightMouseDown(%this) { Canvas.popDialog(%this); -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.tscript index f788c7edb..934a35bd9 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.tscript @@ -503,7 +503,7 @@ function EManageSFXParameters::addParameter( %this, %parameter ) altCommand = %parameter @ ".value = $thisControl.getValue();"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/reset-icon"; + bitmapAsset = "ToolsModule:reset_icon_n_image"; autoFit = "0"; groupNum = "-1"; buttonType = "PushButton"; @@ -524,7 +524,7 @@ function EManageSFXParameters::addParameter( %this, %parameter ) command = %parameter @ ".reset();"; }; new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; autoFit = "0"; groupNum = "-1"; buttonType = "PushButton"; diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/cameraBookmarks.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/cameraBookmarks.ed.tscript index f158cde4d..9e8960a3e 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/cameraBookmarks.ed.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/cameraBookmarks.ed.tscript @@ -228,7 +228,7 @@ function EManageBookmarks::addBookmark( %this, %mark, %index ) new GuiBitmapButtonCtrl() { class = "EManageBookmarksGoToButton"; - bitmap = "tools/gui/images/camera-btn"; + bitmapAsset = "ToolsModule:camera_btn_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; @@ -264,7 +264,7 @@ function EManageBookmarks::addBookmark( %this, %mark, %index ) new GuiBitmapButtonCtrl() { class = "EManageBookmarksDeleteButton"; - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; groupNum = "-1"; buttonType = "PushButton"; useMouseEvents = "0"; diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.tscript index c0a883fda..6942a0cf9 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.tscript @@ -61,7 +61,9 @@ function TerrainEditor::setPaintMaterial( %this, %matIndex, %terrainMat ) ETerrainEditor.paintIndex = %matIndex; ETerrainMaterialSelected.selectedMatIndex = %matIndex; ETerrainMaterialSelected.selectedMat = %terrainMat; - ETerrainMaterialSelected.bitmap = %terrainMat.diffuseMap; + + ETerrainMaterialSelected.setBitmap(%terrainMat.getDiffuseMap()); + ETerrainMaterialSelectedEdit.Visible = isObject(%terrainMat); TerrainTextureText.text = %terrainMat.getInternalName(); ProceduralTerrainPainterDescription.text = "Generate "@ %terrainMat.getInternalName() @" layer"; @@ -128,7 +130,7 @@ function EPainter::updateLayers( %this, %matIndex ) new GuiBitmapButtonCtrl() { - bitmap = "tools/gui/images/delete"; + bitmapAsset = "ToolsModule:delete_n_image"; buttonType = "PushButton"; HorizSizing = "left"; VertSizing = "bottom"; @@ -139,7 +141,7 @@ function EPainter::updateLayers( %this, %matIndex ) }; %ctrl.setText( %matInternalName ); - %ctrl.setBitmap( %mat.diffuseMap ); + %ctrl.setBitmap( %mat.getDiffuseMap() ); %tooltip = %matInternalName; if(%i < 9) @@ -480,4 +482,4 @@ function EPainterIconBtn::onControlDropped( %this, %payload ) // select the button/material we just reordered. %stack.getObject( %dstIndex ).performClick(); -} \ No newline at end of file +} diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.tscript index e817f61bf..3670c6ada 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.tscript @@ -20,6 +20,7 @@ // IN THE SOFTWARE. //----------------------------------------------------------------------------- +$TerrainMaterialEditor::emptyMaterialImage = "ToolsModule:unknownImage_image"; //----------------------------------------------------------------------------- @@ -34,6 +35,7 @@ function TerrainMaterialDlg::show( %this, %matIndex, %terrMat, %onApplyCallback %item = %matLibTree.findItemByObjectId( %terrMat ); if ( %item != -1 ) { + %matLibTree.selectItem( %item, false ); %matLibTree.selectItem( %item ); %matLibTree.scrollVisible( %item ); } @@ -164,11 +166,26 @@ function TerrainMaterialDlg::dialogApply( %this ) Canvas.popDialog( TerrainMaterialDlg ); call( %this.onApplyCallback, %this.activeMat, %this.matIndex ); + + TerrainMaterialDlg.matDirty = false; } //----------------------------------------------------------------------------- function TerrainMaterialDlg::dialogCancel( %this ) +{ + if(TerrainMaterialDlg.matDirty) + { + toolsMessageBoxYesNo("Save Dirty Material?", "The current material has been modified. Do you wish save your changes?", + "TerrainMaterialDlg.saveDirtyMaterial(" @ %this-->matLibTree.getSelectedItem() @ ");TerrainMaterialDlg.closeDialog();", "TerrainMaterialDlg.closeDialog();"); + } + else + { + %this.closeDialog(); + } +} + +function TerrainMaterialDlg::closeDialog( %this ) { // Restore material properties we have changed. @@ -213,118 +230,67 @@ function TerrainMaterialDlg::setMaterialName( %this, %newName ) { %mat.setInternalName( %newName ); %this-->matLibTree.buildVisibleTree( false ); + + TerrainMaterialDlg.matDirty = true; } } } //----------------------------------------------------------------------------- -function TerrainMaterialDlg::changeBase( %this ) +function TerrainMaterialDlg::clearTextureMap(%this, %mapName) { - %ctrl = %this-->baseTexCtrl; - %file = %ctrl.bitmap; - if( getSubStr( %file, 0 , 6 ) $= "tools/" ) - %file = ""; + %targetMapName = "tex" @ %mapName; + %targetMap = %this.findObjectByInternalName(%targetMapName, true); - %file = TerrainMaterialDlg._selectTextureFileDialog( %file ); - if( %file $= "" ) + %targetMap.setBitmap($TerrainMaterialEditor::emptyMaterialImage); + %targetMap.asset = ""; + + TerrainMaterialDlg.matDirty = true; + + if(%mapName $= "DetailMap") { - if( %ctrl.bitmap !$= "" ) - %file = %ctrl.bitmap; - else - %file = "tools/materialEditor/gui/unknownImage"; + //hide the supplemental maps + NormalMapContainer.callOnChildren("setActive", false); + ORMMapContainer.callOnChildren("setActive", false); + MacroMapContainer.callOnChildren("setActive", false); } - - %file = makeRelativePath( %file, getMainDotCsDir() ); - %ctrl.setBitmap( %file ); } -//----------------------------------------------------------------------------- - -function TerrainMaterialDlg::changeDetail( %this ) +function TerrainMaterialDlg::updateTextureMap(%this, %mapName) { - %ctrl = %this-->detailTexCtrl; - %file = %ctrl.bitmap; - if( getSubStr( %file, 0 , 6 ) $= "tools/" ) - %file = ""; - - %file = TerrainMaterialDlg._selectTextureFileDialog( %file ); - if( %file $= "" ) - { - if( %ctrl.bitmap !$= "" ) - %file = %ctrl.bitmap; - else - %file = "tools/materialEditor/gui/unknownImage"; - } + %this.updateTargetMap = %mapName; - %file = makeRelativePath( %file, getMainDotCsDir() ); - %ctrl.setBitmap( %file ); + AssetBrowser.showDialog("ImageAsset", %this@".changeTerrainMatMapAsset", "", ""); } -//---------------------------------------------------------------------------- - -function TerrainMaterialDlg::changeMacro( %this ) +function TerrainMaterialDlg::changeTerrainMatMapAsset(%this) { - %ctrl = %this-->macroTexCtrl; - %file = %ctrl.bitmap; - if( getSubStr( %file, 0 , 6 ) $= "tools/" ) - %file = ""; + %targetMapName = "tex" @ %this.updateTargetMap; + %targetMap = %this.findObjectByInternalName(%targetMapName, true); - %file = TerrainMaterialDlg._selectTextureFileDialog( %file ); - if( %file $= "" ) - { - if( %ctrl.bitmap !$= "" ) - %file = %ctrl.bitmap; - else - %file = "tools/materialEditor/gui/unknownImage"; - } - - %file = makeRelativePath( %file, getMainDotCsDir() ); - %ctrl.setBitmap( %file ); -} - - -//----------------------------------------------------------------------------- - -function TerrainMaterialDlg::changeNormal( %this ) + %imgAsset = AssetBrowser.selectedAsset; + if(%imgAsset !$= "") { - %ctrl = %this-->normTexCtrl; - %file = %ctrl.bitmap; - if( getSubStr( %file, 0 , 6 ) $= "tools/" ) - %file = ""; + %targetMap.asset = %imgAsset; + %image = %imgAsset; - %file = TerrainMaterialDlg._selectTextureFileDialog( %file ); - if( %file $= "" ) + if(%this.updateTargetMap $= "DetailMap") { - if( %ctrl.bitmap !$= "" ) - %file = %ctrl.bitmap; - else - %file = "tools/materialEditor/gui/unknownImage"; + //show the supplemental maps + NormalMapContainer.callOnChildren("setActive", true); + ORMMapContainer.callOnChildren("setActive", true); + MacroMapContainer.callOnChildren("setActive", true); } - - %file = makeRelativePath( %file, getMainDotCsDir() ); - %ctrl.setBitmap( %file ); } - -//----------------------------------------------------------------------------- -function TerrainMaterialDlg::changeormConfig( %this ) -{ - %ctrl = %this-->ormConfigTexCtrl; - %file = %ctrl.bitmap; - if( getSubStr( %file, 0 , 6 ) $= "tools/" ) - %file = ""; - - %file = TerrainMaterialDlg._selectTextureFileDialog( %file ); - if( %file $= "" ) - { - if( %ctrl.bitmap !$= "" ) - %file = %ctrl.bitmap; else - %file = "tools/materialEditor/gui/unknownImage"; + { + %image = $TerrainMaterialEditor::emptyMaterialImage; } - %file = makeRelativePath( %file, getMainDotCsDir() ); - %ctrl.setBitmap( %file ); + %targetMap.setBitmap( %image ); + + TerrainMaterialDlg.matDirty = true; } //----------------------------------------------------------------------------- @@ -384,22 +350,49 @@ function TerrainMaterialDlg::activateMaterialCtrls( %this, %active ) %parent = %this-->matSettingsParent; %count = %parent.getCount(); for ( %i = 0; %i < %count; %i++ ) + { + %ctrl = %parent.getObject( %i ); + %ctrlnm = %ctrl.getName(); + %ictrlnm = %ctrl.getInternalName(); %parent.getObject( %i ).setActive( %active ); } + %detailz = %this-->texDetailMap.getBitmap(); + if(%this-->texDetailMap.getBitmap() $= "" || %this-->texDetailMap.getBitmap() $= $TerrainMaterialEditor::emptyMaterialImage) + { + NormalMapContainer.callOnChildren("setActive", false); + ORMMapContainer.callOnChildren("setActive", false); + MacroMapContainer.callOnChildren("setActive", false); + } + else + { + NormalMapContainer.callOnChildren("setActive", true); + ORMMapContainer.callOnChildren("setActive", true); + MacroMapContainer.callOnChildren("setActive", true); + } +} + //----------------------------------------------------------------------------- function TerrainMaterialTreeCtrl::onSelect( %this, %item ) { + if(TerrainMaterialDlg.matDirty) + { + toolsMessageBoxYesNo("Save Dirty Material?", "The current material has been modified. Do you wish save your changes?", + "TerrainMaterialDlg.saveDirtyMaterial(" @ TerrainMaterialDlg.previousMat @ ");TerrainMaterialDlg.setActiveMaterial(" @ %item @ ");", + "TerrainMaterialDlg.setActiveMaterial(" @ %item @ ");"); + } + else + { TerrainMaterialDlg.setActiveMaterial( %item ); } +} //----------------------------------------------------------------------------- function TerrainMaterialTreeCtrl::onUnSelect( %this, %item ) { - TerrainMaterialDlg.saveDirtyMaterial( %item ); - TerrainMaterialDlg.setActiveMaterial( 0 ); + TerrainMaterialDlg.previousMat = %item; } //----------------------------------------------------------------------------- @@ -410,33 +403,105 @@ function TerrainMaterialDlg::setActiveMaterial( %this, %mat ) %mat.isMemberOfClass( TerrainMaterial ) ) { %this.activeMat = %mat; + %this.matDirty = false; %this-->matNameCtrl.setText( %mat.internalName ); - if (%mat.diffuseMap $= ""){ - %this-->baseTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" ); - }else{ - %this-->baseTexCtrl.setBitmap( %mat.diffuseMap ); + + // + %imgPath = %mat.getDiffuseMap(); + if(%imgPath $= "") + %imgPath = $TerrainMaterialEditor::emptyMaterialImage; + + %this-->texBaseMap.setBitmap( %imgPath ); + + if(%imgPath !$= $TerrainMaterialEditor::emptyMaterialImage) + { + %imgAsset = %mat.getDiffuseMapAsset(); + if(%imgAsset $= "") + %imgAsset = %imgPath; + %this-->diffuseMapAssetId.setText( %imgAsset ); } - if (%mat.ormConfigMap $= ""){ - %this-->ormConfigTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" ); - }else{ - %this-->ormConfigTexCtrl.setBitmap( %mat.ormConfigMap ); + else + { + %this-->diffuseMapAssetId.setText( "None" ); } - if (%mat.detailMap $= ""){ - %this-->detailTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" ); - }else{ - %this-->detailTexCtrl.setBitmap( %mat.detailMap ); + + // + %imgPath = %mat.getNormalMap(); + if(%imgPath $= "") + %imgPath = $TerrainMaterialEditor::emptyMaterialImage; + + %this-->texNormalMap.setBitmap( %imgPath ); + + if(%imgPath !$= $TerrainMaterialEditor::emptyMaterialImage) + { + %imgAsset = %mat.getNormalMapAsset(); + if(%imgAsset $= "") + %imgAsset = %imgPath; + %this-->normalMapAssetId.setText( %imgAsset ); } - if (%mat.macroMap $= ""){ - %this-->macroTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" ); - }else{ - %this-->macroTexCtrl.setBitmap( %mat.macroMap ); + else + { + %this-->normalMapAssetId.setText( "None" ); + } + + // + %imgPath = %mat.getORMConfigMap(); + if(%imgPath $= "") + %imgPath = $TerrainMaterialEditor::emptyMaterialImage; + + %this-->texORMConfigMap.setBitmap( %imgPath ); + + if(%imgPath !$= $TerrainMaterialEditor::emptyMaterialImage) + { + %imgAsset = %mat.getORMConfigMapAsset(); + if(%imgAsset $= "") + %imgAsset = %imgPath; + %this-->ORMMapAssetId.setText( %imgAsset ); + } + else + { + %this-->ORMMapAssetId.setText( "None" ); + } + + // + %imgPath = %mat.getDetailMap(); + if(%imgPath $= "") + %imgPath = $TerrainMaterialEditor::emptyMaterialImage; + + %this-->texDetailMap.setBitmap( %imgPath ); + + if(%imgPath !$= $TerrainMaterialEditor::emptyMaterialImage) + { + %imgAsset = %mat.getDetailMapAsset(); + if(%imgAsset $= "") + %imgAsset = %imgPath; + %this-->detailMapAssetId.setText( %imgAsset ); + } + else + { + %this-->detailMapAssetId.setText( "None" ); + } + + // + %imgPath = %mat.getMacroMap(); + if(%imgPath $= "") + %imgPath = $TerrainMaterialEditor::emptyMaterialImage; + + %this-->texMacroMap.setBitmap( %imgPath ); + + if(%imgPath !$= $TerrainMaterialEditor::emptyMaterialImage) + { + %imgAsset = %mat.getMacroMapAsset(); + if(%imgAsset $= "") + %imgAsset = %imgPath; + %this-->macroMapAssetId.setText( %imgAsset ); + } + else + { + %this-->macroMapAssetId.setText( "None" ); } - if (%mat.normalMap $= ""){ - %this-->normTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" ); - }else{ - %this-->normTexCtrl.setBitmap( %mat.normalMap ); - } + %this-->detSizeCtrl.setText( %mat.detailSize ); %this-->baseSizeCtrl.setText( %mat.diffuseSize ); %this-->detStrengthCtrl.setText( %mat.detailStrength ); @@ -481,31 +546,31 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat ) %newName = %this-->matNameCtrl.getText(); - if (%this-->baseTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){ + //--- + %newDiffuse = %this-->texBaseMap.getBitmap(); + if(%newDiffuse $= $TerrainMaterialEditor::emptyMaterialImage) %newDiffuse = ""; - }else{ - %newDiffuse = %this-->baseTexCtrl.bitmap; - } - if (%this-->normTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){ + + //--- + %newNormal = %this-->texNormalMap.getBitmap(); + if(%newNormal $= $TerrainMaterialEditor::emptyMaterialImage) %newNormal = ""; - }else{ - %newNormal = %this-->normTexCtrl.bitmap; - } - if (%this-->ormConfigTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){ + + //--- + %newormConfig = %this-->texORMConfigMap.getBitmap(); + if(%newormConfig $= $TerrainMaterialEditor::emptyMaterialImage) %newormConfig = ""; - }else{ - %newormConfig = %this-->ormConfigTexCtrl.bitmap; - } - if (%this-->detailTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){ + + //--- + %newDetail = %this-->texDetailMap.getBitmap(); + if(%newDetail $= $TerrainMaterialEditor::emptyMaterialImage) %newDetail = ""; - }else{ - %newDetail = %this-->detailTexCtrl.bitmap; - } - if (%this-->macroTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){ + + //--- + %newMacro = %this-->texMacroMap.getBitmap(); + if(%newMacro $= $TerrainMaterialEditor::emptyMaterialImage) %newMacro = ""; - }else{ - %newMacro = %this-->macroTexCtrl.bitmap; - } + %detailSize = %this-->detSizeCtrl.getText(); %diffuseSize = %this-->baseSizeCtrl.getText(); %detailStrength = %this-->detStrengthCtrl.getText(); @@ -526,11 +591,11 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat ) // return. if ( %mat.internalName $= %newName && - %mat.diffuseMap $= %newDiffuse && - %mat.normalMap $= %newNormal && - %mat.detailMap $= %newDetail && - %mat.ormConfigMap $= %newormConfig && - %mat.macroMap $= %newMacro && + %mat.getDiffuseMap() $= %newDiffuse && + %mat.getNormalMap() $= %newNormal && + %mat.getDetailMap() $= %newDetail && + %mat.getORMConfigMap() $= %newormConfig && + %mat.getMacroMap() $= %newMacro && %mat.detailSize == %detailSize && %mat.diffuseSize == %diffuseSize && %mat.detailStrength == %detailStrength && @@ -564,12 +629,12 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat ) %mat.setInternalName( %newName ); } - %mat.diffuseMap = %newDiffuse; - %mat.diffuseMapAsset = ""; - %mat.normalMap = %newNormal; - %mat.ormConfigMap = %newormConfig; - %mat.detailMap = %newDetail; - %mat.macroMap = %newMacro; + %mat.setDiffuseMap(%newDiffuse); + %mat.setNormalMap(%newNormal); + %mat.setORMConfigMap(%newormConfig); + %mat.setDetailMap(%newDetail); + %mat.setMacroMap(%newMacro); + %mat.detailSize = %detailSize; %mat.diffuseSize = %diffuseSize; %mat.detailStrength = %detailStrength; @@ -619,11 +684,11 @@ function TerrainMaterialDlg::snapshotMaterials( %this ) parentGroup = %group; material = %mat; internalName = %mat.internalName; - diffuseMap = %mat.diffuseMap; - normalMap = %mat.normalMap; - ormConfigMap = %mat.ormConfigMap; - detailMap = %mat.detailMap; - macroMap = %mat.macroMap; + diffuseMap = %mat.getDiffuseMap(); + normalMap = %mat.getNormalMap(); + ormConfigMap = %mat.getORMConfigMap(); + detailMap = %mat.getDetailMap(); + macroMap = %mat.getMacroMap(); detailSize = %mat.detailSize; diffuseSize = %mat.diffuseSize; detailStrength = %mat.detailStrength; @@ -638,6 +703,7 @@ function TerrainMaterialDlg::snapshotMaterials( %this ) isSRGB = %mat.isSRGB; invertRoughness = %mat.invertRoughness; }; + } } @@ -658,11 +724,11 @@ function TerrainMaterialDlg::restoreMaterials( %this ) %mat = %obj.material; %mat.setInternalName( %obj.internalName ); - %mat.diffuseMap = %obj.diffuseMap; - %mat.normalMap = %obj.normalMap; - %mat.ormConfigMap = %obj.ormConfigMap; - %mat.detailMap = %obj.detailMap; - %mat.macroMap = %obj.macroMap; + %mat.setDiffuseMap(%obj.diffuseMap); + %mat.setNormalMap(%obj.normalMap); + %mat.setORMConfigMap(%obj.ORMConfigMap); + %mat.setDetailMap(%obj.detailMap); + %mat. setMacroMap(%obj.macroMap); %mat.detailSize = %obj.detailSize; %mat.diffuseSize = %obj.diffuseSize; %mat.detailStrength = %obj.detailStrength; @@ -717,6 +783,7 @@ function TerrainMaterialDlgBlendHeightBaseSlider::onMouseDragged(%this) %value = mFloor(%this.value * 1000)/1000; TerrainMaterialDlgBlendHeightBaseTextEdit.setText(%value); TerrainMaterialDlg.activeMat.blendHeightBase = %this.value; + TerrainMaterialDlg.matDirty = true; } @@ -724,6 +791,7 @@ function TerrainMaterialDlgBlendHeightBaseTextEdit::onValidate(%this) { TerrainMaterialDlgBlendHeightBaseSlider.setValue(%this.getText()); TerrainMaterialDlg.activeMat.blendHeightBase = %this.getText(); + TerrainMaterialDlg.matDirty = true; } function TerrainMaterialDlgBlendHeightContrastSlider::onMouseDragged(%this) @@ -731,6 +799,7 @@ function TerrainMaterialDlgBlendHeightContrastSlider::onMouseDragged(%this) %value = mFloor(%this.value * 1000)/1000; TerrainMaterialDlgBlendHeightContrastTextEdit.setText(%value); TerrainMaterialDlg.activeMat.blendHeightContrast = %this.value; + TerrainMaterialDlg.matDirty = true; } @@ -738,4 +807,5 @@ function TerrainMaterialDlgBlendHeightContrastTextEdit::onValidate(%this) { TerrainMaterialDlgBlendHeightContrastSlider.setValue(%this.getText()); TerrainMaterialDlg.activeMat.blendHeightContrast = %this.getText(); + TerrainMaterialDlg.matDirty = true; } diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/menuHandlers.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/menuHandlers.ed.tscript index 3fb4b1652..ee18a443f 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/menuHandlers.ed.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/menuHandlers.ed.tscript @@ -246,6 +246,27 @@ function EditorSaveAsDefaultLevel() function doEditorSaveAsDefaultLevel() { %success = getScene(0).save("tools/levels/DefaultEditorLevel.mis"); + + if(ETerrainEditor.isDirty) + { + // Find all of the terrain files + initContainerTypeSearch($TypeMasks::TerrainObjectType); + + while ((%terrainObject = containerSearchNext()) != 0) + { + if(%terrainObject.terrainAsset !$= "") + { + //we utilize a terrain asset, so we'll update our dependencies while we're at it + %terrainObject.saveAsset(); + } + else + { + %terrainObject.save(%terrainObject.terrainFile); + } + } + } + + ETerrainPersistMan.saveDirty(); } function EditorResetDefaultLevel() diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/menus.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/menus.ed.tscript index 106c4fdf4..6e8348948 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/menus.ed.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/menus.ed.tscript @@ -361,6 +361,8 @@ function EditorGui::buildMenus(%this) item[1] = "Profiler" TAB "ctrl F2" TAB "showMetrics(true);"; item[2] = "Torque SimView" TAB "" TAB "tree();"; item[3] = "Make Selected a Mesh" TAB "" TAB "AssetBrowser.setupCreateNewAsset(\"ShapeAsset\", AssetBrowser.selectedModule, \"makeSelectedAMesh\");"; + item[4] = "-"; + item[5] = "Project Importer" TAB "" TAB "ProjectImporter::beginProjectImport();"; }; %this.menuBar.insert(%toolsMenu); diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/AL_ShadowVisualizeMaterial.asset.taml b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/AL_ShadowVisualizeMaterial.asset.taml new file mode 100644 index 000000000..47ced299d --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/AL_ShadowVisualizeMaterial.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/Viz_DetailLightingMat.asset.taml b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/Viz_DetailLightingMat.asset.taml new file mode 100644 index 000000000..b04817ca7 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/Viz_DetailLightingMat.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/Viz_MaterialComplexityMat.asset.taml b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/Viz_MaterialComplexityMat.asset.taml new file mode 100644 index 000000000..ad9cd4bc5 --- /dev/null +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/Viz_MaterialComplexityMat.asset.taml @@ -0,0 +1,7 @@ + diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/lightViz.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/lightViz.tscript index 0f2e51f20..7d688d8ae 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/lightViz.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/lightViz.tscript @@ -140,7 +140,7 @@ singleton PostEffect( AL_DepthVisualize ) shader = AL_DepthVisualizeShader; stateBlock = AL_DefaultVisualizeState; texture[0] = "#deferred"; - texture[1] = "tools/worldEditor/images/depthviz"; + textureAsset[1] = "ToolsModule:depthviz_image"; target = "$backBuffer"; renderPriority = 9999; }; diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/miscViz.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/miscViz.tscript index 76361304c..c555d9138 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/miscViz.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/miscViz.tscript @@ -54,7 +54,7 @@ singleton PostEffect( Viz_TexelDensityPFX ) { shader = Viz_TexelDensity; stateBlock = AL_DefaultVisualizeState; - texture[0] = "tools/resources/checkerboard"; + textureAsset[0] = "ToolsModule:checkerboard_image"; target = "$backBuffer"; renderPriority = 9999; }; @@ -435,4 +435,4 @@ function toggleVolumeViz(%vizName) $SFXSpace::isRenderable = !$SFXSpace::isRenderable; EVisibilityVolumeOptions.checkItem(7, $SFXSpace::isRenderable); } -} \ No newline at end of file +} diff --git a/Tools/CMake/torque3d.cmake b/Tools/CMake/torque3d.cmake index f3218fd20..982050b4a 100644 --- a/Tools/CMake/torque3d.cmake +++ b/Tools/CMake/torque3d.cmake @@ -216,6 +216,9 @@ mark_as_advanced(TORQUE_SCRIPT_EXTENSION) option(TORQUE_USE_ZENITY "use the Zenity backend for NFD" OFF) mark_as_advanced(TORQUE_USE_ZENITY) +option(TORQUE_SHOW_LEGACY_FILE_FIELDS "If on, shows legacy direct file path fields in the inspector." OFF) +mark_as_advanced(TORQUE_SHOW_LEGACY_FILE_FIELDS) + if(WIN32) # warning C4800: 'XXX' : forcing value to bool 'true' or 'false' (performance warning) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4800")