Package pyffi :: Package formats :: Package nif :: Class NifFormat :: Class NiObjectNET
[hide private]
[frames] | no frames]

Class NiObjectNET

source code

                  object --+                        
                           |                        
      utils.graph.DetailNode --+                    
                               |                    
          utils.graph.GlobalNode --+                
                                   |                
object_models.xml.struct_.StructBase --+            
                                       |            
                     NifFormat._NiObject --+        
                                           |        
                          NifFormat.NiObject --+    
                                               |    
                          NifFormat._NiObjectNET --+
                                                   |
                                                  NifFormat.NiObjectNET
Known Subclasses:

Nested Classes [hide private]

Inherited from object_models.xml.struct_.StructBase: __metaclass__

Instance Methods [hide private]
 
add_extra_data(self, extrablock)
Add block to extra data list and extra data chain.
source code
 
remove_extra_data(self, extrablock)
Remove block from extra data list and extra data chain.
source code
 
get_extra_datas(self)
Get a list of all extra data blocks.
source code
 
set_extra_datas(self, extralist)
Set all extra data blocks from given list (erases existing data).
source code
 
add_controller(self, ctrlblock)
Add block to controller chain and set target of controller to self.
source code
 
get_controllers(self)
Get a list of all controllers.
source code
 
add_integer_extra_data(self, name, value)
Add a particular extra integer data block.
source code

Inherited from NiObject: apply_scale, find, find_chain, is_interchangeable, tree

Inherited from NiObject (private): _validateTree

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_child_nodes, get_global_display, get_hash, get_links, get_refs, get_size, get_strings, get_template_attribute, read, replace_global_node, set_attribute, set_basic_attribute, set_template_attribute, write

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 object_models.xml.struct_.StructBase: arg

Properties [hide private]

Inherited from _NiObjectNET: controller, extra_data, extra_data_list, has_old_extra_data, name, num_extra_data_list, old_extra_internal_id, old_extra_prop_name, old_extra_string, unknown_byte

Inherited from object: __class__

Method Details [hide private]

add_extra_data(self, extrablock)

source code 
Add block to extra data list and extra data chain. It is good practice to ensure that the extra data has empty next_extra_data field when adding it to avoid loops in the hierarchy.

set_extra_datas(self, extralist)

source code 

Set all extra data blocks from given list (erases existing data).

>>> from pyffi.formats.nif import NifFormat
>>> node = NifFormat.NiNode()
>>> extra1 = NifFormat.NiExtraData()
>>> extra1.name = "hello"
>>> extra2 = NifFormat.NiExtraData()
>>> extra2.name = "world"
>>> node.get_extra_datas()
[]
>>> node.set_extra_datas([extra1, extra2])
>>> [extra.name for extra in node.get_extra_datas()]
['hello', 'world']
>>> [extra.name for extra in node.extra_data_list]
['hello', 'world']
>>> node.extra_data is extra1
True
>>> extra1.next_extra_data is extra2
True
>>> extra2.next_extra_data is None
True
>>> node.set_extra_datas([])
>>> node.get_extra_datas()
[]
>>> # now set them the other way around
>>> node.set_extra_datas([extra2, extra1])
>>> [extra.name for extra in node.get_extra_datas()]
['world', 'hello']
>>> [extra.name for extra in node.extra_data_list]
['world', 'hello']
>>> node.extra_data is extra2
True
>>> extra2.next_extra_data is extra1
True
>>> extra1.next_extra_data is None
True
Parameters:
  • extralist (list of L{NifFormat.NiExtraData}) - List of extra data blocks to add.

Class Variable Details [hide private]

_attribute_list

Value:
[<pyffi.object_models.xml.StructAttribute object at 0x2db5cd0>,
 <pyffi.object_models.xml.StructAttribute object at 0x2db5d10>,
 <pyffi.object_models.xml.StructAttribute object at 0x2db5d90>,
 <pyffi.object_models.xml.StructAttribute object at 0x2db5e90>,
 <pyffi.object_models.xml.StructAttribute object at 0x2db5f90>,
 <pyffi.object_models.xml.StructAttribute object at 0x2dbb050>,
 <pyffi.object_models.xml.StructAttribute object at 0x2dbb090>,
 <pyffi.object_models.xml.StructAttribute object at 0x2dbb0d0>,
...