فهرست منبع

Added getShapeConstructorFilePath console function on shapeAsset
Fixed typo in import config settings for DuplicateAutoResolution
Converted TSShapeConstructor to utilize assets
Updated shape editor to work with assetified constructors
Converted guiBitmapButtonCtrl to use assets

Areloch 4 سال پیش
والد
کامیت
88ae8a9665
100فایلهای تغییر یافته به همراه955 افزوده شده و 591 حذف شده
  1. 9 2
      Engine/source/T3D/assets/ShapeAsset.cpp
  2. 9 9
      Engine/source/T3D/assets/assetImporter.cpp
  3. 1 1
      Engine/source/T3D/assets/assetImporter.h
  4. 2 1
      Engine/source/T3D/lighting/reflectionProbe.cpp
  5. 15 0
      Engine/source/console/fileSystemFunctions.cpp
  6. 101 27
      Engine/source/gui/buttons/guiBitmapButtonCtrl.cpp
  7. 13 3
      Engine/source/gui/buttons/guiBitmapButtonCtrl.h
  8. 40 0
      Engine/source/gui/editor/guiShapeEdPreview.cpp
  9. 1 0
      Engine/source/gui/editor/guiShapeEdPreview.h
  10. 1 1
      Engine/source/ts/assimp/assimpShapeLoader.cpp
  11. 1 1
      Engine/source/ts/collada/colladaShapeLoader.cpp
  12. 322 287
      Engine/source/ts/tsShapeConstruct.cpp
  13. 141 122
      Engine/source/ts/tsShapeConstruct.h
  14. 1 1
      Templates/BaseGame/game/core/gameObjects/shapes/camera.tscript
  15. 1 1
      Templates/BaseGame/game/core/gameObjects/shapes/noshape.tscript
  16. 1 1
      Templates/BaseGame/game/core/gameObjects/shapes/octahedron.tscript
  17. 1 1
      Templates/BaseGame/game/core/gameObjects/shapes/simplecone.tscript
  18. 1 1
      Templates/BaseGame/game/core/gameObjects/shapes/unit_capsule.tscript
  19. 1 1
      Templates/BaseGame/game/core/gameObjects/shapes/unit_cube.tscript
  20. 1 1
      Templates/BaseGame/game/core/gameObjects/shapes/unit_sphere.tscript
  21. 1 1
      Templates/BaseGame/game/core/gui/scripts/profiles.tscript
  22. 7 0
      Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterBasicMat.asset.taml
  23. 7 0
      Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterMat.asset.taml
  24. 7 0
      Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterBasicMat.asset.taml
  25. 7 0
      Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterMat.asset.taml
  26. 1 1
      Templates/BaseGame/game/core/rendering/shapes/Fog_Cube.tscript
  27. 1 1
      Templates/BaseGame/game/data/Prototyping/shapes/ConePrimitive.tscript
  28. 1 1
      Templates/BaseGame/game/data/Prototyping/shapes/CubePrimitive.tscript
  29. 1 1
      Templates/BaseGame/game/data/Prototyping/shapes/CylinderPrimitive.tscript
  30. 1 1
      Templates/BaseGame/game/data/Prototyping/shapes/SpherePrimitive.tscript
  31. 1 1
      Templates/BaseGame/game/data/Prototyping/shapes/TorusPrimitive.tscript
  32. 1 1
      Templates/BaseGame/game/data/Prototyping/shapes/TubePrimitive.tscript
  33. 1 1
      Templates/BaseGame/game/data/Prototyping/shapes/kork_chanShape.tscript
  34. 2 2
      Templates/BaseGame/game/data/ui/guis/startupGui.gui
  35. 8 0
      Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_d_image.asset.taml
  36. 8 0
      Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_h_image.asset.taml
  37. 8 0
      Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_n_image.asset.taml
  38. 2 2
      Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditor.gui
  39. 7 7
      Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorPalette.gui
  40. 2 2
      Templates/BaseGame/game/tools/VPathEditor/Scripts/Plugin.tscript
  41. 1 1
      Templates/BaseGame/game/tools/VerveEditor/GUI/GuiProfiles.tscript
  42. 8 0
      Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Images_ScrollBar_image.asset.taml
  43. 11 11
      Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditor.gui
  44. 1 1
      Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/Fields/main.tscript
  45. 1 1
      Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript
  46. 1 1
      Templates/BaseGame/game/tools/VerveEditor/Scripts/Plugin.tscript
  47. 1 1
      Templates/BaseGame/game/tools/VerveEditor/main.tscript
  48. 1 1
      Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml
  49. 7 7
      Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui
  50. 3 3
      Templates/BaseGame/game/tools/assetBrowser/guis/assetImport.gui
  51. 2 2
      Templates/BaseGame/game/tools/assetBrowser/guis/assetImportConfigEditor.gui
  52. 1 1
      Templates/BaseGame/game/tools/assetBrowser/guis/gameObjectCreator.gui
  53. 1 1
      Templates/BaseGame/game/tools/assetBrowser/guis/newAsset.gui
  54. 1 1
      Templates/BaseGame/game/tools/assetBrowser/guis/newComponentAsset.gui
  55. 1 1
      Templates/BaseGame/game/tools/assetBrowser/guis/selectModule.gui
  56. 1 1
      Templates/BaseGame/game/tools/assetBrowser/guis/selectPackage.gui
  57. 1 1
      Templates/BaseGame/game/tools/assetBrowser/guis/selectPath.gui
  58. 1 1
      Templates/BaseGame/game/tools/assetBrowser/main.tscript
  59. 3 4
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript
  60. 1 1
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetImportConfig.tscript
  61. 1 1
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/component.tscript
  62. 1 1
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gameObject.tscript
  63. 1 1
      Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.tscript
  64. 2 2
      Templates/BaseGame/game/tools/assetBrowser/scripts/directoryHandling.tscript
  65. 7 0
      Templates/BaseGame/game/tools/base/images/Grid_512_Black.asset.taml
  66. 7 0
      Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen.asset.taml
  67. 7 0
      Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen_Lines.asset.taml
  68. 7 0
      Templates/BaseGame/game/tools/base/images/Grid_512_Green.asset.taml
  69. 7 0
      Templates/BaseGame/game/tools/base/images/Grid_512_Grey.asset.taml
  70. 7 0
      Templates/BaseGame/game/tools/base/images/Grid_512_Grey_Base.asset.taml
  71. 7 0
      Templates/BaseGame/game/tools/base/images/Grid_512_Orange.asset.taml
  72. 7 0
      Templates/BaseGame/game/tools/base/images/Grid_512_Orange_Lines.asset.taml
  73. 7 0
      Templates/BaseGame/game/tools/base/images/Grid_512_Red.asset.taml
  74. 3 3
      Templates/BaseGame/game/tools/componentEditor/interface/materialFieldType.tscript
  75. 1 1
      Templates/BaseGame/game/tools/componentEditor/main.tscript
  76. 4 4
      Templates/BaseGame/game/tools/convexEditor/convexEditorToolbar.ed.gui
  77. 2 2
      Templates/BaseGame/game/tools/convexEditor/main.tscript
  78. 2 2
      Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui
  79. 3 3
      Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui
  80. 1 1
      Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript
  81. 4 4
      Templates/BaseGame/game/tools/decalEditor/decalEditorGui.gui
  82. 1 1
      Templates/BaseGame/game/tools/decalEditor/main.tscript
  83. 8 0
      Templates/BaseGame/game/tools/editorClasses/gui/images/images_window_image.asset.taml
  84. 6 6
      Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.tscript
  85. 1 1
      Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript
  86. 3 3
      Templates/BaseGame/game/tools/forestEditor/forestEditToolbar.ed.gui
  87. 5 5
      Templates/BaseGame/game/tools/forestEditor/forestEditorGui.gui
  88. 2 2
      Templates/BaseGame/game/tools/forestEditor/main.tscript
  89. 2 2
      Templates/BaseGame/game/tools/gui/assimpImport.ed.tscript
  90. 2 2
      Templates/BaseGame/game/tools/gui/colladaImport.ed.gui
  91. 9 9
      Templates/BaseGame/game/tools/gui/cubemapEditor.gui
  92. 1 1
      Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript
  93. 1 1
      Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.gui
  94. 8 0
      Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_d_image.asset.taml
  95. 8 0
      Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_h_image.asset.taml
  96. 8 0
      Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_n_image.asset.taml
  97. 8 0
      Templates/BaseGame/game/tools/gui/images/treeview/treeview_default_image.asset.taml
  98. 6 6
      Templates/BaseGame/game/tools/gui/materialSelector.ed.gui
  99. 2 2
      Templates/BaseGame/game/tools/gui/postFxEditor.gui
  100. 1 1
      Templates/BaseGame/game/tools/gui/profiles.ed.tscript

