collada.material.Surface¶
- class collada.material.Surface(id, img, format=None, xmlnode=None)¶
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)Load and return a class instance from an XML node.
save()Saves the surface data back to
xmlnodeAttributes
xmlnodeElementTree representation of the surface.
idThe string identifier for the surface within the local scope of the material
imagecollada.material.CImageobject from the image library.