Browse Source

- Taml serialization WIP.

MelvMay-GG 12 years ago
parent
commit
9d273f3
35 changed files with 226 additions and 289 deletions
  1. 4 4
      engine/source/2d/assets/ImageAsset.cc
  2. 2 2
      engine/source/2d/assets/ImageAsset.h
  3. 2 2
      engine/source/2d/assets/ParticleAsset.cc
  4. 2 2
      engine/source/2d/assets/ParticleAsset.h
  5. 2 2
      engine/source/2d/assets/ParticleAssetEmitter.cc
  6. 2 2
      engine/source/2d/assets/ParticleAssetEmitter.h
  7. 1 1
      engine/source/2d/assets/ParticleAssetField.cc
  8. 2 2
      engine/source/2d/assets/ParticleAssetFieldCollection.cc
  9. 2 2
      engine/source/2d/assets/ParticleAssetFieldCollection.h
  10. 1 1
      engine/source/2d/core/SpriteBatchItem.cc
  11. 14 14
      engine/source/2d/scene/Scene.cc
  12. 3 3
      engine/source/2d/scene/Scene.h
  13. 3 3
      engine/source/2d/sceneobject/CompositeSprite.cc
  14. 2 2
      engine/source/2d/sceneobject/CompositeSprite.h
  15. 7 7
      engine/source/2d/sceneobject/SceneObject.cc
  16. 2 2
      engine/source/2d/sceneobject/SceneObject.h
  17. 6 6
      engine/source/assets/assetQuery.cc
  18. 2 2
      engine/source/assets/assetQuery.h
  19. 6 6
      engine/source/assets/assetTagsManifest.cc
  20. 2 2
      engine/source/assets/assetTagsManifest.h
  21. 6 6
      engine/source/component/behaviors/behaviorComponent.cpp
  22. 2 2
      engine/source/component/behaviors/behaviorComponent.h
  23. 3 3
      engine/source/persistence/taml/taml.cc
  24. 3 3
      engine/source/persistence/taml/taml.h
  25. 2 2
      engine/source/persistence/taml/tamlBinaryReader.cc
  26. 1 1
      engine/source/persistence/taml/tamlBinaryReader.h
  27. 3 3
      engine/source/persistence/taml/tamlBinaryWriter.cc
  28. 4 4
      engine/source/persistence/taml/tamlCallbacks.h
  29. 6 6
      engine/source/persistence/taml/tamlCustom.cc
  30. 119 182
      engine/source/persistence/taml/tamlCustom.h
  31. 1 1
      engine/source/persistence/taml/tamlWriteNode.h
  32. 2 2
      engine/source/persistence/taml/tamlXmlReader.cc
  33. 1 1
      engine/source/persistence/taml/tamlXmlReader.h
  34. 3 3
      engine/source/persistence/taml/tamlXmlWriter.cc
  35. 3 3
      engine/source/sim/simObject.h

+ 4 - 4
engine/source/2d/assets/ImageAsset.cc

@@ -868,13 +868,13 @@ void ImageAsset::onTamlPostWrite( void )
 
 //------------------------------------------------------------------------------
 