+ 9 - 2
Engine/source/T3D/assets/ShapeAsset.cpp

@@ -536,12 +536,19 @@ 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());

+ 9 - 9
Engine/source/T3D/assets/assetImporter.cpp

@@ -32,7 +32,7 @@ ConsoleDocClass(AssetImportConfig,
 IMPLEMENT_CONOBJECT(AssetImportConfig);
 
 AssetImportConfig::AssetImportConfig() :
-   DuplicatAutoResolution("AutoRename"),
+   DuplicateAutoResolution("AutoRename"),
    WarningsAsErrors(false),
    PreventImportWithErrors(true),
    AutomaticallyPromptMissingFiles(false),
@@ -132,7 +132,7 @@ void AssetImportConfig::initPersistFields()
    Parent::initPersistFields();
 
    addGroup("General");
-      addField("DuplicatAutoResolution", TypeRealString, Offset(DuplicatAutoResolution, AssetImportConfig), "Duplicate Asset Auto-Resolution Action. Options are None, AutoPrune, AutoRename, FolderPrefix");
+      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");
@@ -230,7 +230,7 @@ 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()));
@@ -320,7 +320,7 @@ 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;
@@ -2345,7 +2345,7 @@ 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);
@@ -2356,7 +2356,7 @@ void AssetImporter::resolveAssetItemIssues(AssetImportObject* assetItem)
 
          importIssues = false;
       }
