Package pyffi :: Package formats :: Package dae :: Class DaeFormat :: Class Data
[hide private]
[frames] | no frames]

Class Data

source code

            object --+            
                     |            
utils.graph.DetailNode --+        
                         |        
    utils.graph.GlobalNode --+    
                             |    
 object_models.FileFormat.Data --+
                                 |
                                DaeFormat.Data

A class to contain the actual collada data.
Instance Methods [hide private]
 
__init__(self, version=17039616)
Initialize collada data.
source code
 
getVersion(self)
Get the collada version, as integer (for instance, 1.4.1 would be 0x01040100).
source code
 
inspect(self, stream)
Quickly checks whether the stream appears to contain collada data.
source code
 
read(self, stream)
Read collada data from stream.
source code
 
write(self, stream)
Write collada data to stream.
source code

Inherited from utils.graph.GlobalNode: get_global_child_edge_types, get_global_child_nodes, get_global_display, get_global_iterator

Inherited from utils.graph.DetailNode: get_detail_child_edge_types, get_detail_child_names, get_detail_child_nodes, get_detail_display, get_detail_iterator, replace_global_node

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

Class Variables [hide private]

Inherited from object_models.FileFormat.Data: user_version, version

Inherited from object_models.FileFormat.Data (private): _byte_order

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, version=17039616)
(Constructor)

source code 
Initialize collada data. By default, this creates an empty collada 1.4.1 root element.
Parameters:
  • version (int) - The collada version (for instance, 0x01040100 for 1.4.1).
Overrides: object.__init__

getVersion(self)

source code 
Get the collada version, as integer (for instance, 1.4.1 would be 0x01040100).
Returns:
The version, as integer.

inspect(self, stream)

source code 

Quickly checks whether the stream appears to contain collada data. Resets stream to original position. If the stream turns out to be collada, L{getVersion} is guaranteed to return the version.

Call this function if you simply wish to check that a file is a collada file without having to parse it completely.

Parameters:
  • stream (file) - The file to inspect.
Returns:
True if stream is collada, False otherwise.
Overrides: object_models.FileFormat.Data.inspect

read(self, stream)

source code 
Read collada data from stream.
Parameters:
  • stream (file) - The file to read from.
Overrides: object_models.FileFormat.Data.read

write(self, stream)

source code 
Write collada data to stream.
Parameters:
  • stream (file) - The file to write to.
Overrides: object_models.FileFormat.Data.write