Browse Source

- Taml serialization WIP.

MelvMay-GG 12 years ago
parent
commit
5c475e8

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

@@ -943,30 +943,30 @@ void ImageAsset::onTamlCustomRead( const TamlCustomNodes& customNodes )
         S32 cellWidth = 0;
         S32 cellWidth = 0;
         S32 cellHeight = 0;
         S32 cellHeight = 0;
 
 
-        // Fetch field nodes.
-        const TamlCustomFieldVector& nodeFields = pCellNode->getFields();
+        // Fetch fields.
+        const TamlCustomFieldVector& fields = pCellNode->getFields();
 
 
         // Iterate property fields.
         // Iterate property fields.
-        for ( TamlCustomFieldVector::const_iterator nodeFieldItr = nodeFields.begin(); nodeFieldItr != nodeFields.end(); ++nodeFieldItr )
+        for ( TamlCustomFieldVector::const_iterator fieldItr = fields.begin(); fieldItr != fields.end(); ++fieldItr )
         {
         {
-            // Fetch node field.
-            const TamlCustomNodeField* pNodeField = *nodeFieldItr;
+            // Fetch field.
+            const TamlCustomField* pField = *fieldItr;
 
 
             // Fetch field name.
             // Fetch field name.
-            StringTableEntry fieldName = pNodeField->getFieldName();
+            StringTableEntry fieldName = pField->getFieldName();
 
 
             // Check common fields.
             // Check common fields.
             if ( fieldName == cellOffsetName )
             if ( fieldName == cellOffsetName )
             {
             {
-                pNodeField->getFieldValue( cellOffset );
+                pField->getFieldValue( cellOffset );
             }
             }
             else if ( fieldName == cellWidthName )
             else if ( fieldName == cellWidthName )
             {
             {
-                pNodeField->getFieldValue( cellWidth );
+                pField->getFieldValue( cellWidth );
             }
             }
             else if ( fieldName == cellHeightName )
             else if ( fieldName == cellHeightName )
             {
             {
-                pNodeField->getFieldValue( cellHeight );
+                pField->getFieldValue( cellHeight );
             }
             }
             else
             else
             {
             {

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

@@ -523,28 +523,28 @@ void ParticleAssetField::onTamlCustomWrite( TamlCustomNode* pCustomNode )
     PROFILE_SCOPE(ParticleAssetField_OnTamlCustomWrite);
     PROFILE_SCOPE(ParticleAssetField_OnTamlCustomWrite);
 
 
     // Add a child (ignore it if there ends up being no children).
     // Add a child (ignore it if there ends up being no children).
-    TamlCustomNode* pAssetFieldNode = pCustomNode->addNode( getFieldName(), true );
+    TamlCustomNode* pAssetField = pCustomNode->addNode( getFieldName(), true );
 
 
     // Sanity!
     // Sanity!
-    AssertFatal( pAssetFieldNode != NULL, "ParticleAssetField::onTamlCustomWrite() - Could not create field node." );
+    AssertFatal( pAssetField != NULL, "ParticleAssetField::onTamlCustomWrite() - Could not create field." );
 
 
     if ( mValueBoundsDirty && (mNotEqual( getMinValue(), 0.0f ) || mNotEqual( getMaxValue(), 0.0f )) )
     if ( mValueBoundsDirty && (mNotEqual( getMinValue(), 0.0f ) || mNotEqual( getMaxValue(), 0.0f )) )
     {
     {
-        pAssetFieldNode->addField( particleAssetFieldMinValueName, getMinValue() );
-        pAssetFieldNode->addField( particleAssetFieldMaxValueName, getMaxValue() );
+        pAssetField->addField( particleAssetFieldMinValueName, getMinValue() );
+        pAssetField->addField( particleAssetFieldMaxValueName, getMaxValue() );
     }
     }
     
     
     if ( mValueBoundsDirty && mNotEqual( getMaxTime(), 1.0f ) )
     if ( mValueBoundsDirty && mNotEqual( getMaxTime(), 1.0f ) )
-        pAssetFieldNode->addField( particleAssetFieldMaxTimeName, getMaxTime() );
+        pAssetField->addField( particleAssetFieldMaxTimeName, getMaxTime() );
 
 
     if ( mValueBoundsDirty && mNotEqual( getDefaultValue(), 1.0f ) )
     if ( mValueBoundsDirty && mNotEqual( getDefaultValue(), 1.0f ) )
-        pAssetFieldNode->addField( particleAssetFieldDefaultValueName, getDefaultValue() );
+        pAssetField->addField( particleAssetFieldDefaultValueName, getDefaultValue() );
 
 
     if ( mNotEqual( getValueScale(), 1.0f ) )
     if ( mNotEqual( getValueScale(), 1.0f ) )
-        pAssetFieldNode->addField( particleAssetFieldValueScaleName, getValueScale() );
+        pAssetField->addField( particleAssetFieldValueScaleName, getValueScale() );
 
 
     if ( mNotEqual( getRepeatTime(), 1.0f ) )
     if ( mNotEqual( getRepeatTime(), 1.0f ) )
-        pAssetFieldNode->addField( particleAssetFieldRepeatTimeName, getRepeatTime() );
+        pAssetField->addField( particleAssetFieldRepeatTimeName, getRepeatTime() );
 
 
     // Fetch key count.
     // Fetch key count.
     const U32 keyCount = getDataKeyCount();
     const U32 keyCount = getDataKeyCount();
@@ -593,49 +593,49 @@ void ParticleAssetField::onTamlCustomRead( const TamlCustomNode* pCustomNode )
     // Clear the existing keys.
     // Clear the existing keys.
     mDataKeys.clear();
     mDataKeys.clear();
 
 
-    // Fetch children nodes.
-    const TamlCustomFieldVector& fieldNodes = pCustomNode->getFields();
+    // Fetch fields.
+    const TamlCustomFieldVector& fields = pCustomNode->getFields();
 
 
-    // Iterate node fields.
-    for ( TamlCustomFieldVector::const_iterator fieldNodeItr = fieldNodes.begin(); fieldNodeItr != fieldNodes.end(); ++fieldNodeItr )
+    // Iterate fields.
+    for ( TamlCustomFieldVector::const_iterator fieldItr = fields.begin(); fieldItr != fields.end(); ++fieldItr )
     {
     {
-        // Fetch field node.
-        TamlCustomNodeField* pFieldNode = *fieldNodeItr;
+        // Fetch field.
+        TamlCustomField* pField = *fieldItr;
 
 
         // Fetch property field name.
         // Fetch property field name.
-        StringTableEntry fieldName = pFieldNode->getFieldName();
+        StringTableEntry fieldName = pField->getFieldName();
 
 
         if ( fieldName == particleAssetFieldRepeatTimeName )
         if ( fieldName == particleAssetFieldRepeatTimeName )
         {
         {
-            pFieldNode->getFieldValue( repeatTime );
+            pField->getFieldValue( repeatTime );
         }
         }
         else if ( fieldName == particleAssetFieldMaxTimeName )
         else if ( fieldName == particleAssetFieldMaxTimeName )
         {
         {
-            pFieldNode->getFieldValue( maxTime );
+            pField->getFieldValue( maxTime );
             mValueBoundsDirty = true;
             mValueBoundsDirty = true;
         }
         }
         else if ( fieldName == particleAssetFieldMinValueName )
         else if ( fieldName == particleAssetFieldMinValueName )
         {
         {
-            pFieldNode->getFieldValue( minValue );
+            pField->getFieldValue( minValue );
             mValueBoundsDirty = true;
             mValueBoundsDirty = true;
         }
         }
         else if ( fieldName == particleAssetFieldMaxValueName )
         else if ( fieldName == particleAssetFieldMaxValueName )
         {
         {
-            pFieldNode->getFieldValue( maxValue );
+            pField->getFieldValue( maxValue );
             mValueBoundsDirty = true;
             mValueBoundsDirty = true;
         }
         }
         else if ( fieldName == particleAssetFieldDefaultValueName )
         else if ( fieldName == particleAssetFieldDefaultValueName )
         {
         {
-            pFieldNode->getFieldValue( defaultValue );
+            pField->getFieldValue( defaultValue );
             mValueBoundsDirty = true;
             mValueBoundsDirty = true;
         }
         }
         else if ( fieldName == particleAssetFieldValueScaleName )
         else if ( fieldName == particleAssetFieldValueScaleName )
         {
         {
-            pFieldNode->getFieldValue( valueScale );
+            pField->getFieldValue( valueScale );
         }
         }
         else if ( fieldName == particleAssetFieldDataKeysName )
         else if ( fieldName == particleAssetFieldDataKeysName )
         {
         {
-            const char* pDataKeys = pFieldNode->getFieldValue();
+            const char* pDataKeys = pField->getFieldValue();
             const S32 elementCount = StringUnit::getUnitCount( pDataKeys, " ,\t" );
             const S32 elementCount = StringUnit::getUnitCount( pDataKeys, " ,\t" );
 
 
             // Are there a valid number of elements?
             // Are there a valid number of elements?
@@ -659,21 +659,21 @@ void ParticleAssetField::onTamlCustomRead( const TamlCustomNode* pCustomNode )
     }
     }
 
 
     // Fetch any children.
     // Fetch any children.
-    const TamlCustomNodeVector& childNodes = pCustomNode->getChildren();
+    const TamlCustomNodeVector& children = pCustomNode->getChildren();
 
 
     // Iterate node children.
     // Iterate node children.
-    for( TamlCustomNodeVector::const_iterator childNodeItr = childNodes.begin(); childNodeItr != childNodes.end(); ++childNodeItr )
+    for( TamlCustomNodeVector::const_iterator childItr = children.begin(); childItr != children.end(); ++childItr )
     {
     {
         // Fetch node.
         // Fetch node.
-        TamlCustomNode* pKeyNode = *childNodeItr;
+        TamlCustomNode* pKeyNode = *childItr;
 
 
         // Ignore anything that isn't a key.
         // Ignore anything that isn't a key.
         if ( pKeyNode->getNodeName() != particleAssetFieldDataKeyName )
         if ( pKeyNode->getNodeName() != particleAssetFieldDataKeyName )
             continue;
             continue;
 
 
         // Fetch the fields.
         // Fetch the fields.
-        const TamlCustomNodeField* pTimeField = pKeyNode->findField( particleAssetFieldDataKeyTimeName );
-        const TamlCustomNodeField* pValueField = pKeyNode->findField( particleAssetFieldDataKeyValueName );
+        const TamlCustomField* pTimeField = pKeyNode->findField( particleAssetFieldDataKeyTimeName );
+        const TamlCustomField* pValueField = pKeyNode->findField( particleAssetFieldDataKeyValueName );
 
 
         // Did we find the fields?
         // Did we find the fields?
         if ( pTimeField == NULL || pValueField == NULL )
         if ( pTimeField == NULL || pValueField == NULL )

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

@@ -1199,7 +1199,7 @@ void SpriteBatch::onTamlCustomRead( const TamlCustomNode* pSpritesNode )
         TamlCustomNode* pNode = *spriteItr;
         TamlCustomNode* pNode = *spriteItr;
 
 
         // Fetch alias name.
         // Fetch alias name.
-        StringTableEntry nodeName = pNode->mNodeName;
+        StringTableEntry nodeName = pNode->getNodeName();
 
 
         // Is this a known node name?
         // Is this a known node name?
         if ( nodeName != spriteItemNodeName )
         if ( nodeName != spriteItemNodeName )

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

@@ -445,7 +445,7 @@ void SpriteBatchItem::onTamlCustomRead( const TamlCustomNode* pSpriteNode )
     for ( TamlCustomFieldVector::const_iterator fieldItr = spriteField.begin(); fieldItr != spriteField.end(); ++fieldItr )
     for ( TamlCustomFieldVector::const_iterator fieldItr = spriteField.begin(); fieldItr != spriteField.end(); ++fieldItr )
     {
     {
         // Fetch sprite field.
         // Fetch sprite field.
-        TamlCustomNodeField* pSpriteField = *fieldItr;
+        TamlCustomField* pSpriteField = *fieldItr;
 
 
         // Fetch sprite field name.
         // Fetch sprite field name.
         StringTableEntry fieldName = pSpriteField->getFieldName();
         StringTableEntry fieldName = pSpriteField->getFieldName();

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

@@ -3672,35 +3672,35 @@ void Scene::onTamlPostRead( const TamlCustomNodes& customNodes )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 {
                 {
                     // Fetch field node.
                     // Fetch field node.
-                    TamlCustomNodeField* pFieldNode = *jointFieldItr;
+                    TamlCustomField* pField = *jointFieldItr;
 
 
                     // Fetch property field name.
                     // Fetch property field name.
-                    StringTableEntry fieldName = pFieldNode->getFieldName();
+                    StringTableEntry fieldName = pField->getFieldName();
 
 
                     // Fetch fields.
                     // Fetch fields.
                     if ( fieldName == jointLocalAnchorAName )
                     if ( fieldName == jointLocalAnchorAName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorA );
+                        pField->getFieldValue( localAnchorA );
                     }
                     }
                     else if ( fieldName == jointLocalAnchorBName )
                     else if ( fieldName == jointLocalAnchorBName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorB );
+                        pField->getFieldValue( localAnchorB );
                     }
                     }
                     else if ( fieldName == jointCollideConnectedName )
                     else if ( fieldName == jointCollideConnectedName )
                     {
                     {
-                        pFieldNode->getFieldValue( collideConnected );
+                        pField->getFieldValue( collideConnected );
                     }
                     }
                     else if ( fieldName == jointDistanceLengthName )
                     else if ( fieldName == jointDistanceLengthName )
                     {
                     {
-                        pFieldNode->getFieldValue( length );
+                        pField->getFieldValue( length );
                     }
                     }
                     else if ( fieldName == jointDistanceFrequencyName )
                     else if ( fieldName == jointDistanceFrequencyName )
                     {
                     {
-                        pFieldNode->getFieldValue( frequency );
+                        pField->getFieldValue( frequency );
                     }
                     }
                     else if ( fieldName == jointDistanceDampingRatioName )
                     else if ( fieldName == jointDistanceDampingRatioName )
                     {
                     {
-                        pFieldNode->getFieldValue( dampingRatio );
+                        pField->getFieldValue( dampingRatio );
                     }
                     }
                 }
                 }
 
 
@@ -3738,27 +3738,27 @@ void Scene::onTamlPostRead( const TamlCustomNodes& customNodes )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 {
                 {
                     // Fetch field node.
                     // Fetch field node.
-                    TamlCustomNodeField* pFieldNode = *jointFieldItr;
+                    TamlCustomField* pField = *jointFieldItr;
 
 
                     // Fetch property field name.
                     // Fetch property field name.
-                    StringTableEntry fieldName = pFieldNode->getFieldName();
+                    StringTableEntry fieldName = pField->getFieldName();
 
 
                     // Fetch fields.
                     // Fetch fields.
                     if ( fieldName == jointLocalAnchorAName )
                     if ( fieldName == jointLocalAnchorAName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorA );
+                        pField->getFieldValue( localAnchorA );
                     }
                     }
                     else if ( fieldName == jointLocalAnchorBName )
                     else if ( fieldName == jointLocalAnchorBName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorB );
+                        pField->getFieldValue( localAnchorB );
                     }
                     }
                     else if ( fieldName == jointCollideConnectedName )
                     else if ( fieldName == jointCollideConnectedName )
                     {
                     {
-                        pFieldNode->getFieldValue( collideConnected );
+                        pField->getFieldValue( collideConnected );
                     }
                     }
                     else if ( fieldName == jointRopeMaxLengthName )
                     else if ( fieldName == jointRopeMaxLengthName )
                     {
                     {
-                        pFieldNode->getFieldValue( maxLength );
+                        pField->getFieldValue( maxLength );
                     }
                     }
                 }
                 }
 
 
@@ -3802,45 +3802,45 @@ void Scene::onTamlPostRead( const TamlCustomNodes& customNodes )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 {
                 {
                     // Fetch field node.
                     // Fetch field node.
-                    TamlCustomNodeField* pFieldNode = *jointFieldItr;
+                    TamlCustomField* pField = *jointFieldItr;
 
 
                     // Fetch property field name.
                     // Fetch property field name.
-                    StringTableEntry fieldName = pFieldNode->getFieldName();
+                    StringTableEntry fieldName = pField->getFieldName();
 
 
                     // Fetch fields.
                     // Fetch fields.
                     if ( fieldName == jointLocalAnchorAName )
                     if ( fieldName == jointLocalAnchorAName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorA );
+                        pField->getFieldValue( localAnchorA );
                     }
                     }
                     else if ( fieldName == jointLocalAnchorBName )
                     else if ( fieldName == jointLocalAnchorBName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorB );
+                        pField->getFieldValue( localAnchorB );
                     }
                     }
                     else if ( fieldName == jointCollideConnectedName )
                     else if ( fieldName == jointCollideConnectedName )
                     {
                     {
-                        pFieldNode->getFieldValue( collideConnected );
+                        pField->getFieldValue( collideConnected );
                     }
                     }
                     else if ( fieldName == jointRevoluteLimitLowerAngleName )
                     else if ( fieldName == jointRevoluteLimitLowerAngleName )
                     {
                     {
-                        pFieldNode->getFieldValue( lowerAngle );
+                        pField->getFieldValue( lowerAngle );
                         lowerAngle = mDegToRad( lowerAngle );
                         lowerAngle = mDegToRad( lowerAngle );
                         enableLimit = true;
                         enableLimit = true;
                     }
                     }
                     else if ( fieldName == jointRevoluteLimitUpperAngleName )
                     else if ( fieldName == jointRevoluteLimitUpperAngleName )
                     {
                     {
-                        pFieldNode->getFieldValue( upperAngle );
+                        pField->getFieldValue( upperAngle );
                         upperAngle = mDegToRad( upperAngle );
                         upperAngle = mDegToRad( upperAngle );
                         enableLimit = true;
                         enableLimit = true;
                     }
                     }
                     else if ( fieldName == jointRevoluteMotorSpeedName )
                     else if ( fieldName == jointRevoluteMotorSpeedName )
                     {
                     {
-                        pFieldNode->getFieldValue( motorSpeed );
+                        pField->getFieldValue( motorSpeed );
                         motorSpeed = mDegToRad( motorSpeed );
                         motorSpeed = mDegToRad( motorSpeed );
                         enableMotor = true;
                         enableMotor = true;
                     }
                     }
                     else if ( fieldName == jointRevoluteMotorMaxTorqueName )
                     else if ( fieldName == jointRevoluteMotorMaxTorqueName )
                     {
                     {
-                        pFieldNode->getFieldValue( maxMotorTorque );
+                        pField->getFieldValue( maxMotorTorque );
                         enableMotor = true;
                         enableMotor = true;
                     }
                     }
                 }
                 }