-      else if (activeImportConfig->DuplicatAutoResolution == String("AutoRename"))
+      else if (activeImportConfig->DuplicateAutoResolution == String("AutoRename"))
       {
          //Set trailing number
          String renamedAssetName = assetItem->assetName;
@@ -2375,11 +2375,11 @@ void AssetImporter::resolveAssetItemIssues(AssetImportObject* assetItem)
          resetAssetValidationStatus(assetItem);
          importIssues = false;
       }
-      else if (activeImportConfig->DuplicatAutoResolution == String("UseExisting"))
+      else if (activeImportConfig->DuplicateAutoResolution == String("UseExisting"))
       {
 
       }
-      else if (activeImportConfig->DuplicatAutoResolution == String("FolderPrefix"))
+      else if (activeImportConfig->DuplicateAutoResolution == String("FolderPrefix"))
       {
          //Set trailing number
          String renamedAssetName = assetItem->assetName;
@@ -3150,7 +3150,7 @@ 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(StringTable->insert(qualifiedToFile));

+ 1 - 1
Engine/source/T3D/assets/assetImporter.h

@@ -22,7 +22,7 @@ public:
    /// <summary>
    /// Duplicate Asset Auto-Resolution Action. Options are None, AutoPrune, AutoRename
    /// </summary>
-   String DuplicatAutoResolution;
+   String DuplicateAutoResolution;
 
    /// <summary>
    /// Indicates if warnings should be treated as errors.

+ 2 - 1
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);

+ 15 - 0
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"
 

+ 101 - 27
Engine/source/gui/buttons/guiBitmapButtonCtrl.cpp

@@ -128,6 +128,8 @@ GuiBitmapButtonCtrl::GuiBitmapButtonCtrl()
    mUseStates = true;
    setExtent( 140, 30 );
    mMasked = false;
+
+   INIT_IMAGEASSET(Bitmap);
 }
 
 //-----------------------------------------------------------------------------
@@ -135,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 "
@@ -176,7 +177,7 @@ bool GuiBitmapButtonCtrl::onWake()
       return false;
       
    setActive( true );
-   setBitmap( mBitmapName );
+   setBitmap( getBitmap() );
    
    return true;
 }
@@ -208,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( 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( StringTable->insert(path) );
-}
+}*/
 
 //-----------------------------------------------------------------------------
 
@@ -282,13 +283,13 @@ void GuiBitmapButtonCtrl::setBitmap( StringTableEntry name )
 {
    PROFILE_SCOPE( GuiBitmapButtonCtrl_setBitmap );
    
-   mBitmapName = name;
+   _setBitmap(name);
    if( !isAwake() )
       return;
 
-   if( mBitmapName != StringTable->EmptyString())
+   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 )
@@ -301,31 +302,102 @@ void GuiBitmapButtonCtrl::setBitmap( StringTableEntry 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;
             }
