Module fmeobjects :: Class FMEAppearance
[hide private]
[frames] | no frames]

Class FMEAppearance


init()

Create an instance of a blank appearance object.

Instance Methods [hide private]
 
__getObject__(args)
 
__init__()
x.__init__(...) initializes x; see help(type(x)) for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
float or None
getAlpha()
This routine retrieves the alpha (1-transparency) of this Appearance.
tuple of float or None
getColorAmbient()
This routine retrieves ambient the color of this Appearance as r g b values between 0.0 and 1.0.This will return None if it did not have a color ambient associated with it.
tuple of float or None
getColorDiffuse()
This routine retrieves Diffuse the color of this Appearance as r g b values between 0.0 and 1.0.
tuple of float or None
getColorEmissive()
This routine retrieves Emissive the color of this Appearance as r g b values between 0.0 and 1.0.
tuple of float or None
getColorSpecular()
This routine retrieves specular the color of this Appearance as r g b values between 0.0 and 1.0 This will return None if it did not have a color specular associated with it.
int or None
getMapperReference(mapperType)
This routine retrieves the texture reference of mapperType of this Appearance.
unicode or None
getName()
This routine retrieves the 'name' of this Appearance as a unicode string.
float or None
getShininess()
This routine retrieves the Shininess of this Appearance.
int or None
getTextureReference()
This routine retrieves the main texture reference of this Appearance.
None
removeMapperReference(mapperType)
This routine removes the specified mapper reference from this Appearance.
None
removeTextureReference()
This routine removes the main texture reference from this Appearance.
None
setAlpha(alpha)
This routine sets the alpha of this Appearance.
None
setColorAmbient(r, g, b)
This routine sets the Ambient color of this Appearance.
None
setColorDiffuse(r, g, b)
This routine sets the Diffuse color of this Appearance.
None
setColorEmissive(r, g, b)
This routine sets the Emissive color of this Appearance.
None
setColorSpecular(r, g, b)
This routine sets the Specular color of this Appearance.
bool
setMapperReference(mapperType, textureReference)
This routine sets a Mapper that modifies this Appearance.
None
setName(name)
This routine sets the 'name' of this Appearance with a unicode string.
None
setShininess(shininess)
This routine sets the Shininess of this Appearance.
bool
setTextureReference(textureReference)
This routine sets the main texture reference of this Appearance.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__()
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

getAlpha()

 

This routine retrieves the alpha (1-transparency) of this Appearance. This will return 'None if it did not have a alpha associated with it.

Returns: float or None
The alpha of this appearance.

getColorAmbient()

 

This routine retrieves ambient the color of this Appearance as r g b values between 0.0 and 1.0.This will return None if it did not have a color ambient associated with it.

Returns: tuple of float or None
A tuple of the r g b values of the ambient color.

getColorDiffuse()

 

This routine retrieves Diffuse the color of this Appearance as r g b values between 0.0 and 1.0. This will return None if it did not have a color diffuse associated with it.

Returns: tuple of float or None
A tuple of the r g b values of the diffuse color.

getColorEmissive()

 

This routine retrieves Emissive the color of this Appearance as r g b values between 0.0 and 1.0. This will return None if it did not have a color emissive associated with it.

Returns: tuple of float or None
A tuple of the r g b values of the emissive color.

getColorSpecular()

 

This routine retrieves specular the color of this Appearance as r g b values between 0.0 and 1.0 This will return None if it did not have a color specular associated with it.

Returns: tuple of float or None
A tuple of the r g b values of the specular color.

getMapperReference(mapperType)

 

This routine retrieves the texture reference of mapperType of this Appearance. This will return None if it did not have a mapper of mapper type associated with it.

Parameters:
  • mapperType (int) - The mapper type to retrieve the reference for, such as FME_MAPPER_BUMP_MAP.
Returns: int or None
The texture reference of mapperType of this Appearance.

getName()

 

This routine retrieves the 'name' of this Appearance as a unicode string. This will return None if it did not have a name associated with it.

Returns: unicode or None
The appearance's name.

getShininess()

 

