Package pyffi :: Package formats :: Package tri :: Class TriFormat :: Class Header
[hide private]
[frames] | no frames]

Class Header

source code

                  object --+                
                           |                
      utils.graph.DetailNode --+            
                               |            
          utils.graph.GlobalNode --+        
                                   |        
object_models.xml.struct_.StructBase --+    
                                       |    
                       TriFormat._Header --+
                                           |
                      object --+           |
                               |           |
          utils.graph.DetailNode --+       |
                                   |       |
              utils.graph.GlobalNode --+   |
                                       |   |
           object_models.FileFormat.Data --+
                                           |
                                          TriFormat.Header

A class to contain the actual tri data.
Nested Classes [hide private]

Inherited from object_models.xml.struct_.StructBase: __metaclass__

Instance Methods [hide private]
 
inspect_quick(self, stream)
Quickly checks if stream contains TRI data, by looking at the first 8 bytes.
source code
 
inspect(self, stream)
Quickly checks if stream contains TRI data, and reads everything up to the arrays.
source code
 
read(self, stream)
Read a tri file.
source code
 
write(self, stream)
Write a tri file.
source code
 
add_morph(self, name=None, relative_vertices=None)
Add a morph.
source code
 
add_modifier(self, name=None, relative_vertices=None)
Add a modifier.
source code
 
get_global_child_nodes(self, edge_filter=(True, True))
Generator which yields all children of this item in the global view, of given edge type (default is edges of type 0).
source code

Inherited from object_models.xml.struct_.StructBase: __init__, __str__, deepcopy, fix_links, get_attribute, get_basic_attribute, get_detail_child_names, get_detail_child_nodes, get_global_display, get_hash, get_links, get_refs, get_size, get_strings, get_template_attribute, replace_global_node, set_attribute, set_basic_attribute, set_template_attribute, tree

Inherited from utils.graph.GlobalNode: get_global_child_edge_types, get_global_iterator

Inherited from utils.graph.DetailNode: get_detail_child_edge_types, get_detail_display, get_detail_iterator

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

Class Methods [hide private]

Inherited from object_models.xml.struct_.StructBase: get_games, get_versions

Class Variables [hide private]
  _attribute_list = [<pyffi.object_models.xml.StructAttribute ob...

Inherited from _Header (private): _attrs, _names

Inherited from object_models.xml.struct_.StructBase: arg

Inherited from object_models.FileFormat.Data: user_version

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

Properties [hide private]

Inherited from _Header: has_uv, modifier_vertices, modifiers, morphs, num_modifier_vertices, num_modifiers, num_morphs, num_quad_faces, num_tri_faces, num_uvs, num_vertices, quad_faces, signature, tri_faces, unknown_1, unknown_2, unknown_3, unknown_4, unknown_5, unknown_6, uv_quad_faces, uv_tri_faces, uvs, version, vertices

Inherited from object: __class__

Method Details [hide private]

inspect_quick(self, stream)

source code 
Quickly checks if stream contains TRI data, by looking at the first 8 bytes. Reads the signature and the version.
Parameters:
  • stream (file) - The stream to inspect.

inspect(self, stream)

source code 
Quickly checks if stream contains TRI data, and reads everything up to the arrays.
Parameters:
  • stream (file) - The stream to inspect.
Returns:
True if stream is of particular format, False otherwise.
Overrides: object_models.FileFormat.Data.inspect

read(self, stream)

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

write(self, stream)

source code 
Write a tri file.
Parameters:
  • stream (file) - The stream to which to write.
Overrides: object_models.FileFormat.Data.write

get_global_child_nodes(self, edge_filter=(True, True))

source code 

Generator which yields all children of this item in the global view, of given edge type (default is edges of type 0).

Override this method.

Returns:
Generator for global node children.
Overrides: utils.graph.GlobalNode.get_global_child_nodes
(inherited documentation)

Class Variable Details [hide private]

_attribute_list

Value:
[<pyffi.object_models.xml.StructAttribute object at 0x4ae2650>,
 <pyffi.object_models.xml.StructAttribute object at 0x4ae29d0>,
 <pyffi.object_models.xml.StructAttribute object at 0x4ae2990>,
 <pyffi.object_models.xml.StructAttribute object at 0x4ae2a50>,
 <pyffi.object_models.xml.StructAttribute object at 0x4ae2ad0>,
 <pyffi.object_models.xml.StructAttribute object at 0x4ae2b10>,
 <pyffi.object_models.xml.StructAttribute object at 0x4ae2b50>,
 <pyffi.object_models.xml.StructAttribute object at 0x4ae2b90>,
...