@@ -594,4 +666,6 @@ bool GuiBitmapButtonCtrl::pointInControl(const Point2I& parentCoordPoint)
    }
    else
       return Parent::pointInControl(parentCoordPoint);
-}
+}
+
+DEF_IMAGEASSET_BINDS(GuiBitmapButtonCtrl, Bitmap);

+ 13 - 3
Engine/source/gui/buttons/guiBitmapButtonCtrl.h

@@ -84,15 +84,23 @@ class GuiBitmapButtonCtrl : public GuiButtonCtrl
       struct Textures
       {
          /// Texture for normal state.
+         StringTableEntry mTextureNormalAssetId;
+         AssetPtr<ImageAsset> mTextureNormalAsset;
          GFXTexHandle mTextureNormal;
          
          /// Texture for highlight state.
+         StringTableEntry mTextureHilightAssetId;
+         AssetPtr<ImageAsset> mTextureHilightAsset;
          GFXTexHandle mTextureHilight;
          
          /// Texture for depressed state.
+         StringTableEntry mTextureDepressedAssetId;
+         AssetPtr<ImageAsset> mTextureDepressedAsset;
          GFXTexHandle mTextureDepressed;
          
          /// Texture for inactive state.
+         StringTableEntry mTextureInactiveAssetId;
+         AssetPtr<ImageAsset> mTextureInactiveAsset;
          GFXTexHandle mTextureInactive;
       };
 
@@ -110,8 +118,8 @@ class GuiBitmapButtonCtrl : public GuiButtonCtrl
       ///
       BitmapMode mBitmapMode;
 
-      /// File name for bitmap.
-      StringTableEntry 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,6 +157,8 @@ class GuiBitmapButtonCtrl : public GuiButtonCtrl
       
       /// @}
 
+      void onBitmapChange() {}
+
    public:
                            
       GuiBitmapButtonCtrl();

+ 40 - 0
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"
@@ -399,6 +402,35 @@ bool GuiShapeEdPreview::setObjectModel(const char* modelName)
    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<ShapeAsset>(id);
+         modelName = asset->getShapeFilePath();
+         AssetDatabase.releaseAsset(id);
+      }
+      else if (assetType == StringTable->insert("ShapeAnimationAsset"))
+      {
+         ShapeAnimationAsset* asset = AssetDatabase.acquireAsset<ShapeAnimationAsset>(id);
+         modelName = asset->getAnimationPath();
+         AssetDatabase.releaseAsset(id);
+      }
+   }
+
+   return setObjectModel(modelName);
+}
+
 void GuiShapeEdPreview::_onResourceChanged(const Torque::Path& path)
 {
    if (path != Torque::Path(mModelName))
@@ -1717,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" )
 {

+ 1 - 0
Engine/source/gui/editor/guiShapeEdPreview.h

@@ -199,6 +199,7 @@ public:
 
    void setCurrentDetail(S32 dl);
    bool setObjectModel(const char * modelName);
+   bool setObjectShapeAsset(const char* assetId);
 
    void _onResourceChanged(const Torque::Path& path);
 

+ 1 - 1
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;

+ 1 - 1
Engine/source/ts/collada/colladaShapeLoader.cpp

@@ -693,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;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 322 - 287
Engine/source/ts/tsShapeConstruct.cpp


+ 141 - 122
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<typename ...ArgTs> inline void addArgs(ArgTs ...args) {
+            using Helper = engineAPI::detail::MarshallHelpers<String>;
+            Helper::marshallEach(argc, argv, args...);
          }
-        
-        // Helper functions to fill in the command arguments
-        template<typename ...ArgTs> inline void addArgs(ArgTs ...args){
-           using Helper = engineAPI::detail::MarshallHelpers<String>;
-           Helper::marshallEach(argc, argv, args...);
-        }
       };
 
       Vector<Command>   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_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_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_addTrigger( const Command& newCmd );
-      bool addCmd_removeTrigger( 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_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_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);
 
       void write(TSShape* shape, Stream& stream, const String& savePath);
    };
@@ -161,8 +164,12 @@ public:
    static const S32 MaxLegacySequences = 127;
 
 protected:
