ModelIO.XMLModelReader Class Reference

#include <class_model_i_o_1_1_x_m_l_model_reader.h>

Inheritance diagram for ModelIO.XMLModelReader:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  __init__ ()
  getConverters ()
  Override this method to supply feature data converters.
  to_v2008_XX ()
  Convert the old Double3 light colour to Double4.
  to_v2007_08 ()
  Convert import node data to v2007.08.
  to_v2007_09 ()
  The texture transforms prior to v2007_09 were unnormalized.
  to_v2007_10 ()
  Convert import node data to v2007.10.
  to_v2008_07 ()
  Convert import node data to v2008.07.
  to_v2008_12 ()
  Convert import node data to v2008.12.
  to_v2011_05 ()
  Remove kLightVisible from light attributes.
  to_v2013_00 ()
  Forces the checking of the maintain scene hierarchy flags on collapse node ancestors, for scenes saved in an earlier version.
  preRead ()
  Override this method for doing any processing before reading.
  read ()
  Override this method in derived classes.

Member Function Documentation

ModelIO.XMLModelReader.__init__ ( )
ModelIO.XMLModelReader.getConverters ( )

Override this method to supply feature data converters.

Return a tuple containing ( method, version ) pairs. The order in which you specify the pairs is important, that is the oldest converter must be listed first, and the most recent converter listed last.

The method must have the following signature:

def <some_name>( self, xmlData ): # Convert data to a particular version.

The version indicates when the data converter method is applied.

For example:

class YourFeatureReader( FeatureReader ):

def getConverters( self ): return ( ( self.convert_to_v2, theVersionManager[ VersionLabel.v2 ] ) , ( self.convert_to_v4, theVersionManager[ VersionLabel.v4 ] ) )

def convert_to_v2( self, xmlData ): # # Convert the given xml data to whatever is required # by version 2 of the application. # pass

def convert_to_v4( self, xmlData ): # # Convert the given xml data to whatever is required # by version 4 of the application. # # Note the convert_to_v2 converter will have already # been applied to the xmlData. # pass

Note that all necessary converters will be applied to bring the document data up to what's needed. That is if a version 1 file is opened then the v2 converter will be applied followed by the v4 converter. If a version 3 file is opened then only the v4 converter is applied. If a version 4 file is opened then no converters will need to be called.

Reimplemented from FeatureReader.FeatureReader.

Reimplemented in EnvironmentModelIO.XMLEnvironmentModelReader.

ModelIO.XMLModelReader.to_v2008_XX ( )

Convert the old Double3 light colour to Double4.

ModelIO.XMLModelReader.to_v2007_08 ( )

Convert import node data to v2007.08.

Each import node that comes from a scene file that is older needs to have apf_symmetry attribute set to false.

ModelIO.XMLModelReader.to_v2007_09 ( )

The texture transforms prior to v2007_09 were unnormalized.

This adds an attribute to indicate that they were unnormalized so that they can be normalized later.

ModelIO.XMLModelReader.to_v2007_10 ( )

Convert import node data to v2007.10.

Each import node that comes from a scene file that is older needs to have collapse groups attribute set to false.

ModelIO.XMLModelReader.to_v2008_07 ( )

Convert import node data to v2008.07.

There were inconsistencies between the node ids and the group-based-names attribute of the ModelImport for files that were created pre v2007.09 and saved between v2007.10 and v2008.03. This corrects those inconsistencies, if any exist.

ModelIO.XMLModelReader.to_v2008_12 ( )

Convert import node data to v2008.12.

Each import node that comes from a scene file that is older needs to have collapse leaf transforms attribute set to false.

ModelIO.XMLModelReader.to_v2011_05 ( )

Remove kLightVisible from light attributes.

ModelIO.XMLModelReader.to_v2013_00 ( )

Forces the checking of the maintain scene hierarchy flags on collapse node ancestors, for scenes saved in an earlier version.

The flags may be incorrect if the user imported an APF into a scene that was a result of an export to APF from Showcase of a scene that had collapse nodes.

ModelIO.XMLModelReader.preRead ( )

Override this method for doing any processing before reading.

Typically, this should be used for re-mapping object ids, such as in the case where there is a name conflict with an object already in the document.

Reimplemented from FeatureReader.FeatureReader.

Reimplemented in EnvironmentModelIO.XMLEnvironmentModelReader.

ModelIO.XMLModelReader.read ( )

Override this method in derived classes.

This method is responsible for populating the given document with the data provided in the given source. It should return True if the read was successful; False otherwise.

Reimplemented from FeatureReader.FeatureReader.


ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader
ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader ModelIO.XMLModelReader