Package pyffi :: Module spells :: Module nif :: Class SpellVisitSkeletonRoots
[hide private]
[frames] | no frames]

Class SpellVisitSkeletonRoots

source code

object --+        
         |        
     Spell --+    
             |    
      NifSpell --+
                 |
                SpellVisitSkeletonRoots
Known Subclasses:

Abstract base class for spells that visit all skeleton roots. Override the skelrootentry method with your implementation.
Instance Methods [hide private]
bool
datainspect(self)
This is called after pyffi.object_models.FileFormat.Data.inspect has been called, and before pyffi.object_models.FileFormat.Data.read is called.
source code
bool
dataentry(self)
Called before all blocks are recursed.
source code
bool
branchinspect(self, branch)
Like _branchinspect, but for customization: can be overridden to perform an extra inspection (the default implementation always returns True).
source code
bool
branchentry(self, branch)
Cast the spell on the given branch.
source code
 
skelrootentry(self, branch)
Do something with a skeleton root.
source code

Inherited from NifSpell: inspectblocktype

Inherited from NifSpell (private): _datainspect

Inherited from Spell: __init__, branchexit, dataexit, recurse

Inherited from Spell (private): _branchinspect

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

Class Methods [hide private]

Inherited from Spell: get_toast_stream, toastentry, toastexit

Class Variables [hide private]

Inherited from Spell: READONLY, SPELLNAME, changed, data, stream, toaster

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

datainspect(self)

source code 
This is called after pyffi.object_models.FileFormat.Data.inspect has been called, and before pyffi.object_models.FileFormat.Data.read is called. Override this function for customization.
Returns: bool
True if the file must be processed, False otherwise.
Overrides: Spell.datainspect
(inherited documentation)

dataentry(self)

source code 

Called before all blocks are recursed. The default implementation simply returns True. You can access the data via data, and unlike in the datainspect method, the full file has been processed at this stage.

Typically, you will override this function to perform a global operation on the file data.

Returns: bool
True if the children must be processed, False otherwise.
Overrides: Spell.dataentry
(inherited documentation)

branchinspect(self, branch)

source code 
Like _branchinspect, but for customization: can be overridden to perform an extra inspection (the default implementation always returns True).
Parameters:
  • branch - The branch to check.
Returns: bool
True if the branch must be processed, False otherwise.
Overrides: Spell.branchinspect
(inherited documentation)

branchentry(self, branch)

source code 

Cast the spell on the given branch. First called with branch equal to data's children, then the grandchildren, and so on. The default implementation simply returns True.

Typically, you will override this function to perform an operation on a particular block type and/or to stop recursion at particular block types.

Parameters:
  • branch - The branch to cast the spell on.
Returns: bool
True if the children must be processed, False otherwise.
Overrides: Spell.branchentry
(inherited documentation)

skelrootentry(self, branch)

source code 
Do something with a skeleton root. Return value is ignored.