-   StringTableEntry          mShapePath;
-   Vector<StringTableEntry>  mSequences;
+   StringTableEntry     mShapeAssetId;
+   AssetPtr<ShapeAsset> mShapeAsset;
+
+   Vector<StringTableEntry>  mSequenceAssetIds;
+   Vector<AssetPtr<ShapeAnimationAsset>> 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<TSShape> as we don't want it to prevent from unloading.
+   TSShape* mShape;        // Edited shape; NULL while not loaded; not a Resource<TSShape> as we don't want it to prevent from unloading.
    ColladaUtils::ImportOptions   mOptions;
    bool mLoadingShape;
 
 public:
 
    TSShapeConstructor();
-   TSShapeConstructor(StringTableEntry 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; }
-   StringTableEntry 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 );
 
 

+ 1 - 1
Templates/BaseGame/game/core/gameObjects/shapes/camera.tscript

@@ -1,7 +1,7 @@
 
 singleton TSShapeConstructor(cameradts)
 {
-   baseShape = "./camera.dts";
+   baseShapeAsset = "Core_GameObjects:Camera";
    singleDetailSize = "0";
    flipUVCoords = "0";
    JoinIdenticalVerts = "0";

+ 1 - 1
Templates/BaseGame/game/core/gameObjects/shapes/noshape.tscript

@@ -1,7 +1,7 @@
 
 singleton TSShapeConstructor(noshapedts)
 {
-   baseShape = "./noshape.dts";
+   baseShapeAsset = "Core_GameObjects:noshape";
    singleDetailSize = "0";
    flipUVCoords = "0";
    JoinIdenticalVerts = "0";

+ 1 - 1
Templates/BaseGame/game/core/gameObjects/shapes/octahedron.tscript

@@ -1,7 +1,7 @@
 
 singleton TSShapeConstructor(octahedrondts)
 {
-   baseShape = "./octahedron.dts";
+   baseShapeAsset = "Core_GameObjects:octahedron";
    singleDetailSize = "0";
    flipUVCoords = "0";
    JoinIdenticalVerts = "0";

+ 1 - 1
Templates/BaseGame/game/core/gameObjects/shapes/simplecone.tscript

@@ -1,7 +1,7 @@
 
 singleton TSShapeConstructor(simpleconedts)
 {
-   baseShape = "./simplecone.dts";
+   baseShapeAsset = "Core_GameObjects:simplecone";
    singleDetailSize = "0";
    flipUVCoords = "0";
    JoinIdenticalVerts = "0";

+ 1 - 1
Templates/BaseGame/game/core/gameObjects/shapes/unit_capsule.tscript

@@ -1,7 +1,7 @@
 
 singleton TSShapeConstructor(unit_capsuledts)
 {
-   baseShape = "./unit_capsule.dts";
+   baseShapeAsset = "Core_GameObjects:unit_capsule";
    singleDetailSize = "0";
    flipUVCoords = "0";
    JoinIdenticalVerts = "0";

+ 1 - 1
Templates/BaseGame/game/core/gameObjects/shapes/unit_cube.tscript

@@ -1,7 +1,7 @@
 
 singleton TSShapeConstructor(unit_cubedts)
 {
-   baseShape = "./unit_cube.dts";
+   baseShapeAsset = "Core_GameObjects:unit_cube";
    singleDetailSize = "0";
    flipUVCoords = "0";
    JoinIdenticalVerts = "0";

+ 1 - 1
Templates/BaseGame/game/core/gameObjects/shapes/unit_sphere.tscript

@@ -1,7 +1,7 @@
 
 singleton TSShapeConstructor(unit_spheredts)
 {
-   baseShape = "./unit_sphere.dts";
+   baseShapeAsset = "Core_GameObjects:unit_sphere";
    singleDetailSize = "0";
    flipUVCoords = "0";
    JoinIdenticalVerts = "0";

+ 1 - 1
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";
 

+ 7 - 0
Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterBasicMat.asset.taml

@@ -0,0 +1,7 @@
+<MaterialAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="UnderwaterBasicMat"
+    scriptFile="@assetFile=water.tscript"
+    materialDefinitionName="UnderwaterBasicMat"
+    VersionId="1" />

+ 7 - 0
Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterMat.asset.taml

@@ -0,0 +1,7 @@
+<MaterialAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="UnderwaterMat"
+    scriptFile="@assetFile=water.tscript"
+    materialDefinitionName="UnderwaterMat"
+    VersionId="1" />

+ 7 - 0
Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterBasicMat.asset.taml

@@ -0,0 +1,7 @@
+<MaterialAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="WaterBasicMat"
+    scriptFile="@assetFile=water.tscript"
+    materialDefinitionName="WaterBasicMat"
+    VersionId="1" />

+ 7 - 0
Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterMat.asset.taml

@@ -0,0 +1,7 @@
+<MaterialAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="WaterMat"
+    scriptFile="@assetFile=water.tscript"
+    materialDefinitionName="WaterMat"
+    VersionId="1" />

+ 1 - 1
Templates/BaseGame/game/core/rendering/shapes/Fog_Cube.tscript

@@ -1,7 +1,7 @@
 
 singleton TSShapeConstructor(Fog_CubeDAE)
 {
-   baseShape = "./Fog_Cube.DAE";
+   baseShapeAsset = "Core_Rendering:Fog_Cube";
    singleDetailSize = "0";
    flipUVCoords = "0";
    JoinIdenticalVerts = "0";

+ 1 - 1
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";

+ 1 - 1
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";

+ 1 - 1
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";

+ 1 - 1
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";

+ 1 - 1
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";

+ 1 - 1
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";

+ 1 - 1
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";

+ 2 - 2
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";

+ 8 - 0
Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_d_image.asset.taml

@@ -0,0 +1,8 @@
+<ImageAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="Images_btn_Palette_d_image"
+    imageFile="@assetFile=btn_Palette_d.png"
+    UseMips="true"
+    isHDRImage="false"
+    imageType="Albedo" />

+ 8 - 0
Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_h_image.asset.taml

@@ -0,0 +1,8 @@
+<ImageAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="Images_btn_Palette_h_image"
+    imageFile="@assetFile=btn_Palette_h.png"
+    UseMips="true"
+    isHDRImage="false"
+    imageType="Albedo" />

+ 8 - 0
Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_n_image.asset.taml

@@ -0,0 +1,8 @@
+<ImageAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="Images_btn_Palette_n_image"
+    imageFile="@assetFile=btn_Palette_n.png"
+    UseMips="true"
+    isHDRImage="false"
+    imageType="Albedo" />

+ 2 - 2
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 );
-}
+}

+ 7 - 7
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";
-}
+}

+ 2 - 2
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();
     }
-}
+}