@@ -3886,31 +3886,31 @@ void Scene::onTamlPostRead( const TamlCustomNodes& customNodes )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 {
                 {
                     // Fetch field node.
                     // Fetch field node.
-                    TamlCustomNodeField* pFieldNode = *jointFieldItr;
+                    TamlCustomField* pField = *jointFieldItr;
 
 
                     // Fetch property field name.
                     // Fetch property field name.
-                    StringTableEntry fieldName = pFieldNode->getFieldName();
+                    StringTableEntry fieldName = pField->getFieldName();
 
 
                     // Fetch fields.
                     // Fetch fields.
                     if ( fieldName == jointLocalAnchorAName )
                     if ( fieldName == jointLocalAnchorAName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorA );
+                        pField->getFieldValue( localAnchorA );
                     }
                     }
                     else if ( fieldName == jointLocalAnchorBName )
                     else if ( fieldName == jointLocalAnchorBName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorB );
+                        pField->getFieldValue( localAnchorB );
                     }
                     }
                     else if ( fieldName == jointCollideConnectedName )
                     else if ( fieldName == jointCollideConnectedName )
                     {
                     {
-                        pFieldNode->getFieldValue( collideConnected );
+                        pField->getFieldValue( collideConnected );
                     }
                     }
                     else if ( fieldName == jointWeldFrequencyName )
                     else if ( fieldName == jointWeldFrequencyName )
                     {
                     {
-                        pFieldNode->getFieldValue( frequency );
+                        pField->getFieldValue( frequency );
                     }
                     }
                     else if ( fieldName == jointWeldDampingRatioName )
                     else if ( fieldName == jointWeldDampingRatioName )
                     {
                     {
-                        pFieldNode->getFieldValue( dampingRatio );
+                        pField->getFieldValue( dampingRatio );
                     }
                     }
                 }
                 }
 
 
