LightingIO.XMLLightingReader Class Reference

#include <class_lighting_i_o_1_1_x_m_l_lighting_reader.h>

Inheritance diagram for LightingIO.XMLLightingReader:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  getConverters ()
  Override this method to supply feature data converters.
  to_v2008_11 ()
  Before 2008.11, the 'cube_map' section looks like: <cube_map name="diffuse"> <image src="diffuse.exr" name="Cube"> </image> <image src="1.383 0.0 0.113894117647" name="IBLChannelGainColor"> </image> <cube_map> <parameter type="double4" name="diffuseIBLChannelGainColor" value="1.383 0.0 0.113894117647"> </parameter> "image" for "IBLChannelGainColor" is unwanted and incorrect, we need to remove them, then it should look like: <cube_map name="diffuse"> <image src="diffuse.exr" name="Cube"> </image> <cube_map> <parameter type="double4" name="diffuseIBLChannelGainColor" value="1.383 0.0 0.113894117647"> </parameter>
  read ()
  Creates and sets the lighting environment from XML.

Member Function Documentation

LightingIO.XMLLightingReader.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.

LightingIO.XMLLightingReader.to_v2008_11 ( )

Before 2008.11, the 'cube_map' section looks like: <cube_map name="diffuse"> <image src="diffuse.exr" name="Cube"> </image> <image src="1.383 0.0 0.113894117647" name="IBLChannelGainColor"> </image> <cube_map> <parameter type="double4" name="diffuseIBLChannelGainColor" value="1.383 0.0 0.113894117647"> </parameter> "image" for "IBLChannelGainColor" is unwanted and incorrect, we need to remove them, then it should look like: <cube_map name="diffuse"> <image src="diffuse.exr" name="Cube"> </image> <cube_map> <parameter type="double4" name="diffuseIBLChannelGainColor" value="1.383 0.0 0.113894117647"> </parameter>

LightingIO.XMLLightingReader.read ( )

Creates and sets the lighting environment from XML.

Reimplemented from FeatureReader.FeatureReader.


LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader
LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader LightingIO.XMLLightingReader