A class which bundles the main import function along with all helper
functions and data shared between these functions.
|
__init__(self,
**config)
Main import function: open file and import all trees. |
source code
|
|
|
importRoot(self,
root_block)
Main import function. |
source code
|
|
|
importBranch(self,
niBlock)
Read the content of the current NIF tree branch to Blender
recursively. |
source code
|
|
|
importArmatureBranch(self,
b_armature,
niArmature,
niBlock,
group_mesh=None)
Reads the content of the current NIF tree branch to Blender
recursively, as meshes parented to a given armature or parented to
the closest bone in the armature. |
source code
|
|
|
importName(self,
niBlock,
max_length=22,
postfix='
' )
Get unique name for an object, preserving existing names. |
source code
|
|
|
importMatrix(self,
niBlock,
relative_to=None)
Retrieves a niBlock's transform matrix as a Mathutil.Matrix. |
source code
|
|
|
decompose_srt(self,
m)
Decompose Blender transform matrix as a scale, rotation matrix, and
translation vector. |
source code
|
|
|
importEmpty(self,
niBlock)
Creates and returns a grouping empty. |
source code
|
|
|
|
|
importBone(self,
niBlock,
b_armature,
b_armatureData,
niArmature)
Adds a bone to the armature in edit mode. |
source code
|
|
|
find_correction_matrix(self,
niBlock,
niArmature)
Returns the correction matrix for a bone. |
source code
|
|
|
|
|
importTexture(self,
source)
Convert a NiSourceTexture block, or simply a path string, to a
Blender Texture object, return the Texture object and stores it in
the self.textures dictionary to avoid future duplicate imports. |
source code
|
|
|
getMaterialHash(self,
matProperty,
textProperty,
alphaProperty,
specProperty,
textureEffect,
wireProperty,
bsShaderProperty,
extraDatas)
Helper function for importMaterial. |
source code
|
|
|
importMaterial(self,
matProperty,
textProperty,
alphaProperty,
specProperty,
textureEffect,
wireProperty,
bsShaderProperty,
extraDatas)
Creates and returns a material. |
source code
|
|
|
importMaterialControllers(self,
b_material,
n_geom)
Import material animation data for given geometry. |
source code
|
|
|
importMaterialUVController(self,
b_material,
n_geom)
Import UV controller data. |
source code
|
|
|
getMaterialIpo(self,
b_material)
Return existing material ipo data, or if none exists, create one and
return that. |
source code
|
|
|
importMesh(self,
niBlock,
group_mesh=None,
applytransform=False,
relative_to=None)
Creates and returns a raw mesh, or appends geometry data to
group_mesh. |
source code
|
|
|
importTextkey(self,
niBlock)
Stores the text keys that define animation start and end in a text
buffer, so that they can be re-exported. |
source code
|
|
|
|
|
|
|
getFramesPerSecond(self,
roots)
Scan all blocks and return a reasonable number for FPS. |
source code
|
|
|
|
|
find_controller(self,
niBlock,
controllerType)
Find a controller. |
source code
|
|
|
find_property(self,
niBlock,
propertyType)
Find a property. |
source code
|
|
|
find_extra(self,
niBlock,
extratype)
Find extra data. |
source code
|
|
|
set_parents(self,
niBlock)
Set the parent block recursively through the tree, to allow crawling
back as needed. |
source code
|
|
|
markArmaturesBones(self,
niBlock)
Mark armatures and bones by peeking into NiSkinInstance blocks. |
source code
|
|
|
|
|
is_bone(self,
niBlock)
Tests a NiNode to see if it's a bone. |
source code
|
|
|
is_armature_root(self,
niBlock)
Tests a block to see if it's an armature. |
source code
|
|
|
get_closest_bone(self,
niBlock,
skelroot)
Detect closest bone ancestor. |
source code
|
|
|
get_blender_object(self,
niBlock)
Retrieves the Blender object or Blender bone matching the block. |
source code
|
|
|
|
|
set_animation(self,
niBlock,
b_obj)
Load basic animation info for this object. |
source code
|
|
|
importBhkShape(self,
bhkshape)
Import an oblivion collision shape as list of blender meshes. |
source code
|
|
|
importHavokConstraints(self,
hkbody)
Imports a bone havok constraint as Blender object constraint. |
source code
|
|
|
importBSBound(self,
bbox)
Import a bounding box. |
source code
|
|
|
|
|
|
Inherited from nif_common.NifImportExport :
get_bone_name_for_blender ,
get_bone_name_for_nif ,
get_extend_from_flags ,
get_flags_from_extend ,
msg_progress
|