@@ -3954,46 +3954,46 @@ void Scene::onTamlPostRead( const TamlCustomNodes& customNodes )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 {
                 {
                     // Fetch field node.
                     // Fetch field node.
-                    TamlCustomNodeField* pFieldNode = *jointFieldItr;
+                    TamlCustomField* pField = *jointFieldItr;
 
 
                     // Fetch property field name.
                     // Fetch property field name.
-                    StringTableEntry fieldName = pFieldNode->getFieldName();
+                    StringTableEntry fieldName = pField->getFieldName();
 
 
                     // Fetch fields.
                     // Fetch fields.
                     if ( fieldName == jointLocalAnchorAName )
                     if ( fieldName == jointLocalAnchorAName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorA );
+                        pField->getFieldValue( localAnchorA );
                     }
                     }
                     else if ( fieldName == jointLocalAnchorBName )
                     else if ( fieldName == jointLocalAnchorBName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorB );
+                        pField->getFieldValue( localAnchorB );
                     }
                     }
                     else if ( fieldName == jointCollideConnectedName )
                     else if ( fieldName == jointCollideConnectedName )
                     {
                     {
-                        pFieldNode->getFieldValue( collideConnected );
+                        pField->getFieldValue( collideConnected );
                     }
                     }
                     else if ( fieldName == jointWheelMotorSpeedName )
                     else if ( fieldName == jointWheelMotorSpeedName )
                     {
                     {
-                        pFieldNode->getFieldValue( motorSpeed );
+                        pField->getFieldValue( motorSpeed );
                         motorSpeed = mDegToRad( motorSpeed );
                         motorSpeed = mDegToRad( motorSpeed );
                         enableMotor = true;
                         enableMotor = true;
                     }
                     }
                     else if ( fieldName == jointWheelMotorMaxTorqueName )
                     else if ( fieldName == jointWheelMotorMaxTorqueName )
                     {
                     {
-                        pFieldNode->getFieldValue( maxMotorTorque );
+                        pField->getFieldValue( maxMotorTorque );
                         enableMotor = true;
                         enableMotor = true;
                     }
                     }
                     else if ( fieldName == jointWheelFrequencyName )
                     else if ( fieldName == jointWheelFrequencyName )
                     {
                     {
-                        pFieldNode->getFieldValue( frequency );
+                        pField->getFieldValue( frequency );
                     }
                     }
                     else if ( fieldName == jointWheelDampingRatioName )
                     else if ( fieldName == jointWheelDampingRatioName )
                     {
                     {
-                        pFieldNode->getFieldValue( dampingRatio );
+                        pField->getFieldValue( dampingRatio );
                     }
                     }
                     else if ( fieldName == jointWheelWorldAxisName )
                     else if ( fieldName == jointWheelWorldAxisName )
                     {
                     {
-                        pFieldNode->getFieldValue( worldAxis );                    
+                        pField->getFieldValue( worldAxis );                    
                     }
                     }
                 }
                 }
 
 
@@ -4038,31 +4038,31 @@ void Scene::onTamlPostRead( const TamlCustomNodes& customNodes )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 {
                 {
                     // Fetch field node.
                     // Fetch field node.
-                    TamlCustomNodeField* pFieldNode = *jointFieldItr;
+                    TamlCustomField* pField = *jointFieldItr;
 
 
                     // Fetch property field name.
                     // Fetch property field name.
-                    StringTableEntry fieldName = pFieldNode->getFieldName();
+                    StringTableEntry fieldName = pField->getFieldName();
 
 
                     // Fetch fields.
                     // Fetch fields.
                     if ( fieldName == jointLocalAnchorAName )
                     if ( fieldName == jointLocalAnchorAName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorA );
+                        pField->getFieldValue( localAnchorA );
                     }
                     }
                     else if ( fieldName == jointLocalAnchorBName )
                     else if ( fieldName == jointLocalAnchorBName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorB );
+                        pField->getFieldValue( localAnchorB );
                     }
                     }
                     else if ( fieldName == jointCollideConnectedName )
                     else if ( fieldName == jointCollideConnectedName )
                     {
                     {
-                        pFieldNode->getFieldValue( collideConnected );
+                        pField->getFieldValue( collideConnected );
                     }
                     }
                     else if ( fieldName == jointFrictionMaxForceName )
                     else if ( fieldName == jointFrictionMaxForceName )
                     {
                     {
-                        pFieldNode->getFieldValue( maxForce );
+                        pField->getFieldValue( maxForce );
                     }
                     }
                     else if ( fieldName == jointFrictionMaxTorqueName )
                     else if ( fieldName == jointFrictionMaxTorqueName )
                     {
                     {
-                        pFieldNode->getFieldValue( maxTorque );
+                        pField->getFieldValue( maxTorque );
                     }
                     }
                 }
                 }
 
 
@@ -4108,48 +4108,48 @@ void Scene::onTamlPostRead( const TamlCustomNodes& customNodes )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 {
                 {
                     // Fetch field node.
                     // Fetch field node.
-                    TamlCustomNodeField* pFieldNode = *jointFieldItr;
+                    TamlCustomField* pField = *jointFieldItr;
 
 
                     // Fetch property field name.
                     // Fetch property field name.
-                    StringTableEntry fieldName = pFieldNode->getFieldName();
+                    StringTableEntry fieldName = pField->getFieldName();
 
 
                     // Fetch fields.
                     // Fetch fields.
                     if ( fieldName == jointLocalAnchorAName )
                     if ( fieldName == jointLocalAnchorAName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorA );
+                        pField->getFieldValue( localAnchorA );
                     }
                     }
                     else if ( fieldName == jointLocalAnchorBName )
                     else if ( fieldName == jointLocalAnchorBName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorB );
