Previous topic

collada.material.Sampler2D

Next topic

collada.polygons

This Page

collada.material.Surface

class collada.material.Surface(id, img, format=None, xmlnode=None)

Bases: collada.DaeObject

Class containing data coming from a <surface> tag.

Collada materials use this to access to the <image> tag. The only extra information we store right now is the image format. In theory, this enables many more features according to the collada spec, but no one seems to actually use them in the wild, so for now, it’s unimplemented.

__init__(id, img, format=None, xmlnode=None)

Creates a surface.

Parameters:
  • id (str) – A string identifier for the surface within the local scope of the material
  • img (collada.material.CImage) – The image object
  • format (str) – The format of the image
  • xmlnode – If loaded from xml, the xml node

Methods

__init__(id, img[, format, xmlnode]) Creates a surface.
load(collada, localscope, node)
save() Saves the surface data back to xmlnode
id

The string identifier for the surface within the local scope of the material

image

collada.material.CImage object from the image library.

format

Format string.

xmlnode

ElementTree representation of the surface.

save()

Saves the surface data back to xmlnode