+ 1 - 1
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 )

+ 8 - 0
Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Images_ScrollBar_image.asset.taml

@@ -0,0 +1,8 @@
+<ImageAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="Images_ScrollBar_image"
+    imageFile="@assetFile=scrollBar.png"
+    UseMips="true"
+    isHDRImage="false"
+    imageType="Albedo" />

+ 11 - 11
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";
          };
       };
    };

+ 1 - 1
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();
+VerveEditor::InitInspectorFieldScripts();

+ 1 - 1
Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript

@@ -17,4 +17,4 @@ function VerveEditor::InitInspectorScripts()
     
     exec( "./Fields/main." @ $TorqueScriptFileExtension );
 }
-VerveEditor::InitInspectorScripts();
+VerveEditor::InitInspectorScripts();

+ 1 - 1
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 );

+ 1 - 1
Templates/BaseGame/game/tools/VerveEditor/main.tscript

@@ -231,4 +231,4 @@ function VerveEditor::Reset()
         // Stop.
         $VerveEditor::Controller.Stop();
     }
-}
+}

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml

@@ -187,7 +187,7 @@
             <Setting
                 name="AutomaticallyPromptMissingFiles">0</Setting>
             <Setting
-                name="DuplicatAutoResolution">AutoPrune</Setting>
+                name="DuplicateAutoResolution">FolderPrefix</Setting>
             <Setting
                 name="PreventImportWithErrors">1</Setting>
             <Setting

+ 7 - 7
Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui

@@ -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";

+ 3 - 3
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";

+ 2 - 2
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";

+ 1 - 1
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";

+ 1 - 1
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";

+ 1 - 1
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";

+ 1 - 1
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";

+ 1 - 1
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";

+ 1 - 1
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";

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/main.tscript

@@ -200,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);
-}
+}

+ 3 - 4
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";
@@ -2142,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 @ "\");";
@@ -2575,4 +2574,4 @@ function AssetBrowser::importLooseFiles(%this)
 {
    echo("Adding loose files at directory " @ %this.dirHandler.currentAddress);
    LooseFileAuditWindow.showDialog(%this.dirHandler.currentAddress);  
-}
+}

+ 1 - 1
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", "", "");

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/component.tscript