+                        pField->getFieldValue( localAnchorB );
                     }
                     }
                     else if ( fieldName == jointCollideConnectedName )
                     else if ( fieldName == jointCollideConnectedName )
                     {
                     {
-                        pFieldNode->getFieldValue( collideConnected );
+                        pField->getFieldValue( collideConnected );
                     }
                     }
                     else if ( fieldName == jointPrismaticLimitLowerTransName )
                     else if ( fieldName == jointPrismaticLimitLowerTransName )
                     {
                     {
-                        pFieldNode->getFieldValue( lowerTransLimit );
+                        pField->getFieldValue( lowerTransLimit );
                         enableLimit = true;
                         enableLimit = true;
                     }
                     }
                     else if ( fieldName == jointPrismaticLimitUpperTransName )
                     else if ( fieldName == jointPrismaticLimitUpperTransName )
                     {
                     {
-                        pFieldNode->getFieldValue( upperTransLimit );
+                        pField->getFieldValue( upperTransLimit );
                         enableLimit = true;
                         enableLimit = true;
                     }
                     }
                     else if ( fieldName == jointPrismaticMotorSpeedName )
                     else if ( fieldName == jointPrismaticMotorSpeedName )
                     {
                     {
-                        pFieldNode->getFieldValue( motorSpeed );
+                        pField->getFieldValue( motorSpeed );
                         motorSpeed = mDegToRad( motorSpeed );
                         motorSpeed = mDegToRad( motorSpeed );
                         enableMotor = true;
                         enableMotor = true;
                     }
                     }
                     else if ( fieldName == jointPrismaticMotorMaxForceName )
                     else if ( fieldName == jointPrismaticMotorMaxForceName )
                     {
                     {
-                        pFieldNode->getFieldValue( maxMotorForce );
+                        pField->getFieldValue( maxMotorForce );
                         enableMotor = true;
                         enableMotor = true;
                     }
                     }
                     else if ( fieldName == jointPrismaticWorldAxisName )
                     else if ( fieldName == jointPrismaticWorldAxisName )
                     {
                     {
-                        pFieldNode->getFieldValue( worldAxis );
+                        pField->getFieldValue( worldAxis );
                     }
                     }
                 }
                 }
 
 
@@ -4197,43 +4197,43 @@ void Scene::onTamlPostRead( const TamlCustomNodes& customNodes )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 {
                 {
                     // Fetch field node.
                     // Fetch field node.
-                    TamlCustomNodeField* pFieldNode = *jointFieldItr;
+                    TamlCustomField* pField = *jointFieldItr;
 
 
                     // Fetch property field name.
                     // Fetch property field name.
-                    StringTableEntry fieldName = pFieldNode->getFieldName();
+                    StringTableEntry fieldName = pField->getFieldName();
 
 
                     // Fetch fields.
                     // Fetch fields.
                     if ( fieldName == jointLocalAnchorAName )
                     if ( fieldName == jointLocalAnchorAName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorA );
+                        pField->getFieldValue( localAnchorA );
                     }
                     }
                     else if ( fieldName == jointLocalAnchorBName )
                     else if ( fieldName == jointLocalAnchorBName )
                     {
                     {
-                        pFieldNode->getFieldValue( localAnchorB );
+                        pField->getFieldValue( localAnchorB );
                     }
                     }
                     else if ( fieldName == jointCollideConnectedName )
                     else if ( fieldName == jointCollideConnectedName )
                     {
                     {
-                        pFieldNode->getFieldValue( collideConnected );
+                        pField->getFieldValue( collideConnected );
                     }
                     }
                     else if ( fieldName == jointPulleyLengthAName )
                     else if ( fieldName == jointPulleyLengthAName )
                     {
                     {
-                        pFieldNode->getFieldValue( lengthA );
+                        pField->getFieldValue( lengthA );
                     }
                     }
                     else if ( fieldName == jointPulleyLengthBName )
                     else if ( fieldName == jointPulleyLengthBName )
                     {
                     {
-                        pFieldNode->getFieldValue( lengthB );
+                        pField->getFieldValue( lengthB );
                     }
                     }
                     else if ( fieldName == jointPulleyRatioName )
                     else if ( fieldName == jointPulleyRatioName )
                     {
                     {
-                        pFieldNode->getFieldValue( ratio );
+                        pField->getFieldValue( ratio );
                     }
                     }
                     else if ( fieldName == jointPulleyGroundAnchorAName )
                     else if ( fieldName == jointPulleyGroundAnchorAName )
                     {
                     {
-                        pFieldNode->getFieldValue( worldGroundAnchorA );
+                        pField->getFieldValue( worldGroundAnchorA );
                     }
                     }
                     else if ( fieldName == jointPulleyGroundAnchorBName )
                     else if ( fieldName == jointPulleyGroundAnchorBName )
                     {
                     {
-                        pFieldNode->getFieldValue( worldGroundAnchorB );
+                        pField->getFieldValue( worldGroundAnchorB );
                     }
                     }
                 }
                 }
 
 
@@ -4271,31 +4271,31 @@ void Scene::onTamlPostRead( const TamlCustomNodes& customNodes )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 {
                 {
                     // Fetch field node.
                     // Fetch field node.
-                    TamlCustomNodeField* pFieldNode = *jointFieldItr;
+                    TamlCustomField* pField = *jointFieldItr;
 
 
                     // Fetch property field name.
                     // Fetch property field name.
-                    StringTableEntry fieldName = pFieldNode->getFieldName();
+                    StringTableEntry fieldName = pField->getFieldName();
 
 
                     // Fetch fields.
                     // Fetch fields.
                     if ( fieldName == jointCollideConnectedName )
                     if ( fieldName == jointCollideConnectedName )
                     {
                     {
-                        pFieldNode->getFieldValue( collideConnected );
+                        pField->getFieldValue( collideConnected );
                     }
                     }
                     else if ( fieldName == jointTargetWorldTargetName )
                     else if ( fieldName == jointTargetWorldTargetName )
                     {
                     {
-                        pFieldNode->getFieldValue( worldTarget );
+                        pField->getFieldValue( worldTarget );
                     }
                     }
                     else if ( fieldName == jointTargetMaxForceName )
                     else if ( fieldName == jointTargetMaxForceName )
                     {
                     {
-                        pFieldNode->getFieldValue( maxForce );
+                        pField->getFieldValue( maxForce );
                     }
                     }
                     else if ( fieldName == jointTargetFrequencyName )
                     else if ( fieldName == jointTargetFrequencyName )
                     {
                     {
-                        pFieldNode->getFieldValue( frequency );
+                        pField->getFieldValue( frequency );
                     }
                     }
                     else if ( fieldName == jointTargetDampingRatioName )
                     else if ( fieldName == jointTargetDampingRatioName )
                     {
                     {
-                        pFieldNode->getFieldValue( dampingRatio );
+                        pField->getFieldValue( dampingRatio );
                     }
                     }
                 }
                 }
 
 
@@ -4335,36 +4335,36 @@ void Scene::onTamlPostRead( const TamlCustomNodes& customNodes )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 for ( TamlCustomFieldVector::const_iterator jointFieldItr = jointFields.begin(); jointFieldItr != jointFields.end(); ++jointFieldItr )
                 {
                 {
                     // Fetch field node.
                     // Fetch field node.
-                    TamlCustomNodeField* pFieldNode = *jointFieldItr;
+                    TamlCustomField* pField = *jointFieldItr;
 
 
                     // Fetch property field name.
                     // Fetch property field name.
-                    StringTableEntry fieldName = pFieldNode->getFieldName();
+                    StringTableEntry fieldName = pField->getFieldName();
 
 
                     // Fetch fields.
                     // Fetch fields.
                     if ( fieldName == jointCollideConnectedName )
                     if ( fieldName == jointCollideConnectedName )
                     {
                     {
-                        pFieldNode->getFieldValue( collideConnected );
+                        pField->getFieldValue( collideConnected );
                     }
                     }
                     else if ( fieldName == jointMotorLinearOffsetName )
                     else if ( fieldName == jointMotorLinearOffsetName )
                     {
                     {
-                        pFieldNode->getFieldValue( linearOffset );
+                        pField->getFieldValue( linearOffset );
                     }
                     }
                     else if ( fieldName == jointMotorAngularOffsetName )
                     else if ( fieldName == jointMotorAngularOffsetName )
                     {
                     {
-                        pFieldNode->getFieldValue( angularOffset );
+                        pField->getFieldValue( angularOffset );
                         angularOffset = mDegToRad( angularOffset );
                         angularOffset = mDegToRad( angularOffset );
                     }
                     }
                     else if ( fieldName == jointMotorMaxForceName )
                     else if ( fieldName == jointMotorMaxForceName )
                     {
                     {
-                        pFieldNode->getFieldValue( maxForce );
+                        pField->getFieldValue( maxForce );
                     }
                     }
                     else if ( fieldName == jointMotorMaxTorqueName )
                     else if ( fieldName == jointMotorMaxTorqueName )
                     {
                     {
-                        pFieldNode->getFieldValue( maxTorque );
+                        pField->getFieldValue( maxTorque );
                     }
                     }
                     else if ( fieldName == jointMotorCorrectionFactorName )
                     else if ( fieldName == jointMotorCorrectionFactorName )
                     {
                     {
-                        pFieldNode->getFieldValue( correctionFactor );
+                        pField->getFieldValue( correctionFactor );
                     }
                     }
                 }
                 }
 
 

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