-void ImageAsset::onTamlCustomWrite( TamlCustomProperties& customProperties )
+void ImageAsset::onTamlCustomWrite( TamlCustomNodes& customNodes )
 {
     // Debug Profiling.
     PROFILE_SCOPE(ImageAsset_OnTamlCustomWrite);
 
     // Call parent.
-    Parent::onTamlCustomWrite( customProperties );
+    Parent::onTamlCustomWrite( customNodes );
 
     // Finish if not in explicit mode.
     if ( !mExplicitMode )
@@ -901,7 +901,7 @@ void ImageAsset::onTamlCustomWrite( TamlCustomProperties& customProperties )
 
 //-----------------------------------------------------------------------------
 
-void ImageAsset::onTamlCustomRead( const TamlCustomProperties& customProperties )
+void ImageAsset::onTamlCustomRead( const TamlCustomNodes& customNodes )
 {
     // Debug Profiling.
     PROFILE_SCOPE(ImageAsset_OnTamlCustomRead);
@@ -944,7 +944,7 @@ void ImageAsset::onTamlCustomRead( const TamlCustomProperties& customProperties
         for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
         {
             // Fetch property field.
-            TamlPropertyField* pPropertyField = *propertyFieldItr;
+            TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
             // Fetch property field name.
             StringTableEntry fieldName = pPropertyField->getFieldName();

+ 2 - 2
engine/source/2d/assets/ImageAsset.h

@@ -243,8 +243,8 @@ protected:
     /// Taml callbacks.
     virtual void onTamlPreWrite( void );
     virtual void onTamlPostWrite( void );
-    virtual void onTamlCustomWrite( TamlCustomProperties& customProperties );
-    virtual void onTamlCustomRead( const TamlCustomProperties& customProperties );
+    virtual void onTamlCustomWrite( TamlCustomNodes& customNodes );
+    virtual void onTamlCustomRead( const TamlCustomNodes& customNodes );
 
 
 protected:

+ 2 - 2
engine/source/2d/assets/ParticleAsset.cc

@@ -474,7 +474,7 @@ void ParticleAsset::moveEmitter( S32 fromIndex, S32 toIndex )
 
 //------------------------------------------------------------------------------
 
-void ParticleAsset::onTamlCustomWrite( TamlCustomProperties& customProperties )
+void ParticleAsset::onTamlCustomWrite( TamlCustomNodes& customNodes )
 {
     // Debug Profiling.
     PROFILE_SCOPE(ParticleAsset_OnTamlCustomWrite);
@@ -485,7 +485,7 @@ void ParticleAsset::onTamlCustomWrite( TamlCustomProperties& customProperties )
 
 //-----------------------------------------------------------------------------
 
-void ParticleAsset::onTamlCustomRead( const TamlCustomProperties& customProperties )
+void ParticleAsset::onTamlCustomRead( const TamlCustomNodes& customNodes )
 {
     // Debug Profiling.
     PROFILE_SCOPE(ParticleAsset_OnTamlCustomRead);

+ 2 - 2
engine/source/2d/assets/ParticleAsset.h

@@ -160,8 +160,8 @@ public:
 protected:
     virtual void initializeAsset( void );
 
-    void onTamlCustomWrite( TamlCustomProperties& customProperties );
-    void onTamlCustomRead( const TamlCustomProperties& customProperties );
+    void onTamlCustomWrite( TamlCustomNodes& customNodes );
+    void onTamlCustomRead( const TamlCustomNodes& customNodes );
 
 protected:
     static bool setLifetime(void* obj, const char* data)                    { static_cast<ParticleAsset*>(obj)->setLifetime(dAtof(data)); return false; }

+ 2 - 2
engine/source/2d/assets/ParticleAssetEmitter.cc

@@ -489,7 +489,7 @@ void ParticleAssetEmitter::onAssetRefreshed( AssetPtrBase* pAssetPtrBase )
 
 //------------------------------------------------------------------------------
 
-void ParticleAssetEmitter::onTamlCustomWrite( TamlCustomProperties& customProperties )
+void ParticleAssetEmitter::onTamlCustomWrite( TamlCustomNodes& customNodes )
 {
     // Debug Profiling.
     PROFILE_SCOPE(ParticleAssetEmitter_OnTamlCustomWrite);
@@ -500,7 +500,7 @@ void ParticleAssetEmitter::onTamlCustomWrite( TamlCustomProperties& customProper
 
 //-----------------------------------------------------------------------------
 
-void ParticleAssetEmitter::onTamlCustomRead( const TamlCustomProperties& customProperties )
+void ParticleAssetEmitter::onTamlCustomRead( const TamlCustomNodes& customNodes )
 {
     // Debug Profiling.
     PROFILE_SCOPE(ParticleAssetEmitter_OnTamlCustomRead);

+ 2 - 2
engine/source/2d/assets/ParticleAssetEmitter.h

@@ -260,8 +260,8 @@ private:
     virtual void onAssetRefreshed( AssetPtrBase* pAssetPtrBase );
 
 protected:
-    void onTamlCustomWrite( TamlCustomProperties& customProperties );
-    void onTamlCustomRead( const TamlCustomProperties& customProperties );
+    void onTamlCustomWrite( TamlCustomNodes& customNodes );
+    void onTamlCustomRead( const TamlCustomNodes& customNodes );
 
     static bool     setEmitterName(void* obj, const char* data)                         { static_cast<ParticleAssetEmitter*>(obj)->setEmitterName( data ); return false; }
     static bool     setEmitterType(void* obj, const char* data)                         { static_cast<ParticleAssetEmitter*>(obj)->setEmitterType( getEmitterTypeEnum(data) ); return false; }

+ 1 - 1
engine/source/2d/assets/ParticleAssetField.cc

@@ -594,7 +594,7 @@ void ParticleAssetField::onTamlCustomRead( const TamlPropertyAlias* pPropertyAli
     for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
     {
         // Fetch property field.
-        TamlPropertyField* pPropertyField = *propertyFieldItr;
+        TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
         // Fetch property field name.
         StringTableEntry fieldName = pPropertyField->getFieldName();

+ 2 - 2
engine/source/2d/assets/ParticleAssetFieldCollection.cc

@@ -422,7 +422,7 @@ F32 ParticleAssetFieldCollection::getValueScale( void ) const
 
 //------------------------------------------------------------------------------
 
-void ParticleAssetFieldCollection::onTamlCustomWrite( TamlCustomProperties& customProperties )
+void ParticleAssetFieldCollection::onTamlCustomWrite( TamlCustomNodes& customNodes )
 {
     // Debug Profiling.
     PROFILE_SCOPE(ParticleAssetFieldCollection_OnTamlCustomWrite);
@@ -443,7 +443,7 @@ void ParticleAssetFieldCollection::onTamlCustomWrite( TamlCustomProperties& cust
 
 //-----------------------------------------------------------------------------
 
-void ParticleAssetFieldCollection::onTamlCustomRead( const TamlCustomProperties& customProperties )
+void ParticleAssetFieldCollection::onTamlCustomRead( const TamlCustomNodes& customNodes )
 {
     // Debug Profiling.
     PROFILE_SCOPE(ParticleAssetFieldCollection_OnTamlCustomRead);

+ 2 - 2
engine/source/2d/assets/ParticleAssetFieldCollection.h

@@ -81,8 +81,8 @@ public:
     bool setValueScale( const F32 valueScale );
     F32 getValueScale( void ) const;    
 
-    void onTamlCustomWrite( TamlCustomProperties& customProperties );
-    void onTamlCustomRead( const TamlCustomProperties& customProperties );
+    void onTamlCustomWrite( TamlCustomNodes& customNodes );
+    void onTamlCustomRead( const TamlCustomNodes& customNodes );
 };
 
 #endif // ParticleAssetFieldCollection

+ 1 - 1
engine/source/2d/core/SpriteBatchItem.cc

@@ -442,7 +442,7 @@ void SpriteBatchItem::onTamlCustomRead( const TamlPropertyAlias* pSpriteAlias )
     for ( TamlPropertyAlias::const_iterator propertyFieldItr = pSpriteAlias->begin(); propertyFieldItr != pSpriteAlias->end(); ++propertyFieldItr )
     {
         // Fetch sprite field.
-        TamlPropertyField* pSpriteField = *propertyFieldItr;
+        TamlCustomNodeField* pSpriteField = *propertyFieldItr;
 
         // Fetch sprite field name.
         StringTableEntry fieldName = pSpriteField->getFieldName();

+ 14 - 14
engine/source/2d/scene/Scene.cc

@@ -3617,7 +3617,7 @@ void Scene::onTamlPreRead( void )
 
 //-----------------------------------------------------------------------------
 
-void Scene::onTamlPostRead( const TamlCustomProperties& customProperties )
+void Scene::onTamlPostRead( const TamlCustomNodes& customProperties )
 {
     // Call parent.
     Parent::onTamlPostRead( customProperties );
@@ -3658,7 +3658,7 @@ void Scene::onTamlPostRead( const TamlCustomProperties& customProperties )
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch property field name.
                 StringTableEntry fieldName = pPropertyField->getFieldName();
@@ -3716,7 +3716,7 @@ void Scene::onTamlPostRead( const TamlCustomProperties& customProperties )
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch property field name.
                 StringTableEntry fieldName = pPropertyField->getFieldName();
@@ -3772,7 +3772,7 @@ void Scene::onTamlPostRead( const TamlCustomProperties& customProperties )
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch property field name.
                 StringTableEntry fieldName = pPropertyField->getFieldName();
@@ -3848,7 +3848,7 @@ void Scene::onTamlPostRead( const TamlCustomProperties& customProperties )
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch property field name.
                 StringTableEntry fieldName = pPropertyField->getFieldName();
@@ -3908,7 +3908,7 @@ void Scene::onTamlPostRead( const TamlCustomProperties& customProperties )
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch property field name.
                 StringTableEntry fieldName = pPropertyField->getFieldName();
@@ -3984,7 +3984,7 @@ void Scene::onTamlPostRead( const TamlCustomProperties& customProperties )
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch property field name.
                 StringTableEntry fieldName = pPropertyField->getFieldName();
@@ -4046,7 +4046,7 @@ void Scene::onTamlPostRead( const TamlCustomProperties& customProperties )
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch property field name.
                 StringTableEntry fieldName = pPropertyField->getFieldName();
@@ -4127,7 +4127,7 @@ void Scene::onTamlPostRead( const TamlCustomProperties& customProperties )
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch property field name.
                 StringTableEntry fieldName = pPropertyField->getFieldName();
@@ -4193,7 +4193,7 @@ void Scene::onTamlPostRead( const TamlCustomProperties& customProperties )
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch property field name.
                 StringTableEntry fieldName = pPropertyField->getFieldName();
@@ -4245,7 +4245,7 @@ void Scene::onTamlPostRead( const TamlCustomProperties& customProperties )
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch property field name.
                 StringTableEntry fieldName = pPropertyField->getFieldName();
@@ -4306,10 +4306,10 @@ void Scene::onTamlPostRead( const TamlCustomProperties& customProperties )
 
 //-----------------------------------------------------------------------------
 
-void Scene::onTamlCustomWrite( TamlCustomProperties& customProperties )
+void Scene::onTamlCustomWrite( TamlCustomNodes& customProperties )
 {
     // Call parent.
-    Parent::onTamlCustomWrite( customProperties );
+    Parent::onTamlCustomWrite( customNodes );
 
     // Fetch joint count.
     const U32 jointCount = getJointCount();
@@ -4746,7 +4746,7 @@ void Scene::onTamlCustomWrite( TamlCustomProperties& customProperties )
 
 //-----------------------------------------------------------------------------
 
-void Scene::onTamlCustomRead( const TamlCustomProperties& customProperties )
+void Scene::onTamlCustomRead( const TamlCustomNodes& customProperties )
 {
     // Call parent.
     Parent::onTamlCustomRead( customProperties );

+ 3 - 3
engine/source/2d/scene/Scene.h

@@ -291,9 +291,9 @@ private:
 protected:
     /// Taml callbacks.
     virtual void            onTamlPreRead( void );
-    virtual void            onTamlPostRead( const TamlCustomProperties& customProperties );
-    virtual void            onTamlCustomWrite( TamlCustomProperties& customProperties );
-    virtual void            onTamlCustomRead( const TamlCustomProperties& customProperties );
+    virtual void            onTamlPostRead( const TamlCustomNodes& customNodes );
+    virtual void            onTamlCustomWrite( TamlCustomNodes& customNodes );
+    virtual void            onTamlCustomRead( const TamlCustomNodes& customNodes );
 
 public:
     Scene();

+ 3 - 3
engine/source/2d/sceneobject/CompositeSprite.cc

@@ -381,10 +381,10 @@ SpriteBatchItem* CompositeSprite::createCustomLayout( const SpriteBatchItem::Log
 
 //-----------------------------------------------------------------------------
 
-void CompositeSprite::onTamlCustomWrite( TamlCustomProperties& customProperties )
+void CompositeSprite::onTamlCustomWrite( TamlCustomNodes& customNodes )
 {
     // Call parent.
-    Parent::onTamlCustomWrite( customProperties );
+    Parent::onTamlCustomWrite( customNodes );
 
     // Fetch sprite count.
     const U32 spriteCount = getSpriteCount();
@@ -402,7 +402,7 @@ void CompositeSprite::onTamlCustomWrite( TamlCustomProperties& customProperties
 
 //-----------------------------------------------------------------------------
 
-void CompositeSprite::onTamlCustomRead( const TamlCustomProperties& customProperties )
+void CompositeSprite::onTamlCustomRead( const TamlCustomNodes& customNodes )
 {
     // Call parent.
     Parent::onTamlCustomRead( customProperties );

+ 2 - 2
engine/source/2d/sceneobject/CompositeSprite.h

@@ -85,8 +85,8 @@ protected:
     virtual SpriteBatchItem* createSpriteIsometricLayout( const SpriteBatchItem::LogicalPosition& logicalPosition );
     virtual SpriteBatchItem* createCustomLayout( const SpriteBatchItem::LogicalPosition& logicalPosition );
 
-    virtual void onTamlCustomWrite( TamlCustomProperties& customProperties );
-    virtual void onTamlCustomRead( const TamlCustomProperties& customProperties );
+    virtual void onTamlCustomWrite( TamlCustomNodes& customNodes );
+    virtual void onTamlCustomRead( const TamlCustomNodes& customNodes );
 
 protected:
     static bool         setDefaultSpriteAngle(void* obj, const char* data)                  { STATIC_VOID_CAST_TO(CompositeSprite, SpriteBatch, obj)->setDefaultSpriteAngle(mDegToRad(dAtof(data))); return false; }

+ 7 - 7
engine/source/2d/sceneobject/SceneObject.cc

@@ -3371,13 +3371,13 @@ U32 SceneObject::getGlobalSceneObjectCount( void )
 
 //-----------------------------------------------------------------------------
 
-void SceneObject::onTamlCustomWrite( TamlCustomProperties& customProperties )
+void SceneObject::onTamlCustomWrite( TamlCustomNodes& customNodes )
 {
     // Debug Profiling.
     PROFILE_SCOPE(SceneObject_OnTamlCustomWrite);
 
     // Call parent.
-    Parent::onTamlCustomWrite( customProperties );
+    Parent::onTamlCustomWrite( customNodes );
 
     // Fetch collision shape count.
     const U32 collisionShapeCount = getCollisionShapeCount();
@@ -3531,7 +3531,7 @@ void SceneObject::onTamlCustomWrite( TamlCustomProperties& customProperties )
 
 //-----------------------------------------------------------------------------
 
-void SceneObject::onTamlCustomRead( const TamlCustomProperties& customProperties )
+void SceneObject::onTamlCustomRead( const TamlCustomNodes& customNodes )
 {
     // Debug Profiling.
     PROFILE_SCOPE(SceneObject_OnTamlCustomRead);
@@ -3574,7 +3574,7 @@ void SceneObject::onTamlCustomRead( const TamlCustomProperties& customProperties
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch property field name.
                 StringTableEntry fieldName = pPropertyField->getFieldName();
@@ -3631,7 +3631,7 @@ void SceneObject::onTamlCustomRead( const TamlCustomProperties& customProperties
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch property field name.
                 StringTableEntry fieldName = pPropertyField->getFieldName();
@@ -3696,7 +3696,7 @@ void SceneObject::onTamlCustomRead( const TamlCustomProperties& customProperties
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch property field name.
                 StringTableEntry fieldName = pPropertyField->getFieldName();
@@ -3764,7 +3764,7 @@ void SceneObject::onTamlCustomRead( const TamlCustomProperties& customProperties
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch property field name.
                 StringTableEntry fieldName = pPropertyField->getFieldName();

+ 2 - 2
engine/source/2d/sceneobject/SceneObject.h

@@ -241,8 +241,8 @@ protected:
     void                    initializeContactGathering( void );
 
     /// Taml callbacks.
-    virtual void            onTamlCustomWrite( TamlCustomProperties& customProperties );
-    virtual void            onTamlCustomRead( const TamlCustomProperties& customProperties );
+    virtual void            onTamlCustomWrite( TamlCustomNodes& customNodes );
+    virtual void            onTamlCustomRead( const TamlCustomNodes& customNodes );
 
 public:
     SceneObject();

+ 6 - 6
engine/source/assets/assetQuery.cc

@@ -51,13 +51,13 @@ void AssetQuery::initPersistFields()
 
 //-----------------------------------------------------------------------------
 
-void AssetQuery::onTamlCustomWrite( TamlCustomProperties& customProperties )
+void AssetQuery::onTamlCustomWrite( TamlCustomNodes& customNodes )
 {
     // Call parent.
-    Parent::onTamlCustomWrite( customProperties );
+    Parent::onTamlCustomWrite( customNodes );
 
-    // Add property.
-    TamlCustomProperty* pProperty = customProperties.addProperty( ASSETQUERY_CUSTO_PROPERTY_NAME );
+    // Add node.
+    TamlCustomNode* pCustomNode = customNodes..addProperty( ASSETQUERY_CUSTO_PROPERTY_NAME );
 
     // Finish if no assets.
     if ( size() == 0 )
@@ -76,7 +76,7 @@ void AssetQuery::onTamlCustomWrite( TamlCustomProperties& customProperties )
 
 //-----------------------------------------------------------------------------
 
-void AssetQuery::onTamlCustomRead( const TamlCustomProperties& customProperties )
+void AssetQuery::onTamlCustomRead( const TamlCustomNodes& customNodes )
 {
     // Call parent.
     Parent::onTamlCustomRead( customProperties );
@@ -102,7 +102,7 @@ void AssetQuery::onTamlCustomRead( const TamlCustomProperties& customProperties
             continue;
 
         // Fetch field.
-        const TamlPropertyField* pField = pAlias->findField( ASSETQUERY_ASSETID_FIELD_NAME );
+        const TamlCustomNodeField* pField = pAlias->findField( ASSETQUERY_ASSETID_FIELD_NAME );
 
         // Do we find the field?
         if ( pField == NULL )

+ 2 - 2
engine/source/assets/assetQuery.h

@@ -49,8 +49,8 @@ private:
     typedef SimObject Parent;
 
 protected:
-    virtual void onTamlCustomWrite( TamlCustomProperties& customProperties );
-    virtual void onTamlCustomRead( const TamlCustomProperties& customProperties );
+    virtual void onTamlCustomWrite( TamlCustomNodes& customNodes );
+    virtual void onTamlCustomRead( const TamlCustomNodes& customNodes );
 
     static const char* getCount(void* obj, const char* data) { return Con::getIntArg(static_cast<AssetQuery*>(obj)->size()); }
     static bool writeCount( void* obj, StringTableEntry pFieldName ) { return false; }

+ 6 - 6
engine/source/assets/assetTagsManifest.cc

@@ -118,10 +118,10 @@ void AssetTagsManifest::renameAssetId( const char* pAssetIdFrom, const char* pAs
 
 //-----------------------------------------------------------------------------
 
-void AssetTagsManifest::onTamlCustomWrite( TamlCustomProperties& customProperties )
+void AssetTagsManifest::onTamlCustomWrite( TamlCustomNodes& customNodes )
 {
     // Call parent.
-    Parent::onTamlCustomWrite( customProperties );
+    Parent::onTamlCustomWrite( customNodes );
 
     // Finish if no tags.
     if ( mTagNameDatabase.size() == 0 )
@@ -157,7 +157,7 @@ void AssetTagsManifest::onTamlCustomWrite( TamlCustomProperties& customPropertie
 
 //-----------------------------------------------------------------------------
 
-void AssetTagsManifest::onTamlCustomRead( const TamlCustomProperties& customProperties )
+void AssetTagsManifest::onTamlCustomRead( const TamlCustomNodes& customNodes )
 {
     // Call parent.
     Parent::onTamlCustomRead( customProperties );
@@ -183,7 +183,7 @@ void AssetTagsManifest::onTamlCustomRead( const TamlCustomProperties& customProp
             continue;
 
         // Fetch "Name" field.
-        const TamlPropertyField* pTagNameField = pAlias->findField( ASSETTAGS_TAGS_NAME_FIELD );
+        const TamlCustomNodeField* pTagNameField = pAlias->findField( ASSETTAGS_TAGS_NAME_FIELD );
 
         // Do we find the field?
         if ( pTagNameField == NULL )
@@ -218,7 +218,7 @@ void AssetTagsManifest::onTamlCustomRead( const TamlCustomProperties& customProp
             continue;
 
         // Fetch "AssetId" field.
-        const TamlPropertyField* pAssetIdField = pAlias->findField( ASSETTAGS_ASSETS_ASSETID_FIELD );
+        const TamlCustomNodeField* pAssetIdField = pAlias->findField( ASSETTAGS_ASSETS_ASSETID_FIELD );
 
         // Do we find the field?
         if ( pAssetIdField == NULL )
@@ -229,7 +229,7 @@ void AssetTagsManifest::onTamlCustomRead( const TamlCustomProperties& customProp
         }
 
         // Fetch "Tag" field.
-        const TamlPropertyField* pTagField = pAlias->findField( ASSETTAGS_ASSETS_TAG_FIELD );
+        const TamlCustomNodeField* pTagField = pAlias->findField( ASSETTAGS_ASSETS_TAG_FIELD );
 
         // Do we find the field?
         if ( pTagField == NULL )

+ 2 - 2
engine/source/assets/assetTagsManifest.h

@@ -120,8 +120,8 @@ private:
     void renameAssetId( const char* pAssetIdFrom, const char* pAssetIdTo );
 
 protected:
-    virtual void onTamlCustomWrite( TamlCustomProperties& customProperties );
-    virtual void onTamlCustomRead( const TamlCustomProperties& customProperties );
+    virtual void onTamlCustomWrite( TamlCustomNodes& customNodes );
+    virtual void onTamlCustomRead( const TamlCustomNodes& customNodes );
 
 public:
     AssetTagsManifest();

+ 6 - 6
engine/source/component/behaviors/behaviorComponent.cpp

@@ -886,10 +886,10 @@ const BehaviorComponent::typePortConnectionVector* BehaviorComponent::getBehavio
 
 //-----------------------------------------------------------------------------
 
-void BehaviorComponent::onTamlCustomWrite( TamlCustomProperties& customProperties )
+void BehaviorComponent::onTamlCustomWrite( TamlCustomNodes& customNodes )
 {
     // Call parent.
-    Parent::onTamlCustomWrite( customProperties );
+    Parent::onTamlCustomWrite( customNodes );
 
     // Fetch behavior count.
     const U32 behaviorCount = (U32)mBehaviors.size();
@@ -987,7 +987,7 @@ void BehaviorComponent::onTamlCustomWrite( TamlCustomProperties& customPropertie
 
 //-----------------------------------------------------------------------------
 
-void BehaviorComponent::onTamlCustomRead( const TamlCustomProperties& customProperties )
+void BehaviorComponent::onTamlCustomRead( const TamlCustomNodes& customNodes )
 {
     // Call parent.
     Parent::onTamlCustomRead( customProperties );
@@ -1051,7 +1051,7 @@ void BehaviorComponent::onTamlCustomRead( const TamlCustomProperties& customProp
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch field name.
                 const char* pFieldName = pPropertyField->getFieldName();
@@ -1139,8 +1139,8 @@ void BehaviorComponent::onTamlCustomRead( const TamlCustomProperties& customProp
             }
 
             // Fetch property field #1.
-            TamlPropertyField* pPropertyField1 = *pPropertyAlias->begin();
-            TamlPropertyField* pPropertyField2 = *(pPropertyAlias->begin()+1);
+            TamlCustomNodeField* pPropertyField1 = *pPropertyAlias->begin();
+            TamlCustomNodeField* pPropertyField2 = *(pPropertyAlias->begin()+1);
            
             // Fetch behavior instances #1.
             BehaviorInstance* pBehaviorInstance1 = getBehaviorByInstanceId( dAtoi( pPropertyField1->getFieldValue() ) );

+ 2 - 2
engine/source/component/behaviors/behaviorComponent.h

@@ -88,8 +88,8 @@ protected:
     virtual const char* _callMethod( U32 argc, const char *argv[], bool callThis = true );
 
     /// Taml callbacks.
-    virtual void onTamlCustomWrite( TamlCustomProperties& customProperties );
-    virtual void onTamlCustomRead( const TamlCustomProperties& customProperties );
+    virtual void onTamlCustomWrite( TamlCustomNodes& customNodes );
+    virtual void onTamlCustomRead( const TamlCustomNodes& customNodes );
 
 private:
     void destroyBehaviorOutputConnections( BehaviorInstance* pOutputBehavior );

+ 3 - 3
engine/source/persistence/taml/taml.cc

@@ -671,7 +671,7 @@ void Taml::compileCustomProperties( TamlWriteNode* pTamlWriteNode )
     AssertFatal( pTamlWriteNode->mpSimObject != NULL, "Cannot compile custom properties on a node with no object." );
 
     // Fetch the custom properties on the write node.
-    TamlCustomProperties& customProperties = pTamlWriteNode->mCustomProperties;
+    TamlCustomNodes& customProperties = pTamlWriteNode->mCustomProperties;
 
     // Are there any Taml callbacks?
     if ( pTamlWriteNode->mpTamlCallbacks != NULL )
@@ -695,9 +695,9 @@ void Taml::compileCustomProperties( TamlWriteNode* pTamlWriteNode )
             TamlPropertyAlias* pAlias = *typeAliasItr;
 
             // Iterate the fields.
-            for( TamlPropertyFieldVector::iterator fieldItr = pAlias->begin(); fieldItr != pAlias->end(); ++fieldItr )
+            for( TamlCustomNodeFieldVector::iterator fieldItr = pAlias->begin(); fieldItr != pAlias->end(); ++fieldItr )
             {
-                TamlPropertyField* pPropertyField = *fieldItr;
+                TamlCustomNodeField* pPropertyField = *fieldItr;
 
                 // Skip if not an object field.
                 if ( !pPropertyField->isObjectField() )

+ 3 - 3
engine/source/persistence/taml/taml.h

@@ -129,10 +129,10 @@ private:
     inline void tamlPreWrite( TamlCallbacks* pCallbacks )                                           { pCallbacks->onTamlPreWrite(); }
     inline void tamlPostWrite( TamlCallbacks* pCallbacks )                                          { pCallbacks->onTamlPostWrite(); }
     inline void tamlPreRead( TamlCallbacks* pCallbacks )                                            { pCallbacks->onTamlPreRead(); }
-    inline void tamlPostRead( TamlCallbacks* pCallbacks, const TamlCustomProperties& customProperties )   { pCallbacks->onTamlPostRead( customProperties ); }
+    inline void tamlPostRead( TamlCallbacks* pCallbacks, const TamlCustomNodes& customNodes )   { pCallbacks->onTamlPostRead( customProperties ); }
     inline void tamlAddParent( TamlCallbacks* pCallbacks, SimObject* pParentObject )                { pCallbacks->onTamlAddParent( pParentObject ); }
-    inline void tamlCustomWrite( TamlCallbacks* pCallbacks, TamlCustomProperties& customProperties )      { pCallbacks->onTamlCustomWrite( customProperties ); }
-    inline void tamlCustomRead( TamlCallbacks* pCallbacks, const TamlCustomProperties& customProperties ) { pCallbacks->onTamlCustomRead( customProperties ); }
+    inline void tamlCustomWrite( TamlCallbacks* pCallbacks, TamlCustomNodes& customNodes )      { pCallbacks->onTamlCustomWrite( customProperties ); }
+    inline void tamlCustomRead( TamlCallbacks* pCallbacks, const TamlCustomNodes& customNodes ) { pCallbacks->onTamlCustomRead( customProperties ); }
 
 public:
     Taml();

+ 2 - 2
engine/source/persistence/taml/tamlBinaryReader.cc

@@ -191,7 +191,7 @@ SimObject* TamlBinaryReader::parseElement( Stream& stream, const U32 versionId )
     }
 
     // Parse custom elements.
-    TamlCustomProperties customProperties;
+    TamlCustomNodes customProperties;
 
     // Parse children.
     parseChildren( stream, pCallbacks, pSimObject, versionId );
@@ -212,7 +212,7 @@ SimObject* TamlBinaryReader::parseElement( Stream& stream, const U32 versionId )
 
 //-----------------------------------------------------------------------------
 
-void TamlBinaryReader::parseCustomElements( Stream& stream, TamlCallbacks* pCallbacks, TamlCustomProperties& customProperties, const U32 versionId )
+void TamlBinaryReader::parseCustomElements( Stream& stream, TamlCallbacks* pCallbacks, TamlCustomNodes& customNodes, const U32 versionId )
 {
     // Debug Profiling.
     PROFILE_SCOPE(TamlBinaryReader_ParseCustomElement);

+ 1 - 1
engine/source/persistence/taml/tamlBinaryReader.h

@@ -58,7 +58,7 @@ private:
     void resetParse( void );
 
     SimObject* parseElement( Stream& stream, const U32 versionId );
-    void parseCustomElements( Stream& stream, TamlCallbacks* pCallbacks, TamlCustomProperties& customProperties, const U32 versionId );
+    void parseCustomElements( Stream& stream, TamlCallbacks* pCallbacks, TamlCustomNodes& customNodes, const U32 versionId );
     void parseAttributes( Stream& stream, SimObject* pSimObject, const U32 versionId );
     void parseChildren( Stream& stream, TamlCallbacks* pCallbacks, SimObject* pSimObject, const U32 versionId );
 };

+ 3 - 3
engine/source/persistence/taml/tamlBinaryWriter.cc

@@ -132,13 +132,13 @@ void TamlBinaryWriter::writeCustomElements( Stream& stream, const TamlWriteNode*
     PROFILE_SCOPE(TamlBinaryWriter_WriteCustomElements);
 
     // Fetch custom properties.
-    const TamlCustomProperties& customProperties = pTamlWriteNode->mCustomProperties;
+    const TamlCustomNodes& customNodes = pTamlWriteNode->mCustomProperties;
 
     // Write custom element count.
     stream.write( (U32)customProperties.size() );
 
     // Iterate custom properties.
-    for( TamlCustomProperties::const_iterator customPropertyItr = customProperties.begin(); customPropertyItr != customProperties.end(); ++customPropertyItr )
+    for( TamlCustomNodes::const_iterator customPropertyItr = customProperties.begin(); customPropertyItr != customProperties.end(); ++customPropertyItr )
     {
         // Fetch custom property.
         TamlCustomProperty* pCustomProperty = *customPropertyItr;
@@ -176,7 +176,7 @@ void TamlBinaryWriter::writeCustomElements( Stream& stream, const TamlWriteNode*
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Fetch object field flag,
                 const bool isObjectField = pPropertyField->isObjectField();

+ 4 - 4
engine/source/persistence/taml/tamlCallbacks.h

@@ -25,7 +25,7 @@
 
 //-----------------------------------------------------------------------------
 
-class TamlCustomProperties;
+class TamlCustomNodes;
 class SimObject;
 
 //-----------------------------------------------------------------------------
@@ -46,16 +46,16 @@ private:
 
     /// Called after Taml has finished reading the object.
     /// The custom properties is additionally passed here for object who want to process it at the end of reading.
-    virtual void onTamlPostRead( const TamlCustomProperties& customProperties ) = 0;
+    virtual void onTamlPostRead( const TamlCustomNodes& customNodes ) = 0;
 
     /// Called after Taml has finished reading the object and has added the object to any parent.
     virtual void onTamlAddParent( SimObject* pParentObject ) = 0;
 
     /// Called during the writing of the object to allow custom properties to be written.
-    virtual void onTamlCustomWrite( TamlCustomProperties& customProperties ) = 0;
+    virtual void onTamlCustomWrite( TamlCustomNodes& customNodes ) = 0;
 
     /// Called during the reading of the object to allow custom properties to be read.
-    virtual void onTamlCustomRead( const TamlCustomProperties& customProperties ) = 0;
+    virtual void onTamlCustomRead( const TamlCustomNodes& customNodes ) = 0;
 };
 
 #endif // _TAML_CALLBACKS_H_

+ 6 - 6
engine/source/persistence/taml/tamlCustom.cc

@@ -28,7 +28,7 @@
 
 //-----------------------------------------------------------------------------
 
-void TamlPropertyField::resetState( void )
+void TamlCustomNodeField::resetState( void )
 {
     mFieldName = StringTable->EmptyString;
     *mFieldValue = 0;
@@ -40,7 +40,7 @@ void TamlPropertyField::resetState( void )
 
 //-----------------------------------------------------------------------------
 
-void TamlPropertyField::set( const char* pFieldName, const char* pFieldValue )
+void TamlCustomNodeField::set( const char* pFieldName, const char* pFieldValue )
 {
     // Sanity!
     AssertFatal( pFieldName != NULL, "Field name cannot be NULL." );
@@ -69,7 +69,7 @@ void TamlPropertyField::set( const char* pFieldName, const char* pFieldValue )
 
 //-----------------------------------------------------------------------------
 
-void TamlPropertyField::set( const char* pFieldName, SimObject* pFieldObject )
+void TamlCustomNodeField::set( const char* pFieldName, SimObject* pFieldObject )
 {
     // Sanity!
     AssertFatal( pFieldName != NULL, "Field name cannot be NULL." );
@@ -88,7 +88,7 @@ void TamlPropertyField::set( const char* pFieldName, SimObject* pFieldObject )
 
 //-----------------------------------------------------------------------------
 
-void TamlPropertyField::setWriteNode( TamlWriteNode* pWriteNode )
+void TamlCustomNodeField::setWriteNode( TamlWriteNode* pWriteNode )
 {
     // Sanity!
     AssertFatal( mFieldName != StringTable->EmptyString, "Cannot set write node with an empty field name." );
@@ -105,14 +105,14 @@ void TamlPropertyField::setWriteNode( TamlWriteNode* pWriteNode )
 
 //-----------------------------------------------------------------------------
 
-SimObject* TamlPropertyField::getFieldObject( void ) const
+SimObject* TamlCustomNodeField::getFieldObject( void ) const
 {
     return mpFieldObject != NULL ? mpFieldObject : NULL;
 }
 
 //-----------------------------------------------------------------------------
 
-bool TamlPropertyField::isObjectField( void ) const
+bool TamlCustomNodeField::isObjectField( void ) const
 {
     return mpFieldObject != NULL;
 }

+ 119 - 182
engine/source/persistence/taml/tamlCustom.h

@@ -51,7 +51,7 @@
 
 //-----------------------------------------------------------------------------
 
-#define MAX_TAML_PROPERTY_FIELDVALUE_LENGTH 2048
+#define MAX_TAML_NODE_FIELDVALUE_LENGTH 2048
 
 //-----------------------------------------------------------------------------
 
@@ -59,10 +59,10 @@ class TamlWriteNode;
 
 //-----------------------------------------------------------------------------
 
-class TamlPropertyField : public IFactoryObjectReset
+class TamlCustomNodeField : public IFactoryObjectReset
 {
 public:
-    TamlPropertyField()
+    TamlCustomNodeField()
     {
         // Reset field object.
         // NOTE: This MUST be done before the state is reset otherwise we'll be touching uninitialized stuff.
@@ -72,7 +72,7 @@ public:
         resetState();
     }
 
-    virtual ~TamlPropertyField()
+    virtual ~TamlCustomNodeField()
     {
         // Everything should already be cleared in a state reset.
         // Touching any memory here is dangerous as this type is typically
@@ -111,7 +111,7 @@ public:
         if ( dSscanf( mFieldValue, "%d %d", &fieldValue.x, &fieldValue.y ) != 2 )
         {
             // Warn.
-            Con::warnf( "TamlPropertyField - Reading point2I but it has an incorrect format: '%s'.", mFieldValue );
+            Con::warnf( "TamlCustomNodeField - Reading point2I but it has an incorrect format: '%s'.", mFieldValue );
         }
     }
 
@@ -120,7 +120,7 @@ public:
         if ( dSscanf( mFieldValue, "%g %g", &fieldValue.x, &fieldValue.y ) != 2 )
         {
             // Warn.
-            Con::warnf( "TamlPropertyField - Reading point2F but it has an incorrect format: '%s'.", mFieldValue );
+            Con::warnf( "TamlCustomNodeField - Reading point2F but it has an incorrect format: '%s'.", mFieldValue );
         }
     }
 
@@ -129,7 +129,7 @@ public:
         if ( dSscanf( mFieldValue, "%g %g", &fieldValue.x, &fieldValue.y ) != 2 )
         {
             // Warn.
-            Con::warnf( "TamlPropertyField - Reading vector but it has an incorrect format: '%s'.", mFieldValue );
+            Con::warnf( "TamlCustomNodeField - Reading vector but it has an incorrect format: '%s'.", mFieldValue );
         }
     }
 
@@ -179,7 +179,7 @@ public:
         char fieldNameBuffer[1024];
 
         // Sanity!
-        AssertFatal( fieldNameLength < sizeof(fieldNameBuffer), "TamlPropertyField: Field name is too long." );
+        AssertFatal( fieldNameLength < sizeof(fieldNameBuffer), "TamlCustomNodeField: Field name is too long." );
 
         dStrcpy( fieldNameBuffer, mFieldName );
         fieldNameBuffer[fieldNameLength-1] = 0;
@@ -190,28 +190,25 @@ public:
 
 private:
     StringTableEntry    mFieldName;
-    char                mFieldValue[MAX_TAML_PROPERTY_FIELDVALUE_LENGTH];
+    char                mFieldValue[MAX_TAML_NODE_FIELDVALUE_LENGTH];
     SimObject*          mpFieldObject;
     TamlWriteNode*      mpFieldWriteNode;
 };
 
-static FactoryCache<TamlPropertyField> TamlPropertyFieldFactory;
+static FactoryCache<TamlCustomNodeField> TamlCustomNodeFieldFactory;
+typedef Vector<TamlCustomNodeField*> TamlCustomNodeFieldVector;
 
 //-----------------------------------------------------------------------------
 
-typedef Vector<TamlPropertyField*> TamlPropertyFieldVector;
-
-class TamlPropertyAlias :
-    public TamlPropertyFieldVector,
-    public IFactoryObjectReset
+class TamlCustomNode : public IFactoryObjectReset
 {
 public:
-    TamlPropertyAlias()
+    TamlCustomNode()
     {
         resetState();
     }
 
-    virtual ~TamlPropertyAlias()
+    virtual ~TamlCustomNode()
     {
         // Everything should already be cleared in a state reset.
         // Touching any memory here is dangerous as this type is typically
@@ -221,25 +218,36 @@ public:
 
     virtual void resetState( void )
     {
-        while( size() > 0 )
+        // Cache the children.
+        while ( mChildren.size() > 0 )
+        {
+            TamlCustomNodeFactory.cacheObject( mChildren.back() );
+            mChildren.pop_back();
+        }
+
+        // Cache the fields.
+        while( mFields.size() > 0 )
         {
-            TamlPropertyFieldFactory.cacheObject( back() );
-            pop_back();
+            TamlCustomNodeFieldFactory.cacheObject( mFields.back() );
+            mFields.pop_back();
         }
 
-        mAliasName = StringTable->EmptyString;
+        // Reset the node name.
+        mNodeName = StringTable->EmptyString;
+
+        // Reset the ignore empty flag.
         mIgnoreEmpty = false;
     }
 
-    void set( const char* pAliasName )
+    void set( const char* pNodeName )
     {
         // Sanity!
-        AssertFatal( pAliasName != NULL, "Type alias cannot be NULL." );
+        AssertFatal( pNodeName != NULL, "Node name cannot be NULL." );
 
-        mAliasName = StringTable->insert( pAliasName );
+        mNodeName = StringTable->insert( pNodeName );
     }
 
-    TamlPropertyField* addField( const char* pFieldName, const ColorI& fieldValue )
+    TamlCustomNodeField* addField( const char* pFieldName, const ColorI& fieldValue )
     {
         // Fetch the field value.
         const char* pFieldValue = Con::getData( TypeColorI, &const_cast<ColorI&>(fieldValue), 0 );
@@ -248,14 +256,14 @@ public:
         if ( pFieldValue == NULL )
         {
             // No, so warn.
-            Con::warnf( "Taml: Failed to add property field name '%s' with ColorI value.", pFieldName );
+            Con::warnf( "Taml: Failed to add node field name '%s' with ColorI value.", pFieldName );
             pFieldValue = StringTable->EmptyString;
         }
 
         return addField( pFieldName, pFieldValue );
     }
 
-    TamlPropertyField* addField( const char* pFieldName, const ColorF& fieldValue )
+    TamlCustomNodeField* addField( const char* pFieldName, const ColorF& fieldValue )
     {
         // Fetch the field value.
         const char* pFieldValue = Con::getData( TypeColorF, &const_cast<ColorF&>(fieldValue), 0 );
@@ -264,137 +272,137 @@ public:
         if ( pFieldValue == NULL )
         {
             // No, so warn.
-            Con::warnf( "Taml: Failed to add property field name '%s' with ColorF value.", pFieldName );
+            Con::warnf( "Taml: Failed to add node field name '%s' with ColorF value.", pFieldName );
             pFieldValue = StringTable->EmptyString;
         }
 
         return addField( pFieldName, pFieldValue );
     }
 
-    TamlPropertyField* addField( const char* pFieldName, const Point2I& fieldValue )
+    TamlCustomNodeField* addField( const char* pFieldName, const Point2I& fieldValue )
     {
         char fieldValueBuffer[32];
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%d %d", fieldValue.x, fieldValue.y );
         return addField( pFieldName, fieldValueBuffer );
     }
 
-    TamlPropertyField* addField( const char* pFieldName, const Point2F& fieldValue )
+    TamlCustomNodeField* addField( const char* pFieldName, const Point2F& fieldValue )
     {
         char fieldValueBuffer[32];
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%.5g %0.5g", fieldValue.x, fieldValue.y );
         return addField( pFieldName, fieldValueBuffer );
     }
 
-    TamlPropertyField* addField( const char* pFieldName, const b2Vec2& fieldValue )
+    TamlCustomNodeField* addField( const char* pFieldName, const b2Vec2& fieldValue )
     {
         char fieldValueBuffer[32];
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%.5g %.5g", fieldValue.x, fieldValue.y );
         return addField( pFieldName, fieldValueBuffer );
     }
 
-    TamlPropertyField* addField( const char* pFieldName, const U32 fieldValue )
+    TamlCustomNodeField* addField( const char* pFieldName, const U32 fieldValue )
     {
         char fieldValueBuffer[16];
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%d", fieldValue );
         return addField( pFieldName, fieldValueBuffer );
     }
 
-    TamlPropertyField* addField( const char* pFieldName, const bool fieldValue )
+    TamlCustomNodeField* addField( const char* pFieldName, const bool fieldValue )
     {
         char fieldValueBuffer[16];
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%d", fieldValue );
         return addField( pFieldName, fieldValueBuffer );
     }
 
-    TamlPropertyField* addField( const char* pFieldName, const S32 fieldValue )
+    TamlCustomNodeField* addField( const char* pFieldName, const S32 fieldValue )
     {
         char fieldValueBuffer[16];
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%d", fieldValue );
         return addField( pFieldName, fieldValueBuffer );
     }
 
-    TamlPropertyField* addField( const char* pFieldName, const float fieldValue )
+    TamlCustomNodeField* addField( const char* pFieldName, const float fieldValue )
     {
         char fieldValueBuffer[16];
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%.5g", fieldValue );
         return addField( pFieldName, fieldValueBuffer );
     }
 
-    TamlPropertyField* addField( const char* pFieldName, const char* pFieldValue )
+    TamlCustomNodeField* addField( const char* pFieldName, const char* pFieldValue )
     {
-        // Create a property field.
-        TamlPropertyField* pPropertyField = TamlPropertyFieldFactory.createObject();
+        // Create a node field.
+        TamlCustomNodeField* pNodeField = TamlCustomNodeFieldFactory.createObject();
 
-        // Set property field.
-        pPropertyField->set( pFieldName, pFieldValue );
+        // Set node field.
+        pNodeField->set( pFieldName, pFieldValue );
 
 #if TORQUE_DEBUG
         // Ensure a field name conflict does not exist.
-        for( Vector<TamlPropertyField*>::iterator propertyFieldItr = begin(); propertyFieldItr != end(); ++propertyFieldItr )
+        for( Vector<TamlCustomNodeField*>::iterator nodeFieldItr = mFields.begin(); nodeFieldItr != mFields.end(); ++nodeFieldItr )
         {
             // Skip if field name is not the same.
-            if ( pPropertyField->getFieldName() != (*propertyFieldItr)->getFieldName() )
+            if ( pNodeField->getFieldName() != (*nodeFieldItr)->getFieldName() )
                 continue;
 
             // Warn!
-            Con::warnf("Conflicting Taml property field name of '%s' in property alias of '%s'.", pFieldName, mAliasName );
+            Con::warnf("Conflicting Taml node field name of '%s' in property alias of '%s'.", pFieldName, mNodeName );
 
-            // Cache property field.
-            TamlPropertyFieldFactory.cacheObject( pPropertyField );
+            // Cache node field.
+            TamlCustomNodeFieldFactory.cacheObject( pNodeField );
             return NULL;
         }
 
         // Ensure the field value is not too long.
-        if ( dStrlen( pFieldValue ) >= MAX_TAML_PROPERTY_FIELDVALUE_LENGTH )
+        if ( dStrlen( pFieldValue ) >= MAX_TAML_NODE_FIELDVALUE_LENGTH )
         {
             // Warn.
             Con::warnf("Taml field name '%s' has a field value that is too long (Max:%d): '%s'.",
                 pFieldName,
-                MAX_TAML_PROPERTY_FIELDVALUE_LENGTH,
+                MAX_TAML_NODE_FIELDVALUE_LENGTH,
                 pFieldValue );
 
-            // Cache property field.
-            TamlPropertyFieldFactory.cacheObject( pPropertyField );
+            // Cache node field.
+            TamlCustomNodeFieldFactory.cacheObject( pNodeField );
             return NULL;
         }
 #endif
-        // Store property field.
-        push_back( pPropertyField );
+        // Store node field.
+        mFields.push_back( pNodeField );
 
-        return pPropertyField;
+        return pNodeField;
     }
 
-    TamlPropertyField* addField( const char* pFieldName, SimObject* pFieldObject )
+    TamlCustomNodeField* addField( const char* pFieldName, SimObject* pFieldObject )
     {
-        // Create a property field.
-        TamlPropertyField* pPropertyField = TamlPropertyFieldFactory.createObject();
+        // Create a node field.
+        TamlCustomNodeField* pNodeField = TamlCustomNodeFieldFactory.createObject();
 
-        // Set property field.
-        pPropertyField->set( pFieldName, pFieldObject );
+        // Set node field.
+        pNodeField->set( pFieldName, pFieldObject );
 
 #if TORQUE_DEBUG
         // Ensure a field name conflict does not exist.
-        for( TamlPropertyFieldVector::iterator propertyFieldItr = begin(); propertyFieldItr != end(); ++propertyFieldItr )
+        for( TamlCustomNodeFieldVector::iterator nodeFieldItr = mFields.begin(); nodeFieldItr != mFields.end(); ++nodeFieldItr )
         {
             // Skip if field name is not the same.
-            if ( pPropertyField->getFieldName() != (*propertyFieldItr)->getFieldName() )
+            if ( pNodeField->getFieldName() != (*nodeFieldItr)->getFieldName() )
                 continue;
 
             // Warn!
-            Con::warnf("Conflicting Taml property field name of '%s' in property alias of '%s'.", pFieldName, mAliasName );
+            Con::warnf("Conflicting Taml node field name of '%s' in property alias of '%s'.", pFieldName, mNodeName );
 
-            // Cache property field.
-            TamlPropertyFieldFactory.cacheObject( pPropertyField );
+            // Cache node field.
+            TamlCustomNodeFieldFactory.cacheObject( pNodeField );
             return NULL;
         }
 #endif
-        // Store property field.
-        push_back( pPropertyField );
+        // Store node field.
+        mFields.push_back( pNodeField );
 
-        return pPropertyField;
+        return pNodeField;
     }
 
-    const TamlPropertyField* findField( const char* pFieldName ) const
+    const TamlCustomNodeField* findField( const char* pFieldName ) const
     {
         // Sanity!
         AssertFatal( pFieldName != NULL, "Cannot find Taml field name that is NULL." );
@@ -402,8 +410,8 @@ public:
         // Fetch field name.
         StringTableEntry fieldName = StringTable->insert( pFieldName );
 
-        // Find property field.
-        for( TamlPropertyFieldVector::const_iterator fieldItr = begin(); fieldItr != end(); ++fieldItr )
+        // Find node field.
+        for( TamlCustomNodeFieldVector::const_iterator fieldItr = mFields.begin(); fieldItr != mFields.end(); ++fieldItr )
         {
             if ( (*fieldItr)->getFieldName() == fieldName )
                 return (*fieldItr);
@@ -412,175 +420,104 @@ public:
         return NULL;
     }
 
-    StringTableEntry    mAliasName;
-    bool                mIgnoreEmpty;
-};
-
-static FactoryCache<TamlPropertyAlias> TamlPropertyAliasFactory;
-
-//-----------------------------------------------------------------------------
-
-typedef Vector<TamlPropertyAlias*> TamlPropertyAliasVector;
-
-class TamlCustomProperty :
-    public TamlPropertyAliasVector,
-    public IFactoryObjectReset
-{
-public:
-    TamlCustomProperty()
-    {
-    }
-
-    virtual ~TamlCustomProperty()
-    {
-        // Everything should already be cleared in a state reset.
-        // Touching any memory here is dangerous as this type is typically
-        // held in a static factory cache until shutdown at which point
-        // pretty much anything or everything could be invalid!
-    }
-
-    virtual void resetState( void )
-    {
-        while( size() > 0 )
-        {
-            TamlPropertyAliasFactory.cacheObject( back() );
-            pop_back();
-        }
-        mIgnoreEmpty = true;
-    }
-
-    void set( const char* pPropertyName )
-    {
-        // Sanity!
-        AssertFatal( pPropertyName != NULL, "TamlCustomProperty::set() - Property name cannot be NULL." );
-
-        mPropertyName = StringTable->insert( pPropertyName );
-    }
-
-    TamlPropertyAlias* addAlias( const char* pAliasName, const bool ignoreEmpty = false )
-    {
-        // Create a alias.
-        TamlPropertyAlias* pAlias = TamlPropertyAliasFactory.createObject();
-
-        // Set alias name.
-        pAlias->set( pAliasName );
-
-        // Set ignore-empty flag.
-        pAlias->mIgnoreEmpty = ignoreEmpty;
-
-        // Store alias.
-        push_back( pAlias );
-
-        return pAlias;
-    }
-
-    void removeAlias( const U32 index )
-    {
-        // Sanity!
-        AssertFatal( index < (U32)size(), "TamlCustomProperty::removeAlias() - Index is out of bounds." );
-
-        // Cache the alias.
-        TamlPropertyAliasFactory.cacheObject( at(index) );
-
-        // Remove it.
-        erase( index );
-    }
-
-    StringTableEntry mPropertyName;
-    bool mIgnoreEmpty;
+    StringTableEntry            mNodeName;
+    Vector<TamlCustomNode*>     mChildren;
+    TamlCustomNodeFieldVector   mFields;
+    bool                        mIgnoreEmpty;
 };
 
-static FactoryCache<TamlCustomProperty> TamlCustomPropertyFactory;
+static FactoryCache<TamlCustomNode> TamlCustomNodeFactory;
+typedef Vector<TamlCustomNode*> TamlCustomNodeVector;
 
 //-----------------------------------------------------------------------------
 
-typedef Vector<TamlCustomProperty*> TamlCustomPropertyVector;
-
-class TamlCustomProperties :
-    public TamlCustomPropertyVector,
-    public IFactoryObjectReset
+class TamlCustomNodes : public IFactoryObjectReset
 {
 public:
-    TamlCustomProperties()
+    TamlCustomNodes()
     {
     }
 
-    virtual ~TamlCustomProperties()
+    virtual ~TamlCustomNodes()
     {
         resetState();
     }
 
     virtual void resetState( void )
     {
-        while( size() > 0 )
+        // Cache the nodes.
+        while ( mNodes.size() > 0 )
         {
-            TamlCustomPropertyFactory.cacheObject( back() );
-            pop_back();
+            TamlCustomNodeFactory.cacheObject( mNodes.back() );
+            mNodes.pop_back();
         }
     }
 
-    TamlCustomProperty* addProperty( const char* pPropertyName, const bool ignoreEmpty = true )
+    TamlCustomNode* addNode( const char* pNodeName, const bool ignoreEmpty = true )
     {
-        // Create a custom property.
-        TamlCustomProperty* pCustomProperty = TamlCustomPropertyFactory.createObject();
+        // Create a custom node.
+        TamlCustomNode* pCustomNode = TamlCustomNodeFactory.createObject();
 
-        // Set property name.
-        pCustomProperty->set( pPropertyName );
+        // Set node name.
+        pCustomNode->set( pNodeName );
 
         // Set ignore-empty flag.
-        pCustomProperty->mIgnoreEmpty = ignoreEmpty;
+        pCustomNode->mIgnoreEmpty = ignoreEmpty;
 
 #if TORQUE_DEBUG
-        // Ensure an property name conflict does not exist.
-        for( TamlCustomPropertyVector::iterator propertyItr = begin(); propertyItr != end(); ++propertyItr )
+        // Ensure a node name conflict does not exist.
+        for( TamlCustomNodeVector::iterator nodeItr = mNodes.begin(); nodeItr != mNodes.end(); ++nodeItr )
         {
-            // Skip if property name is not the same.
-            if ( pCustomProperty->mPropertyName != (*propertyItr)->mPropertyName )
+            // Skip if node name is not the same.
+            if ( pCustomNode->mNodeName != (*nodeItr)->mNodeName )
                 continue;
 
             // Warn!
-            Con::warnf("Conflicting Taml custom property name of '%s'.", pPropertyName );
+            Con::warnf("Conflicting Taml custom node name of '%s'.", pNodeName );
 
             // Cache property.
-            TamlCustomPropertyFactory.cacheObject( pCustomProperty );
+            TamlCustomNodeFactory.cacheObject( pCustomNode );
             return NULL;
         }
 #endif
         // Store property.
-        push_back( pCustomProperty );
+        mNodes.push_back( pCustomNode );
 
-        return pCustomProperty;
+        return pCustomNode;
     }
 
-    void removeProperty( const U32 index )
+    void removeNode( const U32 index )
     {
         // Sanity!
-        AssertFatal( index < (U32)size(), "TamlCustomProperty::removeProperty() - Index is out of bounds." );
+        AssertFatal( index < (U32)mNodes.size(), "tamlCustomNode::removeNode() - Index is out of bounds." );
 
-        // Cache the custom property.
-        TamlCustomPropertyFactory.cacheObject( at(index) );
+        // Cache the custom node.
+        TamlCustomNodeFactory.cacheObject( mNodes[index] );
 
         // Remove it.
-        erase( index );
+        mNodes.erase( index );
     }
 
-    const TamlCustomProperty* findProperty( const char* pPropertyName ) const
+    const TamlCustomNode* findProperty( const char* pNodeName ) const
     {
         // Sanity!
-        AssertFatal( pPropertyName != NULL, "Cannot find Taml property name that is NULL." );
+        AssertFatal( pNodeName != NULL, "Cannot find Taml node name that is NULL." );
 
-        // Fetch property name.
-        StringTableEntry propertyName = StringTable->insert( pPropertyName );
+        // Fetch node name.
+        StringTableEntry nodeName = StringTable->insert( pNodeName );
 
-        // Find property.
-        for( Vector<TamlCustomProperty*>::const_iterator propertyItr = begin(); propertyItr != end(); ++propertyItr )
+        // Find node.
+        for( Vector<TamlCustomNode*>::const_iterator nodeItr = mNodes.begin(); nodeItr != mNodes.end(); ++nodeItr )
         {
-            if ( (*propertyItr)->mPropertyName == propertyName )
-                return (*propertyItr);
+            if ( (*nodeItr)->mNodeName == nodeName )
+                return (*nodeItr);
         }
 
         return NULL;
     }
+
+private:
+    TamlCustomNodeVector mNodes;
 };
 
 #endif // _TAML_CUSTOM_H_

+ 1 - 1
engine/source/persistence/taml/tamlWriteNode.h

@@ -113,7 +113,7 @@ public:
     const char*                 mpObjectName;
     Vector<TamlWriteNode::FieldValuePair*> mFields;
     Vector<TamlWriteNode*>*     mChildren;
-    TamlCustomProperties        mCustomProperties;
+    TamlCustomNodes        mCustomProperties;
 };
 
 #endif // _TAML_WRITE_NODE_H_

+ 2 - 2
engine/source/persistence/taml/tamlXmlReader.cc

@@ -166,7 +166,7 @@ SimObject* TamlXmlReader::parseElement( TiXmlElement* pXmlElement )
     // Fetch any children.
     TiXmlNode* pChildXmlNode = pXmlElement->FirstChild();
 
-    TamlCustomProperties customProperties;
+    TamlCustomNodes customProperties;
 
     // Do we have any element children?
     if ( pChildXmlNode != NULL )
@@ -247,7 +247,7 @@ SimObject* TamlXmlReader::parseElement( TiXmlElement* pXmlElement )
 
 //-----------------------------------------------------------------------------
 
-void TamlXmlReader::parseCustomElement( TiXmlElement* pXmlElement, TamlCustomProperties& customProperties )
+void TamlXmlReader::parseCustomElement( TiXmlElement* pXmlElement, TamlCustomNodes& customNodes )
 {
     // Debug Profiling.
     PROFILE_SCOPE(TamlXmlReader_ParseCustomElement);

+ 1 - 1
engine/source/persistence/taml/tamlXmlReader.h

@@ -69,7 +69,7 @@ private:
     void resetParse( void );
 
     SimObject* parseElement( TiXmlElement* pXmlElement );
-    void parseCustomElement( TiXmlElement* pXmlElement, TamlCustomProperties& customProperties );
+    void parseCustomElement( TiXmlElement* pXmlElement, TamlCustomNodes& customNodes );
     void parseAttributes( TiXmlElement* pXmlElement, SimObject* pSimObject );
 
     U32 getTamlRefId( TiXmlElement* pXmlElement );

+ 3 - 3
engine/source/persistence/taml/tamlXmlWriter.cc

@@ -139,14 +139,14 @@ void TamlXmlWriter::compileCustomElements( TiXmlElement* pXmlElement, const Taml
     PROFILE_SCOPE(TamlXmlWriter_CompileCustomElements);
 
     // Fetch custom properties.
-    const TamlCustomProperties& customProperties = pTamlWriteNode->mCustomProperties;
+    const TamlCustomNodes& customProperties = pTamlWriteNode->mCustomProperties;
 
     // Finish if no custom properties exist.
     if ( customProperties.size() == 0 )
         return;
 
     // Iterate custom properties.
-    for( TamlCustomProperties::const_iterator customPropertyItr = customProperties.begin(); customPropertyItr != customProperties.end(); ++customPropertyItr )
+    for( TamlCustomNodes::const_iterator customPropertyItr = customProperties.begin(); customPropertyItr != customProperties.end(); ++customPropertyItr )
     {
         // Fetch custom property.
         TamlCustomProperty* pCustomProperty = *customPropertyItr;
@@ -176,7 +176,7 @@ void TamlXmlWriter::compileCustomElements( TiXmlElement* pXmlElement, const Taml
             for ( TamlPropertyAlias::const_iterator propertyFieldItr = pPropertyAlias->begin(); propertyFieldItr != pPropertyAlias->end(); ++propertyFieldItr )
             {
                 // Fetch property field.
-                TamlPropertyField* pPropertyField = *propertyFieldItr;
+                TamlCustomNodeField* pPropertyField = *propertyFieldItr;
 
                 // Is it an object field?
                 if ( pPropertyField->isObjectField() )

+ 3 - 3
engine/source/sim/simObject.h

@@ -321,10 +321,10 @@ protected:
     virtual void onTamlPreWrite( void ) {}
     virtual void onTamlPostWrite( void ) {}
     virtual void onTamlPreRead( void ) {}
-    virtual void onTamlPostRead( const TamlCustomProperties& customProperties ) {}
+    virtual void onTamlPostRead( const TamlCustomNodes& customNodes ) {}
     virtual void onTamlAddParent( SimObject* pParentObject ) {}
-    virtual void onTamlCustomWrite( TamlCustomProperties& customProperties ) {}
-    virtual void onTamlCustomRead( const TamlCustomProperties& customProperties ) {}
+    virtual void onTamlCustomWrite( TamlCustomNodes& customNodes ) {}
+    virtual void onTamlCustomRead( const TamlCustomNodes& customNodes ) {}
     
 protected:
     bool	mCanSaveFieldDictionary; ///< true if dynamic fields (added at runtime) should be saved, defaults to true