This routine retrieves the Shininess of this Appearance. This will return None if it did not have a shininess associated with it.

Returns: float or None
The appearance's shininess or None

getTextureReference()

 

This routine retrieves the main texture reference of this Appearance. This will return None if it did not have a texture reference associated with it.

Returns: int or None
The appearance's texture reference or None

removeMapperReference(mapperType)

 

This routine removes the specified mapper reference from this Appearance.

Parameters:
  • mapperType (int) - The mapper reference to remove.
Returns: None

setAlpha(alpha)

 

This routine sets the alpha of this Appearance. The alpha should be a floating point value in the range of 0.0 to 1.0, where 0.0 represents a fully transparent color, and 1.0 represents a fully opaque color. Setting the value to negative will remove this property from this appearance.

Parameters:
  • alpha (float) - The alpha value to set on the appearance.
Returns: None

setColorAmbient(r, g, b)

 

This routine sets the Ambient color of this Appearance. The color values should be in r g b color space with values between 0.0 and 1.0. Setting any color value to a negative value will remove the color from this Appearance.

Parameters:
  • r (float) - The r value of the color ambient to set on this appearance.
  • g (float) - The g value of the color ambient to set on this appearance.
  • b (float) - The b value of the color ambient to set on this appearance.
Returns: None

setColorDiffuse(r, g, b)

 

This routine sets the Diffuse color of this Appearance. The color values should be in r g b color space with values between 0.0 and 1.0. Setting any color value to a negative value will remove the color from this Appearance.

Parameters:
  • r (float) - The r value of the color diffuse to set on this appearance.
  • g (float) - The g value of the color diffuse to set on this appearance.
  • b (float) - The b value of the color diffuse to set on this appearance.
Returns: None

setColorEmissive(r, g, b)

 

This routine sets the Emissive color of this Appearance. The color values should be in r g b color space with values between 0.0 and 1.0. Setting any color value to a negative value will remove the color from this Appearance.

Parameters:
  • r (float) - The r value of the color emissive to set on this appearance.
  • g (float) - The g value of the color emissive to set on this appearance.
  • b (float) - The b value of the color emissive to set on this appearance.
Returns: None

setColorSpecular(r, g, b)

 

This routine sets the Specular color of this Appearance. The color values should be in r g b color space with values between 0.0 and 1.0. Setting any color value to a negative value will remove the color from this Appearance.

Parameters:
  • r (float) - The r value of the color specular to set on this appearance.
  • g (float) - The g value of the color specular to set on this appearance.
  • b (float) - The b value of the color specular to set on this appearance.
Returns: None

setMapperReference(mapperType, textureReference)

 

This routine sets a Mapper that modifies this Appearance. The Mapper is a texture object that modifies some property of the Appearance, such as FME_MAPPER_ALPHA_MAP. The textureReference should refer to a Texture found in the common FMELibrary. True will be returned if the reference supplied refers to a valid Texture in the library, false indicates a hanging reference.

Parameters:
  • mapperType (int) - The Mappper to set on this appearance.
  • textureReference (int) - The texture reference to set on this appearance.
Returns: bool
Returns True if the reference supplied refers to a valid texture in the library and False otherwise.

setName(name)

 

This routine sets the 'name' of this Appearance with a unicode string. (It need not be a unique name among other, possibly different Appearances.) Setting the 'name' to be (blank) will remove the name from this Appearance.

Parameters:
  • name (unicode) - The name to set on this appearance.
Returns: None

setShininess(shininess)

 

This routine sets the Shininess of this Appearance. The Shininess should be a floating point value in the range of 0.0 to 1.0 Setting the value to negative will remove this property from this appearance.

Parameters:
  • shininess (float) - The shininess to set on the appearance.
Returns: None

setTextureReference(textureReference)

 

This routine sets the main texture reference of this Appearance. The texture reference should be valid reference to a Texture found in the common FMELibrary. True will be returned if the reference supplied refers to a valid Texture in the library, false indicates a hanging reference.

Parameters:
  • textureReference (int) - The shininess to set on the appearance.
Returns: bool