@@ -3588,37 +3588,37 @@ void SceneObject::onTamlCustomRead( const TamlCustomNodes& customNodes )
             // Iterate property fields.
             // Iterate property fields.
             for ( TamlCustomFieldVector::const_iterator shapeFieldItr = shapeFields.begin(); shapeFieldItr != shapeFields.end(); ++shapeFieldItr )
             for ( TamlCustomFieldVector::const_iterator shapeFieldItr = shapeFields.begin(); shapeFieldItr != shapeFields.end(); ++shapeFieldItr )
             {
             {
-                // Fetch field node.
-                const TamlCustomNodeField* pFieldNode = *shapeFieldItr;
+                // Fetch field.
+                const TamlCustomField* pField = *shapeFieldItr;
 
 
                 // Fetch property field name.
                 // Fetch property field name.
-                StringTableEntry fieldName = pFieldNode->getFieldName();
+                StringTableEntry fieldName = pField->getFieldName();
 
 
                 // Check common fields.
                 // Check common fields.
                 if ( fieldName == shapeDensityName )
                 if ( fieldName == shapeDensityName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeDensity );
+                    pField->getFieldValue( shapeDensity );
                 }
                 }
                 else if ( fieldName == shapeFrictionName )
                 else if ( fieldName == shapeFrictionName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeFriction );
+                    pField->getFieldValue( shapeFriction );
                 }
                 }
                 else if ( fieldName == shapeRestitutionName )
                 else if ( fieldName == shapeRestitutionName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeRestitution );
+                    pField->getFieldValue( shapeRestitution );
                 }
                 }
                 else if ( fieldName == shapeSensorName )
                 else if ( fieldName == shapeSensorName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeSensor );
+                    pField->getFieldValue( shapeSensor );
                 }
                 }
                 // Check circle fields.
                 // Check circle fields.
                 else if ( fieldName == circleRadiusName )
                 else if ( fieldName == circleRadiusName )
                 {
                 {
-                    pFieldNode->getFieldValue( radius );
+                    pField->getFieldValue( radius );
                 }
                 }
                 else if ( fieldName == circleOffsetName )
                 else if ( fieldName == circleOffsetName )
                 {
                 {
-                    pFieldNode->getFieldValue( offset );
+                    pField->getFieldValue( offset );
                 }                   
                 }                   
             }
             }
 
 
@@ -3648,31 +3648,31 @@ void SceneObject::onTamlCustomRead( const TamlCustomNodes& customNodes )
             // Iterate property fields.
             // Iterate property fields.
             for ( TamlCustomFieldVector::const_iterator shapeFieldItr = shapeFields.begin(); shapeFieldItr != shapeFields.end(); ++shapeFieldItr )
             for ( TamlCustomFieldVector::const_iterator shapeFieldItr = shapeFields.begin(); shapeFieldItr != shapeFields.end(); ++shapeFieldItr )
             {
             {
-                // Fetch field node.
-                const TamlCustomNodeField* pFieldNode = *shapeFieldItr;
+                // Fetch field.
+                const TamlCustomField* pField = *shapeFieldItr;
 
 
                 // Fetch property field name.
                 // Fetch property field name.
-                StringTableEntry fieldName = pFieldNode->getFieldName();
+                StringTableEntry fieldName = pField->getFieldName();
 
 
                 // Check common fields.
                 // Check common fields.
                 if ( fieldName == shapeDensityName )
                 if ( fieldName == shapeDensityName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeDensity );
+                    pField->getFieldValue( shapeDensity );
                 }
                 }
                 else if ( fieldName == shapeFrictionName )
                 else if ( fieldName == shapeFrictionName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeFriction );
+                    pField->getFieldValue( shapeFriction );
                 }
                 }
                 else if ( fieldName == shapeRestitutionName )
                 else if ( fieldName == shapeRestitutionName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeRestitution );
+                    pField->getFieldValue( shapeRestitution );
                 }
                 }
                 else if ( fieldName == shapeSensorName )
                 else if ( fieldName == shapeSensorName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeSensor );
+                    pField->getFieldValue( shapeSensor );
                 }
                 }
                 // Check polygon fields.
                 // Check polygon fields.
-                else if ( pFieldNode->fieldNameBeginsWith( polygonPointName ) )
+                else if ( pField->fieldNameBeginsWith( polygonPointName ) )
                 {
                 {
                     // Is the point count at maximum?
                     // Is the point count at maximum?
                     if ( pointCount == b2_maxPolygonVertices )
                     if ( pointCount == b2_maxPolygonVertices )
@@ -3683,7 +3683,7 @@ void SceneObject::onTamlCustomRead( const TamlCustomNodes& customNodes )
                     }
                     }
 
 
                     b2Vec2 point;
                     b2Vec2 point;
-                    pFieldNode->getFieldValue( point );
+                    pField->getFieldValue( point );
                     points[pointCount++] = point;
                     points[pointCount++] = point;
                 }
                 }
             }
             }
@@ -3716,44 +3716,44 @@ void SceneObject::onTamlCustomRead( const TamlCustomNodes& customNodes )
             // Iterate property fields.
             // Iterate property fields.
             for ( TamlCustomFieldVector::const_iterator shapeFieldItr = shapeFields.begin(); shapeFieldItr != shapeFields.end(); ++shapeFieldItr )
             for ( TamlCustomFieldVector::const_iterator shapeFieldItr = shapeFields.begin(); shapeFieldItr != shapeFields.end(); ++shapeFieldItr )
             {
             {
-                // Fetch field node.
-                const TamlCustomNodeField* pFieldNode = *shapeFieldItr;
+                // Fetch field.
+                const TamlCustomField* pField = *shapeFieldItr;
 
 
                 // Fetch property field name.
                 // Fetch property field name.
-                StringTableEntry fieldName = pFieldNode->getFieldName();
+                StringTableEntry fieldName = pField->getFieldName();
 
 
                 // Check common fields.
                 // Check common fields.
                 if ( fieldName == shapeDensityName )
                 if ( fieldName == shapeDensityName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeDensity );
+                    pField->getFieldValue( shapeDensity );
                 }
                 }
                 else if ( fieldName == shapeFrictionName )
                 else if ( fieldName == shapeFrictionName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeFriction );
+                    pField->getFieldValue( shapeFriction );
                 }
                 }
                 else if ( fieldName == shapeRestitutionName )
                 else if ( fieldName == shapeRestitutionName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeRestitution );
+                    pField->getFieldValue( shapeRestitution );
                 }
                 }
                 else if ( fieldName == shapeSensorName )
                 else if ( fieldName == shapeSensorName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeSensor );
+                    pField->getFieldValue( shapeSensor );
                 }
                 }
                 // Check chain fields.
                 // Check chain fields.
-                else if ( pFieldNode->fieldNameBeginsWith( chainPointName ) )
+                else if ( pField->fieldNameBeginsWith( chainPointName ) )
                 {
                 {
                     b2Vec2 point;
                     b2Vec2 point;
-                    pFieldNode->getFieldValue( point );
+                    pField->getFieldValue( point );
                     points.push_back( point );
                     points.push_back( point );
                 }
                 }
                 else if ( fieldName == chainAdjacentStartName )
                 else if ( fieldName == chainAdjacentStartName )
                 {
                 {
-                    pFieldNode->getFieldValue( adjacentStartPoint );
+                    pField->getFieldValue( adjacentStartPoint );
                     hasAdjacentStartPoint = true;
                     hasAdjacentStartPoint = true;
                 }
                 }
                 else if ( fieldName == chainAdjacentEndName )
                 else if ( fieldName == chainAdjacentEndName )
                 {
                 {
-                    pFieldNode->getFieldValue( adjacentEndPoint );
+                    pField->getFieldValue( adjacentEndPoint );
                     hasAdjacentEndPoint = true;
                     hasAdjacentEndPoint = true;
                 }
                 }
             }
             }