@@ -145,4 +145,4 @@ function AssetBrowser::buildComponentAssetPreview(%this, %assetDef, %previewData
    %previewData.assetFriendlyName = %assetDef.friendlyName;
    %previewData.assetDesc = %assetDef.description;
    %previewData.tooltip = %assetDef.friendlyName @ "\n" @ %assetDef;
-}
+}

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gameObject.tscript

@@ -293,4 +293,4 @@ function GuiInspectorTypeGameObjectAssetPtr::onClick( %this, %fieldName )
       //We've gotta be trying to create a GameObject, so kick that off  
       AssetBrowser.createGameObjectAsset();
    }
-}
+}

+ 1 - 1
Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/gui.tscript

@@ -176,4 +176,4 @@ function AssetBrowser::buildGUIAssetPreview(%this, %assetDef, %previewData)
    %previewData.assetFriendlyName = %assetDef.assetName;
    %previewData.assetDesc = %assetDef.description;
    %previewData.tooltip = %assetDef.assetName;
-}
+}

+ 2 - 2
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 @ "\");";
@@ -338,4 +338,4 @@ function directoryHandler::copyFolder(%this, %fromFolder, %toFolder)
    }
       
    return true;
-}
+}

+ 7 - 0
Templates/BaseGame/game/tools/base/images/Grid_512_Black.asset.taml

@@ -0,0 +1,7 @@
+<MaterialAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="Grid_512_Black"
+    scriptFile="@assetFile=materials.tscript"
+    materialDefinitionName="Grid_512_Black"
+    VersionId="1" />

+ 7 - 0
Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen.asset.taml

@@ -0,0 +1,7 @@
+<MaterialAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="Grid_512_ForestGreen"
+    scriptFile="@assetFile=materials.tscript"
+    materialDefinitionName="Grid_512_ForestGreen"
+    VersionId="1" />

+ 7 - 0
Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen_Lines.asset.taml

@@ -0,0 +1,7 @@
+<MaterialAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="Grid_512_ForestGreen_Lines"
+    scriptFile="@assetFile=materials.tscript"
+    materialDefinitionName="Grid_512_ForestGreen_Lines"
+    VersionId="1" />

+ 7 - 0
Templates/BaseGame/game/tools/base/images/Grid_512_Green.asset.taml

@@ -0,0 +1,7 @@
+<MaterialAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="Grid_512_Green"
+    scriptFile="@assetFile=materials.tscript"
+    materialDefinitionName="Grid_512_Green"
+    VersionId="1" />

+ 7 - 0
Templates/BaseGame/game/tools/base/images/Grid_512_Grey.asset.taml

@@ -0,0 +1,7 @@
+<MaterialAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="Grid_512_Grey"
+    scriptFile="@assetFile=materials.tscript"
+    materialDefinitionName="Grid_512_Grey"
+    VersionId="1" />

+ 7 - 0
Templates/BaseGame/game/tools/base/images/Grid_512_Grey_Base.asset.taml

@@ -0,0 +1,7 @@
+<MaterialAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="Grid_512_Grey_Base"
+    scriptFile="@assetFile=materials.tscript"
+    materialDefinitionName="Grid_512_Grey_Base"
+    VersionId="1" />

+ 7 - 0
Templates/BaseGame/game/tools/base/images/Grid_512_Orange.asset.taml

@@ -0,0 +1,7 @@
+<MaterialAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="Grid_512_Orange"
+    scriptFile="@assetFile=materials.tscript"
+    materialDefinitionName="Grid_512_Orange"
+    VersionId="1" />

+ 7 - 0
Templates/BaseGame/game/tools/base/images/Grid_512_Orange_Lines.asset.taml

@@ -0,0 +1,7 @@
+<MaterialAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="Grid_512_Orange_Lines"
+    scriptFile="@assetFile=materials.tscript"
+    materialDefinitionName="Grid_512_Orange_Lines"
+    VersionId="1" />

+ 7 - 0
Templates/BaseGame/game/tools/base/images/Grid_512_Red.asset.taml

@@ -0,0 +1,7 @@
+<MaterialAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="Grid_512_Red"
+    scriptFile="@assetFile=materials.tscript"
+    materialDefinitionName="Grid_512_Red"
+    VersionId="1" />

+ 3 - 3
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)
 {
    
-}
+}

+ 1 - 1
Templates/BaseGame/game/tools/componentEditor/main.tscript

