diff --git a/Engine/source/T3D/assets/ShapeAsset.cpp b/Engine/source/T3D/assets/ShapeAsset.cpp
index 0f119a4b2..67229a1a5 100644
--- a/Engine/source/T3D/assets/ShapeAsset.cpp
+++ b/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());
diff --git a/Engine/source/T3D/assets/assetImporter.cpp b/Engine/source/T3D/assets/assetImporter.cpp
index b0405785c..5fb305693 100644
--- a/Engine/source/T3D/assets/assetImporter.cpp
+++ b/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));
diff --git a/Engine/source/T3D/assets/assetImporter.h b/Engine/source/T3D/assets/assetImporter.h
index f1e9e47bc..af4fac28b 100644
--- a/Engine/source/T3D/assets/assetImporter.h
+++ b/Engine/source/T3D/assets/assetImporter.h
@@ -22,7 +22,7 @@ public:
///
/// Duplicate Asset Auto-Resolution Action. Options are None, AutoPrune, AutoRename
///
- String DuplicatAutoResolution;
+ String DuplicateAutoResolution;
///
/// Indicates if warnings should be treated as errors.
diff --git a/Engine/source/console/fileSystemFunctions.cpp b/Engine/source/console/fileSystemFunctions.cpp
index fd114b71d..b67ae2c0c 100644
--- a/Engine/source/console/fileSystemFunctions.cpp
+++ b/Engine/source/console/fileSystemFunctions.cpp
@@ -398,6 +398,21 @@ DefineEngineFunction(isFile, bool, ( const char* fileName ),,
return Torque::FS::IsFile(givenPath);
}
+DefineEngineFunction(isScriptFile, bool, (const char* fileName), ,
+ "@brief Determines if the specified file exists or not\n\n"
+
+ "@param fileName The path to the file.\n"
+ "@return Returns true if the file was found.\n"
+
+ "@ingroup FileSystem")
+{
+ String cleanfilename(Torque::Path::CleanSeparators(fileName));
+ Con::expandScriptFilename(sgScriptFilenameBuffer, sizeof(sgScriptFilenameBuffer), cleanfilename.c_str());
+
+ Torque::Path givenPath(Torque::Path::CompressPath(sgScriptFilenameBuffer));
+ return Torque::FS::IsScriptFile(givenPath.getFullPath());
+}
+
DefineEngineFunction( IsDirectory, bool, ( const char* directory ),,
"@brief Determines if a specified directory exists or not\n\n"
diff --git a/Engine/source/gui/buttons/guiBitmapButtonCtrl.cpp b/Engine/source/gui/buttons/guiBitmapButtonCtrl.cpp
index 43f470711..91088b2a4 100644
--- a/Engine/source/gui/buttons/guiBitmapButtonCtrl.cpp
+++ b/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);
-}
\ No newline at end of file
+}
+
+DEF_IMAGEASSET_BINDS(GuiBitmapButtonCtrl, Bitmap);
diff --git a/Engine/source/gui/buttons/guiBitmapButtonCtrl.h b/Engine/source/gui/buttons/guiBitmapButtonCtrl.h
index 86e525c76..59e7825f1 100644
--- a/Engine/source/gui/buttons/guiBitmapButtonCtrl.h
+++ b/Engine/source/gui/buttons/guiBitmapButtonCtrl.h
@@ -84,15 +84,23 @@ class GuiBitmapButtonCtrl : public GuiButtonCtrl
struct Textures
{
/// Texture for normal state.
+ StringTableEntry mTextureNormalAssetId;
+ AssetPtr mTextureNormalAsset;
GFXTexHandle mTextureNormal;
/// Texture for highlight state.
+ StringTableEntry mTextureHilightAssetId;
+ AssetPtr mTextureHilightAsset;
GFXTexHandle mTextureHilight;
/// Texture for depressed state.
+ StringTableEntry mTextureDepressedAssetId;
+ AssetPtr mTextureDepressedAsset;
GFXTexHandle mTextureDepressed;
/// Texture for inactive state.
+ StringTableEntry mTextureInactiveAssetId;
+ AssetPtr mTextureInactiveAsset;
GFXTexHandle mTextureInactive;
};
@@ -110,8 +118,8 @@ class GuiBitmapButtonCtrl : public GuiButtonCtrl
///
BitmapMode mBitmapMode;
- /// File name for bitmap.
- 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();
diff --git a/Engine/source/gui/editor/guiShapeEdPreview.cpp b/Engine/source/gui/editor/guiShapeEdPreview.cpp
index dea22ab28..5ea20ec13 100644
--- a/Engine/source/gui/editor/guiShapeEdPreview.cpp
+++ b/Engine/source/gui/editor/guiShapeEdPreview.cpp
@@ -35,6 +35,9 @@
#include "gfx/gfxDrawUtil.h"
#include "collision/concretePolyList.h"
+#include "T3D/assets/ShapeAsset.h"
+#include "T3D/assets/ShapeAnimationAsset.h"
+
#ifdef TORQUE_COLLADA
#include "collision/optimizedPolyList.h"
#include "ts/collada/colladaUtils.h"
@@ -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(id);
+ modelName = asset->getShapeFilePath();
+ AssetDatabase.releaseAsset(id);
+ }
+ else if (assetType == StringTable->insert("ShapeAnimationAsset"))
+ {
+ ShapeAnimationAsset* asset = AssetDatabase.acquireAsset(id);
+ modelName = asset->getAnimationPath();
+ AssetDatabase.releaseAsset(id);
+ }
+ }
+
+ return setObjectModel(modelName);
+}
+
void GuiShapeEdPreview::_onResourceChanged(const Torque::Path& path)
{
if (path != Torque::Path(mModelName))
@@ -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" )
{
diff --git a/Engine/source/gui/editor/guiShapeEdPreview.h b/Engine/source/gui/editor/guiShapeEdPreview.h
index 70ba071c7..ba42d7265 100644
--- a/Engine/source/gui/editor/guiShapeEdPreview.h
+++ b/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);
diff --git a/Engine/source/ts/assimp/assimpShapeLoader.cpp b/Engine/source/ts/assimp/assimpShapeLoader.cpp
index fccdd13ef..17b0a970b 100644
--- a/Engine/source/ts/assimp/assimpShapeLoader.cpp
+++ b/Engine/source/ts/assimp/assimpShapeLoader.cpp
@@ -805,7 +805,7 @@ TSShape* assimpLoadShape(const Torque::Path &path)
// Allow TSShapeConstructor object to override properties
ColladaUtils::getOptions().reset();
- TSShapeConstructor* tscon = TSShapeConstructor::findShapeConstructor(path.getFullPath());
+ TSShapeConstructor* tscon = TSShapeConstructor::findShapeConstructorByFilename(path.getFullPath());
if (tscon)
{
ColladaUtils::getOptions() = tscon->mOptions;
diff --git a/Engine/source/ts/collada/colladaShapeLoader.cpp b/Engine/source/ts/collada/colladaShapeLoader.cpp
index 15ee7af8c..8021d25f1 100644
--- a/Engine/source/ts/collada/colladaShapeLoader.cpp
+++ b/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;
diff --git a/Engine/source/ts/tsShapeConstruct.cpp b/Engine/source/ts/tsShapeConstruct.cpp
index 3e357c304..232f21895 100644
--- a/Engine/source/ts/tsShapeConstruct.cpp
+++ b/Engine/source/ts/tsShapeConstruct.cpp
@@ -38,46 +38,52 @@
//#define DEBUG_SPEW
-ConsoleDocClass( TSShapeConstructor,
+ConsoleDocClass(TSShapeConstructor,
"@brief An object used to modify a DTS or COLLADA shape model after it has "
"been loaded by Torque\n\n"
"@ingroup gameObjects\n"
);
-IMPLEMENT_CALLBACK( TSShapeConstructor, onLoad, void, (), (),
+IMPLEMENT_CALLBACK(TSShapeConstructor, onLoad, void, (), (),
"Called immediately after the DTS or DAE file has been loaded; before the "
"shape data is available to any other object (StaticShape, Player etc). This "
"is where you should put any post-load commands to modify the shape in-memory "
- "such as addNode, renameSequence etc." )
+ "such as addNode, renameSequence etc.")
-IMPLEMENT_CALLBACK( TSShapeConstructor, onUnload, void, (), (),
+IMPLEMENT_CALLBACK(TSShapeConstructor, onUnload, void, (), (),
"Called when the DTS or DAE resource is flushed from memory. Not normally "
- "required, but may be useful to perform cleanup." )
+ "required, but may be useful to perform cleanup.")
-ImplementEnumType( TSShapeConstructorUpAxis,
+ImplementEnumType(TSShapeConstructorUpAxis,
"Axis to use for upwards direction when importing from Collada.\n\n"
- "@ingroup TSShapeConstructor" )
- { UPAXISTYPE_X_UP, "X_AXIS" },
- { UPAXISTYPE_Y_UP, "Y_AXIS" },
- { UPAXISTYPE_Z_UP, "Z_AXIS" },
- { UPAXISTYPE_COUNT, "DEFAULT" }
+ "@ingroup TSShapeConstructor")
+{
+UPAXISTYPE_X_UP, "X_AXIS"
+},
+{ UPAXISTYPE_Y_UP, "Y_AXIS" },
+{ UPAXISTYPE_Z_UP, "Z_AXIS" },
+{ UPAXISTYPE_COUNT, "DEFAULT" }
EndImplementEnumType;
-ImplementEnumType( TSShapeConstructorLodType,
+ImplementEnumType(TSShapeConstructorLodType,
"\n\n"
- "@ingroup TSShapeConstructor" )
- { ColladaUtils::ImportOptions::DetectDTS, "DetectDTS" },
- { ColladaUtils::ImportOptions::SingleSize, "SingleSize" },
- { ColladaUtils::ImportOptions::TrailingNumber, "TrailingNumber" },
-EndImplementEnumType;
+ "@ingroup TSShapeConstructor")
+{
+ ColladaUtils::ImportOptions::DetectDTS, "DetectDTS"
+},
+{ ColladaUtils::ImportOptions::SingleSize, "SingleSize" },
+{ ColladaUtils::ImportOptions::TrailingNumber, "TrailingNumber" },
+ EndImplementEnumType;
ImplementEnumType(TSShapeConstructorAnimType,
"\n\n"
- "@ingroup TSShapeConstructor" )
- { ColladaUtils::ImportOptions::FrameCount, "Frames" },
- { ColladaUtils::ImportOptions::Seconds, "Seconds" },
- { ColladaUtils::ImportOptions::Milliseconds, "Milliseconds" },
-EndImplementEnumType;
+ "@ingroup TSShapeConstructor")
+{
+ ColladaUtils::ImportOptions::FrameCount, "Frames"
+},
+{ ColladaUtils::ImportOptions::Seconds, "Seconds" },
+{ ColladaUtils::ImportOptions::Milliseconds, "Milliseconds" },
+ EndImplementEnumType;
//-----------------------------------------------------------------------------
@@ -86,14 +92,14 @@ String TSShapeConstructor::smCapsuleShapePath("tools/shapes/unit_capsule.dts");
String TSShapeConstructor::smCubeShapePath("tools/shapes/unit_cube.dts");
String TSShapeConstructor::smSphereShapePath("tools/shapes/unit_sphere.dts");
-ResourceRegisterPostLoadSignal< TSShape > TSShapeConstructor::_smAutoLoad( &TSShapeConstructor::_onTSShapeLoaded );
-ResourceRegisterUnloadSignal< TSShape > TSShapeConstructor::_smAutoUnload( &TSShapeConstructor::_onTSShapeUnloaded );
+ResourceRegisterPostLoadSignal< TSShape > TSShapeConstructor::_smAutoLoad(&TSShapeConstructor::_onTSShapeLoaded);
+ResourceRegisterUnloadSignal< TSShape > TSShapeConstructor::_smAutoUnload(&TSShapeConstructor::_onTSShapeUnloaded);
-void TSShapeConstructor::_onTSShapeLoaded( Resource< TSShape >& resource )
+void TSShapeConstructor::_onTSShapeLoaded(Resource< TSShape >& resource)
{
- TSShapeConstructor* ctor = findShapeConstructor( resource.getPath().getFullPath() );
- if( ctor )
- ctor->_onLoad( resource );
+ TSShapeConstructor* ctor = findShapeConstructorByFilename(resource.getPath().getFullPath());
+ if (ctor)
+ ctor->_onLoad(resource);
if (ctor && ctor->mShape && ctor->mShape->needsReinit())
{
@@ -101,20 +107,20 @@ void TSShapeConstructor::_onTSShapeLoaded( Resource< TSShape >& resource )
}
}
-void TSShapeConstructor::_onTSShapeUnloaded( const Torque::Path& path, TSShape* shape )
+void TSShapeConstructor::_onTSShapeUnloaded(const Torque::Path& path, TSShape* shape)
{
- TSShapeConstructor* ctor = findShapeConstructor( path.getFullPath() );
- if( ctor && ( ctor->getShape() == shape ) )
+ TSShapeConstructor* ctor = findShapeConstructorByFilename(path.getFullPath());
+ if (ctor && (ctor->getShape() == shape))
ctor->_onUnload();
}
// TSShape names are case insensitive
-static inline bool namesEqual( const String& nameA, const String& nameB )
+static inline bool namesEqual(const String& nameA, const String& nameB)
{
- return nameA.equal( nameB, String::NoCase );
+ return nameA.equal(nameB, String::NoCase);
}
-static void SplitSequencePathAndName( String& srcPath, String& srcName )
+static void SplitSequencePathAndName(String& srcPath, String& srcName)
{
srcName = "";
@@ -132,7 +138,7 @@ static void SplitSequencePathAndName( String& srcPath, String& srcName )
// now 'split' is at the end of the path, and 'split2' is at the start of the sequence name
srcName = srcPath.substr(split2);
- srcPath = srcPath.erase(split, srcPath.length()-split);
+ srcPath = srcPath.erase(split, srcPath.length() - split);
}
}
@@ -141,8 +147,11 @@ static void SplitSequencePathAndName( String& srcPath, String& srcName )
IMPLEMENT_CONOBJECT(TSShapeConstructor);
TSShapeConstructor::TSShapeConstructor()
- : mShapePath(StringTable->EmptyString()), mLoadingShape(false)
+ : mLoadingShape(false)
{
+ mShapeAssetId = StringTable->EmptyString();
+ mShapeAsset = StringTable->EmptyString();
+
mOptions.upAxis = UPAXISTYPE_COUNT;
mOptions.unit = -1.0f;
mOptions.lodType = ColladaUtils::ImportOptions::TrailingNumber;
@@ -181,37 +190,37 @@ TSShapeConstructor::~TSShapeConstructor()
{
}
-bool TSShapeConstructor::addSequenceFromField( void *obj, const char *index, const char *data )
+bool TSShapeConstructor::addSequenceFromField(void* obj, const char* index, const char* data)
{
- TSShapeConstructor *pObj = static_cast( obj );
+ TSShapeConstructor* pObj = static_cast(obj);
- if ( data && data[0] )
- pObj->mSequences.push_back( StringTable->insert(data) );
+ if (data && data[0])
+ pObj->mSequenceAssetIds.push_back(StringTable->insert(data));
return false;
}
void TSShapeConstructor::initPersistFields()
{
- addGroup( "Media" );
- addField( "baseShape", TypeStringFilename, Offset(mShapePath, TSShapeConstructor),
+ addGroup("Media");
+ addField("baseShapeAsset", TypeShapeAssetId, Offset(mShapeAssetId, TSShapeConstructor),
"Specifies the path to the DTS or DAE file to be operated on by this object.\n"
"Since the TSShapeConstructor script must be in the same folder as the DTS or "
"DAE file, it is recommended to use a relative path so that the shape and "
"script files can be copied to another location without having to modify the "
- "path." );
- endGroup( "Media" );
+ "path.");
+ endGroup("Media");
- addGroup( "Collada" );
- addField( "upAxis", TYPEID< domUpAxisType >(), Offset(mOptions.upAxis, TSShapeConstructor),
+ addGroup("Collada");
+ addField("upAxis", TYPEID< domUpAxisType >(), Offset(mOptions.upAxis, TSShapeConstructor),
"Override the element in the COLLADA (.dae) file. No effect for DTS files.\n"
"Set to one of the following values:\n"
"- X_AXIS
- Positive X points up. Model will be rotated into Torque's coordinate system (Z up).
"
"- Y_AXIS
- Positive Y points up. Model will be rotated into Torque's coordinate system (Z up).
"
"- Z_AXIS
- Positive Z points up. No rotation will be applied to the model.
"
- "- DEFAULT
- The default value. Use the value in the .dae file (defaults to Z_AXIS if the element is not present).
" );
+ "DEFAULTThe default value. Use the value in the .dae file (defaults to Z_AXIS if the element is not present).");
- addField( "unit", TypeF32, Offset(mOptions.unit, TSShapeConstructor),
+ addField("unit", TypeF32, Offset(mOptions.unit, TSShapeConstructor),
"Override the element in the COLLADA (.dae) file. No effect for DTS files.\n"
"COLLADA (.dae) files usually contain a element that indicates the "
"'real world' units that the model is described in. It means you can work "
@@ -224,26 +233,26 @@ void TSShapeConstructor::initPersistFields()
"and the building scaled down by 0.3048, given them both the correct scale "
"relative to each other.
\n"
"Omit the field or set to -1 to use the value in the .dae file (1.0 if the "
- " element is not present)" );
+ " element is not present)");
- addField( "lodType", TYPEID< ColladaUtils::ImportOptions::eLodType >(), Offset(mOptions.lodType, TSShapeConstructor),
+ addField("lodType", TYPEID< ColladaUtils::ImportOptions::eLodType >(), Offset(mOptions.lodType, TSShapeConstructor),
"Control how the COLLADA (.dae) importer interprets LOD in the model. No effect for DTS files.\n"
"Set to one of the following values:\n"
"- DetectDTS
- The default value. Instructs the importer to search for a 'baseXXX->startXXX' node hierarchy at the root level. If found, the importer acts as if ''TrailingNumber'' was set. Otherwise, all geometry is imported at a single detail size.
"
"- SingleSize
- All geometry is imported at a fixed detail size. Numbers at the end of geometry node's are ignored.
"
"- TrailingNumber
- Numbers at the end of geometry node's name are interpreted as the detail size (similar to DTS exporting). Geometry instances with the same base name but different trailing number are grouped into the same object.
"
- "- DEFAULT
- The default value. Use the value in the .dae file (defaults to Z_AXIS if the element is not present).
" );
+ "DEFAULTThe default value. Use the value in the .dae file (defaults to Z_AXIS if the element is not present).");
- addField( "singleDetailSize", TypeS32, Offset(mOptions.singleDetailSize, TSShapeConstructor),
+ addField("singleDetailSize", TypeS32, Offset(mOptions.singleDetailSize, TSShapeConstructor),
"Sets the detail size when lodType is set to SingleSize. No effect otherwise, and no effect for DTS files.\n"
- "@see lodType" );
+ "@see lodType");
- addField( "matNamePrefix", TypeRealString, Offset(mOptions.matNamePrefix, TSShapeConstructor),
+ addField("matNamePrefix", TypeRealString, Offset(mOptions.matNamePrefix, TSShapeConstructor),
"Prefix to apply to all material map names in the COLLADA (.dae) file. No effect for DTS files.\n"
"This field is useful to avoid material name clashes for exporters that generate generic material "
- "names like \"texture0\" or \"material1\"." );
+ "names like \"texture0\" or \"material1\".");
- addField( "alwaysImport", TypeRealString, Offset(mOptions.alwaysImport, TSShapeConstructor),
+ addField("alwaysImport", TypeRealString, Offset(mOptions.alwaysImport, TSShapeConstructor),
"TAB separated patterns of nodes to import even if in neverImport list. No effect for DTS files.\n"
"Torque allows unwanted nodes in COLLADA (.dae) files to to be ignored "
"during import. This field contains a TAB separated list of patterns to "
@@ -257,17 +266,17 @@ void TSShapeConstructor::initPersistFields()
" alwaysImport = \"mount*\" TAB \"eye\";\n"
" neverImport = \"*-PIVOT\";\n"
"}\n"
- "@endtsexample" );
+ "@endtsexample");
- addField( "neverImport", TypeRealString, Offset(mOptions.neverImport, TSShapeConstructor),
+ addField("neverImport", TypeRealString, Offset(mOptions.neverImport, TSShapeConstructor),
"TAB separated patterns of nodes to ignore on loading. No effect for DTS files.\n"
"Torque allows unwanted nodes in COLLADA (.dae) files to to be ignored "
"during import. This field contains a TAB separated list of patterns to "
"match node names. Any node that matches one of the patterns in the list will "
"not be imported (unless it matches the alwaysImport list.\n"
- "@see alwaysImport" );
+ "@see alwaysImport");
- addField( "alwaysImportMesh", TypeRealString, Offset(mOptions.alwaysImportMesh, TSShapeConstructor),
+ addField("alwaysImportMesh", TypeRealString, Offset(mOptions.alwaysImportMesh, TSShapeConstructor),
"TAB separated patterns of meshes to import even if in neverImportMesh list. No effect for DTS files.\n"
"Torque allows unwanted meshes in COLLADA (.dae) files to to be ignored "
"during import. This field contains a TAB separated list of patterns to "
@@ -281,15 +290,15 @@ void TSShapeConstructor::initPersistFields()
" alwaysImportMesh = \"body*\" TAB \"armor\" TAB \"bounds\";\n"
" neverImportMesh = \"*-dummy\";\n"
"}\n"
- "@endtsexample" );
+ "@endtsexample");
- addField( "neverImportMesh", TypeRealString, Offset(mOptions.neverImportMesh, TSShapeConstructor),
+ addField("neverImportMesh", TypeRealString, Offset(mOptions.neverImportMesh, TSShapeConstructor),
"TAB separated patterns of meshes to ignore on loading. No effect for DTS files.\n"
"Torque allows unwanted meshes in COLLADA (.dae) files to to be ignored "
"during import. This field contains a TAB separated list of patterns to "
"match mesh names. Any mesh that matches one of the patterns in the list will "
"not be imported (unless it matches the alwaysImportMesh list.\n"
- "@see alwaysImportMesh" );
+ "@see alwaysImportMesh");
addField("neverImportMat", TypeRealString, Offset(mOptions.neverImportMat, TSShapeConstructor),
"TAB separated patterns of materials to ignore on loading. No effect for DTS files.\n"
@@ -298,57 +307,57 @@ void TSShapeConstructor::initPersistFields()
"match material names. Any material that matches one of the patterns in the list will "
"not be imported");
- addField( "ignoreNodeScale", TypeBool, Offset(mOptions.ignoreNodeScale, TSShapeConstructor),
+ addField("ignoreNodeScale", TypeBool, Offset(mOptions.ignoreNodeScale, TSShapeConstructor),
"Ignore elements inside COLLADA s. No effect for DTS files.\n"
"This field is a workaround for certain exporters that generate bad node "
- "scaling, and is not usually required." );
+ "scaling, and is not usually required.");
- addField( "adjustCenter", TypeBool, Offset(mOptions.adjustCenter, TSShapeConstructor),
- "Translate COLLADA model on import so the origin is at the center. No effect for DTS files." );
+ addField("adjustCenter", TypeBool, Offset(mOptions.adjustCenter, TSShapeConstructor),
+ "Translate COLLADA model on import so the origin is at the center. No effect for DTS files.");
- addField( "adjustFloor", TypeBool, Offset(mOptions.adjustFloor, TSShapeConstructor),
+ addField("adjustFloor", TypeBool, Offset(mOptions.adjustFloor, TSShapeConstructor),
"Translate COLLADA model on import so origin is at the (Z axis) bottom of the model. No effect for DTS files.\n"
"This can be used along with adjustCenter to have the origin at the "
"center of the bottom of the model.\n"
- "@see adjustCenter" );
+ "@see adjustCenter");
- addField( "forceUpdateMaterials", TypeBool, Offset(mOptions.forceUpdateMaterials, TSShapeConstructor),
+ addField("forceUpdateMaterials", TypeBool, Offset(mOptions.forceUpdateMaterials, TSShapeConstructor),
"Forces update of the materials." TORQUE_SCRIPT_EXTENSION " file in the same folder as the COLLADA "
"(.dae) file, even if Materials already exist. No effect for DTS files.\n"
- "Normally only Materials that are not already defined are written to materials." TORQUE_SCRIPT_EXTENSION "." );
+ "Normally only Materials that are not already defined are written to materials." TORQUE_SCRIPT_EXTENSION ".");
// Fields added for assimp options
- addField( "convertLeftHanded", TypeBool, Offset(mOptions.convertLeftHanded, TSShapeConstructor),
- "Convert to left handed coordinate system." );
- addField( "calcTangentSpace", TypeBool, Offset(mOptions.calcTangentSpace, TSShapeConstructor),
- "Calculate tangents and bitangents, if possible." );
- addField( "genUVCoords", TypeBool, Offset(mOptions.genUVCoords, TSShapeConstructor),
- "Convert spherical, cylindrical, box and planar mapping to proper UVs." );
- addField( "transformUVCoords", TypeBool, Offset(mOptions.transformUVCoords, TSShapeConstructor),
- "Preprocess UV transformations (scaling, translation ...)." );
- addField( "flipUVCoords", TypeBool, Offset(mOptions.flipUVCoords, TSShapeConstructor),
+ addField("convertLeftHanded", TypeBool, Offset(mOptions.convertLeftHanded, TSShapeConstructor),
+ "Convert to left handed coordinate system.");
+ addField("calcTangentSpace", TypeBool, Offset(mOptions.calcTangentSpace, TSShapeConstructor),
+ "Calculate tangents and bitangents, if possible.");
+ addField("genUVCoords", TypeBool, Offset(mOptions.genUVCoords, TSShapeConstructor),
+ "Convert spherical, cylindrical, box and planar mapping to proper UVs.");
+ addField("transformUVCoords", TypeBool, Offset(mOptions.transformUVCoords, TSShapeConstructor),
+ "Preprocess UV transformations (scaling, translation ...).");
+ addField("flipUVCoords", TypeBool, Offset(mOptions.flipUVCoords, TSShapeConstructor),
"This step flips all UV coordinates along the y-axis and adjusts material settings and bitangents accordingly.\n"
- "Assimp uses TL(0,0):BR(1,1). T3D uses TL(0,1):BR(1,0). This will be needed for most textured models." );
- addField( "findInstances", TypeBool, Offset(mOptions.findInstances, TSShapeConstructor),
- "Search for instanced meshes and remove them by references to one master." );
- addField( "limitBoneWeights", TypeBool, Offset(mOptions.limitBoneWeights, TSShapeConstructor),
- "Limit bone weights to 4 per vertex." );
- addField( "joinIdenticalVerts", TypeBool, Offset(mOptions.joinIdenticalVerts, TSShapeConstructor),
- "Identifies and joins identical vertex data sets within all imported meshes." );
- addField( "reverseWindingOrder", TypeBool, Offset(mOptions.reverseWindingOrder, TSShapeConstructor),
- "This step adjusts the output face winding order to be clockwise. The default assimp face winding order is counter clockwise." );
- addField( "invertNormals", TypeBool, Offset(mOptions.invertNormals, TSShapeConstructor),
- "Reverse the normal vector direction for all normals." );
- addField( "removeRedundantMats", TypeBool, Offset(mOptions.removeRedundantMats, TSShapeConstructor),
- "Removes redundant materials." );
- addField( "animTiming", TYPEID< ColladaUtils::ImportOptions::eAnimTimingType >(), Offset(mOptions.animTiming, TSShapeConstructor),
- "How to import timing data as frames, seconds or milliseconds." );
+ "Assimp uses TL(0,0):BR(1,1). T3D uses TL(0,1):BR(1,0). This will be needed for most textured models.");
+ addField("findInstances", TypeBool, Offset(mOptions.findInstances, TSShapeConstructor),
+ "Search for instanced meshes and remove them by references to one master.");
+ addField("limitBoneWeights", TypeBool, Offset(mOptions.limitBoneWeights, TSShapeConstructor),
+ "Limit bone weights to 4 per vertex.");
+ addField("joinIdenticalVerts", TypeBool, Offset(mOptions.joinIdenticalVerts, TSShapeConstructor),
+ "Identifies and joins identical vertex data sets within all imported meshes.");
+ addField("reverseWindingOrder", TypeBool, Offset(mOptions.reverseWindingOrder, TSShapeConstructor),
+ "This step adjusts the output face winding order to be clockwise. The default assimp face winding order is counter clockwise.");
+ addField("invertNormals", TypeBool, Offset(mOptions.invertNormals, TSShapeConstructor),
+ "Reverse the normal vector direction for all normals.");
+ addField("removeRedundantMats", TypeBool, Offset(mOptions.removeRedundantMats, TSShapeConstructor),
+ "Removes redundant materials.");
+ addField("animTiming", TYPEID< ColladaUtils::ImportOptions::eAnimTimingType >(), Offset(mOptions.animTiming, TSShapeConstructor),
+ "How to import timing data as frames, seconds or milliseconds.");
addField("animFPS", TypeS32, Offset(mOptions.animFPS, TSShapeConstructor),
"FPS value to use if timing is set in frames and the animations does not have an fps set.");
- endGroup( "Collada" );
+ endGroup("Collada");
- addGroup( "Sequences" );
- addProtectedField( "sequence", TypeStringFilename, NULL, &addSequenceFromField, &emptyStringProtectedGetFn,
+ addGroup("Sequences");
+ addProtectedField("sequence", TypeStringFilename, NULL, &addSequenceFromField, &emptyStringProtectedGetFn,
"Legacy method of adding sequences to a DTS or DAE shape after loading.\n\n"
"@tsexample\n"
"singleton TSShapeConstructor(MyShapeDae)\n"
@@ -358,8 +367,8 @@ void TSShapeConstructor::initPersistFields()
" sequence = \"../anims/walk.dae walk\";\n"
" sequence = \"../anims/jump.dsq jump\";\n"
"}\n"
- "@endtsexample" );
- endGroup( "Sequences" );
+ "@endtsexample");
+ endGroup("Sequences");
Parent::initPersistFields();
}
@@ -368,33 +377,51 @@ void TSShapeConstructor::consoleInit()
{
Parent::consoleInit();
- Con::addVariable( "$pref::TSShapeConstructor::CapsuleShapePath", TypeRealString, &TSShapeConstructor::smCapsuleShapePath,
+ Con::addVariable("$pref::TSShapeConstructor::CapsuleShapePath", TypeRealString, &TSShapeConstructor::smCapsuleShapePath,
"The file path to the capsule shape used by tsMeshFit.\n\n"
- "@ingroup MeshFit\n" );
+ "@ingroup MeshFit\n");
- Con::addVariable( "$pref::TSShapeConstructor::CubeShapePath", TypeRealString, &TSShapeConstructor::smCubeShapePath,
+ Con::addVariable("$pref::TSShapeConstructor::CubeShapePath", TypeRealString, &TSShapeConstructor::smCubeShapePath,
"The file path to the cube shape used by tsMeshFit.\n\n"
- "@ingroup MeshFit\n" );
+ "@ingroup MeshFit\n");
- Con::addVariable( "$pref::TSShapeConstructor::SphereShapePath", TypeRealString, &TSShapeConstructor::smSphereShapePath,
+ Con::addVariable("$pref::TSShapeConstructor::SphereShapePath", TypeRealString, &TSShapeConstructor::smSphereShapePath,
"The file path to the sphere shape used by tsMeshFit.\n\n"
- "@ingroup MeshFit\n" );
+ "@ingroup MeshFit\n");
}
-TSShapeConstructor* TSShapeConstructor::findShapeConstructor(const FileName& path)
+TSShapeConstructor* TSShapeConstructor::findShapeConstructorByAssetId(StringTableEntry shapeAssetId)
{
- SimGroup *group;
- if (Sim::findObject( "TSShapeConstructorGroup", group ))
+ SimGroup* group;
+ if (Sim::findObject("TSShapeConstructorGroup", group))
{
// Find the TSShapeConstructor object for the given shape file
for (S32 i = 0; i < group->size(); i++)
{
- TSShapeConstructor* tss = dynamic_cast( group->at(i) );
- FileName shapePath = tss->mShapePath;
+ TSShapeConstructor* tss = dynamic_cast(group->at(i));
+ StringTableEntry targetAssetId = tss->getShapeAssetId();
+
+ if(targetAssetId == shapeAssetId)
+ return tss;
+ }
+ }
+ return NULL;
+}
+
+TSShapeConstructor* TSShapeConstructor::findShapeConstructorByFilename(const FileName& path)
+{
+ SimGroup* group;
+ if (Sim::findObject("TSShapeConstructorGroup", group))
+ {
+ // Find the TSShapeConstructor object for the given shape file
+ for (S32 i = 0; i < group->size(); i++)
+ {
+ TSShapeConstructor* tss = dynamic_cast(group->at(i));
+ FileName shapePath = tss->getShapePath();
char buf[1024];
FileName fullShapePath = String(Platform::makeFullPathName(shapePath, buf, sizeof(buf)));
- if (shapePath.equal( path, String::NoCase ) || fullShapePath.equal(path, String::NoCase))
+ if (shapePath.equal(path, String::NoCase) || fullShapePath.equal(path, String::NoCase))
return tss;
}
}
@@ -404,26 +431,25 @@ TSShapeConstructor* TSShapeConstructor::findShapeConstructor(const FileName& pat
//-----------------------------------------------------------------------------
bool TSShapeConstructor::onAdd()
{
- if ( !Parent::onAdd() )
+ if (!Parent::onAdd())
return false;
// Prevent multiple objects pointing at the same shape file
- FileName path = mShapePath;
- TSShapeConstructor* tss = findShapeConstructor( path );
- if ( tss )
+ TSShapeConstructor* tss = findShapeConstructorByAssetId(getShapeAssetId());
+ if (tss)
{
Con::errorf("TSShapeConstructor::onAdd failed: %s is already referenced by "
- "another TSShapeConstructor object (%s - %d)", mShapePath,
+ "another TSShapeConstructor object (%s - %d)", getShapeAssetId(),
tss->getName(), tss->getId());
return false;
}
// Add to the TSShapeConstructor group (for lookups)
- SimGroup *group;
- if ( !Sim::findObject( "TSShapeConstructorGroup", group ) )
+ SimGroup* group;
+ if (!Sim::findObject("TSShapeConstructorGroup", group))
{
group = new SimGroup();
- if ( !group->registerObject("TSShapeConstructorGroup") )
+ if (!group->registerObject("TSShapeConstructorGroup"))
{
SAFE_DELETE(group);
@@ -431,15 +457,15 @@ bool TSShapeConstructor::onAdd()
"TSShapeConstructorGroup");
return false;
}
- Sim::getRootGroup()->addObject( group );
+ Sim::getRootGroup()->addObject(group);
}
- group->addObject( this );
+ group->addObject(this);
// This is only here for backwards compatibility!
//
// If we have no sequences, it may be using the older sequence# syntax.
// Check for dynamic fields of that pattern and add them into the sequence vector.
- if ( mSequences.empty() )
+ /*if (mSequenceAssetIds.empty())
{
for ( U32 idx = 0; idx < MaxLegacySequences; idx++ )
{
@@ -457,13 +483,17 @@ bool TSShapeConstructor::onAdd()
Con::setData( TypeStringFilename, &expanded, 0, 1, &data );
addSequenceFromField( this, NULL, expanded.c_str() );
}
- }
+ }*/
// If an instance of this shape has already been loaded, call onLoad now
- Resource shape = ResourceManager::get().find( mShapePath );
+ mShapeAsset = mShapeAssetId;
+ if (mShapeAsset.notNull())
+ {
+ Resource shape = mShapeAsset->getShapeResource();
- if ( shape )
- _onLoad( shape );
+ if (shape)
+ _onLoad(shape);
+ }
if (mShape && mShape->needsReinit())
{
@@ -478,29 +508,34 @@ bool TSShapeConstructor::onAdd()
void TSShapeConstructor::_onLoad(TSShape* shape)
{
// Check if we should unload first
- if ( mShape )
+ if (mShape)
_onUnload();
- #ifdef DEBUG_SPEW
- Con::printf( "[TSShapeConstructor] attaching to shape '%s'", mShapePath );
- #endif
+#ifdef DEBUG_SPEW
+ Con::printf("[TSShapeConstructor] attaching to shape '%s'", getShapePath());
+#endif
mShape = shape;
mChangeSet.clear();
mLoadingShape = true;
// Add sequences defined using field syntax
- for ( S32 i = 0; i < mSequences.size(); i++ )
+ for (S32 i = 0; i < mSequenceAssetIds.size(); i++)
{
- if ( mSequences[i] == StringTable->EmptyString())
+ if (mSequenceAssetIds[i] == StringTable->EmptyString())
+ continue;
+
+ AssetPtr sequenceAsset = mSequenceAssetIds[i];
+
+ if (sequenceAsset.isNull())
continue;
// Split the sequence path from the target sequence name
String destName;
- String srcPath( mSequences[i] );
- SplitSequencePathAndName( srcPath, destName );
+ String srcPath(sequenceAsset->getAnimationPath());
+ SplitSequencePathAndName(srcPath, destName);
- addSequence( srcPath, destName );
+ addSequence(srcPath, destName);
}
// Call script function
@@ -512,9 +547,9 @@ void TSShapeConstructor::_onLoad(TSShape* shape)
void TSShapeConstructor::_onUnload()
{
- #ifdef DEBUG_SPEW
- Con::printf( "[TSShapeConstructor] detaching from '%s'", mShapePath );
- #endif
+#ifdef DEBUG_SPEW
+ Con::printf("[TSShapeConstructor] detaching from '%s'", getShapePath());
+#endif
onUnload_callback();
@@ -524,28 +559,28 @@ void TSShapeConstructor::_onUnload()
//-----------------------------------------------------------------------------
// Storage
-bool TSShapeConstructor::writeField(StringTableEntry fieldname, const char *value)
+bool TSShapeConstructor::writeField(StringTableEntry fieldname, const char* value)
{
// Ignore the sequence fields (these are written as 'addSequence' commands instead)
- if ( dStrnicmp( fieldname, "sequence", 8 ) == 0 )
+ if (dStrnicmp(fieldname, "sequence", 8) == 0)
return false;
- else if ( dStrnicmp( fieldname, "baseShape", 9 ) == 0 )
+ else if (dStrnicmp(fieldname, "baseShape", 9) == 0)
{
// Small hack to only write the base filename (no path) since the
// TSShapeConstructor script must be in the same folder as the model, and
// then we can easily copy both around without having to change the field
- const char* filename = dStrrchr( value, '/' );
- if ( filename > value )
+ const char* filename = dStrrchr(value, '/');
+ if (filename > value)
{
- S32 len = dStrlen( filename );
- dMemmove((void*)(value + 1), filename, len );
+ S32 len = dStrlen(filename);
+ dMemmove((void*)(value + 1), filename, len);
((char*)value)[0] = '.';
((char*)value)[len + 1] = '\0';
}
return true;
}
- return Parent::writeField( fieldname, value );
+ return Parent::writeField(fieldname, value);
}
//-----------------------------------------------------------------------------
@@ -557,108 +592,108 @@ bool TSShapeConstructor::writeField(StringTableEntry fieldname, const char *valu
// Check that the given index is valid (0 - max-1). If not, generate an
// error and return.
#define CHECK_INDEX_IN_RANGE(func, index, maxIndex, ret) \
- if ( ( index < 0 ) || ( index >= maxIndex ) ) \
- { \
- Con::errorf( "TSShapeConstructor::" #func ": index out of " \
- "range (0-%d)", maxIndex-1); \
- return ret; \
- }
+if ( ( index < 0 ) || ( index >= maxIndex ) ) \
+{ \
+Con::errorf( "TSShapeConstructor::" #func ": index out of " \
+"range (0-%d)", maxIndex-1); \
+return ret; \
+}
// Do a node lookup and allow the root node name ("")
#define GET_NODE_INDEX_ALLOW_ROOT(func, var, name, ret) \
- S32 var##Index = -1; \
- if (name[0]) \
- { \
- var##Index = mShape->findNode(name); \
- if (var##Index < 0) \
- { \
- Con::errorf( "TSShapeConstructor::" #func ": Could not " \
- "find node '%s'", name); \
- return ret; \
- } \
- } \
- TSShape::Node* var = var##Index < 0 ? NULL : &(mShape->nodes[var##Index]); \
- TORQUE_UNUSED(var##Index); \
- TORQUE_UNUSED(var)
+S32 var##Index = -1; \
+if (name[0]) \
+{ \
+var##Index = mShape->findNode(name); \
+if (var##Index < 0) \
+{ \
+Con::errorf( "TSShapeConstructor::" #func ": Could not " \
+ "find node '%s'", name); \
+return ret; \
+} \
+} \
+TSShape::Node* var = var##Index < 0 ? NULL : &(mShape->nodes[var##Index]); \
+TORQUE_UNUSED(var##Index); \
+TORQUE_UNUSED(var)
// Do a node lookup, root node ("") is not allowed
#define GET_NODE_INDEX_NO_ROOT(func, var, name, ret) \
- S32 var##Index = mShape->findNode(name); \
- if (var##Index < 0) \
- { \
- Con::errorf( "TSShapeConstructor::" #func ": Could not find " \
- "node '%s'", name); \
- return ret; \
- } \
- TSShape::Node* var = &(mShape->nodes[var##Index]); \
- TORQUE_UNUSED(var##Index); \
- TORQUE_UNUSED(var)
+S32 var##Index = mShape->findNode(name); \
+if (var##Index < 0) \
+{ \
+Con::errorf( "TSShapeConstructor::" #func ": Could not find " \
+"node '%s'", name); \
+return ret; \
+} \
+TSShape::Node* var = &(mShape->nodes[var##Index]); \
+TORQUE_UNUSED(var##Index); \
+TORQUE_UNUSED(var)
// Do an object lookup
#define GET_OBJECT(func, var, name, ret) \
- S32 var##Index = mShape->findObject(name); \
- if (var##Index < 0) \
- { \
- Con::errorf( "TSShapeConstructor::" #func ": Could not find " \
- "object '%s'", name); \
- return ret; \
- } \
- TSShape::Object* var = &(mShape->objects[var##Index]); \
- TORQUE_UNUSED(var##Index); \
- TORQUE_UNUSED(var)
+S32 var##Index = mShape->findObject(name); \
+if (var##Index < 0) \
+{ \
+Con::errorf( "TSShapeConstructor::" #func ": Could not find " \
+"object '%s'", name); \
+return ret; \
+} \
+TSShape::Object* var = &(mShape->objects[var##Index]); \
+TORQUE_UNUSED(var##Index); \
+TORQUE_UNUSED(var)
// Do a mesh lookup
#define GET_MESH(func, var, name, ret) \
- TSMesh* var = mShape->findMesh(name); \
- if (!var) \
- { \
- Con::errorf( "TSShapeConstructor::" #func ": Could not find " \
- "mesh '%s'", name); \
- return ret; \
- }
+TSMesh* var = mShape->findMesh(name); \
+if (!var) \
+{ \
+Con::errorf( "TSShapeConstructor::" #func ": Could not find " \
+"mesh '%s'", name); \
+return ret; \
+}
// Do a sequence lookup
#define GET_SEQUENCE(func, var, name, ret) \
- S32 var##Index = mShape->findSequence(name); \
- if (var##Index < 0) \
- { \
- Con::errorf( "TSShapeConstructor::" #func ": Could not find " \
- "sequence named '%s'", name); \
- return ret; \
- } \
- TSShape::Sequence* var = &(mShape->sequences[var##Index]); \
- TORQUE_UNUSED(var##Index); \
- TORQUE_UNUSED(var);
+S32 var##Index = mShape->findSequence(name); \
+if (var##Index < 0) \
+{ \
+Con::errorf( "TSShapeConstructor::" #func ": Could not find " \
+"sequence named '%s'", name); \
+return ret; \
+} \
+TSShape::Sequence* var = &(mShape->sequences[var##Index]); \
+TORQUE_UNUSED(var##Index); \
+TORQUE_UNUSED(var);
//-----------------------------------------------------------------------------
// DUMP
-DefineTSShapeConstructorMethod( dumpShape, void, ( const char* filename ), ( "" ),
- ( filename ),,
+DefineTSShapeConstructorMethod(dumpShape, void, (const char* filename), (""),
+ (filename), ,
"Dump the shape hierarchy to the console or to a file. Useful for reviewing "
"the result of a series of construction commands.\n"
"@param filename Destination filename. If not specified, dump to console.\n\n"
"@tsexample\n"
"%this.dumpShape(); // dump to console\n"
"%this.dumpShape( \"./dump.txt\" ); // dump to file\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- TSShapeInstance* tsi = new TSShapeInstance( mShape, false );
+ TSShapeInstance* tsi = new TSShapeInstance(mShape, false);
- if ( dStrEqual( filename, "" ) )
+ if (dStrEqual(filename, ""))
{
// Dump the constructed shape to a memory stream
- MemStream* dumpStream = new MemStream( 8192 );
- tsi->dump( *dumpStream );
+ MemStream* dumpStream = new MemStream(8192);
+ tsi->dump(*dumpStream);
// Write stream to the console
U32 end = dumpStream->getPosition();
- dumpStream->setPosition( 0 );
- while ( dumpStream->getPosition() < end )
+ dumpStream->setPosition(0);
+ while (dumpStream->getPosition() < end)
{
char line[1024];
- dumpStream->readLine( (U8*)line, sizeof(line) );
- Con::printf( line );
+ dumpStream->readLine((U8*)line, sizeof(line));
+ Con::printf(line);
}
delete dumpStream;
@@ -667,16 +702,16 @@ DefineTSShapeConstructorMethod( dumpShape, void, ( const char* filename ), ( ""
{
// Dump constructed shape to file
char filenameBuf[1024];
- Con::expandScriptFilename( filenameBuf, sizeof(filenameBuf), filename );
+ Con::expandScriptFilename(filenameBuf, sizeof(filenameBuf), filename);
FileStream* dumpStream = new FileStream;
- if ( dumpStream->open( filenameBuf, Torque::FS::File::Write ) )
+ if (dumpStream->open(filenameBuf, Torque::FS::File::Write))
{
- tsi->dump( *dumpStream );
+ tsi->dump(*dumpStream);
dumpStream->close();
}
else
- Con::errorf( "dumpShape failed: Could not open file '%s' for writing", filenameBuf );
+ Con::errorf("dumpShape failed: Could not open file '%s' for writing", filenameBuf);
delete dumpStream;
}
@@ -684,130 +719,130 @@ DefineTSShapeConstructorMethod( dumpShape, void, ( const char* filename ), ( ""
delete tsi;
}}
-DefineTSShapeConstructorMethod( saveShape, void, ( const char* filename ),,
- ( filename ),,
+DefineTSShapeConstructorMethod(saveShape, void, (const char* filename), ,
+ (filename), ,
"Save the shape (with all current changes) to a new DTS file.\n"
"@param filename Destination filename.\n\n"
"@tsexample\n"
"%this.saveShape( \"./myShape.dts\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
char filenameBuf[1024];
- Con::expandScriptFilename( filenameBuf, sizeof(filenameBuf), filename );
+ Con::expandScriptFilename(filenameBuf, sizeof(filenameBuf), filename);
FileStream* dtsStream = new FileStream;
- if ( dtsStream->open( filenameBuf, Torque::FS::File::Write ) )
+ if (dtsStream->open(filenameBuf, Torque::FS::File::Write))
{
- mShape->write( dtsStream );
+ mShape->write(dtsStream);
dtsStream->close();
}
else
{
- Con::errorf( "saveShape failed: Could not open '%s' for writing", filenameBuf );
+ Con::errorf("saveShape failed: Could not open '%s' for writing", filenameBuf);
}
delete dtsStream;
}}
-DefineTSShapeConstructorMethod( writeChangeSet, void, (),,
- (),,
+DefineTSShapeConstructorMethod(writeChangeSet, void, (), ,
+ (), ,
"Write the current change set to a TSShapeConstructor script file. The "
"name of the script file is the same as the model, but with ." TORQUE_SCRIPT_EXTENSION " extension. "
- "eg. myShape." TORQUE_SCRIPT_EXTENSION " for myShape.dts or myShape.dae.\n" )
+ "eg. myShape." TORQUE_SCRIPT_EXTENSION " for myShape.dts or myShape.dae.\n")
{
- Torque::Path scriptPath( mShapePath );
+ Torque::Path scriptPath(getShapePath());
scriptPath.setExtension(TORQUE_SCRIPT_EXTENSION);
// Read current file contents
FileObject f;
- f.readMemory( scriptPath.getFullPath() );
+ f.readMemory(scriptPath.getFullPath());
// Write new file
- FileStream *stream;
- if ((stream = FileStream::createAndOpen( scriptPath.getFullPath(), Torque::FS::File::Write )) == NULL)
+ FileStream* stream;
+ if ((stream = FileStream::createAndOpen(scriptPath.getFullPath(), Torque::FS::File::Write)) == NULL)
{
- Con::errorf( "Failed to write TSShapeConstructor change set to %s", scriptPath.getFullPath().c_str() );
+ Con::errorf("Failed to write TSShapeConstructor change set to %s", scriptPath.getFullPath().c_str());
return;
}
// Write existing file contents up to the start of the onLoad function
- String beginMessage( avar( "function %s::onLoad(%%this)", getName() ) );
- String endMessage( "}" );
+ String beginMessage(avar("function %s::onLoad(%%this)", getName()));
+ String endMessage("}");
- while ( !f.isEOF() )
+ while (!f.isEOF())
{
- const char* buffer = (const char *) f.readLine();
- if ( !String::compare( buffer, beginMessage ))
+ const char* buffer = (const char*)f.readLine();
+ if (!String::compare(buffer, beginMessage))
break;
- stream->writeText( buffer );
- stream->writeText( "\r\n" );
+ stream->writeText(buffer);
+ stream->writeText("\r\n");
}
// Write the new contents
- if ( f.isEOF() )
- stream->writeText( "\r\n" );
- stream->writeText( beginMessage );
- stream->writeText( "\r\n{\r\n" );
+ if (f.isEOF())
+ stream->writeText("\r\n");
+ stream->writeText(beginMessage);
+ stream->writeText("\r\n{\r\n");
- mChangeSet.write( mShape, *stream, scriptPath.getPath() );
+ mChangeSet.write(mShape, *stream, scriptPath.getPath());
- stream->writeText( endMessage );
- stream->writeText( "\r\n" );
+ stream->writeText(endMessage);
+ stream->writeText("\r\n");
// Now skip the contents of the function
- while ( !f.isEOF() )
+ while (!f.isEOF())
{
- const char* buffer = (const char *) f.readLine();
- if ( !String::compare( buffer, endMessage ))
+ const char* buffer = (const char*)f.readLine();
+ if (!String::compare(buffer, endMessage))
break;
}
// Write the remainder of the existing file contents
- while( !f.isEOF() )
+ while (!f.isEOF())
{
- const char* buffer = (const char *) f.readLine();
- stream->writeText( buffer );
- stream->writeText( "\r\n" );
+ const char* buffer = (const char*)f.readLine();
+ stream->writeText(buffer);
+ stream->writeText("\r\n");
}
delete stream;
}}
-DefineTSShapeConstructorMethod( notifyShapeChanged, void, (),,
- (),,
+DefineTSShapeConstructorMethod(notifyShapeChanged, void, (), ,
+ (), ,
"Notify game objects that this shape file has changed, allowing them to update "
- "internal data if needed." )
+ "internal data if needed.")
{
- ResourceManager::get().getChangedSignal().trigger( mShapePath );
+ ResourceManager::get().getChangedSignal().trigger(getShapePath());
}}
//-----------------------------------------------------------------------------
// NODES
-DefineTSShapeConstructorMethod( getNodeCount, S32, (),,
+DefineTSShapeConstructorMethod(getNodeCount, S32, (), ,
(), 0,
"Get the total number of nodes in the shape.\n"
"@return the number of nodes in the shape.\n\n"
"@tsexample\n"
"%count = %this.getNodeCount();\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
return mShape->nodes.size();
}}
-DefineTSShapeConstructorMethod( getNodeIndex, S32, ( const char* name ),,
- ( name ), -1,
+DefineTSShapeConstructorMethod(getNodeIndex, S32, (const char* name), ,
+ (name), -1,
"Get the index of the node.\n"
"@param name name of the node to lookup.\n"
"@return the index of the named node, or -1 if no such node exists.\n\n"
"@tsexample\n"
"// get the index of Bip01 Pelvis node in the shape\n"
"%index = %this.getNodeIndex( \"Bip01 Pelvis\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- return mShape->findNode( name );
+ return mShape->findNode(name);
}}
-DefineTSShapeConstructorMethod( getNodeName, const char*, ( S32 index ),,
- ( index ), "",
+DefineTSShapeConstructorMethod(getNodeName, const char*, (S32 index), ,
+ (index), "",
"Get the name of the indexed node.\n"
"@param index index of the node to lookup (valid range is 0 - getNodeCount()-1).\n"
"@return the name of the indexed node, or \"\" if no such node exists.\n\n"
@@ -816,42 +851,42 @@ DefineTSShapeConstructorMethod( getNodeName, const char*, ( S32 index ),,
"%count = %this.getNodeCount();\n"
"for (%i = 0; %i < %count; %i++)\n"
" echo(%i SPC %this.getNodeName(%i));\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- CHECK_INDEX_IN_RANGE( getNodeName, index, mShape->nodes.size(), "" );
- return mShape->getName( mShape->nodes[index].nameIndex );
+ CHECK_INDEX_IN_RANGE(getNodeName, index, mShape->nodes.size(), "");
+ return mShape->getName(mShape->nodes[index].nameIndex);
}}
-DefineTSShapeConstructorMethod( getNodeParentName, const char*, ( const char* name ),,
- ( name ), "",
+DefineTSShapeConstructorMethod(getNodeParentName, const char*, (const char* name), ,
+ (name), "",
"Get the name of the node's parent. If the node has no parent (ie. it is at "
"the root level), return an empty string.\n"
"@param name name of the node to query.\n"
"@return the name of the node's parent, or \"\" if the node is at the root level\n\n"
"@tsexample\n"
"echo( \"Bip01 Pelvis parent = \" @ %this.getNodeParentName( \"Bip01 Pelvis \") );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_NODE_INDEX_NO_ROOT( getNodeParentName, node, name, "" );
+ GET_NODE_INDEX_NO_ROOT(getNodeParentName, node, name, "");
- if ( node->parentIndex < 0 )
+ if (node->parentIndex < 0)
return "";
else
- return mShape->getName( mShape->nodes[node->parentIndex].nameIndex );
+ return mShape->getName(mShape->nodes[node->parentIndex].nameIndex);
}}
-DefineTSShapeConstructorMethod( setNodeParent, bool, ( const char* name, const char* parentName ),,
- ( name, parentName ), false,
- "Set the parent of a node.\n"
- "@param name name of the node to modify\n"
- "@param parentName name of the parent node to set (use \"\" to move the node to the root level)\n"
- "@return true if successful, false if failed\n\n"
- "@tsexample\n"
- "%this.setNodeParent( \"Bip01 Pelvis\", \"start01\" );\n"
- "@endtsexample\n" )
+DefineTSShapeConstructorMethod(setNodeParent, bool, (const char* name, const char* parentName), ,
+ (name, parentName), false,
+ "Set the parent of a node.\n"
+ "@param name name of the node to modify\n"
+ "@param parentName name of the parent node to set (use \"\" to move the node to the root level)\n"
+ "@return true if successful, false if failed\n\n"
+ "@tsexample\n"
+ "%this.setNodeParent( \"Bip01 Pelvis\", \"start01\" );\n"
+ "@endtsexample\n")
{
- GET_NODE_INDEX_NO_ROOT( setNodeParent, node, name, false );
- GET_NODE_INDEX_ALLOW_ROOT( setNodeParent, parent, parentName, false );
+ GET_NODE_INDEX_NO_ROOT(setNodeParent, node, name, false);
+ GET_NODE_INDEX_ALLOW_ROOT(setNodeParent, parent, parentName, false);
node->parentIndex = parentIndex;
ADD_TO_CHANGE_SET();
@@ -859,24 +894,24 @@ DefineTSShapeConstructorMethod( setNodeParent, bool, ( const char* name, const c
return true;
}}
-DefineTSShapeConstructorMethod( getNodeChildCount, S32, ( const char* name ),,
- ( name ), 0,
+DefineTSShapeConstructorMethod(getNodeChildCount, S32, (const char* name), ,
+ (name), 0,
"Get the number of children of this node.\n"
"@param name name of the node to query.\n"
"@return the number of child nodes.\n\n"
"@tsexample\n"
"%count = %this.getNodeChildCount( \"Bip01 Pelvis\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_NODE_INDEX_ALLOW_ROOT( getNodeChildCount, node, name, 0 );
+ GET_NODE_INDEX_ALLOW_ROOT(getNodeChildCount, node, name, 0);
Vector nodeChildren;
- mShape->getNodeChildren( nodeIndex, nodeChildren );
+ mShape->getNodeChildren(nodeIndex, nodeChildren);
return nodeChildren.size();
}}
-DefineTSShapeConstructorMethod( getNodeChildName, const char*, ( const char* name, S32 index ),,
- ( name, index ), "",
+DefineTSShapeConstructorMethod(getNodeChildName, const char*, (const char* name, S32 index), ,
+ (name, index), "",
"Get the name of the indexed child node.\n"
"@param name name of the parent node to query.\n"
"@param index index of the child node (valid range is 0 - getNodeChildName()-1).\n"
@@ -901,35 +936,35 @@ DefineTSShapeConstructorMethod( getNodeChildName, const char*, ( const char* nam
" dumpNode( %shape, %name, \"\" );\n"
" }\n"
"}\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_NODE_INDEX_ALLOW_ROOT( getNodeChildName, node, name, "" );
+ GET_NODE_INDEX_ALLOW_ROOT(getNodeChildName, node, name, "");
Vector nodeChildren;
- mShape->getNodeChildren( nodeIndex, nodeChildren );
- CHECK_INDEX_IN_RANGE( getNodeChildName, index, nodeChildren.size(), "" );
+ mShape->getNodeChildren(nodeIndex, nodeChildren);
+ CHECK_INDEX_IN_RANGE(getNodeChildName, index, nodeChildren.size(), "");
- return mShape->getName( mShape->nodes[nodeChildren[index]].nameIndex );
+ return mShape->getName(mShape->nodes[nodeChildren[index]].nameIndex);
}}
-DefineTSShapeConstructorMethod( getNodeObjectCount, S32, ( const char* name ),,
- ( name ), 0,
+DefineTSShapeConstructorMethod(getNodeObjectCount, S32, (const char* name), ,
+ (name), 0,
"Get the number of geometry objects attached to this node.\n"
"@param name name of the node to query.\n"
"@return the number of attached objects.\n\n"
"@tsexample\n"
"%count = %this.getNodeObjectCount( \"Bip01 Head\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_NODE_INDEX_ALLOW_ROOT( getNodeObjectCount, node, name, 0 );
+ GET_NODE_INDEX_ALLOW_ROOT(getNodeObjectCount, node, name, 0);
Vector nodeObjects;
- mShape->getNodeObjects( nodeIndex, nodeObjects );
+ mShape->getNodeObjects(nodeIndex, nodeObjects);
return nodeObjects.size();
}}
-DefineTSShapeConstructorMethod( getNodeObjectName, const char*, ( const char* name, S32 index ),,
- ( name, index ), "",
+DefineTSShapeConstructorMethod(getNodeObjectName, const char*, (const char* name, S32 index), ,
+ (name, index), "",
"Get the name of the indexed object.\n"
"@param name name of the node to query.\n"
"@param index index of the object (valid range is 0 - getNodeObjectCount()-1).\n"
@@ -939,19 +974,19 @@ DefineTSShapeConstructorMethod( getNodeObjectName, const char*, ( const char* na
"%count = %this.getNodeObjectCount( \"Bip01 Head\" );\n"
"for ( %i = 0; %i < %count; %i++ )\n"
" echo( %this.getNodeObjectName( \"Bip01 Head\", %i ) );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_NODE_INDEX_ALLOW_ROOT( getNodeObjectName, node, name, "" );
+ GET_NODE_INDEX_ALLOW_ROOT(getNodeObjectName, node, name, "");
Vector nodeObjects;
- mShape->getNodeObjects( nodeIndex, nodeObjects );
- CHECK_INDEX_IN_RANGE( getNodeObjectName, index, nodeObjects.size(), "" );
+ mShape->getNodeObjects(nodeIndex, nodeObjects);
+ CHECK_INDEX_IN_RANGE(getNodeObjectName, index, nodeObjects.size(), "");
- return mShape->getName( mShape->objects[nodeObjects[index]].nameIndex );
+ return mShape->getName(mShape->objects[nodeObjects[index]].nameIndex);
}}
-DefineTSShapeConstructorMethod( getNodeTransform, TransformF, ( const char* name, bool isWorld ), ( false ),
- ( name, isWorld ), TransformF::Identity,
+DefineTSShapeConstructorMethod(getNodeTransform, TransformF, (const char* name, bool isWorld), (false),
+ (name, isWorld), TransformF::Identity,
"Get the base (ie. not animated) transform of a node.\n"
"@param name name of the node to query.\n"
"@param isWorld true to get the global transform, false (or omitted) to get "
@@ -960,35 +995,35 @@ DefineTSShapeConstructorMethod( getNodeTransform, TransformF, ( const char* name
"@tsexample\n"
"%ret = %this.getNodeTransform( \"mount0\" );\n"
"%this.setNodeTransform( \"mount4\", %ret );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_NODE_INDEX_NO_ROOT( getNodeTransform, node, name, TransformF::Identity );
+ GET_NODE_INDEX_NO_ROOT(getNodeTransform, node, name, TransformF::Identity);
// Get the node transform
Point3F pos;
AngAxisF aa;
- if ( isWorld )
+ if (isWorld)
{
// World transform
MatrixF mat;
- mShape->getNodeWorldTransform( nodeIndex, &mat );
+ mShape->getNodeWorldTransform(nodeIndex, &mat);
pos = mat.getPosition();
- aa.set( mat );
+ aa.set(mat);
}
else
{
// Local transform
pos = mShape->defaultTranslations[nodeIndex];
const Quat16& q16 = mShape->defaultRotations[nodeIndex];
- aa.set( q16.getQuatF() );
+ aa.set(q16.getQuatF());
}
- return TransformF( pos, aa );
+ return TransformF(pos, aa);
}}
-DefineTSShapeConstructorMethod( setNodeTransform, bool, ( const char* name, TransformF txfm, bool isWorld ), ( false ),
- ( name, txfm, isWorld ), false,
+DefineTSShapeConstructorMethod(setNodeTransform, bool, (const char* name, TransformF txfm, bool isWorld), (false),
+ (name, txfm, isWorld), false,
"Set the base transform of a node. That is, the transform of the node when "
"in the root (not-animated) pose.\n"
"@param name name of the node to modify\n"
@@ -1001,42 +1036,42 @@ DefineTSShapeConstructorMethod( setNodeTransform, bool, ( const char* name, Tran
"%this.setNodeTransform( \"mount0\", \"0 0 1 0 0 1 0\" );\n"
"%this.setNodeTransform( \"mount0\", \"0 0 0 0 0 1 1.57\" );\n"
"%this.setNodeTransform( \"mount0\", \"1 0 0 0 0 1 0\", true );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_NODE_INDEX_NO_ROOT( setNodeTransform, node, name, false );
+ GET_NODE_INDEX_NO_ROOT(setNodeTransform, node, name, false);
- Point3F pos( txfm.getPosition() );
- QuatF rot( txfm.getOrientation() );
+ Point3F pos(txfm.getPosition());
+ QuatF rot(txfm.getOrientation());
- if ( isWorld )
+ if (isWorld)
{
// World transform
// Get the node's parent (if any)
- if ( node->parentIndex != -1 )
+ if (node->parentIndex != -1)
{
MatrixF mat;
- mShape->getNodeWorldTransform( node->parentIndex, &mat );
+ mShape->getNodeWorldTransform(node->parentIndex, &mat);
// Pre-multiply by inverse of parent's world transform to get
// local node transform
mat.inverse();
- mat.mul( txfm.getMatrix() );
+ mat.mul(txfm.getMatrix());
- rot.set( mat );
+ rot.set(mat);
pos = mat.getPosition();
}
}
- if ( !mShape->setNodeTransform( name, pos, rot) )
+ if (!mShape->setNodeTransform(name, pos, rot))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( renameNode, bool, ( const char* oldName, const char* newName ),,
- ( oldName, newName ), false,
+DefineTSShapeConstructorMethod(renameNode, bool, (const char* oldName, const char* newName), ,
+ (oldName, newName), false,
"Rename a node.\n"
"@note Note that node names must be unique, so this command will fail if "
"there is already a node with the desired name\n"
@@ -1045,19 +1080,19 @@ DefineTSShapeConstructorMethod( renameNode, bool, ( const char* oldName, const c
"@return true if successful, false otherwise\n\n"
"@tsexample\n"
"%this.renameNode( \"Bip01 L Hand\", \"mount5\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_NODE_INDEX_NO_ROOT( renameNode, node, oldName, false );
+ GET_NODE_INDEX_NO_ROOT(renameNode, node, oldName, false);
- if ( !mShape->renameNode( oldName, newName ) )
+ if (!mShape->renameNode(oldName, newName))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( addNode, bool, ( const char* name, const char* parentName, TransformF txfm, bool isWorld ), ( TransformF::Identity, false ),
- ( name, parentName, txfm, isWorld ), false,
+DefineTSShapeConstructorMethod(addNode, bool, (const char* name, const char* parentName, TransformF txfm, bool isWorld), (TransformF::Identity, false),
+ (name, parentName, txfm, isWorld), false,
"Add a new node.\n"
"@param name name for the new node (must not already exist)\n"
"@param parentName name of an existing node to be the parent of the new node. "
@@ -1071,41 +1106,41 @@ DefineTSShapeConstructorMethod( addNode, bool, ( const char* name, const char* p
"%this.addNode( \"Nose\", \"Bip01 Head\", \"0 2 2 0 0 1 0\" );\n"
"%this.addNode( \"myRoot\", \"\", \"0 0 4 0 0 1 1.57\" );\n"
"%this.addNode( \"Nodes\", \"Bip01 Head\", \"0 2 0 0 0 1 0\", true );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- Point3F pos( txfm.getPosition() );
- QuatF rot( txfm.getOrientation() );
+ Point3F pos(txfm.getPosition());
+ QuatF rot(txfm.getOrientation());
- if ( isWorld )
+ if (isWorld)
{
// World transform
// Get the node's parent (if any)
- S32 parentIndex = mShape->findNode( parentName );
- if ( parentIndex != -1 )
+ S32 parentIndex = mShape->findNode(parentName);
+ if (parentIndex != -1)
{
MatrixF mat;
- mShape->getNodeWorldTransform( parentIndex, &mat );
+ mShape->getNodeWorldTransform(parentIndex, &mat);
// Pre-multiply by inverse of parent's world transform to get
// local node transform
mat.inverse();
- mat.mul( txfm.getMatrix() );
+ mat.mul(txfm.getMatrix());
- rot.set( mat );
+ rot.set(mat);
pos = mat.getPosition();
}
}
- if ( !mShape->addNode( name, parentName, pos, rot ) )
+ if (!mShape->addNode(name, parentName, pos, rot))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( removeNode, bool, ( const char* name ),,
- ( name ), false,
+DefineTSShapeConstructorMethod(removeNode, bool, (const char* name), ,
+ (name), false,
"Remove a node from the shape.\n"
"The named node is removed from the shape, including from any sequences that "
"use the node. Child nodes and objects attached to the node are re-assigned "
@@ -1114,11 +1149,11 @@ DefineTSShapeConstructorMethod( removeNode, bool, ( const char* name ),,
"@return true if successful, false otherwise.\n\n"
"@tsexample\n"
"%this.removeNode( \"Nose\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_NODE_INDEX_NO_ROOT( removeNode, node, name, false );
+ GET_NODE_INDEX_NO_ROOT(removeNode, node, name, false);
- if ( !mShape->removeNode( name ) )
+ if (!mShape->removeNode(name))
return false;
ADD_TO_CHANGE_SET();
@@ -1128,18 +1163,18 @@ DefineTSShapeConstructorMethod( removeNode, bool, ( const char* name ),,
//-----------------------------------------------------------------------------
// MATERIALS
-DefineTSShapeConstructorMethod( getTargetCount, S32, (),, (), 0,
+DefineTSShapeConstructorMethod(getTargetCount, S32, (), , (), 0,
"Get the number of materials in the shape.\n"
"@return the number of materials in the shape.\n\n"
"@tsexample\n"
"%count = %this.getTargetCount();\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
return mShape->getTargetCount();
}}
-DefineTSShapeConstructorMethod( getTargetName, const char*, ( S32 index ),,
- ( index ), "",
+DefineTSShapeConstructorMethod(getTargetName, const char*, (S32 index), ,
+ (index), "",
"Get the name of the indexed shape material.\n"
"@param index index of the material to get (valid range is 0 - getTargetCount()-1).\n"
"@return the name of the indexed material.\n\n"
@@ -1147,26 +1182,26 @@ DefineTSShapeConstructorMethod( getTargetName, const char*, ( S32 index ),,
"%count = %this.getTargetCount();\n"
"for ( %i = 0; %i < %count; %i++ )\n"
" echo( \"Target \" @ %i @ \": \" @ %this.getTargetName( %i ) );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- return mShape->getTargetName( index );
+ return mShape->getTargetName(index);
}}
//-----------------------------------------------------------------------------
// OBJECTS
-DefineTSShapeConstructorMethod( getObjectCount, S32, (),, (), 0,
+DefineTSShapeConstructorMethod(getObjectCount, S32, (), , (), 0,
"Get the total number of objects in the shape.\n"
"@return the number of objects in the shape.\n\n"
"@tsexample\n"
"%count = %this.getObjectCount();\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
return mShape->objects.size();
}}
-DefineTSShapeConstructorMethod( getObjectName, const char*, ( S32 index ),,
- ( index ), "",
+DefineTSShapeConstructorMethod(getObjectName, const char*, (S32 index), ,
+ (index), "",
"Get the name of the indexed object.\n"
"@param index index of the object to get (valid range is 0 - getObjectCount()-1).\n"
"@return the name of the indexed object.\n\n"
@@ -1175,44 +1210,44 @@ DefineTSShapeConstructorMethod( getObjectName, const char*, ( S32 index ),,
"%count = %this.getObjectCount();\n"
"for ( %i = 0; %i < %count; %i++ )\n"
" echo( %i SPC %this.getObjectName( %i ) );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- CHECK_INDEX_IN_RANGE( getObjectName, index, mShape->objects.size(), "" );
+ CHECK_INDEX_IN_RANGE(getObjectName, index, mShape->objects.size(), "");
- return mShape->getName( mShape->objects[index].nameIndex );
+ return mShape->getName(mShape->objects[index].nameIndex);
}}
-DefineTSShapeConstructorMethod( getObjectIndex, S32, ( const char* name ),,
- ( name ), -1,
+DefineTSShapeConstructorMethod(getObjectIndex, S32, (const char* name), ,
+ (name), -1,
"Get the index of the first object with the given name.\n"
"@param name name of the object to get.\n"
"@return the index of the named object.\n\n"
"@tsexample\n"
"%index = %this.getObjectIndex( \"Head\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- return mShape->findObject( name );
+ return mShape->findObject(name);
}}
-DefineTSShapeConstructorMethod( getObjectNode, const char*, ( const char* name ),,
- ( name ), "",
+DefineTSShapeConstructorMethod(getObjectNode, const char*, (const char* name), ,
+ (name), "",
"Get the name of the node this object is attached to.\n"
"@param name name of the object to get.\n"
"@return the name of the attached node, or an empty string if this "
"object is not attached to a node (usually the case for skinned meshes).\n\n"
"@tsexample\n"
"echo( \"Hand is attached to \" @ %this.getObjectNode( \"Hand\" ) );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_OBJECT( getObjectNode, obj, name, 0 );
- if ( obj->nodeIndex < 0 )
+ GET_OBJECT(getObjectNode, obj, name, 0);
+ if (obj->nodeIndex < 0)
return "";
else
- return mShape->getName( mShape->nodes[obj->nodeIndex].nameIndex );
+ return mShape->getName(mShape->nodes[obj->nodeIndex].nameIndex);
}}
-DefineTSShapeConstructorMethod( setObjectNode, bool, ( const char* objName, const char* nodeName ),,
- ( objName, nodeName ), false,
+DefineTSShapeConstructorMethod(setObjectNode, bool, (const char* objName, const char* nodeName), ,
+ (objName, nodeName), false,
"Set the node an object is attached to.\n"
"When the shape is rendered, the object geometry is rendered at the node's "
"current transform.\n"
@@ -1221,17 +1256,17 @@ DefineTSShapeConstructorMethod( setObjectNode, bool, ( const char* objName, cons
"@return true if successful, false otherwise\n\n"
"@tsexample\n"
"%this.setObjectNode( \"Hand\", \"Bip01 LeftHand\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- if ( !mShape->setObjectNode( objName, nodeName ) )
+ if (!mShape->setObjectNode(objName, nodeName))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( renameObject, bool, ( const char* oldName, const char* newName ),,
- ( oldName, newName ), false,
+DefineTSShapeConstructorMethod(renameObject, bool, (const char* oldName, const char* newName), ,
+ (oldName, newName), false,
"Rename an object.\n"
"@note Note that object names must be unique, so this command will fail if "
"there is already an object with the desired name\n"
@@ -1240,17 +1275,17 @@ DefineTSShapeConstructorMethod( renameObject, bool, ( const char* oldName, const
"@return true if successful, false otherwise\n\n"
"@tsexample\n"
"%this.renameObject( \"MyBox\", \"Box\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- if ( !mShape->renameObject( oldName, newName ) )
+ if (!mShape->renameObject(oldName, newName))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( removeObject, bool, ( const char* name ),,
- ( name ), false,
+DefineTSShapeConstructorMethod(removeObject, bool, (const char* name), ,
+ (name), false,
"Remove an object (including all meshes for that object) from the shape.\n"
"@param name name of the object to remove.\n"
"@return true if successful, false otherwise.\n\n"
@@ -1259,9 +1294,9 @@ DefineTSShapeConstructorMethod( removeObject, bool, ( const char* name ),,
"%count = %this.getObjectCount();\n"
"for ( %i = %count-1; %i >= 0; %i-- )\n"
" %this.removeObject( %this.getObjectName(%i) );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- if ( !mShape->removeObject( name ) )
+ if (!mShape->removeObject(name))
return false;
ADD_TO_CHANGE_SET();
@@ -1270,24 +1305,24 @@ DefineTSShapeConstructorMethod( removeObject, bool, ( const char* name ),,
//-----------------------------------------------------------------------------
// MESHES
-DefineTSShapeConstructorMethod( getMeshCount, S32, ( const char* name ),,
- ( name ), 0,
+DefineTSShapeConstructorMethod(getMeshCount, S32, (const char* name), ,
+ (name), 0,
"Get the number of meshes (detail levels) for the specified object.\n"
"@param name name of the object to query\n"
"@return the number of meshes for this object.\n\n"
"@tsexample\n"
"%count = %this.getMeshCount( \"SimpleShape\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_OBJECT( getMeshCount, obj, name, 0 );
+ GET_OBJECT(getMeshCount, obj, name, 0);
Vector objectDetails;
- mShape->getObjectDetails( objIndex, objectDetails );
+ mShape->getObjectDetails(objIndex, objectDetails);
return objectDetails.size();
}}
-DefineTSShapeConstructorMethod( getMeshName, const char*, ( const char* name, S32 index ),,
- ( name, index ), "",
+DefineTSShapeConstructorMethod(getMeshName, const char*, (const char* name, S32 index), ,
+ (name, index), "",
"Get the name of the indexed mesh (detail level) for the specified object.\n"
"@param name name of the object to query\n"
"@param index index of the mesh (valid range is 0 - getMeshCount()-1)\n"
@@ -1302,14 +1337,14 @@ DefineTSShapeConstructorMethod( getMeshName, const char*, ( const char* name, S3
" for ( %j = 0; %j < %meshCount; %j++ )\n"
" echo( %this.getMeshName( %objName, %j ) );\n"
"}\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_OBJECT( getMeshName, obj, name, "" );
+ GET_OBJECT(getMeshName, obj, name, "");
Vector objectDetails;
mShape->getObjectDetails(objIndex, objectDetails);
- CHECK_INDEX_IN_RANGE( getMeshName, index, objectDetails.size(), "" );
+ CHECK_INDEX_IN_RANGE(getMeshName, index, objectDetails.size(), "");
static const U32 bufSize = 256;
char* returnBuffer = Con::getReturnBuffer(bufSize);
@@ -1317,8 +1352,8 @@ DefineTSShapeConstructorMethod( getMeshName, const char*, ( const char* name, S3
return returnBuffer;
}}
-DefineTSShapeConstructorMethod( getMeshSize, S32, ( const char* name, S32 index ),,
- ( name, index ), -1,
+DefineTSShapeConstructorMethod(getMeshSize, S32, (const char* name, S32 index), ,
+ (name, index), -1,
"Get the detail level size of the indexed mesh for the specified object.\n"
"@param name name of the object to query\n"
"@param index index of the mesh (valid range is 0 - getMeshCount()-1)\n"
@@ -1329,37 +1364,37 @@ DefineTSShapeConstructorMethod( getMeshSize, S32, ( const char* name, S32 index
"%count = %this.getMeshCount( %objName );\n"
"for ( %i = 0; %i < %count; %i++ )\n"
" echo( %this.getMeshSize( %objName, %i ) );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_OBJECT( getMeshName, obj, name, -1 );
+ GET_OBJECT(getMeshName, obj, name, -1);
Vector objectDetails;
- mShape->getObjectDetails( objIndex, objectDetails );
+ mShape->getObjectDetails(objIndex, objectDetails);
- CHECK_INDEX_IN_RANGE( getMeshName, index, objectDetails.size(), -1 );
+ CHECK_INDEX_IN_RANGE(getMeshName, index, objectDetails.size(), -1);
return (S32)mShape->details[objectDetails[index]].size;
}}
-DefineTSShapeConstructorMethod( setMeshSize, bool, ( const char* name, S32 size ),,
- ( name, size ), false,
+DefineTSShapeConstructorMethod(setMeshSize, bool, (const char* name, S32 size), ,
+ (name, size), false,
"Change the detail level size of the named mesh.\n"
"@param name full name (object name + current size ) of the mesh to modify\n"
"@param size new detail level size\n"
"@return true if successful, false otherwise.\n\n"
"@tsexample\n"
"%this.setMeshSize( \"SimpleShape128\", 64 );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- if ( !mShape->setMeshSize( name, size ) )
+ if (!mShape->setMeshSize(name, size))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( getMeshType, const char*, ( const char* name ),,
- ( name ), "",
+DefineTSShapeConstructorMethod(getMeshType, const char*, (const char* name), ,
+ (name), "",
"Get the display type of the mesh.\n"
"@param name name of the mesh to query\n"
"@return the string returned is one of:"
@@ -1368,9 +1403,9 @@ DefineTSShapeConstructorMethod( getMeshType, const char*, ( const char* name ),,
"billboardzaxisa mesh that always faces the camera in the Z-axis\n\n"
"@tsexample\n"
"echo( \"Mesh type is \" @ %this.getMeshType( \"SimpleShape128\" ) );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_MESH( getMeshType, mesh, name, "normal" );
+ GET_MESH(getMeshType, mesh, name, "normal");
if (mesh->getFlags(TSMesh::BillboardZAxis))
return "billboardzaxis";
@@ -1380,8 +1415,8 @@ DefineTSShapeConstructorMethod( getMeshType, const char*, ( const char* name ),,
return "normal";
}}
-DefineTSShapeConstructorMethod( setMeshType, bool, ( const char* name, const char* type ),,
- ( name, type ), false,
+DefineTSShapeConstructorMethod(setMeshType, bool, (const char* name, const char* type), ,
+ (name, type), false,
"Set the display type for the mesh.\n"
"@param name full name (object name + detail size) of the mesh to modify\n"
"@param type the new type for the mesh: \"normal\", \"billboard\" or \"billboardzaxis\"\n"
@@ -1389,19 +1424,19 @@ DefineTSShapeConstructorMethod( setMeshType, bool, ( const char* name, const cha
"@tsexample\n"
"// set the mesh to be a billboard\n"
"%this.setMeshType( \"SimpleShape64\", \"billboard\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_MESH( setMeshType, mesh, name, false );
+ GET_MESH(setMeshType, mesh, name, false);
// Update the mesh flags
- mesh->clearFlags( TSMesh::Billboard | TSMesh::BillboardZAxis );
- if ( dStrEqual( type, "billboard" ) )
- mesh->setFlags( TSMesh::Billboard );
- else if ( dStrEqual( type, "billboardzaxis" ) )
- mesh->setFlags( TSMesh::Billboard | TSMesh::BillboardZAxis );
- else if ( !dStrEqual( type, "normal" ) )
+ mesh->clearFlags(TSMesh::Billboard | TSMesh::BillboardZAxis);
+ if (dStrEqual(type, "billboard"))
+ mesh->setFlags(TSMesh::Billboard);
+ else if (dStrEqual(type, "billboardzaxis"))
+ mesh->setFlags(TSMesh::Billboard | TSMesh::BillboardZAxis);
+ else if (!dStrEqual(type, "normal"))
{
- Con::printf( "setMeshType: Unknown mesh type '%s'", type );
+ Con::printf("setMeshType: Unknown mesh type '%s'", type);
return false;
}
@@ -1409,28 +1444,28 @@ DefineTSShapeConstructorMethod( setMeshType, bool, ( const char* name, const cha
return true;
}}
-DefineTSShapeConstructorMethod( getMeshMaterial, const char*, ( const char* name ),,
- ( name ), "",
+DefineTSShapeConstructorMethod(getMeshMaterial, const char*, (const char* name), ,
+ (name), "",
"Get the name of the material attached to a mesh. Note that only the first "
"material used by the mesh is returned.\n"
"@param name full name (object name + detail size) of the mesh to query\n"
"@return name of the material attached to the mesh (suitable for use with the Material mapTo field)\n\n"
"@tsexample\n"
"echo( \"Mesh material is \" @ %this.sgetMeshMaterial( \"SimpleShape128\" ) );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_MESH( getMeshMaterial, mesh, name, "" );
+ GET_MESH(getMeshMaterial, mesh, name, "");
// Return the name of the first material attached to this mesh
S32 matIndex = mesh->mPrimitives[0].matIndex & TSDrawPrimitive::MaterialMask;
if ((matIndex >= 0) && (matIndex < mShape->materialList->size()))
- return mShape->materialList->getMaterialName( matIndex );
+ return mShape->materialList->getMaterialName(matIndex);
else
return "";
}}
-DefineTSShapeConstructorMethod( setMeshMaterial, bool, ( const char* meshName, const char* matName ),,
- ( meshName, matName ), false,
+DefineTSShapeConstructorMethod(setMeshMaterial, bool, (const char* meshName, const char* matName), ,
+ (meshName, matName), false,
"Set the name of the material attached to the mesh.\n"
"@param meshName full name (object name + detail size) of the mesh to modify\n"
"@param matName name of the material to attach. This could be the base name of "
@@ -1440,108 +1475,108 @@ DefineTSShapeConstructorMethod( setMeshMaterial, bool, ( const char* meshName, c
"@tsexample\n"
"// set the mesh material\n"
"%this.setMeshMaterial( \"SimpleShape128\", \"test_mat\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_MESH( setMeshMaterial, mesh, meshName, false );
+ GET_MESH(setMeshMaterial, mesh, meshName, false);
// Check if this material is already in the shape
S32 matIndex;
- for ( matIndex = 0; matIndex < mShape->materialList->size(); matIndex++ )
+ for (matIndex = 0; matIndex < mShape->materialList->size(); matIndex++)
{
- if ( dStrEqual( matName, mShape->materialList->getMaterialName( matIndex ) ) )
+ if (dStrEqual(matName, mShape->materialList->getMaterialName(matIndex)))
break;
}
- if ( matIndex == mShape->materialList->size() )
+ if (matIndex == mShape->materialList->size())
{
// Add a new material to the shape
U32 flags = TSMaterialList::S_Wrap | TSMaterialList::T_Wrap;
- mShape->materialList->push_back( matName, flags );
+ mShape->materialList->push_back(matName, flags);
}
// Set this material for all primitives in the mesh
- for ( S32 i = 0; i < mesh->mPrimitives.size(); i++ )
+ for (S32 i = 0; i < mesh->mPrimitives.size(); i++)
{
- U32 matType = mesh->mPrimitives[i].matIndex & ( TSDrawPrimitive::TypeMask | TSDrawPrimitive::Indexed );
- mesh->mPrimitives[i].matIndex = ( matType | matIndex );
+ U32 matType = mesh->mPrimitives[i].matIndex & (TSDrawPrimitive::TypeMask | TSDrawPrimitive::Indexed);
+ mesh->mPrimitives[i].matIndex = (matType | matIndex);
}
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( addMesh, bool, ( const char* meshName, const char* srcShape, const char* srcMesh ),,
- ( meshName, srcShape, srcMesh ), false,
+DefineTSShapeConstructorMethod(addMesh, bool, (const char* meshName, const char* srcShape, const char* srcMesh), ,
+ (meshName, srcShape, srcMesh), false,
"Add geometry from another DTS or DAE shape file into this shape.\n"
"Any materials required by the source mesh are also copied into this shape.
\n"
"@param meshName full name (object name + detail size) of the new mesh. If "
- "no detail size is present at the end of the name, a value of 2 is used.
"
- "An underscore before the number at the end of the name will be interpreted as "
- "a negative sign. eg. \"MyMesh_4\" will be interpreted as \"MyMesh-4\".\n"
+ "no detail size is present at the end of the name, a value of 2 is used.
"
+ "An underscore before the number at the end of the name will be interpreted as "
+ "a negative sign. eg. \"MyMesh_4\" will be interpreted as \"MyMesh-4\".\n"
"@param srcShape name of a shape file (DTS or DAE) that contains the mesh\n"
"@param srcMesh the full name (object name + detail size) of the mesh to "
- "copy from the DTS/DAE file into this shape"
+ "copy from the DTS/DAE file into this shape"
"@return true if successful, false otherwise\n\n"
"@tsexample\n"
"%this.addMesh( \"ColMesh-1\", \"./collision.dts\", \"ColMesh\", \"Col-1\" );\n"
"%this.addMesh( \"SimpleShape10\", \"./testShape.dae\", \"MyMesh2\", "" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
// Load the shape source file
char filenameBuf[1024];
Con::expandScriptFilename(filenameBuf, sizeof(filenameBuf), srcShape);
- Resource hSrcShape = ResourceManager::get().load( filenameBuf );
- if ( !bool(hSrcShape) )
+ Resource hSrcShape = ResourceManager::get().load(filenameBuf);
+ if (!bool(hSrcShape))
{
- Con::errorf( "addMesh failed: Could not load source shape: '%s'", filenameBuf );
+ Con::errorf("addMesh failed: Could not load source shape: '%s'", filenameBuf);
return false;
}
- TSShape* shape = const_cast( (const TSShape*)hSrcShape );
- if ( !mShape->addMesh( shape, srcMesh, meshName ) )
+ TSShape* shape = const_cast((const TSShape*)hSrcShape);
+ if (!mShape->addMesh(shape, srcMesh, meshName))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( removeMesh, bool, ( const char* name ),,
- ( name ), false,
+DefineTSShapeConstructorMethod(removeMesh, bool, (const char* name), ,
+ (name), false,
"Remove a mesh from the shape.\n"
"If all geometry is removed from an object, the object is also removed.\n"
"@param name full name (object name + detail size) of the mesh to remove\n"
"@return true if successful, false otherwise\n\n"
"@tsexample\n"
"%this.removeMesh( \"SimpleShape128\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- if ( !mShape->removeMesh( name ) )
+ if (!mShape->removeMesh(name))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( getBounds, Box3F, (),,
+DefineTSShapeConstructorMethod(getBounds, Box3F, (), ,
(), Box3F::Invalid,
"Get the bounding box for the shape.\n"
- "@return Bounding box \"minX minY minZ maxX maxY maxZ\"" )
+ "@return Bounding box \"minX minY minZ maxX maxY maxZ\"")
{
return mShape->mBounds;
}}
-DefineTSShapeConstructorMethod( setBounds, bool, ( Box3F bbox ),,
- ( bbox ), false,
+DefineTSShapeConstructorMethod(setBounds, bool, (Box3F bbox), ,
+ (bbox), false,
"Set the shape bounds to the given bounding box.\n"
"@param Bounding box \"minX minY minZ maxX maxY maxZ\"\n"
- "@return true if successful, false otherwise\n" )
+ "@return true if successful, false otherwise\n")
{
// Set shape bounds
TSShape* shape = mShape;
shape->mBounds = bbox;
- shape->mBounds.getCenter( &shape->center );
- shape->mRadius = ( shape->mBounds.maxExtents - shape->center ).len();
+ shape->mBounds.getCenter(&shape->center);
+ shape->mRadius = (shape->mBounds.maxExtents - shape->center).len();
shape->tubeRadius = shape->mRadius;
ADD_TO_CHANGE_SET();
@@ -1550,15 +1585,15 @@ DefineTSShapeConstructorMethod( setBounds, bool, ( Box3F bbox ),,
//-----------------------------------------------------------------------------
// DETAILS
-DefineTSShapeConstructorMethod( getDetailLevelCount, S32, (),, (), 0,
+DefineTSShapeConstructorMethod(getDetailLevelCount, S32, (), , (), 0,
"Get the total number of detail levels in the shape.\n"
- "@return the number of detail levels in the shape\n" )
+ "@return the number of detail levels in the shape\n")
{
return mShape->details.size();
}}
-DefineTSShapeConstructorMethod( getDetailLevelName, const char*, ( S32 index ),,
- ( index ), "",
+DefineTSShapeConstructorMethod(getDetailLevelName, const char*, (S32 index), ,
+ (index), "",
"Get the name of the indexed detail level.\n"
"@param index detail level index (valid range is 0 - getDetailLevelCount()-1)\n"
"@return the detail level name\n\n"
@@ -1567,15 +1602,15 @@ DefineTSShapeConstructorMethod( getDetailLevelName, const char*, ( S32 index ),,
"%count = %this.getDetailLevelCount();\n"
"for ( %i = 0; %i < %count; %i++ )\n"
" echo( %i SPC %this.getDetailLevelName( %i ) );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- CHECK_INDEX_IN_RANGE( getDetailLevelName, index, mShape->details.size(), "" );
+ CHECK_INDEX_IN_RANGE(getDetailLevelName, index, mShape->details.size(), "");
return mShape->getName(mShape->details[index].nameIndex);
}}
-DefineTSShapeConstructorMethod( getDetailLevelSize, S32, ( S32 index),,
- ( index ), 0,
+DefineTSShapeConstructorMethod(getDetailLevelSize, S32, (S32 index), ,
+ (index), 0,
"Get the size of the indexed detail level.\n"
"@param index detail level index (valid range is 0 - getDetailLevelCount()-1)\n"
"@return the detail level size\n\n"
@@ -1584,15 +1619,15 @@ DefineTSShapeConstructorMethod( getDetailLevelSize, S32, ( S32 index),,
"%count = %this.getDetailLevelCount();\n"
"for ( %i = 0; %i < %count; %i++ )\n"
" echo( \"Detail\" @ %i @ \" has size \" @ %this.getDetailLevelSize( %i ) );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- CHECK_INDEX_IN_RANGE( getDetailLevelSize, index, mShape->details.size(), 0 );
+ CHECK_INDEX_IN_RANGE(getDetailLevelSize, index, mShape->details.size(), 0);
return (S32)mShape->details[index].size;
}}
-DefineTSShapeConstructorMethod( getDetailLevelIndex, S32, ( S32 size ),,
- ( size ), -1,
+DefineTSShapeConstructorMethod(getDetailLevelIndex, S32, (S32 size), ,
+ (size), -1,
"Get the index of the detail level with a given size.\n"
"@param size size of the detail level to lookup\n"
"@return index of the detail level with the desired size, or -1 if no such "
@@ -1600,13 +1635,13 @@ DefineTSShapeConstructorMethod( getDetailLevelIndex, S32, ( S32 size ),,
"@tsexample\n"
"if ( %this.getDetailLevelSize( 32 ) == -1 )\n"
" echo( \"Error: This shape does not have a detail level at size 32\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- return mShape->findDetailBySize( size );
+ return mShape->findDetailBySize(size);
}}
-DefineTSShapeConstructorMethod( renameDetailLevel, bool, ( const char* oldName, const char* newName ),,
- ( oldName, newName ), false,
+DefineTSShapeConstructorMethod(renameDetailLevel, bool, (const char* oldName, const char* newName), ,
+ (oldName, newName), false,
"Rename a detail level.\n"
"@note Note that detail level names must be unique, so this command will "
"fail if there is already a detail level with the desired name\n"
@@ -1615,33 +1650,33 @@ DefineTSShapeConstructorMethod( renameDetailLevel, bool, ( const char* oldName,
"@return true if successful, false otherwise\n\n"
"@tsexample\n"
"%this.renameDetailLevel( \"detail-1\", \"collision-1\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- if ( !mShape->renameDetail( oldName, newName ) )
+ if (!mShape->renameDetail(oldName, newName))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( removeDetailLevel, bool, ( S32 index ),,
- ( index ), false,
+DefineTSShapeConstructorMethod(removeDetailLevel, bool, (S32 index), ,
+ (index), false,
"Remove the detail level (including all meshes in the detail level)\n"
"@param size size of the detail level to remove\n"
"@return true if successful, false otherwise\n"
"@tsexample\n"
"%this.removeDetailLevel( 2 );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- if ( !mShape->removeDetail( index ) )
+ if (!mShape->removeDetail(index))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( setDetailLevelSize, S32, ( S32 index, S32 newSize ),,
- ( index, newSize ), index,
+DefineTSShapeConstructorMethod(setDetailLevelSize, S32, (S32 index, S32 newSize), ,
+ (index, newSize), index,
"Change the size of a detail level."
"@note Note that detail levels are always sorted in decreasing size order, "
"so this command may cause detail level indices to change.\n"
@@ -1650,50 +1685,50 @@ DefineTSShapeConstructorMethod( setDetailLevelSize, S32, ( S32 index, S32 newSiz
"@return new index for this detail level\n\n"
"@tsexample\n"
"%this.setDetailLevelSize( 2, 256 );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- S32 dl = mShape->setDetailSize( index, newSize );
- if ( dl >= 0 )
+ S32 dl = mShape->setDetailSize(index, newSize);
+ if (dl >= 0)
ADD_TO_CHANGE_SET();
return dl;
}}
-DefineTSShapeConstructorMethod( getImposterDetailLevel, S32, (),, (), -1,
+DefineTSShapeConstructorMethod(getImposterDetailLevel, S32, (), , (), -1,
"Get the index of the imposter (auto-billboard) detail level (if any).\n"
"@return imposter detail level index, or -1 if the shape does not use "
- "imposters.\n\n" )
+ "imposters.\n\n")
{
- for ( S32 i = 0; i < mShape->details.size(); i++ )
+ for (S32 i = 0; i < mShape->details.size(); i++)
{
- if ( mShape->details[i].subShapeNum < 0 )
+ if (mShape->details[i].subShapeNum < 0)
return i;
}
return -1;
}}
-DefineTSShapeConstructorMethod( getImposterSettings, const char*, ( S32 index ),,
- ( index ), "",
+DefineTSShapeConstructorMethod(getImposterSettings, const char*, (S32 index), ,
+ (index), "",
"Get the settings used to generate imposters for the indexed detail level.\n"
"@param index index of the detail level to query (does not need to be an "
"imposter detail level\n"
"@return string of the form: \"valid eqSteps pSteps dl dim poles angle\", where:"
""
- "- valid
- 1 if this detail level generates imposters, 0 otherwise
"
- "- eqSteps
- number of steps around the equator
"
- "- pSteps
- number of steps between the poles
"
- "- dl
- index of the detail level used to generate imposters
"
- "- dim
- size (in pixels) of each imposter image
"
- "- poles
- 1 to include pole images, 0 otherwise
"
- "- angle
- angle at which to display pole images
"
+ "- valid
- 1 if this detail level generates imposters, 0 otherwise
"
+ "- eqSteps
- number of steps around the equator
"
+ "- pSteps
- number of steps between the poles
"
+ "- dl
- index of the detail level used to generate imposters
"
+ "- dim
- size (in pixels) of each imposter image
"
+ "- poles
- 1 to include pole images, 0 otherwise
"
+ "- angle
- angle at which to display pole images
"
"
\n\n"
"@tsexample\n"
"// print the imposter detail level settings\n"
"%index = %this.getImposterDetailLevel();\n"
"if ( %index != -1 )\n"
" echo( \"Imposter settings: \" @ %this.getImposterSettings( %index ) );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- CHECK_INDEX_IN_RANGE( getImposterSettings, index, mShape->details.size(), "" );
+ CHECK_INDEX_IN_RANGE(getImposterSettings, index, mShape->details.size(), "");
// Return information about the detail level
const TSShape::Detail& det = mShape->details[index];
@@ -1701,19 +1736,19 @@ DefineTSShapeConstructorMethod( getImposterSettings, const char*, ( S32 index ),
static const U32 bufSize = 512;
char* returnBuffer = Con::getReturnBuffer(bufSize);
dSprintf(returnBuffer, bufSize, "%d\t%d\t%d\t%d\t%d\t%d\t%g",
- (S32)( det.subShapeNum < 0 ), // isImposter
+ (S32)(det.subShapeNum < 0), // isImposter
det.bbEquatorSteps,
det.bbPolarSteps,
det.bbDetailLevel,
det.bbDimension,
det.bbIncludePoles,
- det.bbPolarAngle );
+ det.bbPolarAngle);
return returnBuffer;
}}
-DefineTSShapeConstructorMethod( addImposter, S32, ( S32 size, S32 equatorSteps, S32 polarSteps, S32 dl, S32 dim, bool includePoles, F32 polarAngle ),,
- ( size, equatorSteps, polarSteps, dl, dim, includePoles, polarAngle ), -1,
+DefineTSShapeConstructorMethod(addImposter, S32, (S32 size, S32 equatorSteps, S32 polarSteps, S32 dl, S32 dim, bool includePoles, F32 polarAngle), ,
+ (size, equatorSteps, polarSteps, dl, dim, includePoles, polarAngle), -1,
"Add (or edit) an imposter detail level to the shape.\n"
"If the shape already contains an imposter detail level, this command will "
"simply change the imposter settings\n"
@@ -1741,20 +1776,20 @@ DefineTSShapeConstructorMethod( addImposter, S32, ( S32 size, S32 equatorSteps,
"@tsexample\n"
"%this.addImposter( 2, 4, 0, 0, 64, false, 0 );\n"
"%this.addImposter( 2, 4, 2, 0, 64, true, 10 ); // this command would edit the existing imposter detail level\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
// Add the imposter detail level
- dl = mShape->addImposter( getShapePath(), size, equatorSteps, polarSteps, dl, dim, includePoles, polarAngle);
- if ( dl != -1 )
+ dl = mShape->addImposter(getShapePath(), size, equatorSteps, polarSteps, dl, dim, includePoles, polarAngle);
+ if (dl != -1)
ADD_TO_CHANGE_SET();
return dl;
}}
-DefineTSShapeConstructorMethod( removeImposter, bool, (),, (), false,
+DefineTSShapeConstructorMethod(removeImposter, bool, (), , (), false,
"() Remove the imposter detail level (if any) from the shape.\n"
- "@return true if successful, false otherwise\n\n" )
+ "@return true if successful, false otherwise\n\n")
{
- if ( !mShape->removeImposter() )
+ if (!mShape->removeImposter())
return false;
ADD_TO_CHANGE_SET();
@@ -1763,15 +1798,15 @@ DefineTSShapeConstructorMethod( removeImposter, bool, (),, (), false,
//-----------------------------------------------------------------------------
// SEQUENCES
-DefineTSShapeConstructorMethod( getSequenceCount, S32, (),, (), 0,
+DefineTSShapeConstructorMethod(getSequenceCount, S32, (), , (), 0,
"Get the total number of sequences in the shape.\n"
- "@return the number of sequences in the shape\n\n" )
+ "@return the number of sequences in the shape\n\n")
{
return mShape->sequences.size();
}}
-DefineTSShapeConstructorMethod( getSequenceIndex, S32, ( const char* name),,
- ( name ), -1,
+DefineTSShapeConstructorMethod(getSequenceIndex, S32, (const char* name), ,
+ (name), -1,
"Find the index of the sequence with the given name.\n"
"@param name name of the sequence to lookup\n"
"@return index of the sequence with matching name, or -1 if not found\n\n"
@@ -1779,13 +1814,13 @@ DefineTSShapeConstructorMethod( getSequenceIndex, S32, ( const char* name),,
"// Check if a given sequence exists in the shape\n"
"if ( %this.getSequenceIndex( \"walk\" ) == -1 )\n"
" echo( \"Could not find 'walk' sequence\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- return mShape->findSequence( name );
+ return mShape->findSequence(name);
}}
-DefineTSShapeConstructorMethod( getSequenceName, const char*, ( S32 index ),,
- ( index ), "",
+DefineTSShapeConstructorMethod(getSequenceName, const char*, (S32 index), ,
+ (index), "",
"Get the name of the indexed sequence.\n"
"@param index index of the sequence to query (valid range is 0 - getSequenceCount()-1)\n"
"@return the name of the sequence\n\n"
@@ -1794,83 +1829,83 @@ DefineTSShapeConstructorMethod( getSequenceName, const char*, ( S32 index ),,
"%count = %this.getSequenceCount();\n"
"for ( %i = 0; %i < %count; %i++ )\n"
" echo( %i SPC %this.getSequenceName( %i ) );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- CHECK_INDEX_IN_RANGE( getSequenceName, index, mShape->sequences.size(), "" );
+ CHECK_INDEX_IN_RANGE(getSequenceName, index, mShape->sequences.size(), "");
- return mShape->getName( mShape->sequences[index].nameIndex );
+ return mShape->getName(mShape->sequences[index].nameIndex);
}}
-DefineTSShapeConstructorMethod( getSequenceSource, const char*, ( const char* name ),,
- ( name ), "",
+DefineTSShapeConstructorMethod(getSequenceSource, const char*, (const char* name), ,
+ (name), "",
"Get information about where the sequence data came from.\n"
"For example, whether it was loaded from an external DSQ file.\n"
"@param name name of the sequence to query\n"
"@return TAB delimited string of the form: \"from reserved start end total\", where:"
""
- "- from
- the source of the animation data, such as the path to "
- "a DSQ file, or the name of an existing sequence in the shape. This field "
- "will be empty for sequences already embedded in the DTS or DAE file.
"
- "- reserved
- reserved value
"
- "- start
- the first frame in the source sequence used to create this sequence
"
- "- end
- the last frame in the source sequence used to create this sequence
"
- "- total
- the total number of frames in the source sequence
"
+ "- from
- the source of the animation data, such as the path to "
+ "a DSQ file, or the name of an existing sequence in the shape. This field "
+ "will be empty for sequences already embedded in the DTS or DAE file.
"
+ "- reserved
- reserved value
"
+ "- start
- the first frame in the source sequence used to create this sequence
"
+ "- end
- the last frame in the source sequence used to create this sequence
"
+ "- total
- the total number of frames in the source sequence
"
"
\n\n"
"@tsexample\n"
"// print the source for the walk animation\n"
"echo( \"walk source:\" SPC getField( %this.getSequenceSource( \"walk\" ), 0 ) );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_SEQUENCE( getSequenceSource, seq, name, "" );
+ GET_SEQUENCE(getSequenceSource, seq, name, "");
// Return information about the source data for this sequence
static const U32 bufSize = 512;
char* returnBuffer = Con::getReturnBuffer(bufSize);
- dSprintf( returnBuffer, bufSize, "%s\t%d\t%d\t%d",
+ dSprintf(returnBuffer, bufSize, "%s\t%d\t%d\t%d",
seq->sourceData.from.c_str(), seq->sourceData.start,
- seq->sourceData.end, seq->sourceData.total );
+ seq->sourceData.end, seq->sourceData.total);
return returnBuffer;
}}
-DefineTSShapeConstructorMethod( getSequenceFrameCount, S32, ( const char* name ),,
- ( name ), 0,
+DefineTSShapeConstructorMethod(getSequenceFrameCount, S32, (const char* name), ,
+ (name), 0,
"Get the number of keyframes in the sequence.\n"
"@param name name of the sequence to query\n"
"@return number of keyframes in the sequence\n\n"
"@tsexample\n"
"echo( \"Run has \" @ %this.getSequenceFrameCount( \"run\" ) @ \" keyframes\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_SEQUENCE( getSequenceFrameCount, seq, name, 0 );
+ GET_SEQUENCE(getSequenceFrameCount, seq, name, 0);
return seq->numKeyframes;
}}
-DefineTSShapeConstructorMethod( getSequencePriority, F32, ( const char* name ),,
- ( name ), -1.0f,
+DefineTSShapeConstructorMethod(getSequencePriority, F32, (const char* name), ,
+ (name), -1.0f,
"Get the priority setting of the sequence.\n"
"@param name name of the sequence to query\n"
- "@return priority value of the sequence\n\n" )
+ "@return priority value of the sequence\n\n")
{
- GET_SEQUENCE( getSequencePriority, seq, name, 0.0f );
+ GET_SEQUENCE(getSequencePriority, seq, name, 0.0f);
return seq->priority;
}}
-DefineTSShapeConstructorMethod( setSequencePriority, bool, ( const char* name, F32 priority ),,
- ( name, priority ), false,
+DefineTSShapeConstructorMethod(setSequencePriority, bool, (const char* name, F32 priority), ,
+ (name, priority), false,
"Set the sequence priority.\n"
"@param name name of the sequence to modify\n"
"@param priority new priority value\n"
- "@return true if successful, false otherwise\n\n" )
+ "@return true if successful, false otherwise\n\n")
{
- GET_SEQUENCE( setSequencePriority, seq, name, false );
+ GET_SEQUENCE(setSequencePriority, seq, name, false);
seq->priority = priority;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( getSequenceGroundSpeed, const char*, ( const char* name ),,
- ( name ), "",
+DefineTSShapeConstructorMethod(getSequenceGroundSpeed, const char*, (const char* name), ,
+ (name), "",
"Get the ground speed of the sequence.\n"
"@note Note that only the first 2 ground frames of the sequence are "
"examined; the speed is assumed to be constant throughout the sequence.\n"
@@ -1879,13 +1914,13 @@ DefineTSShapeConstructorMethod( getSequenceGroundSpeed, const char*, ( const cha
"@tsexample\n"
"%speed = VectorLen( getWords( %this.getSequenceGroundSpeed( \"run\" ), 0, 2 ) );\n"
" echo( \"Run moves at \" @ %speed @ \" units per frame\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
// Find the sequence and return the ground speed (assumed to be constant)
- GET_SEQUENCE( getSequenceGroundSpeed, seq, name, "" );
+ GET_SEQUENCE(getSequenceGroundSpeed, seq, name, "");
- Point3F trans(0,0,0), rot(0,0,0);
- if ( seq->numGroundFrames > 0 )
+ Point3F trans(0, 0, 0), rot(0, 0, 0);
+ if (seq->numGroundFrames > 0)
{
const Point3F& p1 = mShape->groundTranslations[seq->firstGroundFrame];
const Point3F& p2 = mShape->groundTranslations[seq->firstGroundFrame + 1];
@@ -1902,13 +1937,13 @@ DefineTSShapeConstructorMethod( getSequenceGroundSpeed, const char*, ( const cha
static const U32 bufSize = 256;
char* returnBuffer = Con::getReturnBuffer(bufSize);
- dSprintf( returnBuffer, bufSize, "%g %g %g %g %g %g",
- trans.x, trans.y, trans.z, rot.x, rot.y, rot.z );
+ dSprintf(returnBuffer, bufSize, "%g %g %g %g %g %g",
+ trans.x, trans.y, trans.z, rot.x, rot.y, rot.z);
return returnBuffer;
}}
-DefineTSShapeConstructorMethod( setSequenceGroundSpeed, bool, ( const char* name, Point3F transSpeed, Point3F rotSpeed ), ( Point3F::Zero ),
- ( name, transSpeed, rotSpeed ), false,
+DefineTSShapeConstructorMethod(setSequenceGroundSpeed, bool, (const char* name, Point3F transSpeed, Point3F rotSpeed), (Point3F::Zero),
+ (name, transSpeed, rotSpeed), false,
"Set the translation and rotation ground speed of the sequence.\n"
"The ground speed of the sequence is set by generating ground transform "
"keyframes. The ground translational and rotational speed is assumed to "
@@ -1923,31 +1958,31 @@ DefineTSShapeConstructorMethod( setSequenceGroundSpeed, bool, ( const char* name
"@tsexample\n"
"%this.setSequenceGroundSpeed( \"run\", \"5 0 0\" );\n"
"%this.setSequenceGroundSpeed( \"spin\", \"0 0 0\", \"4 0 0\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- if ( !mShape->setSequenceGroundSpeed( name, transSpeed, rotSpeed ) )
+ if (!mShape->setSequenceGroundSpeed(name, transSpeed, rotSpeed))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( getSequenceCyclic, bool, ( const char* name ),,
- ( name ), false,
+DefineTSShapeConstructorMethod(getSequenceCyclic, bool, (const char* name), ,
+ (name), false,
"Check if this sequence is cyclic (looping).\n"
"@param name name of the sequence to query\n"
"@return true if this sequence is cyclic, false if not\n\n"
"@tsexample\n"
"if ( !%this.getSequenceCyclic( \"ambient\" ) )\n"
" error( \"ambient sequence is not cyclic!\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_SEQUENCE( getSequenceCyclic, seq, name, false );
+ GET_SEQUENCE(getSequenceCyclic, seq, name, false);
return seq->isCyclic();
}}
-DefineTSShapeConstructorMethod( setSequenceCyclic, bool, ( const char* name, bool cyclic ),,
- ( name, cyclic ), false,
+DefineTSShapeConstructorMethod(setSequenceCyclic, bool, (const char* name, bool cyclic), ,
+ (name, cyclic), false,
"Mark a sequence as cyclic or non-cyclic.\n"
"@param name name of the sequence to modify\n"
"@param cyclic true to make the sequence cyclic, false for non-cyclic\n"
@@ -1955,9 +1990,9 @@ DefineTSShapeConstructorMethod( setSequenceCyclic, bool, ( const char* name, boo
"@tsexample\n"
"%this.setSequenceCyclic( \"ambient\", true );\n"
"%this.setSequenceCyclic( \"shoot\", false );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_SEQUENCE( setSequenceCyclic, seq, name, false );
+ GET_SEQUENCE(setSequenceCyclic, seq, name, false);
// update cyclic flag
if (cyclic != seq->isCyclic())
@@ -1972,8 +2007,8 @@ DefineTSShapeConstructorMethod( setSequenceCyclic, bool, ( const char* name, boo
return true;
}}
-DefineTSShapeConstructorMethod( getSequenceBlend, const char*, ( const char* name ),,
- ( name ), "",
+DefineTSShapeConstructorMethod(getSequenceBlend, const char*, (const char* name), ,
+ (name), "",
"Get information about blended sequences.\n"
"@param name name of the sequence to query\n"
"@return TAB delimited string of the form: \"isBlend blendSeq blendFrame\", where:"
@@ -1990,20 +2025,20 @@ DefineTSShapeConstructorMethod( getSequenceBlend, const char*, ( const char* nam
"%blendData = %this.getSequenceBlend( \"look\" );\n"
"if ( getField( %blendData, 0 ) )\n"
" echo( \"look is a blend, reference: \" @ getField( %blendData, 1 ) );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_SEQUENCE( getSequenceBlend, seq, name, "0" );
+ GET_SEQUENCE(getSequenceBlend, seq, name, "0");
// Return the blend information (flag reference_sequence reference_frame)
static const U32 bufSize = 512;
char* returnBuffer = Con::getReturnBuffer(bufSize);
- dSprintf( returnBuffer, bufSize, "%d\t%s\t%d", (int)seq->isBlend(),
- seq->sourceData.blendSeq.c_str(), seq->sourceData.blendFrame );
+ dSprintf(returnBuffer, bufSize, "%d\t%s\t%d", (int)seq->isBlend(),
+ seq->sourceData.blendSeq.c_str(), seq->sourceData.blendFrame);
return returnBuffer;
}}
-DefineTSShapeConstructorMethod( setSequenceBlend, bool, ( const char* name, bool blend, const char* blendSeq, S32 blendFrame ),,
- ( name, blend, blendSeq, blendFrame ), false,
+DefineTSShapeConstructorMethod(setSequenceBlend, bool, (const char* name, bool blend, const char* blendSeq, S32 blendFrame), ,
+ (name, blend, blendSeq, blendFrame), false,
"Mark a sequence as a blend or non-blend.\n"
"A blend sequence is one that will be added on top of any other playing "
"sequences. This is done by storing the animated node transforms relative "
@@ -2015,19 +2050,19 @@ DefineTSShapeConstructorMethod( setSequenceBlend, bool, ( const char* name, bool
"@return true if successful, false otherwise\n\n"
"@tsexample\n"
"%this.setSequenceBlend( \"look\", true, \"root\", 0 );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_SEQUENCE( setSequenceBlend, seq, name, false );
+ GET_SEQUENCE(setSequenceBlend, seq, name, false);
- if ( !mShape->setSequenceBlend( name, blend, blendSeq, blendFrame ) )
+ if (!mShape->setSequenceBlend(name, blend, blendSeq, blendFrame))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( renameSequence, bool, ( const char* oldName, const char* newName ),,
- ( oldName, newName ), false,
+DefineTSShapeConstructorMethod(renameSequence, bool, (const char* oldName, const char* newName), ,
+ (oldName, newName), false,
"Rename a sequence.\n"
"@note Note that sequence names must be unique, so this command will fail "
"if there is already a sequence with the desired name\n"
@@ -2036,20 +2071,20 @@ DefineTSShapeConstructorMethod( renameSequence, bool, ( const char* oldName, con
"@return true if successful, false otherwise\n\n"
"@tsexample\n"
"%this.renameSequence( \"walking\", \"walk\" );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- GET_SEQUENCE( renameSequence, seq, oldName, false );
+ GET_SEQUENCE(renameSequence, seq, oldName, false);
- if ( !mShape->renameSequence( oldName, newName ) )
+ if (!mShape->renameSequence(oldName, newName))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( addSequence, bool,
- ( const char* source, const char* name, S32 start, S32 end, bool padRot, bool padTrans ),
- ( 0, -1, true, false ), ( source, name, start, end, padRot, padTrans ), false,
+DefineTSShapeConstructorMethod(addSequence, bool,
+ (const char* source, const char* name, S32 start, S32 end, bool padRot, bool padTrans),
+ (0, -1, true, false), (source, name, start, end, padRot, padTrans), false,
"Add a new sequence to the shape.\n"
"@param source the name of an existing sequence, or the name of a DTS or DAE "
"shape or DSQ sequence file. When the shape file contains more than one "
@@ -2076,26 +2111,44 @@ DefineTSShapeConstructorMethod( addSequence, bool,
"%this.addSequence( \"./player_look.dsq\", \"look\", 0, -1 ); // start to end\n"
"%this.addSequence( \"walk\", \"walk_shortA\", 0, 4 ); // start to frame 4\n"
"%this.addSequence( \"walk\", \"walk_shortB\", 4, -1 ); // frame 4 to end\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
String srcName;
- String srcPath( source );
- SplitSequencePathAndName( srcPath, srcName );
+ String srcPath(source);
+ SplitSequencePathAndName(srcPath, srcName);
- if ( !mShape->addSequence( srcPath, srcName, name, start, end, padRot, padTrans ) )
+ if (AssetDatabase.isDeclaredAsset(srcPath))
+ {
+ StringTableEntry assetId = StringTable->insert(srcPath.c_str());
+ StringTableEntry assetType = AssetDatabase.getAssetType(assetId);
+ if (assetType == StringTable->insert("ShapeAsset"))
+ {
+ ShapeAsset* asset = AssetDatabase.acquireAsset(assetId);
+ srcPath = asset->getShapeFilePath();
+ AssetDatabase.releaseAsset(assetId);
+ }
+ else if (assetType == StringTable->insert("ShapeAnimationAsset"))
+ {
+ ShapeAnimationAsset* asset = AssetDatabase.acquireAsset(assetId);
+ srcPath = asset->getAnimationPath();
+ AssetDatabase.releaseAsset(assetId);
+ }
+ }
+
+ if (!mShape->addSequence(srcPath, srcName, name, start, end, padRot, padTrans))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( removeSequence, bool, ( const char* name ),,
- ( name ), false,
+DefineTSShapeConstructorMethod(removeSequence, bool, (const char* name), ,
+ (name), false,
"Remove the sequence from the shape.\n"
"@param name name of the sequence to remove\n"
- "@return true if successful, false otherwise\n\n" )
+ "@return true if successful, false otherwise\n\n")
{
- if ( !mShape->removeSequence( name ) )
+ if (!mShape->removeSequence(name))
return false;
ADD_TO_CHANGE_SET();
@@ -2104,18 +2157,18 @@ DefineTSShapeConstructorMethod( removeSequence, bool, ( const char* name ),,
//-----------------------------------------------------------------------------
// TRIGGERS
-DefineTSShapeConstructorMethod( getTriggerCount, S32, ( const char* name ),,
- ( name ), 0,
+DefineTSShapeConstructorMethod(getTriggerCount, S32, (const char* name), ,
+ (name), 0,
"Get the number of triggers in the specified sequence.\n"
"@param name name of the sequence to query\n"
- "@return number of triggers in the sequence\n\n" )
+ "@return number of triggers in the sequence\n\n")
{
- GET_SEQUENCE( getTriggerCount, seq, name, 0 );
+ GET_SEQUENCE(getTriggerCount, seq, name, 0);
return seq->numTriggers;
}}
-DefineTSShapeConstructorMethod( getTrigger, const char*, ( const char* name, S32 index ),,
- ( name, index ), "",
+DefineTSShapeConstructorMethod(getTrigger, const char*, (const char* name, S32 index), ,
+ (name, index), "",
"Get information about the indexed trigger\n"
"@param name name of the sequence to query\n"
"@param index index of the trigger (valid range is 0 - getTriggerCount()-1)\n"
@@ -2125,12 +2178,12 @@ DefineTSShapeConstructorMethod( getTrigger, const char*, ( const char* name, S32
"%count = %this.getTriggerCount( \"back\" );\n"
"for ( %i = 0; %i < %count; %i++ )\n"
" echo( %i SPC %this.getTrigger( \"back\", %i ) );\n"
- "@endtsexample\n" )
-{
+ "@endtsexample\n")
+{
// Find the sequence and return the indexed trigger (frame and state)
- GET_SEQUENCE( getTrigger, seq, name, "" );
+ GET_SEQUENCE(getTrigger, seq, name, "");
- CHECK_INDEX_IN_RANGE( getTrigger, index, seq->numTriggers, "" );
+ CHECK_INDEX_IN_RANGE(getTrigger, index, seq->numTriggers, "");
const TSShape::Trigger& trig = mShape->triggers[seq->firstTrigger + index];
S32 frame = trig.pos * seq->numKeyframes;
@@ -2144,8 +2197,8 @@ DefineTSShapeConstructorMethod( getTrigger, const char*, ( const char* name, S32
return returnBuffer;
}}
-DefineTSShapeConstructorMethod( addTrigger, bool, ( const char* name, S32 keyframe, S32 state ),,
- ( name, keyframe, state ), false,
+DefineTSShapeConstructorMethod(addTrigger, bool, (const char* name, S32 keyframe, S32 state), ,
+ (name, keyframe, state), false,
"Add a new trigger to the sequence.\n"
"@param name name of the sequence to modify\n"
"@param keyframe keyframe of the new trigger\n"
@@ -2154,17 +2207,17 @@ DefineTSShapeConstructorMethod( addTrigger, bool, ( const char* name, S32 keyfra
"@tsexample\n"
"%this.addTrigger( \"walk\", 3, 1 );\n"
"%this.addTrigger( \"walk\", 5, -1 );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- if ( !mShape->addTrigger( name, keyframe, state ) )
+ if (!mShape->addTrigger(name, keyframe, state))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
-DefineTSShapeConstructorMethod( removeTrigger, bool, ( const char* name, S32 keyframe, S32 state ),,
- ( name, keyframe, state ), false,
+DefineTSShapeConstructorMethod(removeTrigger, bool, (const char* name, S32 keyframe, S32 state), ,
+ (name, keyframe, state), false,
"Remove a trigger from the sequence.\n"
"@param name name of the sequence to modify\n"
"@param keyframe keyframe of the trigger to remove\n"
@@ -2172,68 +2225,97 @@ DefineTSShapeConstructorMethod( removeTrigger, bool, ( const char* name, S32 key
"@return true if successful, false otherwise\n\n"
"@tsexample\n"
"%this.removeTrigger( \"walk\", 3, 1 );\n"
- "@endtsexample\n" )
+ "@endtsexample\n")
{
- if ( !mShape->removeTrigger( name, keyframe, state ) )
+ if (!mShape->removeTrigger(name, keyframe, state))
return false;
ADD_TO_CHANGE_SET();
return true;
}}
+DefineEngineFunction(findShapeConstructorByAssetId, S32, (const char* assetId),,
+ "Attempts to find an existing TSShapeConstructor by looking up an AssetId\n"
+ "@tsexample\n"
+ "findConstructorByAssetId(\"MyModule:MyShape\");\n"
+ "@endtsexample")
+{
+ StringTableEntry assetIdSTE = StringTable->insert(assetId);
+ TSShapeConstructor* tss = TSShapeConstructor::findShapeConstructorByAssetId(assetIdSTE);
+
+ if (tss)
+ return tss->getId();
+ else
+ return 0;
+}
+
+DefineEngineFunction(findShapeConstructorByFilename, S32, (const char* filename),,
+ "Attempts to find an existing TSShapeConstructor by looking up a filename\n"
+ "@tsexample\n"
+ "findShapeConstructorByFilename(\"data/myShape.dae\");\n"
+ "@endtsexample")
+{
+ FileName flName = FileName(filename);
+ TSShapeConstructor* tss = TSShapeConstructor::findShapeConstructorByFilename(flName);
+
+ if (tss)
+ return tss->getId();
+ else
+ return 0;
+}
//-----------------------------------------------------------------------------
// Change-Set manipulation
TSShapeConstructor::ChangeSet::eCommandType TSShapeConstructor::ChangeSet::getCmdType(const char* name)
{
- #define RETURN_IF_MATCH(type) if (!dStricmp(name, #type)) return Cmd##type
+#define RETURN_IF_MATCH(type) if (!dStricmp(name, #type)) return Cmd##type
RETURN_IF_MATCH(AddNode);
- else RETURN_IF_MATCH(RemoveNode);
- else RETURN_IF_MATCH(RenameNode);
- else RETURN_IF_MATCH(SetNodeTransform);
- else RETURN_IF_MATCH(SetNodeParent);
+else RETURN_IF_MATCH(RemoveNode);
+else RETURN_IF_MATCH(RenameNode);
+else RETURN_IF_MATCH(SetNodeTransform);
+else RETURN_IF_MATCH(SetNodeParent);
- else RETURN_IF_MATCH(AddMesh);
- else RETURN_IF_MATCH(AddPrimitive);
- else RETURN_IF_MATCH(SetMeshSize);
- else RETURN_IF_MATCH(SetMeshType);
- else RETURN_IF_MATCH(SetMeshMaterial);
- else RETURN_IF_MATCH(RemoveMesh);
+else RETURN_IF_MATCH(AddMesh);
+else RETURN_IF_MATCH(AddPrimitive);
+else RETURN_IF_MATCH(SetMeshSize);
+else RETURN_IF_MATCH(SetMeshType);
+else RETURN_IF_MATCH(SetMeshMaterial);
+else RETURN_IF_MATCH(RemoveMesh);
- else RETURN_IF_MATCH(SetObjectNode);
- else RETURN_IF_MATCH(RenameObject);
- else RETURN_IF_MATCH(RemoveObject);
- else RETURN_IF_MATCH(SetBounds);
+else RETURN_IF_MATCH(SetObjectNode);
+else RETURN_IF_MATCH(RenameObject);
+else RETURN_IF_MATCH(RemoveObject);
+else RETURN_IF_MATCH(SetBounds);
- else RETURN_IF_MATCH(SetDetailLevelSize);
- else RETURN_IF_MATCH(RenameDetailLevel);
- else RETURN_IF_MATCH(RemoveDetailLevel);
- else RETURN_IF_MATCH(AddImposter);
- else RETURN_IF_MATCH(RemoveImposter);
- else RETURN_IF_MATCH(AddCollisionDetail);
+else RETURN_IF_MATCH(SetDetailLevelSize);
+else RETURN_IF_MATCH(RenameDetailLevel);
+else RETURN_IF_MATCH(RemoveDetailLevel);
+else RETURN_IF_MATCH(AddImposter);
+else RETURN_IF_MATCH(RemoveImposter);
+else RETURN_IF_MATCH(AddCollisionDetail);
- else RETURN_IF_MATCH(AddSequence);
- else RETURN_IF_MATCH(RemoveSequence);
- else RETURN_IF_MATCH(RenameSequence);
- else RETURN_IF_MATCH(SetSequenceCyclic);
- else RETURN_IF_MATCH(SetSequenceBlend);
- else RETURN_IF_MATCH(SetSequencePriority);
- else RETURN_IF_MATCH(SetSequenceGroundSpeed);
+else RETURN_IF_MATCH(AddSequence);
+else RETURN_IF_MATCH(RemoveSequence);
+else RETURN_IF_MATCH(RenameSequence);
+else RETURN_IF_MATCH(SetSequenceCyclic);
+else RETURN_IF_MATCH(SetSequenceBlend);
+else RETURN_IF_MATCH(SetSequencePriority);
+else RETURN_IF_MATCH(SetSequenceGroundSpeed);
- else RETURN_IF_MATCH(AddTrigger);
- else RETURN_IF_MATCH(RemoveTrigger);
+else RETURN_IF_MATCH(AddTrigger);
+else RETURN_IF_MATCH(RemoveTrigger);
- else return CmdInvalid;
+else return CmdInvalid;
- #undef RETURN_IF_MATCH
+#undef RETURN_IF_MATCH
}
void TSShapeConstructor::ChangeSet::write(TSShape* shape, Stream& stream, const String& savePath)
{
// First make a copy of the change-set
ChangeSet output;
- for ( S32 i = 0; i < mCommands.size(); i++ )
+ for (S32 i = 0; i < mCommands.size(); i++)
output.add(mCommands[i]);
// Remove all __backup__ sequences (used during Shape Editing)
@@ -2241,12 +2323,12 @@ void TSShapeConstructor::ChangeSet::write(TSShape* shape, Stream& stream, const
{
for (S32 i = 0; i < shape->sequences.size(); i++)
{
- const char* seqName = shape->getName( shape->sequences[i].nameIndex );
- if ( dStrStartsWith( seqName, "__backup__" ) )
+ const char* seqName = shape->getName(shape->sequences[i].nameIndex);
+ if (dStrStartsWith(seqName, "__backup__"))
{
- Command cmd( "removeSequence" );
- cmd.addArgs( seqName );
- output.add( cmd );
+ Command cmd("removeSequence");
+ cmd.addArgs(seqName);
+ output.add(cmd);
}
}
}
@@ -2257,121 +2339,121 @@ void TSShapeConstructor::ChangeSet::write(TSShape* shape, Stream& stream, const
const Command& cmd = output.mCommands[i];
// Write the command
- stream.writeTabs( 1 );
- stream.writeText( "%this." );
+ stream.writeTabs(1);
+ stream.writeText("%this.");
- stream.writeText( cmd.name );
- stream.writeText( "(" );
+ stream.writeText(cmd.name);
+ stream.writeText("(");
- if ( cmd.argc > 0 )
+ if (cmd.argc > 0)
{
// Use relative paths when possible
- String str( cmd.argv[0] );
- if ( str.startsWith( savePath ) )
+ String str(cmd.argv[0]);
+ if (str.startsWith(savePath))
{
// Need to add "./" to a local file for the script file system. Otherwise
// it will be assumed to be a full and complete path when it comes to loading.
- str = "./" + str.substr( savePath.length() + 1 );
+ str = "./" + str.substr(savePath.length() + 1);
}
- stream.writeText( "\"" );
- stream.write( str.length(), str.c_str() );
- stream.writeText( "\"" );
+ stream.writeText("\"");
+ stream.write(str.length(), str.c_str());
+ stream.writeText("\"");
// Write remaining arguments and newline
for (U32 j = 1; j < cmd.argc; j++)
{
// Use relative paths when possible
- String relStr( cmd.argv[j] );
- if (relStr.startsWith( savePath ) )
- relStr = relStr.substr( savePath.length() + 1 );
+ String relStr(cmd.argv[j]);
+ if (relStr.startsWith(savePath))
+ relStr = relStr.substr(savePath.length() + 1);
- stream.writeText( ", \"" );
- stream.write(relStr.length(), relStr.c_str() );
- stream.writeText( "\"" );
+ stream.writeText(", \"");
+ stream.write(relStr.length(), relStr.c_str());
+ stream.writeText("\"");
}
}
- stream.writeText( ");\r\n" );
+ stream.writeText(");\r\n");
}
}
void TSShapeConstructor::ChangeSet::add( TSShapeConstructor::ChangeSet::Command& cmd )
{
// Lookup the command type
- cmd.type = getCmdType( cmd.name );if ( cmd.type == CmdInvalid )
+ cmd.type = getCmdType(cmd.name); if (cmd.type == CmdInvalid)
return;
// Ignore operations on __proxy__ sequences (they are only used by the shape editor)
- if ( cmd.argv[0].startsWith( "__proxy__" ) || ((cmd.type == CmdAddSequence) && cmd.argv[1].startsWith( "__proxy__") ) )
+ if (cmd.argv[0].startsWith("__proxy__") || ((cmd.type == CmdAddSequence) && cmd.argv[1].startsWith("__proxy__")))
return;
// Add the command to the change set (apply command specific collapsing)
bool addCommand = true;
- switch ( cmd.type )
+ switch (cmd.type)
{
- // Node commands
- case CmdSetNodeParent: addCommand = addCmd_setNodeParent( cmd ); break;
- case CmdSetNodeTransform: addCommand = addCmd_setNodeTransform( cmd ); break;
- case CmdRenameNode: addCommand = addCmd_renameNode( cmd ); break;
- case CmdRemoveNode: addCommand = addCmd_removeNode( cmd ); break;
+ // Node commands
+ case CmdSetNodeParent: addCommand = addCmd_setNodeParent(cmd); break;
+ case CmdSetNodeTransform: addCommand = addCmd_setNodeTransform(cmd); break;
+ case CmdRenameNode: addCommand = addCmd_renameNode(cmd); break;
+ case CmdRemoveNode: addCommand = addCmd_removeNode(cmd); break;
- // Mesh commands
- case CmdSetMeshSize: addCommand = addCmd_setMeshSize( cmd ); break;
- case CmdSetMeshType: addCommand = addCmd_setMeshType( cmd ); break;
- case CmdSetMeshMaterial: addCommand = addCmd_setMeshMaterial( cmd ); break;
- case CmdRemoveMesh: addCommand = addCmd_removeMesh( cmd ); break;
+ // Mesh commands
+ case CmdSetMeshSize: addCommand = addCmd_setMeshSize(cmd); break;
+ case CmdSetMeshType: addCommand = addCmd_setMeshType(cmd); break;
+ case CmdSetMeshMaterial: addCommand = addCmd_setMeshMaterial(cmd); break;
+ case CmdRemoveMesh: addCommand = addCmd_removeMesh(cmd); break;
- // Object commands
- case CmdSetObjectNode: addCommand = addCmd_setObjectNode( cmd ); break;
- case CmdRenameObject: addCommand = addCmd_renameObject( cmd ); break;
- case CmdRemoveObject: addCommand = addCmd_removeObject( cmd ); break;
- case CmdSetBounds: addCommand = addCmd_setBounds( cmd ); break;
+ // Object commands
+ case CmdSetObjectNode: addCommand = addCmd_setObjectNode(cmd); break;
+ case CmdRenameObject: addCommand = addCmd_renameObject(cmd); break;
+ case CmdRemoveObject: addCommand = addCmd_removeObject(cmd); break;
+ case CmdSetBounds: addCommand = addCmd_setBounds(cmd); break;
- // Detail level commands
- case CmdRenameDetailLevel: addCommand = addCmd_renameDetailLevel( cmd ); break;
- case CmdRemoveDetailLevel: addCommand = addCmd_removeDetailLevel( cmd ); break;
- case CmdSetDetailLevelSize: addCommand = addCmd_setDetailSize( cmd ); break;
- case CmdAddImposter: addCommand = addCmd_addImposter( cmd ); break;
- case CmdRemoveImposter: addCommand = addCmd_removeImposter( cmd ); break;
+ // Detail level commands
+ case CmdRenameDetailLevel: addCommand = addCmd_renameDetailLevel(cmd); break;
+ case CmdRemoveDetailLevel: addCommand = addCmd_removeDetailLevel(cmd); break;
+ case CmdSetDetailLevelSize: addCommand = addCmd_setDetailSize(cmd); break;
+ case CmdAddImposter: addCommand = addCmd_addImposter(cmd); break;
+ case CmdRemoveImposter: addCommand = addCmd_removeImposter(cmd); break;
- // Sequence commands
- case CmdAddSequence: addCommand = addCmd_addSequence( cmd ); break;
- case CmdSetSequencePriority: addCommand = addCmd_setSequencePriority( cmd ); break;
- case CmdSetSequenceGroundSpeed: addCommand = addCmd_setSequenceGroundSpeed( cmd ); break;
- case CmdSetSequenceCyclic: addCommand = addCmd_setSequenceCyclic( cmd ); break;
- case CmdSetSequenceBlend: addCommand = addCmd_setSequenceBlend( cmd ); break;
- case CmdRenameSequence: addCommand = addCmd_renameSequence( cmd ); break;
- case CmdRemoveSequence: addCommand = addCmd_removeSequence( cmd ); break;
+ // Sequence commands
+ case CmdAddSequence: addCommand = addCmd_addSequence(cmd); break;
+ case CmdSetSequencePriority: addCommand = addCmd_setSequencePriority(cmd); break;
+ case CmdSetSequenceGroundSpeed: addCommand = addCmd_setSequenceGroundSpeed(cmd); break;
+ case CmdSetSequenceCyclic: addCommand = addCmd_setSequenceCyclic(cmd); break;
+ case CmdSetSequenceBlend: addCommand = addCmd_setSequenceBlend(cmd); break;
+ case CmdRenameSequence: addCommand = addCmd_renameSequence(cmd); break;
+ case CmdRemoveSequence: addCommand = addCmd_removeSequence(cmd); break;
- case CmdAddTrigger: addCommand = addCmd_addTrigger( cmd ); break;
- case CmdRemoveTrigger: addCommand = addCmd_removeTrigger( cmd ); break;
+ case CmdAddTrigger: addCommand = addCmd_addTrigger(cmd); break;
+ case CmdRemoveTrigger: addCommand = addCmd_removeTrigger(cmd); break;
- // Other commands that do not have optimizations
+ // Other commands that do not have optimizations
default:
break;
}
- if ( addCommand )
- mCommands.push_back( cmd );
+ if (addCommand)
+ mCommands.push_back(cmd);
}
//-----------------------------------------------------------------------------
// NODE COMMANDS
-bool TSShapeConstructor::ChangeSet::addCmd_setNodeParent( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_setNodeParent(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// No dependencies, replace the parent argument for any previous addNode or
// setNodeParent.
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdAddNode:
case CmdSetNodeParent:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]))
{
cmd.argv[1] = newCmd.argv[1]; // Replace parent argument
return false;
@@ -2387,18 +2469,18 @@ bool TSShapeConstructor::ChangeSet::addCmd_setNodeParent( const TSShapeConstruct
}
-bool TSShapeConstructor::ChangeSet::addCmd_setNodeTransform( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_setNodeTransform(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// No dependencies, replace the parent argument for any previous addNode or
// setNodeParent.
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdAddNode:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]))
{
cmd.argc = newCmd.argc + 1; // Replace transform argument
cmd.argv[2] = newCmd.argv[1];
@@ -2408,7 +2490,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setNodeTransform( const TSShapeConstr
break;
case CmdSetNodeTransform:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]))
{
cmd = newCmd; // Collapse successive set transform commands
return false;
@@ -2423,7 +2505,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setNodeTransform( const TSShapeConstr
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_renameNode( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_renameNode(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Replace name argument for previous addNode or renameNode, but stop
// if the new name is already in use (can occur if 2 nodes switch names). eg.
@@ -2431,13 +2513,13 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameNode( const TSShapeConstructor:
// B->A
// C->B (cannot replace the previous A->C with A->B as 'B' is in use)
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdAddNode:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]))
{
cmd.argv[0] = newCmd.argv[1]; // Replace initial name argument
return false;
@@ -2445,14 +2527,14 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameNode( const TSShapeConstructor:
break;
case CmdRenameNode:
- if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[1], newCmd.argv[0]))
{
cmd.argv[1] = newCmd.argv[1]; // Collapse successive renames
- if ( namesEqual( cmd.argv[0], cmd.argv[1] ) )
+ if (namesEqual(cmd.argv[0], cmd.argv[1]))
mCommands.erase(index); // Ignore empty renames
return false;
}
- else if ( namesEqual( cmd.argv[0], newCmd.argv[1] ) )
+ else if (namesEqual(cmd.argv[0], newCmd.argv[1]))
return true; // Name is in use, cannot go back further
break;
@@ -2464,18 +2546,18 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameNode( const TSShapeConstructor:
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_removeNode( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_removeNode(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// No dependencies. Remove any previous command that references the node
- String nodeName( newCmd.argv[0] );
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ String nodeName(newCmd.argv[0]);
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdAddNode:
- if ( namesEqual( cmd.argv[0], nodeName ) )
+ if (namesEqual(cmd.argv[0], nodeName))
{
mCommands.erase(index); // Remove the added node
return false;
@@ -2484,12 +2566,12 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeNode( const TSShapeConstructor:
case CmdSetNodeTransform:
case CmdSetNodeParent:
- if ( namesEqual( cmd.argv[0], nodeName ) )
+ if (namesEqual(cmd.argv[0], nodeName))
mCommands.erase(index); // Remove any commands that reference the removed node
break;
case CmdRenameNode:
- if ( namesEqual( cmd.argv[1], nodeName ) )
+ if (namesEqual(cmd.argv[1], nodeName))
{
nodeName = cmd.argv[0]; // Node is renamed
mCommands.erase(index);
@@ -2507,34 +2589,34 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeNode( const TSShapeConstructor:
//-----------------------------------------------------------------------------
// SEQUENCE COMMANDS
-bool TSShapeConstructor::ChangeSet::addCmd_addSequence( TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_addSequence(TSShapeConstructor::ChangeSet::Command& newCmd)
{
// For sequences added from ShapeEditor __backup sequences, search backwards for
// any changes made to the source of the __backup sequence. If none are found,
// use the __backup source instead of the __backup.
const char* backupPrefix = "__backup__";
- if ( !newCmd.argv[0].startsWith( backupPrefix ) )
+ if (!newCmd.argv[0].startsWith(backupPrefix))
return true;
- S32 start = dStrlen( backupPrefix );
- S32 end = newCmd.argv[0].find( '_', 0, String::Right );
- String sourceName = newCmd.argv[0].substr( start, end - start );
+ S32 start = dStrlen(backupPrefix);
+ S32 end = newCmd.argv[0].find('_', 0, String::Right);
+ String sourceName = newCmd.argv[0].substr(start, end - start);
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdSetSequencePriority:
case CmdSetSequenceCyclic:
case CmdSetSequenceBlend:
case CmdSetSequenceGroundSpeed:
// __backup sequence source has been modified => cannot go back further
- if ( namesEqual( cmd.argv[0], sourceName ) )
+ if (namesEqual(cmd.argv[0], sourceName))
return true;
case CmdAddSequence:
- if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[1], newCmd.argv[0]))
{
// No changes to the __backup sequence were found
newCmd.argv[0] = sourceName;
@@ -2550,19 +2632,19 @@ bool TSShapeConstructor::ChangeSet::addCmd_addSequence( TSShapeConstructor::Chan
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_setSequencePriority( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_setSequencePriority(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Replace any previous setSequencePriority command, but stop if the
// sequence is used as a source for addSequence (since the priority is
// copied).
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdSetSequencePriority:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]))
{
cmd.argv[1] = newCmd.argv[1]; // Collapse successive set priority commands
return false;
@@ -2570,7 +2652,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequencePriority( const TSShapeCon
break;
case CmdAddSequence:
- if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[1], newCmd.argv[0]))
return true; // Sequence is used as source => cannot go back further
break;
@@ -2582,19 +2664,19 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequencePriority( const TSShapeCon
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_setSequenceGroundSpeed( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_setSequenceGroundSpeed(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Replace any previous setSequenceGroundSpeed command, but stop if the
// sequence is used as a source for addSequence (since the priority is
// copied).
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdSetSequenceGroundSpeed:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]))
{
cmd.argv[1] = newCmd.argv[1]; // Collapse successive set ground speed commands
return false;
@@ -2602,7 +2684,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequenceGroundSpeed( const TSShape
break;
case CmdAddSequence:
- if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[1], newCmd.argv[0]))
return true; // Sequence is used as source => cannot go back further
break;
@@ -2614,20 +2696,20 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequenceGroundSpeed( const TSShape
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_setSequenceCyclic( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_setSequenceCyclic(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Replace any previous setSequenceCyclic command, but stop if the
// sequence is used as a source for addSequence (since the priority is
// copied).
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdSetSequenceCyclic:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) &&
- dAtob( cmd.argv[1] ) != dAtob( newCmd.argv[1] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]) &&
+ dAtob(cmd.argv[1]) != dAtob(newCmd.argv[1]))
{
mCommands.erase(index); // ignore both setCyclic commands (1 undoes the other)
return false;
@@ -2635,7 +2717,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequenceCyclic( const TSShapeConst
break;
case CmdAddSequence:
- if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[1], newCmd.argv[0]))
return true; // Sequence is used as source => cannot go back further
break;
@@ -2647,22 +2729,22 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequenceCyclic( const TSShapeConst
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_setSequenceBlend( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_setSequenceBlend(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Replace any previous setSequenceBlend command, but stop if the
// sequence is used as a source for addSequence (since the priority is
// copied).
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdSetSequenceBlend:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) &&
- dAtob( cmd.argv[1] ) != dAtob( newCmd.argv[1] ) &&
- namesEqual( cmd.argv[2], newCmd.argv[2] ) &&
- dAtoi( cmd.argv[3] ) == dAtoi( newCmd.argv[3] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]) &&
+ dAtob(cmd.argv[1]) != dAtob(newCmd.argv[1]) &&
+ namesEqual(cmd.argv[2], newCmd.argv[2]) &&
+ dAtoi(cmd.argv[3]) == dAtoi(newCmd.argv[3]))
{
mCommands.erase(index); // Ignore both setBlend commands (1 undoes the other)
return false;
@@ -2670,7 +2752,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequenceBlend( const TSShapeConstr
break;
case CmdAddSequence:
- if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[1], newCmd.argv[0]))
return true; // Sequence is used as source => cannot go back further
break;
@@ -2682,7 +2764,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setSequenceBlend( const TSShapeConstr
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_renameSequence( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_renameSequence(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Replace name argument for previous addSequence or renameSequence, but stop
// if the new name is already in use (can occur if 2 nodes switch names). eg.
@@ -2693,40 +2775,40 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameSequence( const TSShapeConstruc
// Once a previous command is found, go forward through the command list and
// update any references to the old name
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdRenameSequence:
- if ( namesEqual( cmd.argv[0], newCmd.argv[1] ) && !namesEqual( cmd.argv[1], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[1]) && !namesEqual(cmd.argv[1], newCmd.argv[0]))
return true; // Name is in use => cannot go back further
// fall through to common processing
case CmdAddSequence:
- if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[1], newCmd.argv[0]))
{
- if ( cmd.type == CmdRenameSequence )
+ if (cmd.type == CmdRenameSequence)
{
cmd.argv[1] = newCmd.argv[1]; // Collapse successive renames
- if ( namesEqual( cmd.argv[0], cmd.argv[1] ) )
+ if (namesEqual(cmd.argv[0], cmd.argv[1]))
mCommands.erase(index); // Ignore empty renames
}
- else if ( cmd.type == CmdAddSequence )
+ else if (cmd.type == CmdAddSequence)
{
cmd.argv[1] = newCmd.argv[1]; // Replace initial name argument
}
// Update any references to the old name
- for ( S32 j = index + 1; j < mCommands.size(); j++ )
+ for (S32 j = index + 1; j < mCommands.size(); j++)
{
Command& cmd2 = mCommands[j];
- switch ( cmd2.type )
+ switch (cmd2.type)
{
case CmdSetSequencePriority:
case CmdSetSequenceCyclic:
case CmdSetSequenceBlend:
case CmdSetSequenceGroundSpeed:
- if ( namesEqual( cmd2.argv[0], newCmd.argv[0] ) )
+ if (namesEqual(cmd2.argv[0], newCmd.argv[0]))
cmd2.argv[0] = newCmd.argv[1];
break;
}
@@ -2743,24 +2825,24 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameSequence( const TSShapeConstruc
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_removeSequence( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_removeSequence(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Remove any previous command that references the sequence, but stop if the
// sequence is used as a source for addSequence
- String seqName( newCmd.argv[0] );
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ String seqName(newCmd.argv[0]);
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdAddSequence:
- if ( namesEqual( cmd.argv[1], seqName ) )
+ if (namesEqual(cmd.argv[1], seqName))
{
- mCommands.erase( index ); // Remove the added sequence
+ mCommands.erase(index); // Remove the added sequence
return false;
}
- else if ( namesEqual( cmd.argv[0], seqName ) )
+ else if (namesEqual(cmd.argv[0], seqName))
{
// Removed sequence is used as source for another sequence => can't
// go back any further
@@ -2769,10 +2851,10 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeSequence( const TSShapeConstruc
break;
case CmdRenameSequence:
- if ( namesEqual( cmd.argv[1], seqName ) )
+ if (namesEqual(cmd.argv[1], seqName))
{
seqName = cmd.argv[0]; // Sequence is renamed
- mCommands.erase( index );
+ mCommands.erase(index);
}
break;
@@ -2782,8 +2864,8 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeSequence( const TSShapeConstruc
case CmdSetSequenceBlend:
case CmdAddTrigger:
case CmdRemoveTrigger:
- if ( namesEqual( cmd.argv[0], seqName ) )
- mCommands.erase( index ); // Remove any commands that reference the removed sequence
+ if (namesEqual(cmd.argv[0], seqName))
+ mCommands.erase(index); // Remove any commands that reference the removed sequence
break;
default:
@@ -2794,20 +2876,20 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeSequence( const TSShapeConstruc
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_addTrigger( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_addTrigger(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Remove a matching removeTrigger command, but stop if the sequence is used as
// a source for addSequence (since triggers are copied).
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdRemoveTrigger:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) &&
- cmd.argv[1] == newCmd.argv[1] &&
- cmd.argv[2] == newCmd.argv[2] )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]) &&
+ cmd.argv[1] == newCmd.argv[1] &&
+ cmd.argv[2] == newCmd.argv[2])
{
mCommands.erase(index); // Remove previous removeTrigger command
return false;
@@ -2815,7 +2897,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_addTrigger( const TSShapeConstructor:
break;
case CmdAddSequence:
- if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[1], newCmd.argv[0]))
return true; // Sequence is used as a source => cannot go back further
break;
@@ -2827,20 +2909,20 @@ bool TSShapeConstructor::ChangeSet::addCmd_addTrigger( const TSShapeConstructor:
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_removeTrigger( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_removeTrigger(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Remove a matching addTrigger command, but stop if the sequence is used as
// a source for addSequence (since triggers are copied).
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdAddTrigger:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) &&
- cmd.argv[1] == newCmd.argv[1] &&
- cmd.argv[2] == newCmd.argv[2] )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]) &&
+ cmd.argv[1] == newCmd.argv[1] &&
+ cmd.argv[2] == newCmd.argv[2])
{
mCommands.erase(index); // Remove previous addTrigger command
return false;
@@ -2848,7 +2930,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeTrigger( const TSShapeConstruct
break;
case CmdAddSequence:
- if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[1], newCmd.argv[0]))
return true; // Sequence is used as a source => cannot go back further
break;
@@ -2863,7 +2945,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeTrigger( const TSShapeConstruct
//-----------------------------------------------------------------------------
// MESH COMMANDS
-bool TSShapeConstructor::ChangeSet::addCmd_setMeshSize( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_setMeshSize(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Replace size argument for previous addMesh or setMeshSize, but stop if the
// new name is already in use (can occur if 2 nodes switch names). eg.
@@ -2871,13 +2953,13 @@ bool TSShapeConstructor::ChangeSet::addCmd_setMeshSize( const TSShapeConstructor
// B->A
// C->B (cannot replace the previous A->C with A->B as 'B' is in use)
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdAddMesh:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]))
{
cmd.argv[0] = newCmd.argv[1]; // Replace initial size argument
return false;
@@ -2885,14 +2967,14 @@ bool TSShapeConstructor::ChangeSet::addCmd_setMeshSize( const TSShapeConstructor
break;
case CmdSetMeshSize:
- if ( cmd.argv[1] == newCmd.argv[0] )
+ if (cmd.argv[1] == newCmd.argv[0])
{
cmd.argv[1] = newCmd.argv[1]; // Collapse successive size sets
- if ( cmd.argv[0] == cmd.argv[1] )
+ if (cmd.argv[0] == cmd.argv[1])
mCommands.erase(index); // Ignore empty resizes
return false;
}
- else if ( cmd.argv[0] == newCmd.argv[1] )
+ else if (cmd.argv[0] == newCmd.argv[1])
return true; // Size is in use, cannot go back further
break;
@@ -2904,18 +2986,18 @@ bool TSShapeConstructor::ChangeSet::addCmd_setMeshSize( const TSShapeConstructor
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_setMeshType( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_setMeshType(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Replace any previous setMeshType command, but stop if the mesh is used as
// a source for addMesh (since the type is copied).
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdSetMeshType:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]))
{
cmd.argv[1] = newCmd.argv[1]; // Collapse successive set type commands
return false;
@@ -2923,7 +3005,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setMeshType( const TSShapeConstructor
break;
case CmdAddMesh:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]))
return true; // Mesh is used as source => cannot go back further
break;
@@ -2935,18 +3017,18 @@ bool TSShapeConstructor::ChangeSet::addCmd_setMeshType( const TSShapeConstructor
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_setMeshMaterial( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_setMeshMaterial(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Replace any previous setMeshMaterial command, but stop if the mesh is used as
// a source for addMesh (since the materials are copied).
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdSetMeshMaterial:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]))
{
cmd.argv[1] = newCmd.argv[1]; // Collapse successive set material commands
return false;
@@ -2954,7 +3036,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setMeshMaterial( const TSShapeConstru
break;
case CmdAddMesh:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]))
return true; // Mesh is used as source => cannot go back further
break;
@@ -2966,24 +3048,24 @@ bool TSShapeConstructor::ChangeSet::addCmd_setMeshMaterial( const TSShapeConstru
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_removeMesh( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_removeMesh(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Remove any previous command that references the mesh, but stop if the mesh
// is used as a source for addMesh
- String meshName( newCmd.argv[0] );
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ String meshName(newCmd.argv[0]);
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdAddMesh:
- if ( namesEqual( cmd.argv[0], meshName ) )
+ if (namesEqual(cmd.argv[0], meshName))
{
- mCommands.erase( index ); // Remove the added mesh
+ mCommands.erase(index); // Remove the added mesh
return false;
}
- else if ( namesEqual( cmd.argv[2], meshName ) )
+ else if (namesEqual(cmd.argv[2], meshName))
{
// Removed mesh is used as source for another mesh => can't go back
// any further
@@ -2992,9 +3074,9 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeMesh( const TSShapeConstructor:
break;
case CmdAddPrimitive:
- if ( namesEqual( cmd.argv[0], meshName ) )
+ if (namesEqual(cmd.argv[0], meshName))
{
- mCommands.erase( index ); // Remove the added primitive
+ mCommands.erase(index); // Remove the added primitive
return false;
}
break;
@@ -3002,8 +3084,8 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeMesh( const TSShapeConstructor:
case CmdSetMeshSize:
case CmdSetMeshType:
case CmdSetMeshMaterial:
- if ( namesEqual( cmd.argv[0], meshName ) )
- mCommands.erase( index ); // Remove any commands that reference the removed mesh
+ if (namesEqual(cmd.argv[0], meshName))
+ mCommands.erase(index); // Remove any commands that reference the removed mesh
break;
default:
@@ -3017,20 +3099,20 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeMesh( const TSShapeConstructor:
//-----------------------------------------------------------------------------
// OBJECT COMMANDS
-bool TSShapeConstructor::ChangeSet::addCmd_setObjectNode( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_setObjectNode(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// No dependencies, replace the node argument for any previous parent argument for any previous addNode or
// setNodeParent.
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdAddMesh:
{
S32 dummy;
- if ( namesEqual( String::GetTrailingNumber(cmd.argv[0], dummy), newCmd.argv[0] ) )
+ if (namesEqual(String::GetTrailingNumber(cmd.argv[0], dummy), newCmd.argv[0]))
{
cmd.argv[3] = newCmd.argv[1]; // Replace node argument
return false;
@@ -3039,7 +3121,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setObjectNode( const TSShapeConstruct
}
case CmdSetObjectNode:
- if ( namesEqual( cmd.argv[0], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[0], newCmd.argv[0]))
{
cmd.argv[1] = newCmd.argv[1];
return false;
@@ -3054,7 +3136,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setObjectNode( const TSShapeConstruct
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_renameObject( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_renameObject(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Replace name argument for previous renameObject, but stop if the new name
// is already in use (can occur if 2 objects switch names). eg.
@@ -3062,20 +3144,20 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameObject( const TSShapeConstructo
// B->A
// C->B (cannot replace the previous A->C with A->B as 'B' is in use)
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdRenameObject:
- if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[1], newCmd.argv[0]))
{
cmd.argv[1] = newCmd.argv[1]; // Collapse successive renames
- if ( namesEqual( cmd.argv[0], cmd.argv[1] ) )
+ if (namesEqual(cmd.argv[0], cmd.argv[1]))
mCommands.erase(index); // Ignore empty renames
return false;
}
- else if ( namesEqual( cmd.argv[0], newCmd.argv[1] ) )
+ else if (namesEqual(cmd.argv[0], newCmd.argv[1]))
return true; // Name is in use, cannot go back further
break;
@@ -3087,26 +3169,26 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameObject( const TSShapeConstructo
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_removeObject( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_removeObject(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Remove any previous command that references the object, but stop if any
// object mesh is used as a source for addMesh
S32 dummy;
- String objName( newCmd.argv[0] );
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ String objName(newCmd.argv[0]);
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdAddMesh:
- if ( namesEqual( String::GetTrailingNumber(cmd.argv[0], dummy), objName ) )
+ if (namesEqual(String::GetTrailingNumber(cmd.argv[0], dummy), objName))
{
- mCommands.erase( index ); // Remove the added mesh
+ mCommands.erase(index); // Remove the added mesh
// Must still add the removeObject command as there could be multiple
// meshes in the object
}
- else if ( namesEqual( String::GetTrailingNumber(cmd.argv[2], dummy), objName ) )
+ else if (namesEqual(String::GetTrailingNumber(cmd.argv[2], dummy), objName))
{
// Removed mesh is used as source for another mesh => can't go back
// any further
@@ -3115,24 +3197,24 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeObject( const TSShapeConstructo
break;
case CmdRenameObject:
- if ( namesEqual( cmd.argv[1], objName ) )
+ if (namesEqual(cmd.argv[1], objName))
{
objName = cmd.argv[0]; // Object is renamed
- mCommands.erase( index );
+ mCommands.erase(index);
}
break;
case CmdSetObjectNode:
- if ( namesEqual( cmd.argv[0], objName ) )
- mCommands.erase( index ); // Remove any commands that reference the removed object
+ if (namesEqual(cmd.argv[0], objName))
+ mCommands.erase(index); // Remove any commands that reference the removed object
break;
case CmdSetMeshSize:
case CmdSetMeshType:
case CmdSetMeshMaterial:
case CmdRemoveMesh:
- if ( namesEqual( String::GetTrailingNumber(cmd.argv[0], dummy), objName ) )
- mCommands.erase( index ); // Remove comands that reference the removed object
+ if (namesEqual(String::GetTrailingNumber(cmd.argv[0], dummy), objName))
+ mCommands.erase(index); // Remove comands that reference the removed object
break;
default:
@@ -3143,17 +3225,17 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeObject( const TSShapeConstructo
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_setBounds( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_setBounds(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Only the last bounds update applies, so replace any previous command.
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdSetBounds:
- mCommands.erase( index );
+ mCommands.erase(index);
break;
default:
@@ -3167,7 +3249,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_setBounds( const TSShapeConstructor::
//-----------------------------------------------------------------------------
// DETAIL COMMANDS
-bool TSShapeConstructor::ChangeSet::addCmd_renameDetailLevel( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_renameDetailLevel(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Replace name argument for previous renameDetailLevel, but stop if the new
// name is already in use (can occur if 2 objects switch names). eg.
@@ -3175,20 +3257,20 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameDetailLevel( const TSShapeConst
// B->A
// C->B (cannot replace the previous A->C with A->B as 'B' is in use)
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdRenameDetailLevel:
- if ( namesEqual( cmd.argv[1], newCmd.argv[0] ) )
+ if (namesEqual(cmd.argv[1], newCmd.argv[0]))
{
cmd.argv[1] = newCmd.argv[1]; // Collapse successive renames
- if ( namesEqual( cmd.argv[0], cmd.argv[1] ) )
+ if (namesEqual(cmd.argv[0], cmd.argv[1]))
mCommands.erase(index); // Ignore empty renames
return false;
}
- else if ( namesEqual( cmd.argv[0], newCmd.argv[1] ) )
+ else if (namesEqual(cmd.argv[0], newCmd.argv[1]))
return true; // Name is in use, cannot go back further
break;
@@ -3200,22 +3282,22 @@ bool TSShapeConstructor::ChangeSet::addCmd_renameDetailLevel( const TSShapeConst
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_removeDetailLevel( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_removeDetailLevel(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Remove any previous command that references the detail, but stop if a mesh
// is used as a source for addMesh
- S32 detSize = dAtoi( newCmd.argv[0] );
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ S32 detSize = dAtoi(newCmd.argv[0]);
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
S32 size;
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdAddMesh:
- String::GetTrailingNumber( cmd.argv[2], size );
- if ( size == detSize )
+ String::GetTrailingNumber(cmd.argv[2], size);
+ if (size == detSize)
{
// Removed detail is used as source for another mesh => can't go back
// any further
@@ -3228,16 +3310,16 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeDetailLevel( const TSShapeConst
case CmdSetMeshType:
case CmdSetMeshMaterial:
case CmdRemoveMesh:
- String::GetTrailingNumber( cmd.argv[0], size );
- if ( size == detSize )
- mCommands.erase( index );
+ String::GetTrailingNumber(cmd.argv[0], size);
+ if (size == detSize)
+ mCommands.erase(index);
break;
case CmdAddImposter:
case CmdAddCollisionDetail:
- if ( dAtoi(cmd.argv[0]) == detSize )
+ if (dAtoi(cmd.argv[0]) == detSize)
{
- mCommands.erase( index );
+ mCommands.erase(index);
return false;
}
break;
@@ -3250,7 +3332,7 @@ bool TSShapeConstructor::ChangeSet::addCmd_removeDetailLevel( const TSShapeConst
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_setDetailSize( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_setDetailSize(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Similar to renameXXX. Replace size argument for previous addImposter or
// setDetailLevelSize, but stop if the new size is already in use (can occur
@@ -3259,13 +3341,13 @@ bool TSShapeConstructor::ChangeSet::addCmd_setDetailSize( const TSShapeConstruct
// B->A
// C->B (cannot replace the previous A->C with A->B as 'B' is in use)
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdAddImposter:
- if ( cmd.argv[0] == newCmd.argv[0] )
+ if (cmd.argv[0] == newCmd.argv[0])
{
cmd.argv[0] = newCmd.argv[1]; // Change detail size argument
return false;
@@ -3273,14 +3355,14 @@ bool TSShapeConstructor::ChangeSet::addCmd_setDetailSize( const TSShapeConstruct
break;
case CmdSetDetailLevelSize:
- if ( cmd.argv[1] == newCmd.argv[0] )
+ if (cmd.argv[1] == newCmd.argv[0])
{
cmd.argv[1] = newCmd.argv[1]; // Collapse successive detail size changes
- if ( cmd.argv[0] == cmd.argv[1] )
+ if (cmd.argv[0] == cmd.argv[1])
mCommands.erase(index); // Ignore empty changes
return false;
}
- else if ( cmd.argv[0] == newCmd.argv[1] )
+ else if (cmd.argv[0] == newCmd.argv[1])
return true; // Detail size already in use => cannot go back further
break;
@@ -3292,24 +3374,24 @@ bool TSShapeConstructor::ChangeSet::addCmd_setDetailSize( const TSShapeConstruct
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_addImposter( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_addImposter(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Remove previous removeImposter, and replace any previous addImposter. If
// replacing, also remove any setDetailLevelSize for the old imposter
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdAddImposter:
// Replace the AddImposter command, but first remove any reference to
// the added detail level.
- for ( S32 j = index + 1; j < mCommands.size(); j++ )
+ for (S32 j = index + 1; j < mCommands.size(); j++)
{
Command& cmd2 = mCommands[j];
- if ( ( cmd2.type == CmdSetDetailLevelSize ) &&
- cmd2.argv[0] == cmd.argv[0] )
+ if ((cmd2.type == CmdSetDetailLevelSize) &&
+ cmd2.argv[0] == cmd.argv[0])
{
mCommands.erase(j);
break;
@@ -3331,26 +3413,26 @@ bool TSShapeConstructor::ChangeSet::addCmd_addImposter( const TSShapeConstructor
return true;
}
-bool TSShapeConstructor::ChangeSet::addCmd_removeImposter( const TSShapeConstructor::ChangeSet::Command& newCmd )
+bool TSShapeConstructor::ChangeSet::addCmd_removeImposter(const TSShapeConstructor::ChangeSet::Command& newCmd)
{
// Remove any previous addImposter, and also remove any setDetailLevelSize
// for that imposter.
// Always need to return true, since we could be removing imposters already
// present in the shape (not added with addImposter).
- for ( S32 index = mCommands.size()-1; index >= 0; index-- )
+ for (S32 index = mCommands.size() - 1; index >= 0; index--)
{
Command& cmd = mCommands[index];
- switch ( cmd.type )
+ switch (cmd.type)
{
case CmdAddImposter:
// Remove the AddImposter command, but first remove any reference to
// the added detail level.
- for ( S32 j = index + 1; j < mCommands.size(); j++ )
+ for (S32 j = index + 1; j < mCommands.size(); j++)
{
Command& cmd2 = mCommands[j];
- if ( ( cmd2.type == CmdSetDetailLevelSize ) &&
- cmd2.argv[0] == cmd.argv[0] )
+ if ((cmd2.type == CmdSetDetailLevelSize) &&
+ cmd2.argv[0] == cmd.argv[0])
{
mCommands.erase(j);
break;
diff --git a/Engine/source/ts/tsShapeConstruct.h b/Engine/source/ts/tsShapeConstruct.h
index 754655a7f..caaf6ceff 100644
--- a/Engine/source/ts/tsShapeConstruct.h
+++ b/Engine/source/ts/tsShapeConstruct.h
@@ -42,6 +42,9 @@
#include "console/engineAPI.h"
#endif
+#include "T3D/assets/ShapeAsset.h"
+#include "T3D/assets/ShapeAnimationAsset.h"
+
/// This class allows an artist to export their animations for the model
/// into the .dsq format. This class in particular matches up the model
/// with the .dsqs to create a nice animated model.
@@ -101,17 +104,17 @@ public:
String argv[MAX_ARGS]; // Command arguments
S32 argc; // Number of arguments
Command() : type(CmdInvalid), name(0), argc(0) { }
- Command( const char* _name )
+ Command(const char* _name)
: type(CmdInvalid), argc(0)
{
- name = StringTable->insert( _name );
+ name = StringTable->insert(_name);
+ }
+
+ // Helper functions to fill in the command arguments
+ template inline void addArgs(ArgTs ...args) {
+ using Helper = engineAPI::detail::MarshallHelpers;
+ Helper::marshallEach(argc, argv, args...);
}
-
- // Helper functions to fill in the command arguments
- template inline void addArgs(ArgTs ...args){
- using Helper = engineAPI::detail::MarshallHelpers;
- Helper::marshallEach(argc, argv, args...);
- }
};
Vector mCommands;
@@ -120,40 +123,40 @@ public:
void clear() { mCommands.clear(); }
bool empty() { return mCommands.empty(); }
- void add( Command& cmd );
+ void add(Command& cmd);
// These methods handle change set optimisation based on the newly added command
- bool addCmd_setNodeParent( const Command& newCmd );
- bool addCmd_setNodeTransform( const Command& newCmd );
- bool addCmd_renameNode( const Command& newCmd );
- bool addCmd_removeNode( const Command& newCmd );
+ bool addCmd_setNodeParent(const Command& newCmd);
+ bool addCmd_setNodeTransform(const Command& newCmd);
+ bool addCmd_renameNode(const Command& newCmd);
+ bool addCmd_removeNode(const Command& newCmd);
- bool addCmd_setMeshSize( const Command& newCmd );
- bool addCmd_setMeshType( const Command& newCmd );
- bool addCmd_setMeshMaterial( const Command& newCmd );
- bool addCmd_removeMesh( const Command& newCmd );
+ bool addCmd_setMeshSize(const Command& newCmd);
+ bool addCmd_setMeshType(const Command& newCmd);
+ bool addCmd_setMeshMaterial(const Command& newCmd);
+ bool addCmd_removeMesh(const Command& newCmd);
- bool addCmd_setObjectNode( const Command& newCmd );
- bool addCmd_renameObject( const Command& newCmd );
- bool addCmd_removeObject( const Command& newCmd );
- bool addCmd_setBounds( const Command& newCmd );
+ bool addCmd_setObjectNode(const Command& newCmd);
+ bool addCmd_renameObject(const Command& newCmd);
+ bool addCmd_removeObject(const Command& newCmd);
+ bool addCmd_setBounds(const Command& newCmd);
- bool addCmd_renameDetailLevel( const Command& newCmd );
- bool addCmd_removeDetailLevel( const Command& newCmd );
- bool addCmd_setDetailSize( const Command& newCmd );
- bool addCmd_addImposter( const Command& newCmd );
- bool addCmd_removeImposter( const Command& newCmd );
+ bool addCmd_renameDetailLevel(const Command& newCmd);
+ bool addCmd_removeDetailLevel(const Command& newCmd);
+ bool addCmd_setDetailSize(const Command& newCmd);
+ bool addCmd_addImposter(const Command& newCmd);
+ bool addCmd_removeImposter(const Command& newCmd);
- bool addCmd_addSequence( Command& newCmd );
- bool addCmd_setSequencePriority( const Command& newCmd );
- bool addCmd_setSequenceGroundSpeed( const Command& newCmd );
- bool addCmd_setSequenceCyclic( const Command& newCmd );
- bool addCmd_setSequenceBlend( const Command& newCmd );
- bool addCmd_renameSequence( const Command& newCmd );
- bool addCmd_removeSequence( const Command& newCmd );
+ bool addCmd_addSequence(Command& newCmd);
+ bool addCmd_setSequencePriority(const Command& newCmd);
+ bool addCmd_setSequenceGroundSpeed(const Command& newCmd);
+ bool addCmd_setSequenceCyclic(const Command& newCmd);
+ bool addCmd_setSequenceBlend(const Command& newCmd);
+ bool addCmd_renameSequence(const Command& newCmd);
+ bool addCmd_removeSequence(const Command& newCmd);
- bool addCmd_addTrigger( const Command& newCmd );
- bool addCmd_removeTrigger( const Command& newCmd );
+ bool addCmd_addTrigger(const Command& newCmd);
+ bool addCmd_removeTrigger(const Command& newCmd);
void write(TSShape* shape, Stream& stream, const String& savePath);
};
@@ -161,8 +164,12 @@ public:
static const S32 MaxLegacySequences = 127;
protected:
- StringTableEntry mShapePath;
- Vector mSequences;
+ StringTableEntry mShapeAssetId;
+ AssetPtr mShapeAsset;
+
+ Vector mSequenceAssetIds;
+ Vector> mSequencesAssets;
+
ChangeSet mChangeSet;
// Paths to shapes used by MeshFit
@@ -170,46 +177,47 @@ protected:
static String smCubeShapePath;
static String smSphereShapePath;
- static bool addSequenceFromField( void *obj, const char *index, const char *data );
-
- static void _onTSShapeLoaded( Resource< TSShape >& shape );
- static void _onTSShapeUnloaded( const Torque::Path& path, TSShape* shape );
-
+ static bool addSequenceFromField(void* obj, const char* index, const char* data);
+
+ static void _onTSShapeLoaded(Resource< TSShape >& shape);
+ static void _onTSShapeUnloaded(const Torque::Path& path, TSShape* shape);
+
static ResourceRegisterPostLoadSignal< TSShape > _smAutoLoad;
static ResourceRegisterUnloadSignal< TSShape > _smAutoUnload;
-
+
/// @name Callbacks
///@{
- DECLARE_CALLBACK( void, onLoad, () );
- DECLARE_CALLBACK( void, onUnload, () );
+ DECLARE_CALLBACK(void, onLoad, ());
+ DECLARE_CALLBACK(void, onUnload, ());
///@}
- virtual void _onLoad( TSShape* shape );
+ virtual void _onLoad(TSShape* shape);
virtual void _onUnload();
public:
- TSShape* mShape; // Edited shape; NULL while not loaded; not a Resource as we don't want it to prevent from unloading.
+ TSShape* mShape; // Edited shape; NULL while not loaded; not a Resource as we don't want it to prevent from unloading.
ColladaUtils::ImportOptions mOptions;
bool mLoadingShape;
public:
TSShapeConstructor();
- TSShapeConstructor(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 );
diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/camera.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/camera.tscript
index 140656838..87d053808 100644
--- a/Templates/BaseGame/game/core/gameObjects/shapes/camera.tscript
+++ b/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";
diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/noshape.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/noshape.tscript
index 3be82eaf5..231812a1f 100644
--- a/Templates/BaseGame/game/core/gameObjects/shapes/noshape.tscript
+++ b/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";
diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/octahedron.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/octahedron.tscript
index 4d159c252..ac5cb9bd6 100644
--- a/Templates/BaseGame/game/core/gameObjects/shapes/octahedron.tscript
+++ b/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";
diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/simplecone.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/simplecone.tscript
index 141c8857c..c610ccd0c 100644
--- a/Templates/BaseGame/game/core/gameObjects/shapes/simplecone.tscript
+++ b/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";
diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/unit_capsule.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/unit_capsule.tscript
index ed1460f05..3c6a00aab 100644
--- a/Templates/BaseGame/game/core/gameObjects/shapes/unit_capsule.tscript
+++ b/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";
diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/unit_cube.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/unit_cube.tscript
index 77c7cbea0..9d29021dc 100644
--- a/Templates/BaseGame/game/core/gameObjects/shapes/unit_cube.tscript
+++ b/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";
diff --git a/Templates/BaseGame/game/core/gameObjects/shapes/unit_sphere.tscript b/Templates/BaseGame/game/core/gameObjects/shapes/unit_sphere.tscript
index 605e0ed97..ef1d96fb1 100644
--- a/Templates/BaseGame/game/core/gameObjects/shapes/unit_sphere.tscript
+++ b/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";
diff --git a/Templates/BaseGame/game/core/gui/scripts/profiles.tscript b/Templates/BaseGame/game/core/gui/scripts/profiles.tscript
index d3ab01258..dd0ede04a 100644
--- a/Templates/BaseGame/game/core/gui/scripts/profiles.tscript
+++ b/Templates/BaseGame/game/core/gui/scripts/profiles.tscript
@@ -63,7 +63,7 @@ new GuiControlProfile (GuiDefaultProfile)
fontColorSEL= "255 255 255";
// bitmap information
- bitmap = "";
+ bitmapAsset = "";
bitmapBase = "";
textOffset = "0 0";
diff --git a/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterBasicMat.asset.taml b/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterBasicMat.asset.taml
new file mode 100644
index 000000000..a0922de98
--- /dev/null
+++ b/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterBasicMat.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterMat.asset.taml b/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterMat.asset.taml
new file mode 100644
index 000000000..63c59abaa
--- /dev/null
+++ b/Templates/BaseGame/game/core/rendering/scripts/gfxData/UnderwaterMat.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterBasicMat.asset.taml b/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterBasicMat.asset.taml
new file mode 100644
index 000000000..df5ddfb92
--- /dev/null
+++ b/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterBasicMat.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterMat.asset.taml b/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterMat.asset.taml
new file mode 100644
index 000000000..2e270a6ab
--- /dev/null
+++ b/Templates/BaseGame/game/core/rendering/scripts/gfxData/WaterMat.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/core/rendering/shapes/Fog_Cube.tscript b/Templates/BaseGame/game/core/rendering/shapes/Fog_Cube.tscript
index bff0f1b53..a77e476df 100644
--- a/Templates/BaseGame/game/core/rendering/shapes/Fog_Cube.tscript
+++ b/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";
diff --git a/Templates/BaseGame/game/data/Prototyping/shapes/ConePrimitive.tscript b/Templates/BaseGame/game/data/Prototyping/shapes/ConePrimitive.tscript
index 20631dc26..91bee1dbb 100644
--- a/Templates/BaseGame/game/data/Prototyping/shapes/ConePrimitive.tscript
+++ b/Templates/BaseGame/game/data/Prototyping/shapes/ConePrimitive.tscript
@@ -1,6 +1,6 @@
//--- OBJECT WRITE BEGIN ---
new TSShapeConstructor(ConePrimitive_fbx) {
- baseShape = "./ConePrimitive.fbx";
+ baseShapeAsset = "Prototyping:ConePrimitive";
upAxis = "DEFAULT";
unit = "-1";
LODType = "TrailingNumber";
diff --git a/Templates/BaseGame/game/data/Prototyping/shapes/CubePrimitive.tscript b/Templates/BaseGame/game/data/Prototyping/shapes/CubePrimitive.tscript
index 6b5f861c8..01162e086 100644
--- a/Templates/BaseGame/game/data/Prototyping/shapes/CubePrimitive.tscript
+++ b/Templates/BaseGame/game/data/Prototyping/shapes/CubePrimitive.tscript
@@ -1,6 +1,6 @@
//--- OBJECT WRITE BEGIN ---
new TSShapeConstructor(CubePrimitive_fbx) {
- baseShape = "./CubePrimitive.fbx";
+ baseShapeAsset = "Prototyping:CubePrimitive";
upAxis = "DEFAULT";
unit = "-1";
LODType = "TrailingNumber";
diff --git a/Templates/BaseGame/game/data/Prototyping/shapes/CylinderPrimitive.tscript b/Templates/BaseGame/game/data/Prototyping/shapes/CylinderPrimitive.tscript
index 5603b0e1f..14d13454f 100644
--- a/Templates/BaseGame/game/data/Prototyping/shapes/CylinderPrimitive.tscript
+++ b/Templates/BaseGame/game/data/Prototyping/shapes/CylinderPrimitive.tscript
@@ -1,6 +1,6 @@
//--- OBJECT WRITE BEGIN ---
new TSShapeConstructor(CylinderPrimitive_fbx) {
- baseShape = "./CylinderPrimitive.fbx";
+ baseShapeAsset = "Prototyping:CylinderPrimitive";
upAxis = "DEFAULT";
unit = "-1";
LODType = "TrailingNumber";
diff --git a/Templates/BaseGame/game/data/Prototyping/shapes/SpherePrimitive.tscript b/Templates/BaseGame/game/data/Prototyping/shapes/SpherePrimitive.tscript
index b9b693ac9..7c0352ff5 100644
--- a/Templates/BaseGame/game/data/Prototyping/shapes/SpherePrimitive.tscript
+++ b/Templates/BaseGame/game/data/Prototyping/shapes/SpherePrimitive.tscript
@@ -1,6 +1,6 @@
//--- OBJECT WRITE BEGIN ---
new TSShapeConstructor(SpherePrimitive_fbx) {
- baseShape = "./SpherePrimitive.fbx";
+ baseShapeAsset = "Prototyping:SpherePrimitive";
upAxis = "DEFAULT";
unit = "-1";
LODType = "TrailingNumber";
diff --git a/Templates/BaseGame/game/data/Prototyping/shapes/TorusPrimitive.tscript b/Templates/BaseGame/game/data/Prototyping/shapes/TorusPrimitive.tscript
index b2dedc16a..50888d79a 100644
--- a/Templates/BaseGame/game/data/Prototyping/shapes/TorusPrimitive.tscript
+++ b/Templates/BaseGame/game/data/Prototyping/shapes/TorusPrimitive.tscript
@@ -1,6 +1,6 @@
//--- OBJECT WRITE BEGIN ---
new TSShapeConstructor(TorusPrimitive_fbx) {
- baseShape = "./TorusPrimitive.fbx";
+ baseShapeAsset = "Prototyping:TorusPrimitive";
upAxis = "DEFAULT";
unit = "-1";
LODType = "TrailingNumber";
diff --git a/Templates/BaseGame/game/data/Prototyping/shapes/TubePrimitive.tscript b/Templates/BaseGame/game/data/Prototyping/shapes/TubePrimitive.tscript
index f73be16fb..02aab9014 100644
--- a/Templates/BaseGame/game/data/Prototyping/shapes/TubePrimitive.tscript
+++ b/Templates/BaseGame/game/data/Prototyping/shapes/TubePrimitive.tscript
@@ -1,6 +1,6 @@
//--- OBJECT WRITE BEGIN ---
new TSShapeConstructor(TubePrimitive_fbx) {
- baseShape = "./TubePrimitive.fbx";
+ baseShapeAsset = "Prototyping:TubePrimitive";
upAxis = "DEFAULT";
unit = "-1";
LODType = "TrailingNumber";
diff --git a/Templates/BaseGame/game/data/Prototyping/shapes/kork_chanShape.tscript b/Templates/BaseGame/game/data/Prototyping/shapes/kork_chanShape.tscript
index f6fe9b059..b53ee1f48 100644
--- a/Templates/BaseGame/game/data/Prototyping/shapes/kork_chanShape.tscript
+++ b/Templates/BaseGame/game/data/Prototyping/shapes/kork_chanShape.tscript
@@ -1,6 +1,6 @@
//--- OBJECT WRITE BEGIN ---
new TSShapeConstructor(kork_chanShape_fbx) {
- baseShape = "./kork_chanShape.fbx";
+ baseShapeAsset = "Prototyping:kork_chanShape";
upAxis = "DEFAULT";
unit = "-1";
LODType = "TrailingNumber";
diff --git a/Templates/BaseGame/game/data/ui/guis/startupGui.gui b/Templates/BaseGame/game/data/ui/guis/startupGui.gui
index ad7afcf63..cc6aee78b 100644
--- a/Templates/BaseGame/game/data/ui/guis/startupGui.gui
+++ b/Templates/BaseGame/game/data/ui/guis/startupGui.gui
@@ -13,7 +13,7 @@
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
- bitmap = "";
+ bitmapAsset = "";
wrap = "0";
fadeinTime = "1000";
waitTime = "4000";
@@ -70,7 +70,7 @@ new GuiFadeinBitmapCtrl(BlankGui) {
minExtent = "8 8";
visible = "1";
helpTag = "0";
- bitmap = "";
+ bitmapAsset = "";
wrap = "0";
fadeinTime = "100";
waitTime = "2000";
diff --git a/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_d_image.asset.taml b/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_d_image.asset.taml
new file mode 100644
index 000000000..ebf48969f
--- /dev/null
+++ b/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_d_image.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_h_image.asset.taml b/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_h_image.asset.taml
new file mode 100644
index 000000000..a2dc1f821
--- /dev/null
+++ b/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_h_image.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_n_image.asset.taml b/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_n_image.asset.taml
new file mode 100644
index 000000000..d697e1095
--- /dev/null
+++ b/Templates/BaseGame/game/tools/VPathEditor/GUI/Images/Images_btn_Palette_n_image.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditor.gui b/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditor.gui
index d9941f9db..8962b3ec7 100644
--- a/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditor.gui
+++ b/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditor.gui
@@ -141,7 +141,7 @@ new VPathEditor(EVPathEditor) {
};
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -431,4 +431,4 @@ function OnOrientationChanged()
%mode = EPathEditorNodeOrientationMode.getText();
%data = EPathEditorNodeOrientationData.getText();
EVPathEditor.setNodeOrientationMode( %mode, %data );
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorPalette.gui b/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorPalette.gui
index 94f8102dc..0963ae68f 100644
--- a/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorPalette.gui
+++ b/Templates/BaseGame/game/tools/VPathEditor/GUI/VPathEditorPalette.gui
@@ -33,7 +33,7 @@
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Select Path / Node (1)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/arrow";
+ bitmapAsset = "ToolsModule:arrow_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -53,7 +53,7 @@
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Move Point (2)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/move-point";
+ bitmapAsset = "ToolsModule:move_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -73,7 +73,7 @@
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Rotate Point (3)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/rotate-point";
+ bitmapAsset = "ToolsModule:rotate_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -93,7 +93,7 @@
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Scale Point (4)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/scale-point";
+ bitmapAsset = "ToolsModule:scale_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -113,7 +113,7 @@
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Add Node (5)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/add-point";
+ bitmapAsset = "ToolsModule:add_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -133,7 +133,7 @@
tooltipprofile = "GuiToolTipProfile";
ToolTip = "Delete Node (6)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/subtract-point";
+ bitmapAsset = "ToolsModule:subtract_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -173,4 +173,4 @@ function EVPathEditorAddNodeButton::onClick( %this )
function EVPathEditorDeleteNodeButton::onClick( %this )
{
EVPathEditor.EditMode = "DeleteNode";
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/VPathEditor/Scripts/Plugin.tscript b/Templates/BaseGame/game/tools/VPathEditor/Scripts/Plugin.tscript
index 8af3a167a..60bf4ceb9 100644
--- a/Templates/BaseGame/game/tools/VPathEditor/Scripts/Plugin.tscript
+++ b/Templates/BaseGame/game/tools/VPathEditor/Scripts/Plugin.tscript
@@ -40,7 +40,7 @@ function VPathEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the ToolsToolbar
%tooltip = "Path Editor (" @ %accel @ ")";
- EditorGui.addToToolsToolbar( "VPathEditorPlugin", "VPathEditorPalette", expandFilename( "tools/VPathEditor/GUI/Images/btn_Palette" ), %tooltip );
+ EditorGui.addToToolsToolbar( "VPathEditorPlugin", "VPathEditorPalette", "ToolsModule:btn_Palette_n_image", %tooltip );
// Find and Store the Button.
%this.ToolbarButton = ToolsToolbarArray.findObjectByInternalName( "VPathEditorPalette", false );
@@ -175,4 +175,4 @@ function VPathEditorPlugin::syncGizmo( %this )
case "Rotate" : EVPathEditorRotateButton.performClick();
case "Scale" : EVPathEditorScaleButton.performClick();
}
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/GuiProfiles.tscript b/Templates/BaseGame/game/tools/VerveEditor/GUI/GuiProfiles.tscript
index 636b75891..f636bf413 100644
--- a/Templates/BaseGame/game/tools/VerveEditor/GUI/GuiProfiles.tscript
+++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/GuiProfiles.tscript
@@ -170,7 +170,7 @@ singleton GuiControlProfile ( VEditorScrollProfile : VEditorDefaultProfile )
border = false;
hasBitmapArray = true;
- bitmap = "./Images/ScrollBar";
+ bitmapAsset = "ToolsModule:Images_ScrollBar_image";
};
singleton GuiControlProfile ( VEditorCheckBoxProfile : GuiCheckBoxProfile )
diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Images_ScrollBar_image.asset.taml b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Images_ScrollBar_image.asset.taml
new file mode 100644
index 000000000..58cd97824
--- /dev/null
+++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/Images/Images_ScrollBar_image.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditor.gui b/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditor.gui
index 091288fe0..10bd0fe35 100644
--- a/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditor.gui
+++ b/Templates/BaseGame/game/tools/VerveEditor/GUI/VerveEditor.gui
@@ -307,7 +307,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "./Images/btn_AddGroup";
+ bitmapAsset = "ToolsModule:btn_AddGroup_image";
};
new GuiBitmapButtonCtrl(VerveEditorAddTrackButton) {
canSaveDynamicFields = "0";
@@ -330,7 +330,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "./Images/btn_AddTrack";
+ bitmapAsset = "ToolsModule:btn_AddTrack_image";
};
new GuiBitmapButtonCtrl(VerveEditorAddEventButton) {
canSaveDynamicFields = "0";
@@ -352,7 +352,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "./Images/btn_AddEvent";
+ bitmapAsset = "ToolsModule:btn_AddEvent_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -374,7 +374,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "./Images/btn_Delete";
+ bitmapAsset = "ToolsModule:btn_Delete_image";
};
};
};
@@ -623,7 +623,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "./Images/btn_Rewind";
+ bitmapAsset = "ToolsModule:btn_Rewind_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -645,7 +645,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "./Images/btn_StepB";
+ bitmapAsset = "ToolsModule:btn_StepB_image";
};
new GuiBitmapButtonCtrl(VerveEditorPlayButton) {
canSaveDynamicFields = "0";
@@ -667,7 +667,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "./Images/btn_Play";
+ bitmapAsset = "ToolsModule:btn_Play_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -689,7 +689,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "./Images/btn_StepF";
+ bitmapAsset = "ToolsModule:btn_StepF_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -711,7 +711,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "./Images/btn_Forward";
+ bitmapAsset = "ToolsModule:btn_Forward_image";
};
};
new GuiBitmapButtonCtrl() {
@@ -734,7 +734,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "./Images/btn_AddL";
+ bitmapAsset = "ToolsModule:btn_AddL_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -756,7 +756,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "./Images/btn_AddR";
+ bitmapAsset = "ToolsModule:btn_AddR_image";
};
};
};
diff --git a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/Fields/main.tscript b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/Fields/main.tscript
index 2bfde4966..2acb25bf6 100644
--- a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/Fields/main.tscript
+++ b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/Fields/main.tscript
@@ -22,4 +22,4 @@ function VerveEditor::InitInspectorFieldScripts()
exec( "./TypeVShapeAnimationEnum." @ $TorqueScriptFileExtension );
exec( "./TypeToggleEnum." @ $TorqueScriptFileExtension );
}
-VerveEditor::InitInspectorFieldScripts();
\ No newline at end of file
+VerveEditor::InitInspectorFieldScripts();
diff --git a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript
index bcbc87906..caf6c29b5 100644
--- a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript
+++ b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Inspector/main.tscript
@@ -17,4 +17,4 @@ function VerveEditor::InitInspectorScripts()
exec( "./Fields/main." @ $TorqueScriptFileExtension );
}
-VerveEditor::InitInspectorScripts();
\ No newline at end of file
+VerveEditor::InitInspectorScripts();
diff --git a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Plugin.tscript b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Plugin.tscript
index df7c4efcc..f3532ae8a 100644
--- a/Templates/BaseGame/game/tools/VerveEditor/Scripts/Plugin.tscript
+++ b/Templates/BaseGame/game/tools/VerveEditor/Scripts/Plugin.tscript
@@ -26,7 +26,7 @@ function VerveEditorPlugin::onWorldEditorStartup( %this )
%tooltip = "Verve Editor (" @ %accel @ ")";
// Add ourselves to the ToolsToolbar
- EditorGui.addToToolsToolbar( "VerveEditorPlugin", "VerveEditorPluginPalette", expandFilename( "tools/VerveEditor/GUI/Images/btn_Palette" ), %tooltip );
+ EditorGui.addToToolsToolbar( "VerveEditorPlugin", "VerveEditorPluginPalette", "ToolsModule:btn_Palette_n_image", %tooltip );
// Find and Store the Button.
%this.ToolbarButton = ToolsToolbarArray.findObjectByInternalName( "VerveEditorPluginPalette", false );
diff --git a/Templates/BaseGame/game/tools/VerveEditor/main.tscript b/Templates/BaseGame/game/tools/VerveEditor/main.tscript
index f50360412..45ff8b2d9 100644
--- a/Templates/BaseGame/game/tools/VerveEditor/main.tscript
+++ b/Templates/BaseGame/game/tools/VerveEditor/main.tscript
@@ -231,4 +231,4 @@ function VerveEditor::Reset()
// Stop.
$VerveEditor::Controller.Stop();
}
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml b/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml
index 238283915..c2256aeb7 100644
--- a/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml
+++ b/Templates/BaseGame/game/tools/assetBrowser/assetImportConfigs.xml
@@ -187,7 +187,7 @@
0
AutoPrune
+ name="DuplicateAutoResolution">FolderPrefix
1
diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen.asset.taml
new file mode 100644
index 000000000..6935dba28
--- /dev/null
+++ b/Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen_Lines.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen_Lines.asset.taml
new file mode 100644
index 000000000..6ff9c66c5
--- /dev/null
+++ b/Templates/BaseGame/game/tools/base/images/Grid_512_ForestGreen_Lines.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_Green.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_Green.asset.taml
new file mode 100644
index 000000000..b6843c4b6
--- /dev/null
+++ b/Templates/BaseGame/game/tools/base/images/Grid_512_Green.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_Grey.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_Grey.asset.taml
new file mode 100644
index 000000000..3d711a7c9
--- /dev/null
+++ b/Templates/BaseGame/game/tools/base/images/Grid_512_Grey.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_Grey_Base.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_Grey_Base.asset.taml
new file mode 100644
index 000000000..ff8d3047a
--- /dev/null
+++ b/Templates/BaseGame/game/tools/base/images/Grid_512_Grey_Base.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_Orange.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_Orange.asset.taml
new file mode 100644
index 000000000..e8ae4e6b7
--- /dev/null
+++ b/Templates/BaseGame/game/tools/base/images/Grid_512_Orange.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_Orange_Lines.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_Orange_Lines.asset.taml
new file mode 100644
index 000000000..5221fa29c
--- /dev/null
+++ b/Templates/BaseGame/game/tools/base/images/Grid_512_Orange_Lines.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/tools/base/images/Grid_512_Red.asset.taml b/Templates/BaseGame/game/tools/base/images/Grid_512_Red.asset.taml
new file mode 100644
index 000000000..1ab418120
--- /dev/null
+++ b/Templates/BaseGame/game/tools/base/images/Grid_512_Red.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/tools/componentEditor/interface/materialFieldType.tscript b/Templates/BaseGame/game/tools/componentEditor/interface/materialFieldType.tscript
index aff83f5de..060333e62 100644
--- a/Templates/BaseGame/game/tools/componentEditor/interface/materialFieldType.tscript
+++ b/Templates/BaseGame/game/tools/componentEditor/interface/materialFieldType.tscript
@@ -66,7 +66,7 @@ function GuiInspectorGroup::buildMaterialField(%this, %fieldName, %fieldLabel, %
position = "7 4";
extent = "64 64";
buttonType = "PushButton";
- bitmap = "";
+ bitmapAsset = "";
Command = "";
text = "Loading...";
useStates = false;
@@ -80,7 +80,7 @@ function GuiInspectorGroup::buildMaterialField(%this, %fieldName, %fieldLabel, %
extent = "64 64";
Variable = "";
buttonType = "toggleButton";
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
groupNum = "0";
text = "";
tooltip = "Change material";
@@ -274,4 +274,4 @@ function materialFieldBtn::onClick(%this)
function materialFieldBtn::setMaterial(%this, %matAssetName)
{
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/componentEditor/main.tscript b/Templates/BaseGame/game/tools/componentEditor/main.tscript
index 1de7febb2..d026ec39d 100644
--- a/Templates/BaseGame/game/tools/componentEditor/main.tscript
+++ b/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);
\ No newline at end of file
+exec("./interface/stateMachineField." @ $TorqueScriptFileExtension);
diff --git a/Templates/BaseGame/game/tools/convexEditor/convexEditorToolbar.ed.gui b/Templates/BaseGame/game/tools/convexEditor/convexEditorToolbar.ed.gui
index 630c82836..eebd56e85 100644
--- a/Templates/BaseGame/game/tools/convexEditor/convexEditorToolbar.ed.gui
+++ b/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() {
diff --git a/Templates/BaseGame/game/tools/convexEditor/main.tscript b/Templates/BaseGame/game/tools/convexEditor/main.tscript
index 6ecb12b6c..1caced468 100644
--- a/Templates/BaseGame/game/tools/convexEditor/main.tscript
+++ b/Templates/BaseGame/game/tools/convexEditor/main.tscript
@@ -68,7 +68,7 @@ function ConvexEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the ToolsToolbar
%tooltip = "Sketch Tool (" @ %accel @ ")";
- EditorGui.addToToolsToolbar( "ConvexEditorPlugin", "ConvexEditorPalette", expandFilename("tools/convexEditor/images/convex-editor-btn"), %tooltip );
+ EditorGui.addToToolsToolbar( "ConvexEditorPlugin", "ConvexEditorPalette", "ToolsModule:convex_editor_btn_n_image", %tooltip );
//connect editor windows
GuiWindowCtrl::attach( ConvexEditorOptionsWindow, ConvexEditorTreeWindow);
@@ -232,4 +232,4 @@ function ConvexEditorPlugin::writeSettings( %this )
EditorSettings.beginGroup( "ConvexEditor", true );
EditorSettings.setValue( "MaterialName", ConvexEditorGui.materialName );
EditorSettings.endGroup();
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui
index 5a68c4df2..25962a61a 100644
--- a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui
+++ b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorInspectorWindow.ed.gui
@@ -166,7 +166,7 @@
active = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/save-icon";
+ bitmapAsset = "ToolsModule:save_icon_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -186,7 +186,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/save-as";
+ bitmapAsset = "ToolsModule:save_as_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
diff --git a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui
index d07a4158d..6877ca6fb 100644
--- a/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui
+++ b/Templates/BaseGame/game/tools/datablockEditor/DatablockEditorTreeWindow.ed.gui
@@ -103,7 +103,7 @@
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/clear-icon";
+ bitmapAsset = "ToolsModule:clear_icon_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -265,7 +265,7 @@
};
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -286,7 +286,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/new";
+ bitmapAsset = "ToolsModule:new_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
diff --git a/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript b/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript
index 9396faeb6..6ef48370a 100644
--- a/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript
+++ b/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript
@@ -46,7 +46,7 @@ function DatablockEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the ToolsToolbar
%tooltip = "Datablock Editor (" @ %accel @ ")";
- EditorGui.addToToolsToolbar( "DatablockEditorPlugin", "DatablockEditorPalette", expandFilename("tools/worldEditor/images/toolbar/datablock-editor"), %tooltip );
+ EditorGui.addToToolsToolbar( "DatablockEditorPlugin", "DatablockEditorPalette", "ToolsModule:datablock_editor_n_image", %tooltip );
//connect editor windows
GuiWindowCtrl::Attach( DatablockEditorInspectorWindow, DatablockEditorTreeWindow);
diff --git a/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.gui b/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.gui
index b7faf1018..172e33b0e 100644
--- a/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.gui
+++ b/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.gui
@@ -310,7 +310,7 @@
tooltip = "Save All";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/save-icon";
+ bitmapAsset = "ToolsModule:save_icon_n_image";
};
new GuiBitmapButtonCtrl(RetargetDecalButton) {
@@ -329,7 +329,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
tooltip = "Retarget missing decals to an existing decal datablock";
- bitmap = "tools/gui/images/retarget-btn";
+ bitmapAsset = "ToolsModule:retarget_btn_n_image";
buttonType = "PushButton";
useMouseEvents = "0";
};
@@ -350,7 +350,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
tooltip = "Create New Decal Template";
- bitmap = "tools/gui/images/new";
+ bitmapAsset = "ToolsModule:new_n_image";
buttonType = "PushButton";
useMouseEvents = "0";
};
@@ -372,7 +372,7 @@
hovertime = "1000";
text = "";
tooltip = "Delete Selected Decal Template";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
diff --git a/Templates/BaseGame/game/tools/decalEditor/main.tscript b/Templates/BaseGame/game/tools/decalEditor/main.tscript
index 52e98d0e6..58b3201ec 100644
--- a/Templates/BaseGame/game/tools/decalEditor/main.tscript
+++ b/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 );
diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/images/images_window_image.asset.taml b/Templates/BaseGame/game/tools/editorClasses/gui/images/images_window_image.asset.taml
new file mode 100644
index 000000000..b4ffac18d
--- /dev/null
+++ b/Templates/BaseGame/game/tools/editorClasses/gui/images/images_window_image.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.tscript b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.tscript
index 2b690ff79..f857f6c31 100644
--- a/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.tscript
+++ b/Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.tscript
@@ -30,36 +30,36 @@ singleton GuiControlProfile (NavPanelProfile)
singleton GuiControlProfile (NavPanel : NavPanelProfile)
{
- bitmap = "./navPanel";
+ bitmapAsset = "ToolsModule:navPanel_image";
category = "Editor";
};
singleton GuiControlProfile (NavPanelBlue : NavPanelProfile)
{
- bitmap = "./navPanel_blue";
+ bitmapAsset = "ToolsModule:navPanel_blue_image";
category = "Editor";
};
singleton GuiControlProfile (NavPanelGreen : NavPanelProfile)
{
- bitmap = "./navPanel_green";
+ bitmapAsset = "ToolsModule:navPanel_green_image";
category = "Editor";
};
singleton GuiControlProfile (NavPanelRed : NavPanelProfile)
{
- bitmap = "./navPanel_red";
+ bitmapAsset = "ToolsModule:navPanel_red_image";
category = "Editor";
};
singleton GuiControlProfile (NavPanelWhite : NavPanelProfile)
{
- bitmap = "./navPanel_white";
+ bitmapAsset = "ToolsModule:navPanel_white_image";
category = "Editor";
};
singleton GuiControlProfile (NavPanelYellow : NavPanelProfile)
{
- bitmap = "./navPanel_yellow";
+ bitmapAsset = "ToolsModule:navPanel_yellow_image";
category = "Editor";
};
diff --git a/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript b/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript
index b5e93d831..dc7622eed 100644
--- a/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript
+++ b/Templates/BaseGame/game/tools/editorClasses/scripts/guiFormLayoutManager.ed.tscript
@@ -391,4 +391,4 @@ function GuiFormManager::ClearLayoutContent( %layoutObj )
else
GuiFormManager::ClearLayoutContent( %object );
}
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/forestEditor/forestEditToolbar.ed.gui b/Templates/BaseGame/game/tools/forestEditor/forestEditToolbar.ed.gui
index e17d53f90..c6976584f 100644
--- a/Templates/BaseGame/game/tools/forestEditor/forestEditToolbar.ed.gui
+++ b/Templates/BaseGame/game/tools/forestEditor/forestEditToolbar.ed.gui
@@ -118,7 +118,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -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";
diff --git a/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.gui b/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.gui
index e46a09f3d..171c34ffd 100644
--- a/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.gui
+++ b/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.gui
@@ -295,7 +295,7 @@
canSaveDynamicFields = "0";
new GuiBitmapButtonCtrl() {
- bitmap = "tools/forestEditor/images/new-mesh";
+ bitmapAsset = "ToolsModule:new_mesh_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -315,7 +315,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -358,7 +358,7 @@
canSaveDynamicFields = "0";
new GuiBitmapButtonCtrl() {
- bitmap = "tools/forestEditor/images/new-brush";
+ bitmapAsset = "ToolsModule:new_brush_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -378,7 +378,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/forestEditor/images/new-element";
+ bitmapAsset = "ToolsModule:new_element_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -398,7 +398,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
diff --git a/Templates/BaseGame/game/tools/forestEditor/main.tscript b/Templates/BaseGame/game/tools/forestEditor/main.tscript
index 99d1bab88..9f4689622 100644
--- a/Templates/BaseGame/game/tools/forestEditor/main.tscript
+++ b/Templates/BaseGame/game/tools/forestEditor/main.tscript
@@ -119,7 +119,7 @@ function ForestEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the tools menu.
%tooltip = "Forest Editor (" @ %accel @ ")";
- EditorGui.addToToolsToolbar( "ForestEditorPlugin", "ForestEditorPalette", expandFilename("tools/forestEditor/images/forest-editor-btn"), %tooltip );
+ EditorGui.addToToolsToolbar( "ForestEditorPlugin", "ForestEditorPalette", "ToolsModule:forest_editor_btn_n_image", %tooltip );
//connect editor windows
GuiWindowCtrl::attach( ForestEditorPropertiesWindow, ForestEditorPalleteWindow );
@@ -308,4 +308,4 @@ function ForestEditorPlugin::handleCopy( %this )
function ForestEditorPlugin::handlePaste( %this )
{
ForestTools->SelectionTool.pasteSelection();
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/gui/assimpImport.ed.tscript b/Templates/BaseGame/game/tools/gui/assimpImport.ed.tscript
index 054e31e51..af9f3bb38 100644
--- a/Templates/BaseGame/game/tools/gui/assimpImport.ed.tscript
+++ b/Templates/BaseGame/game/tools/gui/assimpImport.ed.tscript
@@ -284,7 +284,7 @@ function AssimpImportDlg::showDialog(%this, %shapePath, %cmd)
if (isFile(%csPath))
exec(%csPath);
- %this.constructor = ShapeEditor.findConstructor(%this.path);
+ %this.constructor = findShapeConstructorByFilename(%this.path);
// Only show the import dialog if required. Note that 'GetShapeInfo' will
// fail if the source file is missing, or a cached.dts is available.
@@ -537,4 +537,4 @@ function AssimpImportDlg::saveSettingsTo(%this, %filename)
%fileObj.close();
%fileObj.delete();
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/gui/colladaImport.ed.gui b/Templates/BaseGame/game/tools/gui/colladaImport.ed.gui
index d098bffe6..4909cee08 100644
--- a/Templates/BaseGame/game/tools/gui/colladaImport.ed.gui
+++ b/Templates/BaseGame/game/tools/gui/colladaImport.ed.gui
@@ -1259,7 +1259,7 @@ function ColladaImportDlg::showDialog(%this, %shapePath, %cmd)
if (isFile(%csPath))
exec(%csPath);
- %this.constructor = ShapeEditor.findConstructor(%this.path);
+ %this.constructor = findShapeConstructorByFilename(%this.path);
// Only show the import dialog if required. Note that 'enumColladaScene' will
// fail if the COLLADA file is missing, or a cached.dts is available.
@@ -1768,4 +1768,4 @@ function showImportDialog(%shapePath, %cmd)
if ( isObject(AssimpImportDlg) )
AssimpImportDlg.showDialog(%shapePath, %cmd);
}
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/gui/cubemapEditor.gui b/Templates/BaseGame/game/tools/gui/cubemapEditor.gui
index b7671123e..ee274fa10 100644
--- a/Templates/BaseGame/game/tools/gui/cubemapEditor.gui
+++ b/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";
diff --git a/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript b/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript
index 55842264c..b64d2cb42 100644
--- a/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript
+++ b/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript
@@ -531,4 +531,4 @@ function ESettingsWindow::getGameOptionsSettings(%this)
SettingsInspector.startGroup("Options Settings");
SettingsInspector.addSettingsField("Options/optionsList", "OptionsList", "OptionsSetting", "");
SettingsInspector.endGroup();
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.gui b/Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.gui
index 596e8e216..ecc17c7e2 100644
--- a/Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.gui
+++ b/Templates/BaseGame/game/tools/gui/guiObjectInspector.ed.gui
@@ -94,7 +94,7 @@
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/clear-icon";
+ bitmapAsset = "ToolsModule:clear_icon_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_d_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_d_image.asset.taml
new file mode 100644
index 000000000..544267d81
--- /dev/null
+++ b/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_d_image.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_h_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_h_image.asset.taml
new file mode 100644
index 000000000..866507c7b
--- /dev/null
+++ b/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_h_image.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_n_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_n_image.asset.taml
new file mode 100644
index 000000000..0c34c1608
--- /dev/null
+++ b/Templates/BaseGame/game/tools/gui/images/menubar/menubar_snap_grid_n_image.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/tools/gui/images/treeview/treeview_default_image.asset.taml b/Templates/BaseGame/game/tools/gui/images/treeview/treeview_default_image.asset.taml
new file mode 100644
index 000000000..9d4a8053d
--- /dev/null
+++ b/Templates/BaseGame/game/tools/gui/images/treeview/treeview_default_image.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/tools/gui/materialSelector.ed.gui b/Templates/BaseGame/game/tools/gui/materialSelector.ed.gui
index 4335007a0..09bddd1dd 100644
--- a/Templates/BaseGame/game/tools/gui/materialSelector.ed.gui
+++ b/Templates/BaseGame/game/tools/gui/materialSelector.ed.gui
@@ -157,7 +157,7 @@ new GuiControl(MaterialSelectorOverlay, EditorGuiGroup) {
Command = "MaterialSelector.showDeleteDialog();";
hovertime = "1000";
tooltip = "Delete Material";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -894,7 +894,7 @@ function MaterialSelector::buildStaticFilters( %this )
Command = "MaterialSelector_addFilterWindow.setVisible(1); MaterialSelectorOverlay.pushToBack(MaterialSelector_addFilterWindow);";
hovertime = "1000";
tooltip = "Create New Tag";
- bitmap = "tools/gui/images/new";
+ bitmapAsset = "ToolsModule:new_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -914,7 +914,7 @@ function MaterialSelector::buildStaticFilters( %this )
Command = "MaterialSelector.clearMaterialFilters();";
hovertime = "1000";
tooltip = "Clear Selected Tag";
- bitmap = "tools/gui/images/clear-btn";
+ bitmapAsset = "ToolsModule:clear_btn_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -1226,7 +1226,7 @@ function MaterialSelector::buildPreviewArray( %this, %material )
position = "7 4";
extent = "64 64";
buttonType = "PushButton";
- bitmap = "";
+ bitmapAsset = "";
Command = "";
text = "Loading...";
useStates = false;
@@ -1239,7 +1239,7 @@ function MaterialSelector::buildPreviewArray( %this, %material )
extent = "64 64";
Variable = "";
buttonType = "toggleButton";
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
groupNum = "0";
text = "";
};
@@ -1662,7 +1662,7 @@ function MaterialSelector::createNewMaterial( %this )
extent = "64 64";
Variable = "";
buttonType = "toggleButton";
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
groupNum = "0";
text = "";
};
diff --git a/Templates/BaseGame/game/tools/gui/postFxEditor.gui b/Templates/BaseGame/game/tools/gui/postFxEditor.gui
index 4827435da..4f1977bba 100644
--- a/Templates/BaseGame/game/tools/gui/postFxEditor.gui
+++ b/Templates/BaseGame/game/tools/gui/postFxEditor.gui
@@ -96,7 +96,7 @@
canSaveDynamicFields = "0";
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/iconAdd.png";
+ bitmapAsset = "ToolsModule:iconAdd_image";
bitmapMode = "Centered";
autoFitExtents = "0";
useModifiers = "0";
@@ -122,7 +122,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/iconDelete.png";
+ bitmapAsset = "ToolsModule:iconDelete_image";
bitmapMode = "Centered";
autoFitExtents = "0";
useModifiers = "0";
diff --git a/Templates/BaseGame/game/tools/gui/profiles.ed.tscript b/Templates/BaseGame/game/tools/gui/profiles.ed.tscript
index 75223fcf8..9314bcc5d 100644
--- a/Templates/BaseGame/game/tools/gui/profiles.ed.tscript
+++ b/Templates/BaseGame/game/tools/gui/profiles.ed.tscript
@@ -60,7 +60,7 @@ new GuiControlProfile (ToolsGuiDefaultProfile)
fontColorSEL= EditorSettings.value("Theme/fieldTextSELColor");
// bitmap information
- bitmap = "";
+ bitmapAsset = "";
bitmapBase = "";
textOffset = "0 0";
diff --git a/Templates/BaseGame/game/tools/guiEditor/gui/guiEditor.ed.gui b/Templates/BaseGame/game/tools/guiEditor/gui/guiEditor.ed.gui
index 24f005009..a3fc69c28 100644
--- a/Templates/BaseGame/game/tools/guiEditor/gui/guiEditor.ed.gui
+++ b/Templates/BaseGame/game/tools/guiEditor/gui/guiEditor.ed.gui
@@ -71,7 +71,7 @@
canSaveDynamicFields = "0";
new GuiBitmapButtonCtrl(GHWorldEditor) {
- bitmap = "tools/worldEditor/images/toolbar/world";
+ bitmapAsset = "ToolsModule:world_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "0";
@@ -93,7 +93,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl(GHGuiEditor) {
- bitmap = "tools/worldEditor/images/toolbar/gui";
+ bitmapAsset = "ToolsModule:gui_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "0";
@@ -114,7 +114,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/worldEditor/images/toolbar/playbutton";
+ bitmapAsset = "ToolsModule:playbutton_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "0";
@@ -152,7 +152,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Asset Browser";
hovertime = "750";
- bitmap = "tools/gui/images/stencilIcons/menuGrid";
+ bitmapAsset = "ToolsModule:menuGrid_image";
bitmapMode = "Stretched";
buttonType = "PushButton";
groupNum = "0";
@@ -272,7 +272,7 @@
canSaveDynamicFields = "0";
new GuiBitmapButtonCtrl(GuiEditorSnapCheckBox) {
- bitmap = "tools/gui/images/GUI-editor/snap-grid";
+ bitmapAsset = "ToolsModule:snap_grid_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "-1";
@@ -293,7 +293,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl(GuiEditorEdgeSnapping_btn) {
- bitmap = "tools/gui/images/GUI-editor/edgesnap";
+ bitmapAsset = "ToolsModule:edgesnap_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "-1";
@@ -315,7 +315,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl(GuiEditorCenterSnapping_btn) {
- bitmap = "tools/gui/images/GUI-editor/centersnap";
+ bitmapAsset = "ToolsModule:centersnap_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "-1";
@@ -368,7 +368,7 @@
canSaveDynamicFields = "0";
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/GUI-editor/align-left";
+ bitmapAsset = "ToolsModule:align_left_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "-1";
@@ -390,7 +390,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/GUI-editor/vertical-center";
+ bitmapAsset = "ToolsModule:vertical_center_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "-1";
@@ -412,7 +412,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/GUI-editor/align-right";
+ bitmapAsset = "ToolsModule:align_right_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "-1";
@@ -449,7 +449,7 @@
canSaveDynamicFields = "0";
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/GUI-editor/align-top";
+ bitmapAsset = "ToolsModule:align_top_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "-1";
@@ -471,7 +471,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/GUI-editor/horizontal-center";
+ bitmapAsset = "ToolsModule:horizontal_center_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "-1";
@@ -493,7 +493,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/GUI-editor/align-bottom";
+ bitmapAsset = "ToolsModule:align_bottom_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "-1";
@@ -562,7 +562,7 @@
canSaveDynamicFields = "0";
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/GUI-editor/send-to-back";
+ bitmapAsset = "ToolsModule:send_to_back_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "-1";
@@ -584,7 +584,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/GUI-editor/bring-to-front";
+ bitmapAsset = "ToolsModule:bring_to_front_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "-1";
@@ -621,7 +621,7 @@
canSaveDynamicFields = "0";
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/GUI-editor/distribute-horizontal";
+ bitmapAsset = "ToolsModule:distribute_horizontal_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "-1";
@@ -643,7 +643,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/GUI-editor/distribute-vertical";
+ bitmapAsset = "ToolsModule:distribute_vertical_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
groupNum = "-1";
@@ -886,7 +886,7 @@
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/clear-icon";
+ bitmapAsset = "ToolsModule:clear_icon_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -1199,7 +1199,7 @@
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/clear-icon";
+ bitmapAsset = "ToolsModule:clear_icon_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -1322,7 +1322,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/save-icon";
+ bitmapAsset = "ToolsModule:save_icon_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -1342,7 +1342,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/save-as";
+ bitmapAsset = "ToolsModule:save_as_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -1439,7 +1439,7 @@
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -1458,7 +1458,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -1477,7 +1477,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -1496,7 +1496,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
diff --git a/Templates/BaseGame/game/tools/levels/DefaultEditorLevel.asset.taml b/Templates/BaseGame/game/tools/levels/DefaultEditorLevel.asset.taml
index 6f9c427a0..5fdb84bfc 100644
--- a/Templates/BaseGame/game/tools/levels/DefaultEditorLevel.asset.taml
+++ b/Templates/BaseGame/game/tools/levels/DefaultEditorLevel.asset.taml
@@ -6,5 +6,13 @@
LevelName="DefaultEditorLevel"
isSubScene="false"
description="An empty room"
- staticObjectAssetDependency0="@Asset=Prototyping:FloorGray"
+ previewImageAsset0="@asset=ToolsModule:DefaultEditorLevel_preview_image"
+ previewImageAsset1="@asset=ToolsModule:DefaultEditorLevel_preview_image"
+ previewImageAsset2="@asset=ToolsModule:DefaultEditorLevel_preview_image"
+ previewImageAsset3="@asset=ToolsModule:DefaultEditorLevel_preview_image"
+ previewImageAsset4="@asset=ToolsModule:DefaultEditorLevel_preview_image"
+ previewImageAsset5="@asset=ToolsModule:DefaultEditorLevel_preview_image"
+ previewImageAsset6="@asset=ToolsModule:DefaultEditorLevel_preview_image"
+ staticObjectAssetDependency0="@asset=Prototyping:FloorGray"
+ staticObjectAssetDependency1="@asset=FPSGameplay:soldier_rigged"
VersionId="1" />
diff --git a/Templates/BaseGame/game/tools/levels/EditorTemplateLevel.asset.taml b/Templates/BaseGame/game/tools/levels/EditorTemplateLevel.asset.taml
index d48d5b05a..439efbdf7 100644
--- a/Templates/BaseGame/game/tools/levels/EditorTemplateLevel.asset.taml
+++ b/Templates/BaseGame/game/tools/levels/EditorTemplateLevel.asset.taml
@@ -5,4 +5,11 @@
LevelFile="@assetFile=EditorTemplateLevel.mis"
LevelName="EditorTemplateLevel"
isSubScene="false"
+ previewImageAsset0="@asset=ToolsModule:DefaultEditorLevel_preview_image"
+ previewImageAsset1="@asset=ToolsModule:DefaultEditorLevel_preview_image"
+ previewImageAsset2="@asset=ToolsModule:DefaultEditorLevel_preview_image"
+ previewImageAsset3="@asset=ToolsModule:DefaultEditorLevel_preview_image"
+ previewImageAsset4="@asset=ToolsModule:DefaultEditorLevel_preview_image"
+ previewImageAsset5="@asset=ToolsModule:DefaultEditorLevel_preview_image"
+ previewImageAsset6="@asset=ToolsModule:DefaultEditorLevel_preview_image"
VersionId="1" />
diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/MaterialToolbar.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialToolbar.ed.gui
index cef7cab7b..e20674037 100644
--- a/Templates/BaseGame/game/tools/materialEditor/gui/MaterialToolbar.ed.gui
+++ b/Templates/BaseGame/game/tools/materialEditor/gui/MaterialToolbar.ed.gui
@@ -59,7 +59,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Select and Edit an Existing Material";
hovertime = "1000";
- bitmap = "tools/materialEditor/gui/materialSelectorIcon";
+ bitmapAsset = "ToolsModule:materialSelectorIcon_n_image";
text = "";
groupNum = "-1";
buttonType = "PushButton";
diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.tscript
index 701ef2d8f..f1486903a 100644
--- a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.tscript
+++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cubepreview.tscript
@@ -1,7 +1,7 @@
singleton TSShapeConstructor(cubemaped_cubepreviewdts)
{
- baseShape = "./cubemaped_cubepreview.dts";
+ baseShapeAsset = "ToolsModule:cubemaped_cubepreview";
singleDetailSize = "0";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.tscript
index 49da54602..8d19aaf62 100644
--- a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.tscript
+++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_cylinderpreview.tscript
@@ -1,7 +1,7 @@
singleton TSShapeConstructor(cubemaped_cylinderpreviewdts)
{
- baseShape = "./cubemaped_cylinderpreview.dts";
+ baseShapeAsset = "ToolsModule:cubemaped_cylinderpreview";
singleDetailSize = "0";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.tscript
index 00c165fed..0d1674c32 100644
--- a/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.tscript
+++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubemaped_spherepreview.tscript
@@ -1,7 +1,7 @@
singleton TSShapeConstructor(cubemaped_spherepreviewdts)
{
- baseShape = "./cubemaped_spherepreview.dts";
+ baseShapeAsset = "ToolsModule:cubemaped_spherepreview";
singleDetailSize = "0";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.tscript
index 1e0e42a22..e02588465 100644
--- a/Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.tscript
+++ b/Templates/BaseGame/game/tools/materialEditor/gui/cubepreview.tscript
@@ -1,7 +1,7 @@
singleton TSShapeConstructor(cubepreviewdts)
{
- baseShape = "./cubepreview.dts";
+ baseShapeAsset = "ToolsModule:cubepreview";
singleDetailSize = "0";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.tscript
index f2b56a147..a657c2304 100644
--- a/Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.tscript
+++ b/Templates/BaseGame/game/tools/materialEditor/gui/cylinderpreview.tscript
@@ -1,7 +1,7 @@
singleton TSShapeConstructor(cylinderpreviewdts)
{
- baseShape = "./cylinderpreview.dts";
+ baseShapeAsset = "ToolsModule:cylinderpreview";
singleDetailSize = "0";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui
index fec0fbd08..93f3b6b85 100644
--- a/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui
+++ b/Templates/BaseGame/game/tools/materialEditor/gui/guiMaterialPropertiesWindow.ed.gui
@@ -112,7 +112,7 @@
Extent = "17 17";
HorizSizing = "left";
tooltip = "Swap material on the object with existing";
- bitmap = "tools/materialEditor/gui/change-material-btn";
+ bitmapAsset = "ToolsModule:change_material_btn_n_image";
command = "materialSelector.showDialog(\"MaterialEditorGui.showMaterialChangeSaveDialog\");";
};
@@ -299,7 +299,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
};
new GuiTextCtrl() {
canSaveDynamicFields = "0";
@@ -399,7 +399,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
};
};
new GuiBitmapCtrl(){
@@ -473,7 +473,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
};
new GuiTextCtrl() {
canSaveDynamicFields = "0";
@@ -525,7 +525,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
};
};
};
@@ -828,7 +828,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
};
new GuiTextCtrl() {
canSaveDynamicFields = "0";
@@ -880,7 +880,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
};
};
new GuiBitmapCtrl() {
@@ -929,7 +929,7 @@
maxLength = "1024";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/save-icon";
+ bitmapAsset = "ToolsModule:save_icon_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -1033,7 +1033,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -1102,7 +1102,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -1269,7 +1269,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -1338,7 +1338,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -1505,7 +1505,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -1574,7 +1574,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -1757,7 +1757,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -1826,7 +1826,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -1989,7 +1989,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
};
new GuiTextCtrl() { // Detailmap Scale text
@@ -2081,7 +2081,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
};
};
new GuiBitmapCtrl(){
@@ -2134,7 +2134,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
};
new GuiTextCtrl() { // Detail Normal Map Strength text
@@ -2226,7 +2226,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
};
};
new GuiBitmapCtrl(){
@@ -2279,7 +2279,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
};
new GuiTextCtrl() {
canSaveDynamicFields = "0";
@@ -2353,7 +2353,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
};
};
new GuiBitmapCtrl(){
@@ -2427,7 +2427,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
};
new GuiTextCtrl() {
canSaveDynamicFields = "0";
@@ -2479,7 +2479,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
};
};
new GuiBitmapCtrl(){
@@ -2553,7 +2553,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
};
new GuiTextCtrl() {
canSaveDynamicFields = "0";
@@ -2605,7 +2605,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
};
};
};
@@ -3892,7 +3892,7 @@
buttonType = "RadioButton";
position = "1 0";
Extent = "13 13";
- bitmap = "tools/materialEditor/gui/wav-sine";
+ bitmapAsset = "ToolsModule:wav_sine_n_image";
command = "MaterialEditorGui.updateWaveType();";
tooltip="Sine Wave";
hovertime = "1000";
@@ -3904,7 +3904,7 @@
buttonType = "RadioButton";
position = "17 0";
Extent = "13 13";
- bitmap = "tools/materialEditor/gui/wav-triangle";
+ bitmapAsset = "ToolsModule:wav_triangle_n_image";
command = "MaterialEditorGui.updateWaveType();";
tooltip="Triangle Wave";
hovertime = "1000";
@@ -3916,7 +3916,7 @@
buttonType = "RadioButton";
position = "33 0";
Extent = "13 13";
- bitmap = "tools/materialEditor/gui/wav-square";
+ bitmapAsset = "ToolsModule:wav_square_n_image";
command = "MaterialEditorGui.updateWaveType();";
tooltip="Square Wave";
hovertime = "1000";
@@ -4703,7 +4703,7 @@
Visible = "0";
//Command = "materialSelector.showDialog(\"MaterialEditorGui.switchMaterial\");";
hovertime = "1000";
- bitmap = "tools/gui/images/folderUp";
+ bitmapAsset = "ToolsModule:folderUp_image";
tooltip = "Go back to previous editor";
groupNum = "-1";
buttonType = "PushButton";
@@ -4722,7 +4722,7 @@
Visible = "1";
Command = "AssetBrowser.showDialog(\"MaterialAsset\", \"MaterialEditorGui.selectMaterialAsset\");";
hovertime = "1000";
- bitmap = "tools/gui/images/open-file";
+ bitmapAsset = "ToolsModule:open_file_n_image";
tooltip = "Open Existing Material";
groupNum = "-1";
buttonType = "PushButton";
@@ -4770,7 +4770,7 @@
tooltip = "Save Material (ALT S)";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/save-icon";
+ bitmapAsset = "ToolsModule:save_icon_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -4791,7 +4791,7 @@
tooltip = "Lookup Material Instances";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/visible";
+ bitmapAsset = "ToolsModule:visible_n_image";
};
new GuiBitmapCtrl(){
position = "147 1";
@@ -4818,7 +4818,7 @@
hovertime = "1000";
tooltip = "Revert Material to Saved";
text = "";
- bitmap = "tools/gui/images/reset-icon";
+ bitmapAsset = "ToolsModule:reset_icon_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -4840,7 +4840,7 @@
hovertime = "1000";
tooltip = "Clear All Material Properties";
text = "";
- bitmap = "tools/gui/images/clear-icon";
+ bitmapAsset = "ToolsModule:clear_icon_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -4862,7 +4862,7 @@
hovertime = "1000";
tooltip = "Delete Material from File";
text = "";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/gui_gridTiny2_image.asset.taml b/Templates/BaseGame/game/tools/materialEditor/gui/gui_gridTiny2_image.asset.taml
new file mode 100644
index 000000000..c22814db6
--- /dev/null
+++ b/Templates/BaseGame/game/tools/materialEditor/gui/gui_gridTiny2_image.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/materialInstancesView.ed.gui b/Templates/BaseGame/game/tools/materialEditor/gui/materialInstancesView.ed.gui
index ce5c683de..e7899e547 100644
--- a/Templates/BaseGame/game/tools/materialEditor/gui/materialInstancesView.ed.gui
+++ b/Templates/BaseGame/game/tools/materialEditor/gui/materialInstancesView.ed.gui
@@ -75,7 +75,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl(MaterialInstanceFilterBtn) {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.tscript
index a2b5811f9..c4d1e494f 100644
--- a/Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.tscript
+++ b/Templates/BaseGame/game/tools/materialEditor/gui/pyramidpreview.tscript
@@ -1,7 +1,7 @@
singleton TSShapeConstructor(pyramidpreviewdts)
{
- baseShape = "./pyramidpreview.dts";
+ baseShapeAsset = "ToolsModule:pyramidpreview";
singleDetailSize = "0";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.tscript
index 8f808fa6e..738c1324e 100644
--- a/Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.tscript
+++ b/Templates/BaseGame/game/tools/materialEditor/gui/spherepreview.tscript
@@ -1,7 +1,7 @@
singleton TSShapeConstructor(spherepreviewdts)
{
- baseShape = "./spherepreview.dts";
+ baseShapeAsset = "ToolsModule:spherepreview";
singleDetailSize = "0";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.tscript
index f6829ce9a..8c8925c51 100644
--- a/Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.tscript
+++ b/Templates/BaseGame/game/tools/materialEditor/gui/torusknotpreview.tscript
@@ -1,7 +1,7 @@
singleton TSShapeConstructor(torusknotpreviewdts)
{
- baseShape = "./torusknotpreview.dts";
+ baseShapeAsset = "ToolsModule:torusknotpreview";
singleDetailSize = "0";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.tscript
index cafa0db6a..d648d51ba 100644
--- a/Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.tscript
+++ b/Templates/BaseGame/game/tools/materialEditor/gui/torusknowpreview.tscript
@@ -1,7 +1,7 @@
singleton TSShapeConstructor(torusknowpreviewdts)
{
- baseShape = "./torusknowpreview.dts";
+ baseShapeAsset = "ToolsModule:torusknowpreview";
singleDetailSize = "0";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
diff --git a/Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.tscript b/Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.tscript
index 234e7610d..a0ac93f16 100644
--- a/Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.tscript
+++ b/Templates/BaseGame/game/tools/materialEditor/gui/toruspreview.tscript
@@ -1,7 +1,7 @@
singleton TSShapeConstructor(toruspreviewdts)
{
- baseShape = "./toruspreview.dts";
+ baseShapeAsset = "ToolsModule:toruspreview";
singleDetailSize = "0";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
diff --git a/Templates/BaseGame/game/tools/materialEditor/main.tscript b/Templates/BaseGame/game/tools/materialEditor/main.tscript
index 5bca2fa6f..3b7fa5c4b 100644
--- a/Templates/BaseGame/game/tools/materialEditor/main.tscript
+++ b/Templates/BaseGame/game/tools/materialEditor/main.tscript
@@ -64,7 +64,7 @@ function MaterialEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the ToolsToolbar
%tooltip = "Material Editor (" @ %accel @ ")";
- EditorGui.addToToolsToolbar( "MaterialEditorPlugin", "MaterialEditorPalette", expandFilename("tools/worldEditor/images/toolbar/material-editor"), %tooltip );
+ EditorGui.addToToolsToolbar( "MaterialEditorPlugin", "MaterialEditorPalette", "ToolsModule:material_editor_n_image", %tooltip );
//connect editor windows
GuiWindowCtrl::attach( MaterialEditorPropertiesWindow, MaterialEditorPreviewWindow);
@@ -163,4 +163,4 @@ function MaterialEditorPlugin::onDeactivated( %this )
%this.map.pop();
Parent::onDeactivated(%this);
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEd_justAlphaMaterial.asset.taml b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEd_justAlphaMaterial.asset.taml
new file mode 100644
index 000000000..e567baec9
--- /dev/null
+++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEd_justAlphaMaterial.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEd_previewMaterial.asset.taml b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEd_previewMaterial.asset.taml
new file mode 100644
index 000000000..22c8bb0ee
--- /dev/null
+++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEd_previewMaterial.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript
index 50d11020d..44b4f0971 100644
--- a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript
+++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript
@@ -28,12 +28,12 @@ function MaterialEditorGui::establishMaterials(%this)
//Cubemap used to preview other cubemaps in the editor.
singleton CubemapData( matEdCubeMapPreviewMat )
{
- cubeFace[0] = "tools/materialEditor/gui/cube_xNeg";
- cubeFace[1] = "tools/materialEditor/gui/cube_xPos";
- cubeFace[2] = "tools/materialEditor/gui/cube_ZNeg";
- cubeFace[3] = "tools/materialEditor/gui/cube_ZPos";
- cubeFace[4] = "tools/materialEditor/gui/cube_YNeg";
- cubeFace[5] = "tools/materialEditor/gui/cube_YPos";
+ cubeMapFaceAsset[0] = "ToolsModule:cube_xNeg_image";
+ cubeMapFaceAsset[1] = "ToolsModule:cube_xPos_image";
+ cubeMapFaceAsset[2] = "ToolsModule:cube_zNeg_image";
+ cubeMapFaceAsset[3] = "ToolsModule:cube_zPos_image";
+ cubeMapFaceAsset[4] = "ToolsModule:cube_yNeg_image";
+ cubeMapFaceAsset[5] = "ToolsModule:cube_yPos_image";
parentGroup = "RootGroup";
};
@@ -1690,12 +1690,12 @@ function MaterialEditorGui::createNewCubemap( %this, %cubemap )
new CubemapData(%cubemap)
{
- cubeFace[0] = "tools/materialEditor/gui/cube_xNeg";
- cubeFace[1] = "tools/materialEditor/gui/cube_xPos";
- cubeFace[2] = "tools/materialEditor/gui/cube_ZNeg";
- cubeFace[3] = "tools/materialEditor/gui/cube_ZPos";
- cubeFace[4] = "tools/materialEditor/gui/cube_YNeg";
- cubeFace[5] = "tools/materialEditor/gui/cube_YPos";
+ cubeMapFaceAsset[0] = "ToolsModule:cube_xNeg_image";
+ cubeMapFaceAsset[1] = "ToolsModule:cube_xPos_image";
+ cubeMapFaceAsset[2] = "ToolsModule:cube_zNeg_image";
+ cubeMapFaceAsset[3] = "ToolsModule:cube_zPos_image";
+ cubeMapFaceAsset[4] = "ToolsModule:cube_yNeg_image";
+ cubeMapFaceAsset[5] = "ToolsModule:cube_yPos_image";
parentGroup = RootGroup;
};
diff --git a/Templates/BaseGame/game/tools/meshRoadEditor/main.tscript b/Templates/BaseGame/game/tools/meshRoadEditor/main.tscript
index 3f5df2c7e..de5ed8197 100644
--- a/Templates/BaseGame/game/tools/meshRoadEditor/main.tscript
+++ b/Templates/BaseGame/game/tools/meshRoadEditor/main.tscript
@@ -76,7 +76,7 @@ function MeshRoadEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the ToolsToolbar
%tooltip = "Mesh Road Editor (" @ %accel @ ")";
- EditorGui.addToToolsToolbar( "MeshRoadEditorPlugin", "MeshRoadEditorPalette", expandFilename("tools/worldEditor/images/toolbar/mesh-road-editor"), %tooltip );
+ EditorGui.addToToolsToolbar( "MeshRoadEditorPlugin", "MeshRoadEditorPalette", "ToolsModule:mesh_road_editor_n_image", %tooltip );
//connect editor windows
GuiWindowCtrl::attach( MeshRoadEditorOptionsWindow, MeshRoadEditorTreeWindow);
@@ -223,4 +223,4 @@ function MeshRoadEditorPlugin::writeSettings( %this )
EditorSettings.setValue( "SideMaterialName", MeshRoadEditorGui.sideMaterialName );
EditorSettings.endGroup();
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui b/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui
index 14444b62d..08d006a2b 100644
--- a/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui
+++ b/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorToolbar.gui
@@ -52,7 +52,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
toolTip = "Show Spline (Z)";
- bitmap = "tools/worldEditor/images/road-river/menubar/show-spline";
+ bitmapAsset = "ToolsModule:show_spline_n_image";
groupNum = "7";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -75,7 +75,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
toolTip = "Show Wireframe (X)";
- bitmap = "tools/worldEditor/images/road-river/menubar/show-wireframe";
+ bitmapAsset = "ToolsModule:menubar_show_wireframe_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -98,7 +98,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
toolTip = "Show Road Texture (V)";
- bitmap = "tools/worldEditor/images/road-river/menubar/show-texture";
+ bitmapAsset = "ToolsModule:show_texture_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -121,7 +121,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
toolTip = "Show Road Profile (P)";
- bitmap = "tools/worldEditor/images/road-river/menubar/show-profile";
+ bitmapAsset = "ToolsModule:show_profile_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -203,7 +203,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
};
};
new GuiControl(MeshRoadDefaultDepthTextEditContainer) {
@@ -281,7 +281,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
};
};
};
@@ -342,4 +342,4 @@ new GuiMouseEventCtrl(MeshRoadDefaultDepthSliderCtrlContainer, EditorGuiGroup) {
ticks = "0";
value = "10";
};
-};
\ No newline at end of file
+};
diff --git a/Templates/BaseGame/game/tools/missionAreaEditor/main.tscript b/Templates/BaseGame/game/tools/missionAreaEditor/main.tscript
index 2fabe6d59..bb69b4b35 100644
--- a/Templates/BaseGame/game/tools/missionAreaEditor/main.tscript
+++ b/Templates/BaseGame/game/tools/missionAreaEditor/main.tscript
@@ -57,7 +57,7 @@ function MissionAreaEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the ToolsToolbar
%tooltip = "Mission Area Editor (" @ %accel @ ")";
- EditorGui.addToToolsToolbar( "MissionAreaEditorPlugin", "MissionAreaEditorPalette", expandFilename("tools/missionAreaEditor/images/mission-area"), %tooltip );
+ EditorGui.addToToolsToolbar( "MissionAreaEditorPlugin", "MissionAreaEditorPalette", "ToolsModule:mission_area_n_image", %tooltip );
//connect editor windows
GuiWindowCtrl::attach( MissionAreaEditorPropertiesWindow, MissionAreaEditorTerrainWindow);
diff --git a/Templates/BaseGame/game/tools/navEditor/main.tscript b/Templates/BaseGame/game/tools/navEditor/main.tscript
index 03b0bb2b6..2aa987baa 100644
--- a/Templates/BaseGame/game/tools/navEditor/main.tscript
+++ b/Templates/BaseGame/game/tools/navEditor/main.tscript
@@ -83,7 +83,7 @@ function NavEditorPlugin::onWorldEditorStartup(%this)
// Add ourselves to the ToolsToolbar.
%tooltip = "Navigation Editor (" @ %accel @ ")";
- EditorGui.addToToolsToolbar("NavEditorPlugin", "NavEditorPalette", expandFilename("tools/navEditor/images/nav-editor"), %tooltip);
+ EditorGui.addToToolsToolbar("NavEditorPlugin", "NavEditorPalette", "ToolsModule:nav_editor_n_image", %tooltip);
GuiWindowCtrl::attach(NavEditorOptionsWindow, NavEditorTreeWindow);
diff --git a/Templates/BaseGame/game/tools/particleEditor/ParticleEditor.ed.gui b/Templates/BaseGame/game/tools/particleEditor/ParticleEditor.ed.gui
index 5c3afca74..8ed697c1c 100644
--- a/Templates/BaseGame/game/tools/particleEditor/ParticleEditor.ed.gui
+++ b/Templates/BaseGame/game/tools/particleEditor/ParticleEditor.ed.gui
@@ -234,7 +234,7 @@ $PE_guielement_ext_colorpicker = "18 18";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/save-icon";
+ bitmapAsset = "ToolsModule:save_icon_n_image";
command = "PE_EmitterEditor.saveEmitter( " @ PE_EmitterEditor.currEmitter @ " ); PE_ParticleEditor.saveParticle( PE_ParticleEditor.currParticle );";
tooltip = "Save Current Emitter";
};
@@ -255,7 +255,7 @@ $PE_guielement_ext_colorpicker = "18 18";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
tooltip = "Delete Current Emitter";
};
};
@@ -1363,7 +1363,7 @@ $PE_guielement_ext_colorpicker = "18 18";
hovertime = "1000";
tooltip = "Clear Particle 2 from Emitter";
text = "";
- bitmap = "tools/gui/images/clear-icon";
+ bitmapAsset = "ToolsModule:clear_icon_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -1411,7 +1411,7 @@ $PE_guielement_ext_colorpicker = "18 18";
hovertime = "1000";
tooltip = "Clear Particle 3 from Emitter";
text = "";
- bitmap = "tools/gui/images/clear-icon";
+ bitmapAsset = "ToolsModule:clear_icon_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -1459,7 +1459,7 @@ $PE_guielement_ext_colorpicker = "18 18";
hovertime = "1000";
tooltip = "Clear Particle 4 from Emitter";
text = "";
- bitmap = "tools/gui/images/clear-icon";
+ bitmapAsset = "ToolsModule:clear_icon_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -1876,7 +1876,7 @@ $PE_guielement_ext_colorpicker = "18 18";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/new";
+ bitmapAsset = "ToolsModule:new_n_image";
tooltip = "Add New Particle To Current Emitter";
useModifiers = "1";
};
@@ -1896,7 +1896,7 @@ $PE_guielement_ext_colorpicker = "18 18";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/save-icon";
+ bitmapAsset = "ToolsModule:save_icon_n_image";
command = "PE_ParticleEditor.saveParticle( PE_ParticleEditor.currParticle );";
tooltip = "Save Current Particle";
};
@@ -1917,7 +1917,7 @@ $PE_guielement_ext_colorpicker = "18 18";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
tooltip = "Delete Current Particle";
};
};
@@ -2021,7 +2021,7 @@ $PE_guielement_ext_colorpicker = "18 18";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -2042,7 +2042,7 @@ $PE_guielement_ext_colorpicker = "18 18";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
Command = "PE_ParticleEditor.updateParticleTexture(1);";
};
new GuiCheckBoxCtrl() {
@@ -3865,7 +3865,7 @@ $PE_guielement_ext_colorpicker = "18 18";
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Play Particle Effect from Start";
hovertime = "1000";
- bitmap = "tools/particleEditor/images/play_btn";
+ bitmapAsset = "ToolsModule:play_btn_n_image";
buttonType = "PushButton";
groupNum = "-1";
text = "";
@@ -3888,7 +3888,7 @@ $PE_guielement_ext_colorpicker = "18 18";
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Drops Particle Effect in front of the Camera";
hovertime = "1000";
- bitmap = "tools/classIcons/camera";
+ bitmapAsset = "ToolsModule:camera_image";
buttonType = "PushButton";
groupNum = "-1";
text = "";
diff --git a/Templates/BaseGame/game/tools/particleEditor/main.tscript b/Templates/BaseGame/game/tools/particleEditor/main.tscript
index d00645623..f09f2f747 100644
--- a/Templates/BaseGame/game/tools/particleEditor/main.tscript
+++ b/Templates/BaseGame/game/tools/particleEditor/main.tscript
@@ -80,7 +80,7 @@ function ParticleEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the ToolsToolbar
%tooltip = "Particle Editor (" @ %accel @ ")";
- EditorGui.addToToolsToolbar( "ParticleEditorPlugin", "ParticleEditorPalette", expandFilename("tools/worldEditor/images/toolbar/particleeditor"), %tooltip );
+ EditorGui.addToToolsToolbar( "ParticleEditorPlugin", "ParticleEditorPalette", "ToolsModule:particleeditor_n_image", %tooltip );
}
//---------------------------------------------------------------------------------------------
diff --git a/Templates/BaseGame/game/tools/projectImporter/guis/projectImporter.gui b/Templates/BaseGame/game/tools/projectImporter/guis/projectImporter.gui
index 5b168f7b9..b308feed3 100644
--- a/Templates/BaseGame/game/tools/projectImporter/guis/projectImporter.gui
+++ b/Templates/BaseGame/game/tools/projectImporter/guis/projectImporter.gui
@@ -957,7 +957,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/iconInformation.png";
+ bitmapAsset = "ToolsModule:iconInformation_image";
bitmapMode = "Centered";
autoFitExtents = "0";
useModifiers = "0";
diff --git a/Templates/BaseGame/game/tools/projectImporter/main.tscript b/Templates/BaseGame/game/tools/projectImporter/main.tscript
index d6e157886..2766b4bad 100644
--- a/Templates/BaseGame/game/tools/projectImporter/main.tscript
+++ b/Templates/BaseGame/game/tools/projectImporter/main.tscript
@@ -55,4 +55,4 @@ function ProjectImporterPlugin::initSettings( %this )
EditorSettings.beginGroup( "ProjectImporter", true );
EditorSettings.endGroup();
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript b/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript
index 73ec6f722..adc197bc1 100644
--- a/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript
+++ b/Templates/BaseGame/game/tools/projectImporter/scripts/pre40/T3Dpre4ProjectImporter.tscript
@@ -543,25 +543,38 @@ function T3Dpre4ProjectImporter::beginCodeFilesImport(%this)
%scriptExtRemovedLine = strReplace(%line, ".cs", "");
%scriptExtRemovedLine = strReplace(%scriptExtRemovedLine, ".tscript", "");
%line = %scriptExtRemovedLine;
+ %fileWasChanged = true;
}
else if(strIsMatchExpr("*queueexec(*.cs*)*", %line) || strIsMatchExpr("*queueexec(*.tscript*)*", %line))
{
%scriptExtRemovedLine = strReplace(%line, ".cs", "");
%scriptExtRemovedLine = strReplace(%scriptExtRemovedLine, ".tscript", "");
%line = %scriptExtRemovedLine;
+ %fileWasChanged = true;
}
else if(strIsMatchExpr("*registerDatablock(*.cs*)*", %line) || strIsMatchExpr("*registerDatablock(*.tscript*)*", %line))
{
%scriptExtRemovedLine = strReplace(%line, ".cs", "");
%scriptExtRemovedLine = strReplace(%scriptExtRemovedLine, ".tscript", "");
%line = %scriptExtRemovedLine;
+ %fileWasChanged = true;
+
+ }
+ else if(strIsMatchExpr("*%this.addSequence(\"*);", %line))
+ {
+ %outLine = processLegacyShapeConstructorField(%line);
+ if(%line !$= %outLine)
+ {
+ %fileWasChanged = true;
+ %line = %outLine;
+ }
}
else
{
if(%objectClassStack.count() != 0)
{
%currentObjClass = %objectClassStack.getKey(%objectClassStack.count()-1);
-
+
%inheritanceList = getClassHierarchy(%currentObjClass);
for (%classDepth =0; %classDepthnextButton.setActive(false);
if(!$ProjectImporter::useExistingModule)
- $ProjectImporter::moduleName = ProjectImportWizardPage3-->newModuleName.getText();
+ $ProjectImporter::moduleName = ProjectImportWizardPage3-->newModuleName.getText();
$ProjectImporter::modulePath = "data/" @ $ProjectImporter::moduleName;
@@ -374,7 +374,7 @@ function testFilenameExtensions(%filename)
else if(isFile(%filename @ ".dds"))
return %filename @ ".dds";
- return "";
+ return %filename;
}
function processLegacyField(%line, %originalFieldName, %newFieldName)
@@ -489,6 +489,95 @@ function processLegacyField(%line, %originalFieldName, %newFieldName)
}
}
+function processLegacyShapeConstructorField(%line)
+{
+ if(!strIsMatchExpr("*%this.addSequence(\"*);", %line))
+ return %line;
+
+ %outLine = %line;
+
+ %animSourceStart = strPos(%line, "%this.addSequence(\"") + 19;
+ %animSourceEnd = strPos(%line, "\",", %animSourceStart);
+ %animationSource = getSubstr(%line, %animSourceStart, %animSourceEnd-%animSourceStart);
+ %animSourcePath = getWord(%animationSource, 0);
+ %animSourceName = getWord(%animationSource, 1);
+
+ //already uses an asset, so we'll skip
+ if(strPos(%animSourcePath, ":") != -1)
+ return %line;
+
+ //otherwise, try and see if we've got an animation source file here
+ if(startsWith(%animSourcePath, "./"))
+ {
+ %targetFilename = strReplace(%animSourcePath, "./", $ProjectImporter::currentFilePath @ "/");
+ }
+ else if(startsWith(%animSourcePath, "../"))
+ {
+ %slashPos = strposr($ProjectImporter::currentFilePath, "/");
+ if(%slashPos == strlen($ProjectImporter::currentFilePath)-1) //if it's right at the end, we'll get the next one up
+ {
+ %slashPos = strposr($ProjectImporter::currentFilePath, "/", 2);
+ }
+
+ %parentPath = getSubStr($ProjectImporter::currentFilePath, 0, %slashPos);
+ %targetFilename = strReplace(%animSourcePath, "../", %parentPath @ "/");
+ }
+ else if(startsWith(%animSourcePath, "~"))
+ {
+ %targetFilename = strReplace(%animSourcePath, "~", $ProjectImporter::modulePath @ "/");
+ if(!isFile(%targetFilename))
+ {
+ %targetFilename = strReplace(%animSourcePath, "~", $ProjectImporter::modulePath @ "/main/");
+ }
+ }
+ else if ((strpos(%animSourcePath,"/") == -1)&&(strpos(%animSourcePath,"\\") == -1))
+ {
+ %targetFilename = $ProjectImporter::currentFilePath @ %animSourcePath;
+ }
+ else if(!startsWith(%animSourcePath, $ProjectImporter::modulePath @ "/"))
+ {
+ %targetFilename = $ProjectImporter::modulePath @ "/" @ %animSourcePath;
+ }
+ else
+ {
+ %targetFilename = %animSourcePath;
+ }
+
+ %targetFilename = strReplace(%targetFilename, "//", "/");
+ %targetFilename = testFilenameExtensions(%targetFilename);
+
+ if(!isFile(%targetFilename))
+ {
+ return %line;
+ }
+
+ $ProjectImporter::assetQuery.clear();
+ %foundAssets = AssetDatabase.findAssetLooseFile($ProjectImporter::assetQuery, %targetFilename);
+ if(%foundAssets != 0)
+ {
+ %assetId = $ProjectImporter::assetQuery.getAsset(0);
+ echo("Legacy Project Importer - processing of legacy shape constructor addSequence line's value: " @ %value @ " has found a matching AssetId: " @ %assetId);
+ }
+
+ if(%assetId !$= "" && AssetDatabase.isDeclaredAsset(%assetId))
+ {
+ //if (%assetId.getStatusString() $= "Ok")
+ %outLine = strReplace(%line, %animSourcePath, %assetId);
+ //else
+ // error("Asset assignment failure:", %assetId, getStatusString());
+ }
+
+ if(%outLine !$= %line)
+ {
+ echo("Legacy Project Importer - processing of legacy shape constructor addSequence line: " @ %line @ " has been updated to: " @ %outLine);
+ return %outLine;
+ }
+ else
+ {
+ return %line;
+ }
+}
+
function findObjectClass(%line, %createWord)
{
//we have a new object, add it to the stack
@@ -668,6 +757,11 @@ function beginImageImport()
if(isImageFormat(%fileExt))
{
+ if(%filename $= "skybox_1.png")
+ {
+ %aefgadfg = true;
+ }
+
$ProjectImporter::assetQuery.clear();
%assetsFound = AssetDatabase.findAssetLooseFile($ProjectImporter::assetQuery, %file);
if(%assetsFound == 0)
diff --git a/Templates/BaseGame/game/tools/resources/ReflectProbeSphere.tscript b/Templates/BaseGame/game/tools/resources/ReflectProbeSphere.tscript
index 4cd31a63e..649009a49 100644
--- a/Templates/BaseGame/game/tools/resources/ReflectProbeSphere.tscript
+++ b/Templates/BaseGame/game/tools/resources/ReflectProbeSphere.tscript
@@ -1,7 +1,7 @@
singleton TSShapeConstructor(ReflectProbeSpheredae)
{
- baseShape = "./ReflectProbeSphere.dae";
+ baseShapeAsset = "ToolsModule:ReflectProbeSphere";
singleDetailSize = "0";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
diff --git a/Templates/BaseGame/game/tools/riverEditor/RiverEditorGui.gui b/Templates/BaseGame/game/tools/riverEditor/RiverEditorGui.gui
index 1a6831489..4d4812152 100644
--- a/Templates/BaseGame/game/tools/riverEditor/RiverEditorGui.gui
+++ b/Templates/BaseGame/game/tools/riverEditor/RiverEditorGui.gui
@@ -90,7 +90,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "World Editor";
hovertime = "1000";
- bitmap = "tools/gui/images/lock";
+ bitmapAsset = "ToolsModule:lock_n_image";
buttonType = "ToggleButton";
groupNum = "-1";
text = "";
@@ -114,7 +114,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "World Editor";
hovertime = "1000";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
buttonType = "PushButton";
groupNum = "-1";
text = "";
diff --git a/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar.gui b/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar.gui
index 141e577d1..358225ce8 100644
--- a/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar.gui
+++ b/Templates/BaseGame/game/tools/riverEditor/RiverEditorToolbar.gui
@@ -52,7 +52,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
toolTip = "Show Spline";
- bitmap = "tools/worldEditor/images/road-river/menubar/show-spline";
+ bitmapAsset = "ToolsModule:show_spline_n_image";
groupNum = "7";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -76,7 +76,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
toolTip = "Show Wireframe";
- bitmap = "tools/worldEditor/images/road-river/menubar/show-wireframe";
+ bitmapAsset = "ToolsModule:menubar_show_wireframe_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -99,7 +99,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
toolTip = "Show River Texture";
- bitmap = "tools/worldEditor/images/road-river/menubar/show-texture";
+ bitmapAsset = "ToolsModule:show_texture_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -181,7 +181,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
};
};
new GuiControl(RiverDefaultDepthTextEditContainer) {
@@ -259,7 +259,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
};
};
};
@@ -320,4 +320,4 @@ new GuiMouseEventCtrl(RiverDefaultDepthSliderCtrlContainer, EditorGuiGroup) {
ticks = "0";
value = "10";
};
-};
\ No newline at end of file
+};
diff --git a/Templates/BaseGame/game/tools/riverEditor/main.tscript b/Templates/BaseGame/game/tools/riverEditor/main.tscript
index 19070038f..bbc85b926 100644
--- a/Templates/BaseGame/game/tools/riverEditor/main.tscript
+++ b/Templates/BaseGame/game/tools/riverEditor/main.tscript
@@ -76,7 +76,7 @@ function RiverEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the ToolsToolbar
%tooltip = "River Editor (" @ %accel @ ")";
- EditorGui.addToToolsToolbar( "RiverEditorPlugin", "RiverEditorPalette", expandFilename("tools/worldEditor/images/toolbar/river-editor"), %tooltip );
+ EditorGui.addToToolsToolbar( "RiverEditorPlugin", "RiverEditorPalette", "ToolsModule:river_editor_n_image", %tooltip );
//connect editor windows
GuiWindowCtrl::attach( RiverEditorOptionsWindow, RiverEditorTreeWindow);
diff --git a/Templates/BaseGame/game/tools/roadEditor/RoadEditorGui.gui b/Templates/BaseGame/game/tools/roadEditor/RoadEditorGui.gui
index 7f9eba0f6..9348f1559 100644
--- a/Templates/BaseGame/game/tools/roadEditor/RoadEditorGui.gui
+++ b/Templates/BaseGame/game/tools/roadEditor/RoadEditorGui.gui
@@ -91,7 +91,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "World Editor";
hovertime = "1000";
- bitmap = "tools/gui/images/lock";
+ bitmapAsset = "ToolsModule:lock_n_image";
buttonType = "ToggleButton";
groupNum = "-1";
text = "";
@@ -115,7 +115,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "World Editor";
hovertime = "1000";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
buttonType = "PushButton";
groupNum = "-1";
text = "";
diff --git a/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.gui b/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.gui
index bfa2e0513..e43257e16 100644
--- a/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.gui
+++ b/Templates/BaseGame/game/tools/roadEditor/RoadEditorToolbar.gui
@@ -52,7 +52,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
toolTip = "Show Spline";
- bitmap = "tools/worldEditor/images/road-river/menubar/show-spline";
+ bitmapAsset = "ToolsModule:show_spline_n_image";
groupNum = "7";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -75,7 +75,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
toolTip = "Show Wireframe";
- bitmap = "tools/worldEditor/images/road-river/menubar/show-wireframe";
+ bitmapAsset = "ToolsModule:menubar_show_wireframe_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -98,7 +98,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
toolTip = "Show Road Texture";
- bitmap = "tools/worldEditor/images/road-river/menubar/show-texture";
+ bitmapAsset = "ToolsModule:show_texture_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -180,7 +180,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
};
};
/*new GuiTextEditSliderCtrl(RoadEditorDefaultWidthSlider) {
@@ -270,4 +270,4 @@ new GuiMouseEventCtrl(RoadDefaultWidthSliderCtrlContainer, EditorGuiGroup) {
ticks = "0";
value = "10";
};
-};
\ No newline at end of file
+};
diff --git a/Templates/BaseGame/game/tools/roadEditor/main.tscript b/Templates/BaseGame/game/tools/roadEditor/main.tscript
index f54976c62..98fd44286 100644
--- a/Templates/BaseGame/game/tools/roadEditor/main.tscript
+++ b/Templates/BaseGame/game/tools/roadEditor/main.tscript
@@ -75,7 +75,7 @@ function RoadEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the ToolsToolbar
%tooltip = "Road Editor (" @ %accel @ ")";
- EditorGui.addToToolsToolbar( "RoadEditorPlugin", "RoadEditorPalette", expandFilename("tools/worldEditor/images/toolbar/road-path-editor"), %tooltip );
+ EditorGui.addToToolsToolbar( "RoadEditorPlugin", "RoadEditorPalette", "ToolsModule:road_path_editor_n_image", %tooltip );
//connect editor windows
GuiWindowCtrl::attach( RoadEditorOptionsWindow, RoadEditorTreeWindow);
diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorToolbar.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorToolbar.ed.gui
index 44b444a5e..8d5ab47d6 100644
--- a/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorToolbar.ed.gui
+++ b/Templates/BaseGame/game/tools/shapeEditor/gui/ShapeEditorToolbar.ed.gui
@@ -70,7 +70,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Show grid";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/show-grid";
+ bitmapAsset = "ToolsModule:show_grid_n_image";
text = "";
groupNum = "-1";
buttonType = "ToggleButton";
@@ -92,7 +92,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Fit Camera to Shape (F)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/fit-selection";
+ bitmapAsset = "ToolsModule:fit_selection_n_image";
text = "";
groupNum = "-1";
buttonType = "PushButton";
@@ -114,7 +114,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Orbit the selected node";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/orbit-cam";
+ bitmapAsset = "ToolsModule:orbit_cam_n_image";
text = "";
groupNum = "-1";
buttonType = "ToggleButton";
@@ -143,7 +143,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Show Nodes (N)";
hovertime = "1000";
- bitmap = "tools/shapeEditor/images/shownodes_btn";
+ bitmapAsset = "ToolsModule:shownodes_btn_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -164,7 +164,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggle shape transparency in the preview window (T)";
hovertime = "1000";
- bitmap = "tools/shapeEditor/images/ghost_btn";
+ bitmapAsset = "ToolsModule:ghost_btn_n_image";
buttonType = "ToggleButton";
groupNum = "0";
useMouseEvents = "0";
@@ -185,7 +185,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggle shape wireframe in the preview window (R)";
hovertime = "1000";
- bitmap = "tools/shapeEditor/images/show-wireframe";
+ bitmapAsset = "ToolsModule:show_wireframe_n_image";
buttonType = "ToggleButton";
groupNum = "0";
useMouseEvents = "0";
@@ -214,7 +214,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggle shape bounding box in the preview window";
hovertime = "1000";
- bitmap = "tools/shapeEditor/images/object-bounds";
+ bitmapAsset = "ToolsModule:object_bounds_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -236,7 +236,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggle selected object bounding box in the preview window";
hovertime = "1000";
- bitmap = "tools/shapeEditor/images/object-fit-bounds";
+ bitmapAsset = "ToolsModule:object_fit_bounds_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -258,7 +258,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggle rendering of collision meshes in the preview window";
hovertime = "1000";
- bitmap = "tools/shapeEditor/images/collision-shape";
+ bitmapAsset = "ToolsModule:collision_shape_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -286,7 +286,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggle Advanced Properties Window";
hovertime = "1000";
- bitmap = "tools/shapeEditor/images/detail-levels_btn";
+ bitmapAsset = "ToolsModule:detail_levels_btn_n_image";
buttonType = "ToggleButton";
groupNum = "0";
useMouseEvents = "0";
diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui
index 1cc944d51..bd76ee516 100644
--- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui
+++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui
@@ -846,7 +846,7 @@
profile = "ToolsGuiTextProfile";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -865,7 +865,7 @@
isContainer = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/new";
+ bitmapAsset = "ToolsModule:new_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -989,7 +989,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/shapeEditor/images/playfwd_btn";
+ bitmapAsset = "ToolsModule:playfwd_btn_n_image";
groupNum = "0";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -1171,7 +1171,7 @@
};
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -1190,7 +1190,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/new";
+ bitmapAsset = "ToolsModule:new_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -1229,7 +1229,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/shapeEditor/images/playbkwd_btn";
+ bitmapAsset = "ToolsModule:playbkwd_btn_n_image";
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
@@ -1250,7 +1250,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/shapeEditor/images/pause_btn";
+ bitmapAsset = "ToolsModule:pause_btn_n_image";
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
@@ -1271,7 +1271,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/shapeEditor/images/playfwd_btn";
+ bitmapAsset = "ToolsModule:playfwd_btn_n_image";
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui
index 8785db315..624214dea 100644
--- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui
+++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAnimWindow.ed.gui
@@ -207,7 +207,7 @@
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/shapeEditor/images/back_btn";
+ bitmapAsset = "ToolsModule:back_btn_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -227,7 +227,7 @@
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/shapeEditor/images/stepback_btn";
+ bitmapAsset = "ToolsModule:stepback_btn_n_image";
internalName = "stepBkwdBtn";
};
new GuiControl() {
@@ -263,7 +263,7 @@
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/shapeEditor/images/playbkwd_btn";
+ bitmapAsset = "ToolsModule:playbkwd_btn_n_image";
};
new GuiBitmapButtonCtrl() {
internalName = "pauseBtn";
@@ -284,7 +284,7 @@
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/shapeEditor/images/pause_btn";
+ bitmapAsset = "ToolsModule:pause_btn_n_image";
};
new GuiBitmapButtonCtrl() {
internalName = "playFwdBtn";
@@ -305,7 +305,7 @@
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/shapeEditor/images/playfwd_btn";
+ bitmapAsset = "ToolsModule:playfwd_btn_n_image";
};
};
new GuiBitmapButtonCtrl() {
@@ -326,7 +326,7 @@
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/shapeEditor/images/stepfwd_btn";
+ bitmapAsset = "ToolsModule:stepfwd_btn_n_image";
internalName = "stepFwdBtn";
};
new GuiBitmapButtonCtrl() {
@@ -347,7 +347,7 @@
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/shapeEditor/images/fwd_btn";
+ bitmapAsset = "ToolsModule:fwd_btn_n_image";
};
new GuiButtonCtrl() {
canSaveDynamicFields = "0";
@@ -388,7 +388,7 @@
groupNum = "0";
buttonType = "ToggleButton";
useMouseEvents = "0";
- bitmap = "tools/shapeEditor/images/pingpong_btn";
+ bitmapAsset = "ToolsModule:pingpong_btn_n_image";
};
new GuiTextEditCtrl() {
internalName = "timeScale";
@@ -417,7 +417,7 @@
position = "39 0";
Extent = "8 13";
MinExtent = "1 1";
- bitmap = "tools/shapeEditor/images/seq_bar-in";
+ bitmapAsset = "ToolsModule:seq_bar_in_n_image";
ToolTip = "Set the In Point to the Current Frame";
Command = "ShapeEdSequences.onEditSeqInOut(\"in\", ShapeEdSeqSlider.getValue());";
};
@@ -429,7 +429,7 @@
position = "765 0";
Extent = "8 13";
MinExtent = "1 1";
- bitmap = "tools/shapeEditor/images/seq_bar-out";
+ bitmapAsset = "ToolsModule:seq_bar_out_n_image";
ToolTip = "Set the Out Point to the Current Frame";
Command = "ShapeEdSequences.onEditSeqInOut(\"out\", ShapeEdSeqSlider.getValue());";
};
diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui
index da9ac4320..bbd266004 100644
--- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui
+++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdPropWindow.ed.gui
@@ -430,7 +430,7 @@
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/new";
+ bitmapAsset = "ToolsModule:new_n_image";
};
new GuiBitmapButtonCtrl() {
internalName = "deleteTriggerBtn";
@@ -451,7 +451,7 @@
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
};
// Trigger list
new GuiControl() {
@@ -617,7 +617,7 @@
treeView = ShapeEdNodeTreeView;
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/clear-icon";
+ bitmapAsset = "ToolsModule:clear_icon_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -1393,7 +1393,7 @@
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/save-icon";
+ bitmapAsset = "ToolsModule:save_icon_n_image";
};
new GuiBitmapButtonCtrl() {
internalName = "newBtn";
@@ -1414,7 +1414,7 @@
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/new";
+ bitmapAsset = "ToolsModule:new_n_image";
};
new GuiBitmapButtonCtrl() {
internalName = "deleteBtn";
@@ -1435,7 +1435,7 @@
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
};
};
//--- OBJECT WRITE END ---
diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui
index eb7a3225a..71cc4339e 100644
--- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui
+++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdSelectWindow.ed.gui
@@ -213,7 +213,7 @@
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/folderUp";
+ bitmapAsset = "ToolsModule:folderUp_image";
};
new GuiPopUpMenuCtrl(ShapeEdSelectMenu) {
canSaveDynamicFields = "0";
diff --git a/Templates/BaseGame/game/tools/shapeEditor/main.tscript b/Templates/BaseGame/game/tools/shapeEditor/main.tscript
index ac3f972a0..76353b548 100644
--- a/Templates/BaseGame/game/tools/shapeEditor/main.tscript
+++ b/Templates/BaseGame/game/tools/shapeEditor/main.tscript
@@ -117,7 +117,7 @@ function ShapeEditorPlugin::onWorldEditorStartup(%this)
// Add ourselves to the ToolsToolbar
%tooltip = "Shape Editor (" @ %accel @ ")";
- EditorGui.addToToolsToolbar( "ShapeEditorPlugin", "ShapeEditorPalette", expandFilename("tools/worldEditor/images/toolbar/shape-editor"), %tooltip );
+ EditorGui.addToToolsToolbar( "ShapeEditorPlugin", "ShapeEditorPalette", "ToolsModule:shape_editor_n_image", %tooltip );
// Add ourselves to the Editor Settings window
exec( "./gui/ShapeEditorSettingsTab.gui" );
@@ -148,17 +148,17 @@ function ShapeEditorPlugin::onWorldEditorStartup(%this)
function ShapeEditorPlugin::openShapeAsset(%this, %assetDef)
{
%this.selectedAssetDef = %assetDef;
- %this.open(makeRelativePath(%this.selectedAssetDef.getShapeFile()));
+ %this.open(%this.selectedAssetDef);
}
function ShapeEditorPlugin::openShapeAssetId(%this, %assetId)
{
%this.selectedAssetDef = AssetDatabase.acquireAsset(%assetId);
//%this.selectedAssetDef = %assetDef;
- %this.open(makeRelativePath(%this.selectedAssetDef.getShapeFile()));
+ %this.open(%this.selectedAssetDef);
}
-function ShapeEditorPlugin::open(%this, %filename)
+function ShapeEditorPlugin::open(%this, %shapeAsset)
{
if ( !%this.isActivated )
{
@@ -210,14 +210,14 @@ function ShapeEditorPlugin::open(%this, %filename)
}
// Select the new shape
- if (isObject(ShapeEditor.shape) && (ShapeEditor.shape.baseShape $= %filename))
+ if (isObject(ShapeEditor.shape) && (ShapeEditor.shape.baseShapeAsset $= %shapeAsset))
{
// Shape is already selected => re-highlight the selected material if necessary
ShapeEdMaterials.updateSelectedMaterial(ShapeEdMaterials-->highlightMaterial.getValue());
}
- else if (%filename !$= "")
+ else if (%shapeAsset !$= "")
{
- ShapeEditor.selectShape(%filename, ShapeEditor.isDirty());
+ ShapeEditor.selectShape(%shapeAsset, ShapeEditor.isDirty());
// 'fitToShape' only works after the GUI has been rendered, so force a repaint first
Canvas.repaint();
diff --git a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript
index 5256288a9..2302226ad 100644
--- a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript
+++ b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditor.ed.tscript
@@ -242,18 +242,22 @@ function ShapeEditor::findConstructor( %this, %path )
return -1;
}
-function ShapeEditor::createConstructor( %this, %path )
+function ShapeEditor::createConstructor( %this, %assetId )
{
- %name = strcapitalise( fileBase( %path ) ) @ strcapitalise( getSubStr( fileExt( %path ), 1, 3 ) );
- %name = strreplace( %name, "-", "_" );
- %name = strreplace( %name, ".", "_" );
+ %name = AssetDatabase.getAssetName(%assetId);
+ //%name = strcapitalise( fileBase( %path ) ) @ strcapitalise( getSubStr( fileExt( %path ), 1, 3 ) );
+ //%name = strreplace( %name, "-", "_" );
+ //%name = strreplace( %name, ".", "_" );
%name = getUniqueName( %name );
- return new TSShapeConstructor( %name ) { baseShape = %path; };
+ return new TSShapeConstructor( %name ) { baseShapeAsset = %assetId; };
}
function ShapeEditor::saveConstructor( %this, %constructor )
{
- %savepath = filePath( %constructor.baseShape ) @ "/" @ fileBase( %constructor.baseShape ) @ "." @ $TorqueScriptFileExtension;
+ %assetDef = AssetDatabase.acquireAsset(%constructor.baseShapeAsset);
+ %savepath = %assetDef.getShapeConstructorFilePath();
+ AssetDatabase.releaseAsset(%constructor.baseShapeAsset);
+
new PersistenceManager( shapeEd_perMan );
shapeEd_perMan.setDirty( %constructor, %savepath );
shapeEd_perMan.saveDirtyObject( %constructor );
@@ -276,7 +280,7 @@ function ShapeEdSelectWindow::onSelect( %this, %path )
}
}
-function ShapeEditor::selectShape( %this, %path, %saveOld )
+function ShapeEditor::selectShape( %this, %shapeAsset, %saveOld )
{
ShapeEdShapeView.setModel( "" );
@@ -288,7 +292,7 @@ function ShapeEditor::selectShape( %this, %path, %saveOld )
else if ( ShapeEditor.isDirty() )
{
// Purge all unsaved changes
- %oldPath = ShapeEditor.shape.baseShape;
+ %oldPath = ShapeEditor.shape.baseShapeAsset;
ShapeEditor.shape.delete();
ShapeEditor.shape = 0;
@@ -296,9 +300,9 @@ function ShapeEditor::selectShape( %this, %path, %saveOld )
}
// Initialise the shape preview window
- if ( !ShapeEdShapeView.setModel( %path ) )
+ if ( !ShapeEdShapeView.setShapeAsset( %shapeAsset.getAssetId() ) )
{
- toolsMessageBoxOK( "Error", "Failed to load '" @ %path @ "'. Check the console for error messages." );
+ toolsMessageBoxOK( "Error", "Failed to load '" @ %shapeAsset.getAssetId() @ "'. Check the console for error messages." );
return;
}
ShapeEdShapeView.fitToShape();
@@ -307,13 +311,13 @@ function ShapeEditor::selectShape( %this, %path, %saveOld )
ShapeEditor.setDirty( false );
// Get ( or create ) the TSShapeConstructor object for this shape
- ShapeEditor.shape = ShapeEditor.findConstructor( %path );
+ ShapeEditor.shape = findShapeConstructorByAssetId( %shapeAsset.getAssetId() );
if ( ShapeEditor.shape <= 0 )
{
- ShapeEditor.shape = %this.createConstructor( %path );
+ ShapeEditor.shape = %this.createConstructor( %shapeAsset );
if ( ShapeEditor.shape <= 0 )
{
- error( "ShapeEditor: Error - could not select " @ %path );
+ error( "ShapeEditor: Error - could not select " @ %shapeAsset.getAssetId() );
return;
}
}
@@ -330,7 +334,7 @@ function ShapeEditor::selectShape( %this, %path, %saveOld )
ShapeEdSelectWindow.updateHints();
// Update editor status bar
- EditorGuiStatusBar.setSelection( %path );
+ EditorGuiStatusBar.setSelection( %shapeAsset.getAssetId() );
}
// Handle a selection in the MissionGroup shape selector
@@ -1761,7 +1765,8 @@ function ShapeEdSeqFromMenu::onSelect( %this, %id, %text )
%this.setText( %seqFrom );
// Allow the user to browse for an external source of animation data
- getLoadFormatFilename( %this @ ".onBrowseSelect", %this.lastPath );
+ //getLoadFormatFilename( %this @ ".onBrowseSelect", %this.lastPath );
+ AssetBrowser.showDialog("ShapeAsset", %this @ ".onBrowseSelect");
}
else
{
@@ -1769,12 +1774,17 @@ function ShapeEdSeqFromMenu::onSelect( %this, %id, %text )
}
}
-function ShapeEdSeqFromMenu::onBrowseSelect( %this, %path )
+function ShapeEdSeqFromMenu::onBrowseSelect( %this, %assetId )
{
- %path = makeRelativePath( %path, getMainDotCSDir() );
- %this.lastPath = %path;
- %this.setText( %path );
- ShapeEdSequences.onEditSequenceSource( %path );
+ //%path = makeRelativePath( %path, getMainDotCSDir() );
+ //%this.lastPath = %path;
+ %this.setText( %assetId );
+
+ %assetDef = AssetDatabase.acquireAsset(%assetId);
+ %shapePath = %assetDef.getShapeFile();
+ AssetDatabase.releaseAsset(%assetId);
+
+ ShapeEdSequences.onEditSequenceSource( %shapePath );
}
//------------------------------------------------------------------------------
@@ -2342,7 +2352,7 @@ function ShapeEdMaterials::editSelectedMaterial( %this )
// materials.
pushInstantGroup();
%this.tempShape = new TSStatic() {
- shapeName = ShapeEditor.shape.baseShape;
+ shapeAsset = ShapeEditor.shape.baseShapeAsset;
collisionType = "None";
};
popInstantGroup();
@@ -2886,16 +2896,16 @@ function ShapeEdDetails::onSetObjectNode( %this )
}
}
-function ShapeEdDetails::onAddMeshFromFile( %this, %path )
+function ShapeEdDetails::onAddMeshFromFile( %this, %assetId )
{
- if ( %path $= "" )
+ if ( %assetId $= "" )
{
- getLoadFormatFilename( %this @ ".onAddMeshFromFile", %this.lastPath );
+ AssetBrowser.showDialog("ShapeAsset", %this @ ".onAddMeshFromFile", "", "", "");
return;
}
- %path = makeRelativePath( %path, getMainDotCSDir() );
- %this.lastPath = %path;
+ //%path = makeRelativePath( %path, getMainDotCSDir() );
+ //%this.lastPath = %path;
// Determine the detail level to use for the new geometry
if ( %this-->addGeomTo.getText() $= "current detail" )
@@ -2904,8 +2914,8 @@ function ShapeEdDetails::onAddMeshFromFile( %this, %path )
}
else
{
+ %base = AssetDatabase.getAssetName(%assetId);
// Check if the file has an LODXXX hint at the end of it
- %base = fileBase( %path );
%pos = strstr( %base, "_LOD" );
if ( %pos > 0 )
%size = getSubStr( %base, %pos + 4, strlen( %base ) ) + 0;
@@ -2917,7 +2927,7 @@ function ShapeEdDetails::onAddMeshFromFile( %this, %path )
%size++;
}
- ShapeEditor.doAddMeshFromFile( %path, %size );
+ ShapeEditor.doAddMeshFromFile( %assetId, %size );
}
function ShapeEdDetails::onDeleteMesh( %this )
@@ -2996,7 +3006,11 @@ function ShapeEditor::autoAddDetails( %this, %dest )
//
// Determine the base name of the input file (MyShape_LOD in the example above)
// and use that to find any other shapes in the set.
- %base = fileBase( %dest.baseShape );
+ %assetDef = AssetDatabase.acquireAsset(%dest.baseShapeAsset);
+ %shapeFile = %assetDef.getShapeFile();
+ AssetDatabase.releaseAsset(%dest.baseShapeAsset);
+
+ %base = fileBase( %shapeFile );
%pos = strstr( %base, "_LOD" );
if ( %pos < 0 )
{
@@ -3008,7 +3022,7 @@ function ShapeEditor::autoAddDetails( %this, %dest )
echo( "Base is: " @ %base );
- %filePatterns = filePath( %dest.baseShape ) @ "/" @ %base @ "*" @ fileExt( %dest.baseShape );
+ %filePatterns = filePath( %shapeFile ) @ "/" @ %base @ "*" @ fileExt( %shapeFile );
echo( "Pattern is: " @ %filePatterns );
@@ -3017,7 +3031,7 @@ function ShapeEditor::autoAddDetails( %this, %dest )
{
%fullPath = makeRelativePath( %fullPath, getMainDotCSDir() );
- if ( %fullPath !$= %dest.baseShape )
+ if ( %fullPath !$= %shapeFile )
{
echo( "Found LOD shape file: " @ %fullPath );
@@ -3037,15 +3051,19 @@ function ShapeEditor::autoAddDetails( %this, %dest )
}
}
-function ShapeEditor::addLODFromFile( %this, %dest, %filename, %size, %allowUnmatched )
+function ShapeEditor::addLODFromFile( %this, %dest, %assetId, %size, %allowUnmatched )
{
+ %assetDef = AssetDatabase.acquireAsset(%assetId);
+ %csPath = %assetDef.getShapeConstructorFilePath();
+ %filename = %assetDef.getShapeFile();
+ AssetDatabase.releaseAsset(%assetId);
+
// Get (or create) a TSShapeConstructor object for the source shape. Need to
// exec the script manually as the resource may not have been loaded yet
- %csPath = filePath( %filename ) @ "/" @ fileBase( %filename ) @ "." @ $TorqueScriptFileExtension;
if ( isFile( %csPath ) )
exec( %csPath );
- %source = ShapeEditor.findConstructor( %filename );
+ %source = findShapeConstructorByAssetId( %assetId );
if ( %source == -1 )
%source = ShapeEditor.createConstructor( %filename );
%source.lodType = "SingleSize";
@@ -3053,7 +3071,7 @@ function ShapeEditor::addLODFromFile( %this, %dest, %filename, %size, %allowUnma
// Create a temporary TSStatic to ensure the resource is loaded
%temp = new TSStatic() {
- shapeName = %filename;
+ shapeAsset = %assetId;
collisionType = "None";
};
@@ -3254,7 +3272,7 @@ function ShapeEdMountWindow::update_onMountSelectionChanged( %this )
%this-->mountSeq.clear();
%this-->mountSeq.add( "", 0 );
- %tss = ShapeEditor.findConstructor( %shapePath );
+ %tss = findShapeConstructorByFilename( %shapePath );
if ( !isObject( %tss ) )
%tss = ShapeEditor.createConstructor( %shapePath );
if ( isObject( %tss ) )
diff --git a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript
index bd6ee4d92..55d6f9483 100644
--- a/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript
+++ b/Templates/BaseGame/game/tools/shapeEditor/scripts/shapeEditorActions.ed.tscript
@@ -1007,10 +1007,10 @@ function ActionRemoveMesh::undo( %this )
//------------------------------------------------------------------------------
// Add meshes from file
-function ShapeEditor::doAddMeshFromFile( %this, %filename, %size )
+function ShapeEditor::doAddMeshFromFile( %this, %assetId, %size )
{
%action = %this.createAction( ActionAddMeshFromFile, "Add mesh from file" );
- %action.filename = %filename;
+ %action.assetId = %assetId;
%action.size = %size;
%this.doAction( %action );
@@ -1018,7 +1018,7 @@ function ShapeEditor::doAddMeshFromFile( %this, %filename, %size )
function ActionAddMeshFromFile::doit( %this )
{
- %this.meshList = ShapeEditor.addLODFromFile( ShapeEditor.shape, %this.filename, %this.size, 1 );
+ %this.meshList = ShapeEditor.addLODFromFile( ShapeEditor.shape, %this.assetId, %this.size, 1 );
if ( %this.meshList !$= "" )
{
%count = getFieldCount( %this.meshList );
diff --git a/Templates/BaseGame/game/tools/shapes/unit_capsule.tscript b/Templates/BaseGame/game/tools/shapes/unit_capsule.tscript
index 0f1dd9974..9464cb795 100644
--- a/Templates/BaseGame/game/tools/shapes/unit_capsule.tscript
+++ b/Templates/BaseGame/game/tools/shapes/unit_capsule.tscript
@@ -1,7 +1,7 @@
singleton TSShapeConstructor(unit_capsuledts2)
{
- baseShape = "./unit_capsule.dts";
+ baseShapeAsset = "ToolsModule:unit_capsule";
singleDetailSize = "0";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
diff --git a/Templates/BaseGame/game/tools/shapes/unit_cube.tscript b/Templates/BaseGame/game/tools/shapes/unit_cube.tscript
index 86214d88a..121a75007 100644
--- a/Templates/BaseGame/game/tools/shapes/unit_cube.tscript
+++ b/Templates/BaseGame/game/tools/shapes/unit_cube.tscript
@@ -1,7 +1,7 @@
singleton TSShapeConstructor(unit_cubedts2)
{
- baseShape = "./unit_cube.dts";
+ baseShapeAsset = "ToolsModule:unit_cube";
singleDetailSize = "0";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
diff --git a/Templates/BaseGame/game/tools/shapes/unit_sphere.tscript b/Templates/BaseGame/game/tools/shapes/unit_sphere.tscript
index 44007e9db..475a102e8 100644
--- a/Templates/BaseGame/game/tools/shapes/unit_sphere.tscript
+++ b/Templates/BaseGame/game/tools/shapes/unit_sphere.tscript
@@ -1,7 +1,7 @@
singleton TSShapeConstructor(unit_spheredts2)
{
- baseShape = "./unit_sphere.dts";
+ baseShapeAsset = "ToolsModule:unit_sphere";
singleDetailSize = "0";
flipUVCoords = "0";
JoinIdenticalVerts = "0";
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui
index 7b5234bd5..298404b55 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui
@@ -50,7 +50,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Open the WorldEditor";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/toolbar/world";
+ bitmapAsset = "ToolsModule:world_image";
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
@@ -71,7 +71,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Open the GuiEditor";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/toolbar/gui";
+ bitmapAsset = "ToolsModule:gui_image";
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
@@ -92,7 +92,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Play Game";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/toolbar/playbutton";
+ bitmapAsset = "ToolsModule:playbutton_n_image";
groupNum = "0";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -123,7 +123,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggle Camera Modes";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/toolbar/player";
+ bitmapAsset = "ToolsModule:player_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -212,7 +212,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
};
};
/*new GuiPopUpMenuCtrl(EWorldEditorCameraSpeed) {
@@ -257,7 +257,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggle Visibility Modes (ALT V)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/visibility-toggle";
+ bitmapAsset = "ToolsModule:visibility_toggle_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ManageBookmarksWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ManageBookmarksWindow.ed.gui
index c5f4ff469..46195d0d7 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/ManageBookmarksWindow.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/ManageBookmarksWindow.ed.gui
@@ -81,7 +81,7 @@
setFirstResponder = "0";
modal = "1";
command = "ManageBookmarksContainer.onOK();";
- bitmap = "tools/gui/images/new";
+ bitmapAsset = "ToolsModule:new_n_image";
helpTag = "0";
text = "Create";
tooltip = "Create New Camera Bookmark";
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ManageSFXParametersWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ManageSFXParametersWindow.ed.gui
index 29c55dc74..95081790f 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/ManageSFXParametersWindow.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/ManageSFXParametersWindow.ed.gui
@@ -112,7 +112,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/new";
+ bitmapAsset = "ToolsModule:new_n_image";
autoFit = "0";
text = "Create";
groupNum = "-1";
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditToolbar.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditToolbar.ed.gui
index 2249b36b2..3c53c7c9f 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditToolbar.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainEditToolbar.ed.gui
@@ -67,7 +67,7 @@
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/circleBrush";
+ bitmapAsset = "ToolsModule:circleBrush_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -89,7 +89,7 @@
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/boxBrush";
+ bitmapAsset = "ToolsModule:boxBrush_n_image";
};
/*
@@ -113,7 +113,7 @@
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/maskBrush";
+ bitmapAsset = "ToolsModule:maskBrush_n_image";
};
*/
};
@@ -203,7 +203,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
};
};
new GuiBitmapCtrl() {
@@ -290,7 +290,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
};
};
new GuiBitmapCtrl() {
@@ -377,7 +377,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
};
};
@@ -400,7 +400,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/softCurve";
+ bitmapAsset = "ToolsModule:softCurve_n_image";
};
new GuiBitmapCtrl() {
@@ -487,7 +487,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
};
};
};
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui
index 37cd69886..bffa0d9d4 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/TerrainPainterToolbar.ed.gui
@@ -67,7 +67,7 @@
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/circleBrush";
+ bitmapAsset = "ToolsModule:circleBrush_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -89,7 +89,7 @@
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/boxBrush";
+ bitmapAsset = "ToolsModule:boxBrush_n_image";
};
/*
@@ -113,7 +113,7 @@
groupNum = "0";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/maskBrush";
+ bitmapAsset = "ToolsModule:maskBrush_n_image";
};
*/
};
@@ -203,7 +203,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
};
};
@@ -301,7 +301,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
Command = "Canvas.pushDialog(PaintBrushSlopeMinContainer);";
};
new GuiTextCtrl() {
@@ -362,7 +362,7 @@
tooltip = "Max terrain angle that will be paintable";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
Command = "Canvas.pushDialog(PaintBrushSlopeMaxContainer);";
};
};
@@ -451,7 +451,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
};
};
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette.ed.gui
index e32cdfb4a..654ec029f 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ConvexEditorPalette.ed.gui
@@ -28,7 +28,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Select Arrow (1)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/arrow";
+ bitmapAsset = "ToolsModule:arrow_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
Command = "GlobalGizmoProfile.mode = \"None\";";
@@ -50,7 +50,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Move Selection (2)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/translate";
+ bitmapAsset = "ToolsModule:translate_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
Command = "GlobalGizmoProfile.mode = \"Move\";";
@@ -72,7 +72,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Rotate Selection (3)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/rotate";
+ bitmapAsset = "ToolsModule:rotate_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
Command = "GlobalGizmoProfile.mode = \"Rotate\";";
@@ -94,9 +94,9 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Scale Selection (4)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/scale";
+ bitmapAsset = "ToolsModule:scale_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
Command = "GlobalGizmoProfile.mode = \"Scale\";";
};
-};
\ No newline at end of file
+};
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette.ed.gui
index 1e4053c8e..1cad1df01 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/DecalEditorPalette.ed.gui
@@ -29,7 +29,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Select Decal (1)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/arrow";
+ bitmapAsset = "ToolsModule:arrow_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -51,7 +51,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Move Decal (2)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/move-point";
+ bitmapAsset = "ToolsModule:move_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -72,7 +72,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Rotate Decal (3)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/rotate-point";
+ bitmapAsset = "ToolsModule:rotate_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -93,7 +93,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Scale Decal (4)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/scale-point";
+ bitmapAsset = "ToolsModule:scale_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -114,8 +114,8 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Add Decal (5)";
hovertime = "1000";
- bitmap = "tools/decalEditor/add-decal";
+ bitmapAsset = "ToolsModule:add_decal_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
-};
\ No newline at end of file
+};
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette.ed.gui
index a1cc96ef5..fd6d9620a 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ForestEditorPalette.ed.gui
@@ -29,7 +29,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Select Item (1)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/arrow";
+ bitmapAsset = "ToolsModule:arrow_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -50,7 +50,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Move Item (2)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/translate";
+ bitmapAsset = "ToolsModule:translate_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -71,7 +71,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Rotate Item (3)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/rotate";
+ bitmapAsset = "ToolsModule:rotate_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -92,7 +92,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Scale Item (4)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/scale";
+ bitmapAsset = "ToolsModule:scale_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -113,7 +113,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Paint (5)";
hovertime = "1000";
- bitmap = "tools/forestEditor/images/paint-forest-btn";
+ bitmapAsset = "ToolsModule:paint_forest_btn_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -134,7 +134,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Erase (6)";
hovertime = "1000";
- bitmap = "tools/forestEditor/images/erase-all-btn";
+ bitmapAsset = "ToolsModule:erase_all_btn_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -156,8 +156,8 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Erase Selected (7)";
hovertime = "1000";
- bitmap = "tools/forestEditor/images/erase-element-btn";
+ bitmapAsset = "ToolsModule:erase_element_btn_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
-};
\ No newline at end of file
+};
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette.ed.gui
index b005ac958..ab4056d4a 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/MeshRoadEditorPalette.ed.gui
@@ -29,7 +29,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Select Mesh Road (1)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/arrow";
+ bitmapAsset = "ToolsModule:arrow_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -51,7 +51,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Move Point (2)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/move-point";
+ bitmapAsset = "ToolsModule:move_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -72,7 +72,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Rotate Point (3)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/rotate-point";
+ bitmapAsset = "ToolsModule:rotate_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -93,7 +93,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Scale Point (4)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/scale-point";
+ bitmapAsset = "ToolsModule:scale_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -114,7 +114,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Create Road (5)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/add-mesh-road";
+ bitmapAsset = "ToolsModule:add_mesh_road_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -135,7 +135,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Insert Point (+)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/add-point";
+ bitmapAsset = "ToolsModule:add_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -156,8 +156,8 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Remove Point (-)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/subtract-point";
+ bitmapAsset = "ToolsModule:subtract_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
-};
\ No newline at end of file
+};
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui
index a18e3f4ba..7209b76a4 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/NavEditorPalette.ed.gui
@@ -31,7 +31,7 @@
ToolTip = "View NavMesh (1).";
DetailedDesc = "";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/visibility-toggle";
+ bitmapAsset = "ToolsModule:visibility_toggle_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -54,7 +54,7 @@
ToolTip = "Create off-mesh links (2).";
DetailedDesc = "Click to select/add. Shift-click to add multiple end points.";
hovertime = "1000";
- bitmap = "tools/navEditor/images/nav-link";
+ bitmapAsset = "ToolsModule:nav_link_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -77,7 +77,7 @@
ToolTip = "Edit cover (3).";
DetailedDesc = "";
hovertime = "1000";
- bitmap = "tools/navEditor/images/nav-cover";
+ bitmapAsset = "ToolsModule:nav_cover_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -100,7 +100,7 @@
ToolTip = "View tiles (4).";
DetailedDesc = "Click to select.";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/select-bounds";
+ bitmapAsset = "ToolsModule:select_bounds_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -123,8 +123,8 @@
ToolTip = "Test pathfinding (5).";
DetailedDesc = "Click to select/move character, CTRL-click to spawn, SHIFT-click to deselect.";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/toolbar/3rd-person-camera";
+ bitmapAsset = "ToolsModule:3rd_person_camera_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
-};
\ No newline at end of file
+};
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette.ed.gui
index 5fea48b1b..bb6034f46 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RiverEditorPalette.ed.gui
@@ -29,7 +29,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Select River (1)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/arrow";
+ bitmapAsset = "ToolsModule:arrow_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -50,7 +50,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Move Point (2)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/move-point";
+ bitmapAsset = "ToolsModule:move_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -71,7 +71,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Rotate Point (3)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/rotate-point";
+ bitmapAsset = "ToolsModule:rotate_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -92,7 +92,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Scale Point (4)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/scale-point";
+ bitmapAsset = "ToolsModule:scale_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -113,7 +113,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Create River (5)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/add-river";
+ bitmapAsset = "ToolsModule:add_river_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -134,7 +134,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Insert Point (+)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/add-point";
+ bitmapAsset = "ToolsModule:add_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -156,8 +156,8 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Remove Point (-)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/subtract-point";
+ bitmapAsset = "ToolsModule:subtract_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
-};
\ No newline at end of file
+};
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette.ed.gui
index 712ea774f..3478d5b0d 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/RoadEditorPalette.ed.gui
@@ -29,7 +29,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Select Road (1)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/arrow";
+ bitmapAsset = "ToolsModule:arrow_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -51,7 +51,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Move Point (2)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/move-point";
+ bitmapAsset = "ToolsModule:move_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -73,7 +73,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Scale Point (4)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/scale-point";
+ bitmapAsset = "ToolsModule:scale_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -94,7 +94,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Create Road (5)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/add-road-path";
+ bitmapAsset = "ToolsModule:add_road_path_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -115,7 +115,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Insert Point (+)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/add-point";
+ bitmapAsset = "ToolsModule:add_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -137,8 +137,8 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Remove Point (-)";
hovertime = "1000";
- bitmap = "tools/worldEditor/images/road-river/subtract-point";
+ bitmapAsset = "ToolsModule:subtract_point_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
-};
\ No newline at end of file
+};
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette.ed.gui
index e8dfaf0e9..3291f1454 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/ShapeEditorPalette.ed.gui
@@ -29,7 +29,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Select Arrow (1)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/arrow";
+ bitmapAsset = "ToolsModule:arrow_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -51,7 +51,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Move Selection (2)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/translate";
+ bitmapAsset = "ToolsModule:translate_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -73,7 +73,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Rotate Selection (3)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/rotate";
+ bitmapAsset = "ToolsModule:rotate_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -95,7 +95,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Rotate sun";
hovertime = "1000";
- bitmap = "tools/shapeEditor/images/sun-btn";
+ bitmapAsset = "ToolsModule:sun_btn_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui
index 0ab8f2b1e..d794d38ab 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/TerrainEditPalette.ed.gui
@@ -32,7 +32,7 @@
text = "Button";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/brushAdjustHeight";
+ bitmapAsset = "ToolsModule:brushAdjustHeight_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -54,7 +54,7 @@
text = "Button";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/raiseHeight";
+ bitmapAsset = "ToolsModule:raiseHeight_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -76,7 +76,7 @@
text = "Button";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/lowerHeight";
+ bitmapAsset = "ToolsModule:lowerHeight_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -98,7 +98,7 @@
text = "Button";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/smoothHeight";
+ bitmapAsset = "ToolsModule:smoothHeight_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -120,7 +120,7 @@
text = "Button";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/softCurve";
+ bitmapAsset = "ToolsModule:softCurve_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -142,7 +142,7 @@
text = "Button";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/brushPaintNoise";
+ bitmapAsset = "ToolsModule:brushPaintNoise_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -164,7 +164,7 @@
text = "Button";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/flattenHeight";
+ bitmapAsset = "ToolsModule:flattenHeight_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -186,7 +186,7 @@
text = "Button";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/setHeight";
+ bitmapAsset = "ToolsModule:setHeight_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -208,7 +208,7 @@
text = "Button";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/setEmpty";
+ bitmapAsset = "ToolsModule:setEmpty_n_image";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
@@ -230,6 +230,6 @@
text = "Button";
buttonType = "RadioButton";
useMouseEvents = "0";
- bitmap = "tools/worldEditor/images/clearEmpty";
+ bitmapAsset = "ToolsModule:clearEmpty_n_image";
};
-};
\ No newline at end of file
+};
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorPalette.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorPalette.ed.gui
index 421b52fe4..7dd2ed44e 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorPalette.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/WorldEditorPalette.ed.gui
@@ -28,7 +28,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Select Arrow (1)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/arrow";
+ bitmapAsset = "ToolsModule:arrow_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -49,7 +49,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Move Selection (2)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/translate";
+ bitmapAsset = "ToolsModule:translate_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -70,7 +70,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Rotate Selection (3)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/rotate";
+ bitmapAsset = "ToolsModule:rotate_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
@@ -91,8 +91,8 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Scale Selection (4)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/scale";
+ bitmapAsset = "ToolsModule:scale_n_image";
buttonType = "RadioButton";
useMouseEvents = "0";
};
-};
\ No newline at end of file
+};
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/init.tscript b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/init.tscript
index 637739745..0f312633a 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/init.tscript
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsPaletteGroups/init.tscript
@@ -99,4 +99,4 @@ function EWToolsPaletteWindow::togglePalette(%this, %paletteName)
EWToolsPaletteWindow.visible = 1;
EWToolsPaletteWindow.extent = getWord(EWToolsPaletteWindow.extent, 0) SPC (16 + 26 * %windowMultiplier);
}
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsToolbar.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsToolbar.ed.gui
index 1f15e5310..330807ae4 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/ToolsToolbar.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/ToolsToolbar.ed.gui
@@ -54,7 +54,7 @@
hovertime = "750";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/collapse-toolbar";
+ bitmapAsset = "ToolsModule:collapse_toolbar_n_image";
};
new GuiDecoyCtrl(EWToolsToolbarDecoy) {
profile = "ToolsGuiDefaultProfile";
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorToolbar.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorToolbar.ed.gui
index 129b5f7cf..0940617c6 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorToolbar.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorToolbar.ed.gui
@@ -52,7 +52,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Fit View To Selection (F)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/fit-selection";
+ bitmapAsset = "ToolsModule:fit_selection_n_image";
text = "";
groupNum = "-1";
buttonType = "PushButton";
@@ -109,7 +109,7 @@
buttonType = "ToggleButton";
useMouseEvents = "0";
buttonMargin = "0 0";
- bitmap = "tools/gui/images/menubar/snapping-settings";
+ bitmapAsset = "ToolsModule:snapping_settings_n_image";
new GuiBitmapCtrl(){
HorizSizing = "left";
@@ -142,7 +142,7 @@
buttonType = "toggleButton";
useMouseEvents = "0";
groupNum = "-1";
- bitmap = "tools/gui/images/menubar/snap-grid";
+ bitmapAsset = "ToolsModule:menubar_snap_grid_n_image";
textMargin = "4";
};
new GuiBitmapButtonCtrl() {
@@ -166,7 +166,7 @@
buttonType = "toggleButton";
useMouseEvents = "0";
groupNum = "-1";
- bitmap = "tools/gui/images/menubar/snap-terrain";
+ bitmapAsset = "ToolsModule:snap_terrain_n_image";
textMargin = "4";
};
new GuiBitmapButtonCtrl() {
@@ -190,7 +190,7 @@
buttonType = "toggleButton";
useMouseEvents = "0";
groupNum = "-1";
- bitmap = "tools/gui/images/menubar/snap-objects";
+ bitmapAsset = "ToolsModule:snap_objects_n_image";
textMargin = "4";
};
};
@@ -249,7 +249,7 @@
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
- bitmap = "tools/gui/images/dropslider";
+ bitmapAsset = "ToolsModule:dropslider_n_image";
};
};
new GuiBitmapCtrl() {
@@ -279,7 +279,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Object bounds selection toggle (V)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/select-bounds";
+ bitmapAsset = "ToolsModule:select_bounds_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -317,7 +317,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggles object center (O) and bounds center (P)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/object-center";
+ bitmapAsset = "ToolsModule:object_center_n_image";
text = "Button";
groupNum = "-1";
buttonType = "ToggleButton";
@@ -350,7 +350,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Toggles object transform (K) and world transform (L)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/world-transform";
+ bitmapAsset = "ToolsModule:world_transform_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
text = "";
@@ -399,7 +399,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Enables Render of Object Node Icons (N)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/object-node-icon";
+ bitmapAsset = "ToolsModule:object_node_icon_n_image";
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
@@ -422,7 +422,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Enables Render of Object Node Lables (SHIFT N)";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/object-node-lable";
+ bitmapAsset = "ToolsModule:object_node_lable_n_image";
text = "";
groupNum = "-1";
buttonType = "ToggleButton";
@@ -464,7 +464,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Make the Selection a Prefab.";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/selection-to-prefab";
+ bitmapAsset = "ToolsModule:selection_to_prefab_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -487,7 +487,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Explode the Selected Prefab.";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/explode-prefab";
+ bitmapAsset = "ToolsModule:explode_prefab_n_image";
text = "";
groupNum = "-1";
buttonType = "PushButton";
@@ -513,7 +513,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Update Reflection Probes";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/probe";
+ bitmapAsset = "ToolsModule:probe_n_image";
text = "";
groupNum = "-1";
buttonType = "PushButton";
@@ -538,7 +538,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Open Editor Settings";
hovertime = "1000";
- bitmap = "tools/gui/images/menubar/settings";
+ bitmapAsset = "ToolsModule:settings_n_image";
text = "";
groupNum = "-1";
buttonType = "PushButton";
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorTreeWindow.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorTreeWindow.ed.gui
index 297336551..a360e9d8d 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorTreeWindow.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorTreeWindow.ed.gui
@@ -102,7 +102,7 @@
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/clear-icon";
+ bitmapAsset = "ToolsModule:clear_icon_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -351,7 +351,7 @@
groupNum = "0";
buttonType = "PushButton";
- Bitmap = "tools/gui/images/folderUp";
+ Bitmap = "ToolsModule:folderUp_image";
autoSize = "0";
};
new GuiPopUpMenuCtrl(CreatorPopupMenu) {
@@ -519,7 +519,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Lock Selection";
hovertime = "1000";
- bitmap = "tools/gui/images/lock";
+ bitmapAsset = "ToolsModule:lock_n_image";
buttonType = "ToggleButton";
groupNum = "-1";
text = "";
@@ -542,7 +542,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Add Sim Group";
hovertime = "1000";
- bitmap = "tools/gui/images/add-simgroup-btn";
+ bitmapAsset = "ToolsModule:add_simgroup_btn_n_image";
buttonType = "PushButton";
groupNum = "-1";
text = "";
@@ -567,7 +567,7 @@
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Delete Selection";
hovertime = "1000";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
buttonType = "PushButton";
groupNum = "-1";
text = "";
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui b/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui
index c954e8237..4e92d9a80 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui
@@ -91,7 +91,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/new";
+ bitmapAsset = "ToolsModule:new_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -116,7 +116,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -317,7 +317,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -410,7 +410,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -546,7 +546,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -639,7 +639,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -902,7 +902,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -972,7 +972,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -1281,7 +1281,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -1351,7 +1351,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -1475,7 +1475,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+ bitmapAsset = "ToolsModule:cubemapBtnBorder_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
@@ -1568,7 +1568,7 @@
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
bitmapMode = "Stretched";
autoFitExtents = "0";
useModifiers = "0";
diff --git a/Templates/BaseGame/game/tools/worldEditor/gui/profiles.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/gui/profiles.ed.tscript
index c03e56a9c..00a6e8507 100644
--- a/Templates/BaseGame/game/tools/worldEditor/gui/profiles.ed.tscript
+++ b/Templates/BaseGame/game/tools/worldEditor/gui/profiles.ed.tscript
@@ -64,7 +64,7 @@ singleton GuiControlProfile (EditorScrollProfile)
border = 3;
borderThickness = 2;
borderColor = "0 0 0";
- bitmap = "tools/gui/images/scrollBar";
+ bitmapAsset = "ToolsModule:scrollBar_image";
hasBitmapArray = true;
category = "Editor";
};
@@ -80,7 +80,7 @@ singleton GuiControlProfile (GuiEditorClassProfile)
fontColorHL = "50 50 50";
fixedExtent = true;
justify = "center";
- bitmap = "tools/gui/images/scrollBar";
+ bitmapAsset = "ToolsModule:scrollBar_image";
hasBitmapArray = true;
category = "Editor";
};
diff --git a/Templates/BaseGame/game/tools/worldEditor/images/images_DefaultHandle_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/images_DefaultHandle_image.asset.taml
new file mode 100644
index 000000000..680536f67
--- /dev/null
+++ b/Templates/BaseGame/game/tools/worldEditor/images/images_DefaultHandle_image.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_d_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_d_image.asset.taml
new file mode 100644
index 000000000..ec645e6d5
--- /dev/null
+++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_d_image.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_h_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_h_image.asset.taml
new file mode 100644
index 000000000..6b71a6c9f
--- /dev/null
+++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_h_image.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_n_image.asset.taml b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_n_image.asset.taml
new file mode 100644
index 000000000..676c27b02
--- /dev/null
+++ b/Templates/BaseGame/game/tools/worldEditor/images/road-river/menubar/menubar_show_wireframe_n_image.asset.taml
@@ -0,0 +1,8 @@
+
diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript
index ee4e7bfb2..70e8f9968 100644
--- a/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript
+++ b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript
@@ -223,7 +223,7 @@ function EditorGui::init(%this)
%this.setMenuDefaultState();
- EWorldEditorToggleCamera.setBitmap("tools/worldEditor/images/toolbar/player");
+ EWorldEditorToggleCamera.setBitmap("ToolsModule:player_n_image");
/*
EWorldEditorCameraSpeed.clear();
@@ -366,7 +366,7 @@ function EditorGui::addToEditorsMenu( %this, %displayName, %accel, %newPlugin )
return %accel;
}
-function EditorGui::addToToolsToolbar( %this, %pluginName, %internalName, %bitmap, %tooltip )
+function EditorGui::addToToolsToolbar( %this, %pluginName, %internalName, %imageAsset, %tooltip )
{
%count = ToolsToolbarArray.getCount();
@@ -401,7 +401,7 @@ function EditorGui::addToToolsToolbar( %this, %pluginName, %internalName, %bitma
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = %tooltip;
hovertime = "750";
- bitmap = %bitmap;
+ bitmapAsset = %imageAsset;
buttonType = "RadioButton";
groupNum = "0";
useMouseEvents = "0";
@@ -800,14 +800,14 @@ function EditorGui::syncCameraGui( %this )
if(LocalClientConnection.camera.newtonRotation == true)
{
EditorGui-->NewtonianRotationCamera.setStateOn(true);
- EWorldEditorToggleCamera.setBitmap("tools/gui/images/menubar/smooth-cam-rot");
+ EWorldEditorToggleCamera.setBitmap("ToolsModule:smooth_cam_rot_n_image");
%flyModeRadioItem = 4;
EditorGuiStatusBar.setCamera("Smooth Rot Camera");
}
else
{
EditorGui-->NewtonianCamera.setStateOn(true);
- EWorldEditorToggleCamera.setBitmap("tools/gui/images/menubar/smooth-cam");
+ EWorldEditorToggleCamera.setBitmap("ToolsModule:smooth_cam_n_image");
%flyModeRadioItem = 3;
EditorGuiStatusBar.setCamera("Smooth Camera");
}
@@ -815,14 +815,14 @@ function EditorGui::syncCameraGui( %this )
else if(%mode $= "EditOrbit")
{
EditorGui-->OrbitCamera.setStateOn(true);
- EWorldEditorToggleCamera.setBitmap("tools/gui/images/menubar/orbit-cam");
+ EWorldEditorToggleCamera.setBitmap("ToolsModule:orbit_cam_n_image");
%flyModeRadioItem = 1;
EditorGuiStatusBar.setCamera("Orbit Camera");
}
else // default camera mode
{
EditorGui-->StandardCamera.setStateOn(true);
- EWorldEditorToggleCamera.setBitmap("tools/worldEditor/images/toolbar/camera");
+ EWorldEditorToggleCamera.setBitmap("ToolsModule:camera_n_image");
%flyModeRadioItem = 0;
EditorGuiStatusBar.setCamera("Standard Camera");
}
@@ -835,7 +835,7 @@ function EditorGui::syncCameraGui( %this )
else if (!$isFirstPersonVar) // if 3rd person
{
EditorGui-->trdPersonCamera.setStateOn(true);
- EWorldEditorToggleCamera.setBitmap("tools/worldEditor/images/toolbar/3rd-person-camera");
+ EWorldEditorToggleCamera.setBitmap("ToolsModule:3rd_person_camera_n_image");
%flyModeRadioItem = 1;
//quick way select menu bar options
%this.findMenu( "Camera" ).checkRadioItem( 0, 1, 1 );
@@ -845,7 +845,7 @@ function EditorGui::syncCameraGui( %this )
else if ($isFirstPersonVar) // if 1st Person
{
EditorGui-->PlayerCamera.setStateOn(true);
- EWorldEditorToggleCamera.setBitmap("tools/worldEditor/images/toolbar/player");
+ EWorldEditorToggleCamera.setBitmap("ToolsModule:player_n_image");
%flyModeRadioItem = 0;
//quick way select menu bar options
%this.findMenu( "Camera" ).checkRadioItem( 0, 1, 1 );
@@ -918,7 +918,7 @@ function WorldEditorInspectorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the ToolsToolbar
%tooltip = "Object Editor (" @ %accel @ ")";
- EditorGui.addToToolsToolbar( "WorldEditorInspectorPlugin", "WorldEditorInspectorPalette", expandFilename("tools/worldEditor/images/toolbar/transform-objects"), %tooltip );
+ EditorGui.addToToolsToolbar( "WorldEditorInspectorPlugin", "WorldEditorInspectorPalette", "ToolsModule:transform_objects_n_image", %tooltip );
//connect editor windows
GuiWindowCtrl::attach( EWInspectorWindow, EWTreeWindow);
@@ -1026,7 +1026,7 @@ function TerrainEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the ToolsToolbar
%tooltip = "Terrain Editor (" @ %accel @ ")";
- EditorGui.addToToolsToolbar( "TerrainEditorPlugin", "TerrainEditorPalette", expandFilename("tools/worldEditor/images/toolbar/sculpt-terrain"), %tooltip );
+ EditorGui.addToToolsToolbar( "TerrainEditorPlugin", "TerrainEditorPalette", "ToolsModule:sculpt_terrain_n_image", %tooltip );
%map = new ActionMap();
%map.bindCmd( keyboard, "1", "ToolsPaletteArray->brushAdjustHeight.performClick();", "" ); //Grab Terrain
@@ -1175,7 +1175,7 @@ function TerrainPainterPlugin::onWorldEditorStartup( %this )
// Add ourselves to the ToolsToolbar
%tooltip = "Terrain Painter (" @ %accel @ ")";
- EditorGui.addToToolsToolbar( "TerrainPainterPlugin", "TerrainPainterPalette", expandFilename("tools/worldEditor/images/toolbar/paint-terrain"), %tooltip );
+ EditorGui.addToToolsToolbar( "TerrainPainterPlugin", "TerrainPainterPalette", "ToolsModule:paint_terrain_n_image", %tooltip );
%map = new ActionMap();
%map.bindCmd( keyboard, "v", "EWTerrainPainterToolbarBrushType->ellipse.performClick();", "" );// Circle Brush
@@ -1390,12 +1390,12 @@ function EWorldEditor::areAllSelectedObjectsOfType( %this, %className )
//-----------------------------------------------------------------------------
function EWorldEditorToggleCamera::toggleBitmap(%this)
{
- %currentImage = %this.bitmap;
+ %currentImage = %this.getBitmapAsset();
- if ( %currentImage $= "tools/worldEditor/images/toolbar/player" )
- %image = "tools/worldEditor/images/toolbar/camera";
+ if ( %currentImage $= "ToolsModule:player_n_image" )
+ %image = "ToolsModule:camera_n_image";
else
- %image = "tools/worldEditor/images/toolbar/player";
+ %image = "ToolsModule:player_n_image";
%this.setBitmap( %image );
}
@@ -2043,24 +2043,24 @@ function EWorldEditor::syncGui( %this )
if( EWorldEditor.objectsUseBoxCenter )
{
- EWorldEditorToolbar-->centerObject.setBitmap("tools/gui/images/menubar/bounds-center");
+ EWorldEditorToolbar-->centerObject.setBitmap("ToolsModule:bounds_center_n_image");
objectCenterDropdown-->objectBoundsBtn.setStateOn( 1 );
}
else
{
- EWorldEditorToolbar-->centerObject.setBitmap("tools/gui/images/menubar/object-center");
+ EWorldEditorToolbar-->centerObject.setBitmap("ToolsModule:object_center_n_image");
objectCenterDropdown-->objectBoxBtn.setStateOn( 1 );
}
if( GlobalGizmoProfile.getFieldValue(alignment) $= "Object" )
{
- EWorldEditorToolbar-->objectTransform.setBitmap("tools/gui/images/menubar/object-transform");
+ EWorldEditorToolbar-->objectTransform.setBitmap("ToolsModule:object_transform_n_image");
objectTransformDropdown-->objectTransformBtn.setStateOn( 1 );
}
else
{
- EWorldEditorToolbar-->objectTransform.setBitmap("tools/gui/images/menubar/world-transform");
+ EWorldEditorToolbar-->objectTransform.setBitmap("ToolsModule:world_transform_n_image");
objectTransformDropdown-->worldTransformBtn.setStateOn( 1 );
}
@@ -2446,7 +2446,7 @@ function EWToolsToolbar::reset( %this )
EWToolsToolbarDecoy.setVisible(false);
EWToolsToolbarDecoy.setExtent((29 + 4) * %count + 4, 31);
- %this-->resizeArrow.setBitmap( "tools/gui/images/collapse-toolbar" );
+ %this-->resizeArrow.setBitmap( "ToolsModule:collapse_toolbar_n_image" );
}
function EWToolsToolbar::toggleSize( %this, %useDynamics )
@@ -2457,7 +2457,7 @@ function EWToolsToolbar::toggleSize( %this, %useDynamics )
if ( %this.isClosed == 0 )
{
- %image = "tools/gui/images/expand-toolbar";
+ %image = "ToolsModule:expand_toolbar_n_image";
for( %i = 0 ; %i < ToolsToolbarArray.getCount(); %i++ )
{
@@ -2478,7 +2478,7 @@ function EWToolsToolbar::toggleSize( %this, %useDynamics )
}
else
{
- %image = "tools/gui/images/collapse-toolbar";
+ %image = "ToolsModule:collapse_toolbar_n_image";
%count = ToolsToolbarArray.getCount();
for( %i = 0 ; %i < %count; %i++ )
@@ -2717,4 +2717,4 @@ function EditorDropdownSliderContainer::onMouseDown(%this)
function EditorDropdownSliderContainer::onRightMouseDown(%this)
{
Canvas.popDialog(%this);
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.tscript
index f788c7edb..934a35bd9 100644
--- a/Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.tscript
+++ b/Templates/BaseGame/game/tools/worldEditor/scripts/ManageSFXParametersWindow.ed.tscript
@@ -503,7 +503,7 @@ function EManageSFXParameters::addParameter( %this, %parameter )
altCommand = %parameter @ ".value = $thisControl.getValue();";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/reset-icon";
+ bitmapAsset = "ToolsModule:reset_icon_n_image";
autoFit = "0";
groupNum = "-1";
buttonType = "PushButton";
@@ -524,7 +524,7 @@ function EManageSFXParameters::addParameter( %this, %parameter )
command = %parameter @ ".reset();";
};
new GuiBitmapButtonCtrl() {
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
autoFit = "0";
groupNum = "-1";
buttonType = "PushButton";
diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/cameraBookmarks.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/cameraBookmarks.ed.tscript
index f158cde4d..9e8960a3e 100644
--- a/Templates/BaseGame/game/tools/worldEditor/scripts/cameraBookmarks.ed.tscript
+++ b/Templates/BaseGame/game/tools/worldEditor/scripts/cameraBookmarks.ed.tscript
@@ -228,7 +228,7 @@ function EManageBookmarks::addBookmark( %this, %mark, %index )
new GuiBitmapButtonCtrl() {
class = "EManageBookmarksGoToButton";
- bitmap = "tools/gui/images/camera-btn";
+ bitmapAsset = "ToolsModule:camera_btn_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@@ -264,7 +264,7 @@ function EManageBookmarks::addBookmark( %this, %mark, %index )
new GuiBitmapButtonCtrl() {
class = "EManageBookmarksDeleteButton";
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.tscript
index c2fd3e766..6942a0cf9 100644
--- a/Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.tscript
+++ b/Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.tscript
@@ -130,7 +130,7 @@ function EPainter::updateLayers( %this, %matIndex )
new GuiBitmapButtonCtrl()
{
- bitmap = "tools/gui/images/delete";
+ bitmapAsset = "ToolsModule:delete_n_image";
buttonType = "PushButton";
HorizSizing = "left";
VertSizing = "bottom";
@@ -482,4 +482,4 @@ function EPainterIconBtn::onControlDropped( %this, %payload )
// select the button/material we just reordered.
%stack.getObject( %dstIndex ).performClick();
-}
\ No newline at end of file
+}
diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/AL_ShadowVisualizeMaterial.asset.taml b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/AL_ShadowVisualizeMaterial.asset.taml
new file mode 100644
index 000000000..47ced299d
--- /dev/null
+++ b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/AL_ShadowVisualizeMaterial.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/Viz_DetailLightingMat.asset.taml b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/Viz_DetailLightingMat.asset.taml
new file mode 100644
index 000000000..b04817ca7
--- /dev/null
+++ b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/Viz_DetailLightingMat.asset.taml
@@ -0,0 +1,7 @@
+
diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/Viz_MaterialComplexityMat.asset.taml b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/Viz_MaterialComplexityMat.asset.taml
new file mode 100644
index 000000000..ad9cd4bc5
--- /dev/null
+++ b/Templates/BaseGame/game/tools/worldEditor/scripts/visibility/Viz_MaterialComplexityMat.asset.taml
@@ -0,0 +1,7 @@
+