@@ -3787,46 +3787,46 @@ void SceneObject::onTamlCustomRead( const TamlCustomNodes& customNodes )
             // Iterate property fields.
             // Iterate property fields.
             for ( TamlCustomFieldVector::const_iterator shapeFieldItr = shapeFields.begin(); shapeFieldItr != shapeFields.end(); ++shapeFieldItr )
             for ( TamlCustomFieldVector::const_iterator shapeFieldItr = shapeFields.begin(); shapeFieldItr != shapeFields.end(); ++shapeFieldItr )
             {
             {
-                // Fetch field node.
-                const TamlCustomNodeField* pFieldNode = *shapeFieldItr;
+                // Fetch field.
+                const TamlCustomField* pField = *shapeFieldItr;
 
 
                 // Fetch property field name.
                 // Fetch property field name.
-                StringTableEntry fieldName = pFieldNode->getFieldName();
+                StringTableEntry fieldName = pField->getFieldName();
 
 
                 // Check common fields.
                 // Check common fields.
                 if ( fieldName == shapeDensityName )
                 if ( fieldName == shapeDensityName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeDensity );
+                    pField->getFieldValue( shapeDensity );
                 }
                 }
                 else if ( fieldName == shapeFrictionName )
                 else if ( fieldName == shapeFrictionName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeFriction );
+                    pField->getFieldValue( shapeFriction );
                 }
                 }
                 else if ( fieldName == shapeRestitutionName )
                 else if ( fieldName == shapeRestitutionName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeRestitution );
+                    pField->getFieldValue( shapeRestitution );
                 }
                 }
                 else if ( fieldName == shapeSensorName )
                 else if ( fieldName == shapeSensorName )
                 {
                 {
-                    pFieldNode->getFieldValue( shapeSensor );
+                    pField->getFieldValue( shapeSensor );
                 }
                 }
                 // Check edge fields.
                 // Check edge fields.
                 else if ( fieldName == edgeStartName )
                 else if ( fieldName == edgeStartName )
                 {
                 {
-                    pFieldNode->getFieldValue( point0 );
+                    pField->getFieldValue( point0 );
                 }
                 }
                 else if ( fieldName == edgeEndName )
                 else if ( fieldName == edgeEndName )
                 {
                 {
-                    pFieldNode->getFieldValue( point1 );
+                    pField->getFieldValue( point1 );
                 }
                 }
                 else if ( fieldName == edgeAdjacentStartName )
                 else if ( fieldName == edgeAdjacentStartName )
                 {
                 {
-                    pFieldNode->getFieldValue( adjacentStartPoint );
+                    pField->getFieldValue( adjacentStartPoint );
                     hasAdjacentStartPoint = true;
                     hasAdjacentStartPoint = true;
                 }
                 }
                 else if ( fieldName == edgeAdjacentEndName )
                 else if ( fieldName == edgeAdjacentEndName )
                 {
                 {
-                    pFieldNode->getFieldValue( adjacentEndPoint );
+                    pField->getFieldValue( adjacentEndPoint );
                     hasAdjacentEndPoint = true;
                     hasAdjacentEndPoint = true;
                 }
                 }
             }
             }

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

@@ -69,7 +69,7 @@ void AssetQuery::onTamlCustomWrite( TamlCustomNodes& customNodes )
         // Add asset node.
         // Add asset node.
         TamlCustomNode* pAssetNode = pCustomNode->addNode( ASSETQUERY_ASSETNODE_NAME );
         TamlCustomNode* pAssetNode = pCustomNode->addNode( ASSETQUERY_ASSETNODE_NAME );
 
 
-        // Add fields.
+        // Add field.
         pAssetNode->addField( ASSETQUERY_ASSETID_FIELD_NAME, *assetItr );
         pAssetNode->addField( ASSETQUERY_ASSETID_FIELD_NAME, *assetItr );
     }
     }
 }
 }
@@ -105,7 +105,7 @@ void AssetQuery::onTamlCustomRead( const TamlCustomNodes& customNodes )
             continue;
             continue;
 
 
         // Fetch field.
         // Fetch field.
-        const TamlCustomNodeField* pField = pAssetNode->findField( ASSETQUERY_ASSETID_FIELD_NAME );
+        const TamlCustomField* pField = pAssetNode->findField( ASSETQUERY_ASSETID_FIELD_NAME );
 
 
         // Do we find the field?
         // Do we find the field?
         if ( pField == NULL )
         if ( pField == NULL )

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

@@ -186,7 +186,7 @@ void AssetTagsManifest::onTamlCustomRead( const TamlCustomNodes& customNodes )
             continue;
             continue;
 
 
         // Fetch "Name" field.
         // Fetch "Name" field.
-        const TamlCustomNodeField* pTagNameField = pTagNode->findField( ASSETTAGS_TAGS_NAME_FIELD );
+        const TamlCustomField* pTagNameField = pTagNode->findField( ASSETTAGS_TAGS_NAME_FIELD );
 
 
         // Do we find the field?
         // Do we find the field?
         if ( pTagNameField == NULL )
         if ( pTagNameField == NULL )
@@ -224,7 +224,7 @@ void AssetTagsManifest::onTamlCustomRead( const TamlCustomNodes& customNodes )
             continue;
             continue;
 
 
         // Fetch "AssetId" field.
         // Fetch "AssetId" field.
-        const TamlCustomNodeField* pAssetIdField = pAssetTagNode->findField( ASSETTAGS_ASSETS_ASSETID_FIELD );
+        const TamlCustomField* pAssetIdField = pAssetTagNode->findField( ASSETTAGS_ASSETS_ASSETID_FIELD );
 
 
         // Do we find the field?
         // Do we find the field?
         if ( pAssetIdField == NULL )
         if ( pAssetIdField == NULL )
@@ -235,7 +235,7 @@ void AssetTagsManifest::onTamlCustomRead( const TamlCustomNodes& customNodes )
         }
         }
 
 
         // Fetch "Tag" field.
         // Fetch "Tag" field.
-        const TamlCustomNodeField* pTagField = pAssetTagNode->findField( ASSETTAGS_ASSETS_TAG_FIELD );
+        const TamlCustomField* pTagField = pAssetTagNode->findField( ASSETTAGS_ASSETS_TAG_FIELD );
 
 
         // Do we find the field?
         // Do we find the field?
         if ( pTagField == NULL )
         if ( pTagField == NULL )

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

@@ -1051,19 +1051,19 @@ void BehaviorComponent::onTamlCustomRead( const TamlCustomNodes& customNodes )
             S32 behaviorId = 0;
             S32 behaviorId = 0;
 
 
             // Fetch field nodes.
             // Fetch field nodes.
-            const TamlCustomFieldVector& fieldNodes = pBehaviorNode->getFields();
+            const TamlCustomFieldVector& fields = pBehaviorNode->getFields();
 
 
-            // Iterate node fields.
-            for ( TamlCustomFieldVector::const_iterator nodeFieldItr = fieldNodes.begin(); nodeFieldItr != fieldNodes.end(); ++nodeFieldItr )
+            // Iterate fields.
+            for ( TamlCustomFieldVector::const_iterator nodeFieldItr = fields.begin(); nodeFieldItr != fields.end(); ++nodeFieldItr )
             {
             {
-                // Fetch node field.
-                TamlCustomNodeField* pNodeField = *nodeFieldItr;
+                // Fetch field.
+                TamlCustomField* pField = *nodeFieldItr;
 
 
                 // Fetch field name.
                 // Fetch field name.
-                const char* pFieldName = pNodeField->getFieldName();
+                const char* pFieldName = pField->getFieldName();
 
 
                 // Fetch field value.
                 // Fetch field value.
-                const char* pFieldValue = pNodeField->getFieldValue();
+                const char* pFieldValue = pField->getFieldValue();
 
 
                 // Is this the behavior field Id name?
                 // Is this the behavior field Id name?
                 if ( pFieldName == behaviorFieldIdName )
                 if ( pFieldName == behaviorFieldIdName )
@@ -1102,7 +1102,7 @@ void BehaviorComponent::onTamlCustomRead( const TamlCustomNodes& customNodes )
                 }
                 }
 
 
                 // Set field.
                 // Set field.
-                pBehaviorInstance->setPrefixedDynamicDataField( pNodeField->getFieldName(), NULL, pNodeField->getFieldValue(), fieldType );
+                pBehaviorInstance->setPrefixedDynamicDataField( pField->getFieldName(), NULL, pField->getFieldValue(), fieldType );
             }
             }
 
 
             // Add behavior.
             // Add behavior.
@@ -1151,8 +1151,8 @@ void BehaviorComponent::onTamlCustomRead( const TamlCustomNodes& customNodes )
             }
             }
 
 
             // Fetch property field #1.
             // Fetch property field #1.
-            TamlCustomNodeField* pPropertyField1 = *connectionFieldNodes.begin();
-            TamlCustomNodeField* pPropertyField2 = *(connectionFieldNodes.begin()+1);
+            TamlCustomField* pPropertyField1 = *connectionFieldNodes.begin();
+            TamlCustomField* pPropertyField2 = *(connectionFieldNodes.begin()+1);
            
            
             // Fetch behavior instances #1.
             // Fetch behavior instances #1.
             BehaviorInstance* pBehaviorInstance1 = getBehaviorByInstanceId( dAtoi( pPropertyField1->getFieldValue() ) );
             BehaviorInstance* pBehaviorInstance1 = getBehaviorByInstanceId( dAtoi( pPropertyField1->getFieldValue() ) );

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