@@ -32,4 +32,4 @@ exec("./gui/superToolTipDlg.ed.gui");
 //field types
 exec("./interface/materialFieldType." @ $TorqueScriptFileExtension);
 exec("./interface/typeMaskFieldType." @ $TorqueScriptFileExtension);
-exec("./interface/stateMachineField." @ $TorqueScriptFileExtension);
+exec("./interface/stateMachineField." @ $TorqueScriptFileExtension);

+ 4 - 4
Templates/BaseGame/game/tools/convexEditor/convexEditorToolbar.ed.gui

@@ -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";
@@ -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() {

+ 2 - 2
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);
@@ -232,4 +232,4 @@ function ConvexEditorPlugin::writeSettings( %this )
    EditorSettings.beginGroup( "ConvexEditor", true );
    EditorSettings.setValue( "MaterialName",           ConvexEditorGui.materialName );
    EditorSettings.endGroup();
-}
+}

+ 2 - 2
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";

+ 3 - 3
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";

+ 1 - 1
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);

+ 4 - 4
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";

+ 1 - 1
Templates/BaseGame/game/tools/decalEditor/main.tscript

@@ -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 );

+ 8 - 0
Templates/BaseGame/game/tools/editorClasses/gui/images/images_window_image.asset.taml

@@ -0,0 +1,8 @@
+<ImageAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="images_window_image"
+    imageFile="@assetFile=window.png"
+    UseMips="true"
+    isHDRImage="false"
+    imageType="Albedo" />

+ 6 - 6
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";
 };

+ 1 - 1
Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript

@@ -391,4 +391,4 @@ function GuiFormManager::ClearLayoutContent( %layoutObj )
       else
          GuiFormManager::ClearLayoutContent( %object );
    }
-}
+}

+ 3 - 3
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";
@@ -220,7 +220,7 @@
             canSaveDynamicFields = "0";
          };
          new GuiBitmapButtonCtrl() {
-            bitmap = "tools/gui/images/dropslider";
+            bitmapAsset = "ToolsModule:dropslider_n_image";
             groupNum = "-1";
             buttonType = "PushButton";
             useMouseEvents = "0";
@@ -322,7 +322,7 @@
             canSaveDynamicFields = "0";
          };
          new GuiBitmapButtonCtrl() {
-            bitmap = "tools/gui/images/dropslider";
+            bitmapAsset = "ToolsModule:dropslider_n_image";
             groupNum = "-1";
             buttonType = "PushButton";
             useMouseEvents = "0";

+ 5 - 5
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";

+ 2 - 2
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();
-}
+}

+ 2 - 2
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();
-}
+}

+ 2 - 2
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);
    }
-}
+}

+ 9 - 9
Templates/BaseGame/game/tools/gui/cubemapEditor.gui

@@ -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) {
@@ -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) {
@@ -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) {
@@ -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) {
@@ -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) {
@@ -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,7 +445,7 @@
          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";

+ 1 - 1
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();
-} 
+} 

+ 1 - 1
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";

+ 8 - 0
Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_d_image.asset.taml

@@ -0,0 +1,8 @@
+<ImageAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="menubar_snap_grid_d_image"
+    imageFile="@assetFile=snap-grid_d.png"
+    UseMips="true"
+    isHDRImage="false"
+    imageType="Albedo" />

+ 8 - 0
Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_h_image.asset.taml

@@ -0,0 +1,8 @@
+<ImageAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="menubar_snap_grid_h_image"
+    imageFile="@assetFile=snap-grid_h.png"
+    UseMips="true"
+    isHDRImage="false"
+    imageType="Albedo" />

+ 8 - 0
Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_n_image.asset.taml

@@ -0,0 +1,8 @@
+<ImageAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="menubar_snap_grid_n_image"
+    imageFile="@assetFile=snap-grid_n.png"
+    UseMips="true"
+    isHDRImage="false"
+    imageType="Albedo" />

+ 8 - 0
Templates/BaseGame/game/tools/gui/images/treeview/treeview_default_image.asset.taml

@@ -0,0 +1,8 @@
+<ImageAsset
+    canSave="true"
+    canSaveDynamicFields="true"
+    AssetName="treeview_default_image"
+    imageFile="@assetFile=default.png"
+    UseMips="true"
+    isHDRImage="false"
+    imageType="Albedo" />

+ 6 - 6
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";
@@ -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 = "";
          }; 

+ 2 - 2
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";

+ 1 - 1
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";
 

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است