@@ -394,7 +394,7 @@ void TamlBinaryReader::parseCustomNode( Stream& stream, TamlCustomNode* pCustomN
             char valueBuffer[MAX_TAML_NODE_FIELDVALUE_LENGTH];
             char valueBuffer[MAX_TAML_NODE_FIELDVALUE_LENGTH];
             stream.readLongString( MAX_TAML_NODE_FIELDVALUE_LENGTH, valueBuffer );
             stream.readLongString( MAX_TAML_NODE_FIELDVALUE_LENGTH, valueBuffer );
 
 
-            // Add node field.
+            // Add field.
             pChildNode->addField( fieldName, valueBuffer );
             pChildNode->addField( fieldName, valueBuffer );
         }
         }
     }
     }

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

@@ -268,27 +268,27 @@ void TamlBinaryWriter::writeCustomNode( Stream& stream, const TamlCustomNode* pC
         }
         }
     }
     }
 
 
-    // Fetch node fields.
-    const TamlCustomFieldVector& nodeFields = pCustomNode->getFields();
+    // Fetch fields.
+    const TamlCustomFieldVector& fields = pCustomNode->getFields();
 
 
     // Fetch child field count.
     // Fetch child field count.
-    const U32 childFieldCount = (U32)nodeFields.size();
+    const U32 childFieldCount = (U32)fields.size();
 
 
-    // Write custom node field count.
+    // Write custom field count.
     stream.write( childFieldCount );
     stream.write( childFieldCount );
 
 
     // Do we have any child fields?
     // Do we have any child fields?
     if ( childFieldCount > 0 )
     if ( childFieldCount > 0 )
     {
     {
-        // Yes, so iterate node fields.
-        for ( TamlCustomFieldVector::const_iterator nodeFieldItr = nodeFields.begin(); nodeFieldItr != nodeFields.end(); ++nodeFieldItr )
+        // Yes, so iterate  fields.
+        for ( TamlCustomFieldVector::const_iterator fieldItr = fields.begin(); fieldItr != fields.end(); ++fieldItr )
         {
         {
             // Fetch node field.
             // Fetch node field.
-            const TamlCustomNodeField* pNodeField = *nodeFieldItr;
+            const TamlCustomField* pField = *fieldItr;
 
 
             // Write the node field.
             // Write the node field.
-            stream.writeString( pNodeField->getFieldName() );
-            stream.writeLongString( MAX_TAML_NODE_FIELDVALUE_LENGTH, pNodeField->getFieldValue() );
+            stream.writeString( pField->getFieldName() );
+            stream.writeLongString( MAX_TAML_NODE_FIELDVALUE_LENGTH, pField->getFieldValue() );
         }
         }
     }
     }
 }
 }

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

@@ -28,12 +28,12 @@
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 
 
-FactoryCache<TamlCustomNodeField> TamlCustomNodeFieldFactory;
+FactoryCache<TamlCustomField> TamlCustomFieldFactory;
 FactoryCache<TamlCustomNode> TamlCustomNodeFactory;
 FactoryCache<TamlCustomNode> TamlCustomNodeFactory;
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 
 
-void TamlCustomNodeField::set( const char* pFieldName, const char* pFieldValue )
+void TamlCustomField::set( const char* pFieldName, const char* pFieldValue )
 {
 {
     // Sanity!
     // Sanity!
     AssertFatal( pFieldName != NULL, "Field name cannot be NULL." );
     AssertFatal( pFieldName != NULL, "Field name cannot be NULL." );

+ 26 - 26
engine/source/persistence/taml/tamlCustom.h

@@ -57,23 +57,23 @@
 
 
 class TamlWriteNode;
 class TamlWriteNode;
 class TamlCustomNode;
 class TamlCustomNode;
-class TamlCustomNodeField;
+class TamlCustomField;
 extern FactoryCache<TamlCustomNode> TamlCustomNodeFactory;
 extern FactoryCache<TamlCustomNode> TamlCustomNodeFactory;
-extern FactoryCache<TamlCustomNodeField> TamlCustomNodeFieldFactory;
+extern FactoryCache<TamlCustomField> TamlCustomFieldFactory;
 typedef Vector<TamlCustomNode*> TamlCustomNodeVector;
 typedef Vector<TamlCustomNode*> TamlCustomNodeVector;
-typedef Vector<TamlCustomNodeField*> TamlCustomFieldVector;
+typedef Vector<TamlCustomField*> TamlCustomFieldVector;
 
 
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 
 
-class TamlCustomNodeField : public IFactoryObjectReset
+class TamlCustomField : public IFactoryObjectReset
 {
 {
 public:
 public:
-    TamlCustomNodeField()
+    TamlCustomField()
     {
     {
         resetState();
         resetState();
     }
     }
 
 
-    virtual ~TamlCustomNodeField()
+    virtual ~TamlCustomField()
     {
     {
         // Everything should already be cleared in a state reset.
         // Everything should already be cleared in a state reset.
         // Touching any memory here is dangerous as this type is typically
         // Touching any memory here is dangerous as this type is typically
@@ -112,7 +112,7 @@ public:
         if ( dSscanf( mFieldValue, "%d %d", &fieldValue.x, &fieldValue.y ) != 2 )
         if ( dSscanf( mFieldValue, "%d %d", &fieldValue.x, &fieldValue.y ) != 2 )
         {
         {
             // Warn.
             // Warn.
-            Con::warnf( "TamlCustomNodeField - Reading point2I but it has an incorrect format: '%s'.", mFieldValue );
+            Con::warnf( "TamlCustomField - Reading point2I but it has an incorrect format: '%s'.", mFieldValue );
         }
         }
     }
     }
 
 
@@ -121,7 +121,7 @@ public:
         if ( dSscanf( mFieldValue, "%g %g", &fieldValue.x, &fieldValue.y ) != 2 )
         if ( dSscanf( mFieldValue, "%g %g", &fieldValue.x, &fieldValue.y ) != 2 )
         {
         {
             // Warn.
             // Warn.
-            Con::warnf( "TamlCustomNodeField - Reading point2F but it has an incorrect format: '%s'.", mFieldValue );
+            Con::warnf( "TamlCustomField - Reading point2F but it has an incorrect format: '%s'.", mFieldValue );
         }
         }
     }
     }
 
 
@@ -130,7 +130,7 @@ public:
         if ( dSscanf( mFieldValue, "%g %g", &fieldValue.x, &fieldValue.y ) != 2 )
         if ( dSscanf( mFieldValue, "%g %g", &fieldValue.x, &fieldValue.y ) != 2 )
         {
         {
             // Warn.
             // Warn.
-            Con::warnf( "TamlCustomNodeField - Reading vector but it has an incorrect format: '%s'.", mFieldValue );
+            Con::warnf( "TamlCustomField - Reading vector but it has an incorrect format: '%s'.", mFieldValue );
         }
         }
     }
     }
 
 
@@ -174,7 +174,7 @@ public:
         char fieldNameBuffer[1024];
         char fieldNameBuffer[1024];
 
 
         // Sanity!
         // Sanity!
-        AssertFatal( fieldNameLength < sizeof(fieldNameBuffer), "TamlCustomNodeField: Field name is too long." );
+        AssertFatal( fieldNameLength < sizeof(fieldNameBuffer), "TamlCustomField: Field name is too long." );
 
 
         dStrcpy( fieldNameBuffer, mFieldName );
         dStrcpy( fieldNameBuffer, mFieldName );
         fieldNameBuffer[fieldNameLength-1] = 0;
         fieldNameBuffer[fieldNameLength-1] = 0;
@@ -227,7 +227,7 @@ public:
         // Cache the fields.
         // Cache the fields.
         while( mFields.size() > 0 )
         while( mFields.size() > 0 )
         {
         {
-            TamlCustomNodeFieldFactory.cacheObject( mFields.back() );
+            TamlCustomFieldFactory.cacheObject( mFields.back() );
             mFields.pop_back();
             mFields.pop_back();
         }
         }
 
 
@@ -306,7 +306,7 @@ public:
         return NULL;
         return NULL;
     }
     }
 
 
-    inline TamlCustomNodeField* addField( const char* pFieldName, const ColorI& fieldValue )
+    inline TamlCustomField* addField( const char* pFieldName, const ColorI& fieldValue )
     {
     {
         // Fetch the field value.
         // Fetch the field value.
         const char* pFieldValue = Con::getData( TypeColorI, &const_cast<ColorI&>(fieldValue), 0 );
         const char* pFieldValue = Con::getData( TypeColorI, &const_cast<ColorI&>(fieldValue), 0 );
@@ -322,7 +322,7 @@ public:
         return addField( pFieldName, pFieldValue );
         return addField( pFieldName, pFieldValue );
     }
     }
 
 
-    inline TamlCustomNodeField* addField( const char* pFieldName, const ColorF& fieldValue )
+    inline TamlCustomField* addField( const char* pFieldName, const ColorF& fieldValue )
     {
     {
         // Fetch the field value.
         // Fetch the field value.
         const char* pFieldValue = Con::getData( TypeColorF, &const_cast<ColorF&>(fieldValue), 0 );
         const char* pFieldValue = Con::getData( TypeColorF, &const_cast<ColorF&>(fieldValue), 0 );
@@ -338,66 +338,66 @@ public:
         return addField( pFieldName, pFieldValue );
         return addField( pFieldName, pFieldValue );
     }
     }
 
 
-    inline TamlCustomNodeField* addField( const char* pFieldName, const Point2I& fieldValue )
+    inline TamlCustomField* addField( const char* pFieldName, const Point2I& fieldValue )
     {
     {
         char fieldValueBuffer[32];
         char fieldValueBuffer[32];
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%d %d", fieldValue.x, fieldValue.y );
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%d %d", fieldValue.x, fieldValue.y );
         return addField( pFieldName, fieldValueBuffer );
         return addField( pFieldName, fieldValueBuffer );
     }
     }
 
 
-    inline TamlCustomNodeField* addField( const char* pFieldName, const Point2F& fieldValue )
+    inline TamlCustomField* addField( const char* pFieldName, const Point2F& fieldValue )
     {
     {
         char fieldValueBuffer[32];
         char fieldValueBuffer[32];
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%.5g %0.5g", fieldValue.x, fieldValue.y );
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%.5g %0.5g", fieldValue.x, fieldValue.y );
         return addField( pFieldName, fieldValueBuffer );
         return addField( pFieldName, fieldValueBuffer );
     }
     }
 
 
-    inline TamlCustomNodeField* addField( const char* pFieldName, const b2Vec2& fieldValue )
+    inline TamlCustomField* addField( const char* pFieldName, const b2Vec2& fieldValue )
     {
     {
         char fieldValueBuffer[32];
         char fieldValueBuffer[32];
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%.5g %.5g", fieldValue.x, fieldValue.y );
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%.5g %.5g", fieldValue.x, fieldValue.y );
         return addField( pFieldName, fieldValueBuffer );
         return addField( pFieldName, fieldValueBuffer );
     }
     }
 
 
-    inline TamlCustomNodeField* addField( const char* pFieldName, const U32 fieldValue )
+    inline TamlCustomField* addField( const char* pFieldName, const U32 fieldValue )
     {
     {
         char fieldValueBuffer[16];
         char fieldValueBuffer[16];
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%d", fieldValue );
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%d", fieldValue );
         return addField( pFieldName, fieldValueBuffer );
         return addField( pFieldName, fieldValueBuffer );
     }
     }
 
 
-    inline TamlCustomNodeField* addField( const char* pFieldName, const bool fieldValue )
+    inline TamlCustomField* addField( const char* pFieldName, const bool fieldValue )
     {
     {
         char fieldValueBuffer[16];
         char fieldValueBuffer[16];
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%d", fieldValue );
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%d", fieldValue );
         return addField( pFieldName, fieldValueBuffer );
         return addField( pFieldName, fieldValueBuffer );
     }
     }
 
 
-    inline TamlCustomNodeField* addField( const char* pFieldName, const S32 fieldValue )
+    inline TamlCustomField* addField( const char* pFieldName, const S32 fieldValue )
     {
     {
         char fieldValueBuffer[16];
         char fieldValueBuffer[16];
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%d", fieldValue );
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%d", fieldValue );
         return addField( pFieldName, fieldValueBuffer );
         return addField( pFieldName, fieldValueBuffer );
     }
     }
 
 
-    inline TamlCustomNodeField* addField( const char* pFieldName, const float fieldValue )
+    inline TamlCustomField* addField( const char* pFieldName, const float fieldValue )
     {
     {
         char fieldValueBuffer[16];
         char fieldValueBuffer[16];
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%.5g", fieldValue );
         dSprintf( fieldValueBuffer, sizeof(fieldValueBuffer), "%.5g", fieldValue );
         return addField( pFieldName, fieldValueBuffer );
         return addField( pFieldName, fieldValueBuffer );
     }
     }
 
 
-    inline TamlCustomNodeField* addField( const char* pFieldName, const char* pFieldValue )
+    inline TamlCustomField* addField( const char* pFieldName, const char* pFieldValue )
     {
     {
         // Create a node field.
         // Create a node field.
-        TamlCustomNodeField* pNodeField = TamlCustomNodeFieldFactory.createObject();
+        TamlCustomField* pNodeField = TamlCustomFieldFactory.createObject();
 
 
         // Set node field.
         // Set node field.
         pNodeField->set( pFieldName, pFieldValue );
         pNodeField->set( pFieldName, pFieldValue );
 
 
 #if TORQUE_DEBUG
 #if TORQUE_DEBUG
         // Ensure a field name conflict does not exist.
         // Ensure a field name conflict does not exist.
-        for( Vector<TamlCustomNodeField*>::iterator nodeFieldItr = mFields.begin(); nodeFieldItr != mFields.end(); ++nodeFieldItr )
+        for( Vector<TamlCustomField*>::iterator nodeFieldItr = mFields.begin(); nodeFieldItr != mFields.end(); ++nodeFieldItr )
         {
         {
             // Skip if field name is not the same.
             // Skip if field name is not the same.
             if ( pNodeField->getFieldName() != (*nodeFieldItr)->getFieldName() )
             if ( pNodeField->getFieldName() != (*nodeFieldItr)->getFieldName() )
@@ -407,7 +407,7 @@ public:
             Con::warnf("Conflicting Taml node field name of '%s' in node '%s'.", pFieldName, mNodeName );
             Con::warnf("Conflicting Taml node field name of '%s' in node '%s'.", pFieldName, mNodeName );
 
 
             // Cache node field.
             // Cache node field.
-            TamlCustomNodeFieldFactory.cacheObject( pNodeField );
+            TamlCustomFieldFactory.cacheObject( pNodeField );
             return NULL;
             return NULL;
         }
         }
 
 
@@ -421,7 +421,7 @@ public:
                 pFieldValue );
                 pFieldValue );
 
 
             // Cache node field.
             // Cache node field.
-            TamlCustomNodeFieldFactory.cacheObject( pNodeField );
+            TamlCustomFieldFactory.cacheObject( pNodeField );
             return NULL;
             return NULL;
         }
         }
 #endif
 #endif
@@ -431,7 +431,7 @@ public:
         return pNodeField;
         return pNodeField;
     }
     }
 
 
-    inline const TamlCustomNodeField* findField( const char* pFieldName ) const
+    inline const TamlCustomField* findField( const char* pFieldName ) const
     {
     {
         // Sanity!
         // Sanity!
         AssertFatal( pFieldName != NULL, "Cannot find Taml field name that is NULL." );
         AssertFatal( pFieldName != NULL, "Cannot find Taml field name that is NULL." );

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

@@ -235,21 +235,21 @@ void TamlXmlWriter::compileCustomNode( TiXmlElement* pXmlElement, const TamlCust
         }
         }
     }
     }
 
 
-    // Fetch node fields.
-    const TamlCustomFieldVector& nodeFields = pCustomNode->getFields();
+    // Fetch fields.
+    const TamlCustomFieldVector& fields = pCustomNode->getFields();
 
 
-    // Iterate node fields.
-    for ( TamlCustomFieldVector::const_iterator nodeFieldItr = nodeFields.begin(); nodeFieldItr != nodeFields.end(); ++nodeFieldItr )
+    // Iterate fields.
+    for ( TamlCustomFieldVector::const_iterator fieldItr = fields.begin(); fieldItr != fields.end(); ++fieldItr )
     {
     {
-        // Fetch node field.
-        const TamlCustomNodeField* pNodeField = *nodeFieldItr;
+        // Fetch field.
+        const TamlCustomField* pField = *fieldItr;
 
 
         // Set field.
         // Set field.
-        pNodeElement->SetAttribute( pNodeField->getFieldName(), pNodeField->getFieldValue() );
+        pNodeElement->SetAttribute( pField->getFieldName(), pField->getFieldValue() );
     }
     }
 
 
     // Finish if the node is set to ignore if empty and it is empty (including fields).
     // Finish if the node is set to ignore if empty and it is empty (including fields).
-    if ( pCustomNode->getIgnoreEmpty() && nodeFields.size() == 0 && pNodeElement->NoChildren() )
+    if ( pCustomNode->getIgnoreEmpty() && fields.size() == 0 && pNodeElement->NoChildren() )
     {
     {
         // Yes, so delete the extended element.
         // Yes, so delete the extended element.
         delete pNodeElement;
         delete pNodeElement;