pyffi.formats.nif — NetImmerse/Gamebryo (.nif and .kf)

Last Built: Mar 06, 2020

pyffi.formats.nif — NetImmerse/Gamebryo (.nif and .kf)

Implementation

class pyffi.formats.nif.NifFormat[source]

Bases: pyffi.object_models.xml.FileFormat

This class contains the generated classes from the xml.

ARCHIVE_CLASSES = [<class 'pyffi.formats.bsa.BsaFormat'>]
class ATextureRenderData(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._ATextureRenderData, object

save_as_dds(stream)[source]

Save image as DDS file.

class AVObject(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Used in NiDefaultAVObjectPalette.

property av_object
property name
class AbstractAdditionalGeometryData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

class AdditionalDataBlock(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property block_offsets
property block_size
property data
property data_sizes
property has_data
property num_blocks
property num_data
class AdditionalDataInfo(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property block_index
property channel_offset
property data_type
property num_channel_bytes
property num_channel_bytes_per_element
property num_total_bytes_per_element
property unknown_byte_1
class AlphaFormat(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

An unsigned 32-bit integer, describing how transparency is handled in a texture.

ALPHA_BINARY = 1
ALPHA_DEFAULT = 3
ALPHA_NONE = 0
ALPHA_SMOOTH = 2
class AnimationType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

Animation type used on this position. This specifies the function of this position.

Lean = 4
Sit = 1
Sleep = 2
class ApplyMode(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

An unsigned 32-bit integer, describing the apply mode of a texture.

APPLY_DECAL = 1
APPLY_HILIGHT = 3
APPLY_HILIGHT2 = 4
APPLY_MODULATE = 2
APPLY_REPLACE = 0
class ArkTexture(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

A texture reference used by NiArkTextureExtraData.

property texture_name
property texturing_property
property unknown_bytes
property unknown_int_3
property unknown_int_4
class AvoidNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

Morrowind specific?

class BSAnimNotes(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Bethesda-specific node.

property unknown_short_1
class BSBehaviorGraphExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Links a nif with a Havok Behavior .hkx animation file

property behaviour_graph_file
property controls_base_skeleton
class BSBlastNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

Bethesda-Specific node.

property unknown_byte_1
property unknown_short_2
class BSBoneLODExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Unknown

property bone_l_o_d_count
property bone_l_o_d_info
class BSBound(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._BSBound, object

apply_scale(scale)[source]

Scale data.

class BSDamageStage(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

Bethesda-Specific node.

property unknown_byte_1
property unknown_short_2
class BSDebrisNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

Bethesda-Specific node.

property unknown_byte_1
property unknown_short_2
class BSDecalPlacementVectorExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Bethesda-specific node. (for dynamic decal projection?)

property num_vector_blocks
property unknown_float_1
property vector_blocks
class BSDismemberBodyPartType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

Biped bodypart data used for visibility control of triangles. Options are Fallout 3, except where marked for Skyrim (uses SBP prefix) Skyrim BP names are listed only for vanilla names, different creatures have different defnitions for naming.

BP_BRAIN = 13
BP_HEAD = 1
BP_HEAD2 = 2
BP_LEFTARM = 3
BP_LEFTARM2 = 4
BP_LEFTLEG = 7
BP_LEFTLEG2 = 8
BP_LEFTLEG3 = 9
BP_RIGHTARM = 5
BP_RIGHTARM2 = 6
BP_RIGHTLEG = 10
BP_RIGHTLEG2 = 11
BP_RIGHTLEG3 = 12
BP_SECTIONCAP_BRAIN = 113
BP_SECTIONCAP_HEAD = 101
BP_SECTIONCAP_HEAD2 = 102
BP_SECTIONCAP_LEFTARM = 103
BP_SECTIONCAP_LEFTARM2 = 104
BP_SECTIONCAP_LEFTLEG = 107
BP_SECTIONCAP_LEFTLEG2 = 108
BP_SECTIONCAP_LEFTLEG3 = 109
BP_SECTIONCAP_RIGHTARM = 105
BP_SECTIONCAP_RIGHTARM2 = 106
BP_SECTIONCAP_RIGHTLEG = 110
BP_SECTIONCAP_RIGHTLEG2 = 111
BP_SECTIONCAP_RIGHTLEG3 = 112
BP_TORSO = 0
BP_TORSOCAP_BRAIN = 213
BP_TORSOCAP_HEAD = 201
BP_TORSOCAP_HEAD2 = 202
BP_TORSOCAP_LEFTARM = 203
BP_TORSOCAP_LEFTARM2 = 204
BP_TORSOCAP_LEFTLEG = 207
BP_TORSOCAP_LEFTLEG2 = 208
BP_TORSOCAP_LEFTLEG3 = 209
BP_TORSOCAP_RIGHTARM = 205
BP_TORSOCAP_RIGHTARM2 = 206
BP_TORSOCAP_RIGHTLEG = 210
BP_TORSOCAP_RIGHTLEG2 = 211
BP_TORSOCAP_RIGHTLEG3 = 212
BP_TORSOSECTION_BRAIN = 13000
BP_TORSOSECTION_HEAD = 1000
BP_TORSOSECTION_HEAD2 = 2000
BP_TORSOSECTION_LEFTARM = 3000
BP_TORSOSECTION_LEFTARM2 = 4000
BP_TORSOSECTION_LEFTLEG = 7000
BP_TORSOSECTION_LEFTLEG2 = 8000
BP_TORSOSECTION_LEFTLEG3 = 9000
BP_TORSOSECTION_RIGHTARM = 5000
BP_TORSOSECTION_RIGHTARM2 = 6000
BP_TORSOSECTION_RIGHTLEG = 10000
BP_TORSOSECTION_RIGHTLEG2 = 11000
BP_TORSOSECTION_RIGHTLEG3 = 12000
SBP_130_HEAD = 130
SBP_131_HAIR = 131
SBP_141_LONGHAIR = 141
SBP_142_CIRCLET = 142
SBP_143_EARS = 143
SBP_150_DECAPITATEDHEAD = 150
SBP_230_HEAD = 230
SBP_30_HEAD = 30
SBP_31_HAIR = 31
SBP_32_BODY = 32
SBP_33_HANDS = 33
SBP_34_FOREARMS = 34
SBP_35_AMULET = 35
SBP_36_RING = 36
SBP_37_FEET = 37
SBP_38_CALVES = 38
SBP_39_SHIELD = 39
SBP_40_TAIL = 40
SBP_41_LONGHAIR = 41
SBP_42_CIRCLET = 42
SBP_43_EARS = 43
SBP_44_DRAGON_BLOODHEAD_OR_MOD_MOUTH = 44
SBP_45_DRAGON_BLOODWINGL_OR_MOD_NECK = 45
SBP_46_DRAGON_BLOODWINGR_OR_MOD_CHEST_PRIMARY = 46
SBP_47_DRAGON_BLOODTAIL_OR_MOD_BACK = 47
SBP_48_MOD_MISC1 = 48
SBP_49_MOD_PELVIS_PRIMARY = 49
SBP_50_DECAPITATEDHEAD = 50
SBP_51_DECAPITATE = 51
SBP_52_MOD_PELVIS_SECONDARY = 52
SBP_53_MOD_LEG_RIGHT = 53
SBP_54_MOD_LEG_LEFT = 54
SBP_55_MOD_FACE_JEWELRY = 55
SBP_56_MOD_CHEST_SECONDARY = 56
SBP_57_MOD_SHOULDER = 57
SBP_58_MOD_ARM_LEFT = 58
SBP_59_MOD_ARM_RIGHT = 59
SBP_60_MOD_MISC2 = 60
SBP_61_FX01 = 61
class BSDismemberSkinInstance(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._BSDismemberSkinInstance, object

get_dismember_partitions()[source]

Return triangles and body part indices.

class BSDistantTreeShaderProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.BSShaderProperty

Bethesda-specific node.

class BSEffectShaderProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiProperty

Skyrim non-PP shader model, used primarily for transparency effects, often as decal.

property emissive_color
property emissive_multiple
property falloff_start_angle
property falloff_start_opacity
property falloff_stop_angle
property falloff_stop_opacity
property greyscale_texture
property shader_flags_1
property shader_flags_2
property soft_falloff_depth
property source_texture
property texture_clamp_mode
property uv_offset
property uv_scale
class BSEffectShaderPropertyColorController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiFloatInterpController

This controller is used to animate colors in BSEffectShaderProperty.

property type_of_controlled_color
class BSEffectShaderPropertyFloatController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiFloatInterpController

This controller is used to animate float variables in BSEffectShaderProperty.

property type_of_controlled_variable
class BSFadeNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

Bethesda-specific fade node.

class BSFrustumFOVController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

Bethesda-specific node.

property interpolator
class BSFurnitureMarker(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Unknown. Marks furniture sitting positions?

property num_positions
property positions
class BSFurnitureMarkerNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.BSFurnitureMarker

Furniture Marker for actors

class BSInvMarker(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Orientation marker for Skyrim’s inventory view. How to show the nif in the player’s inventory. Typically attached to the root node of the nif tree. If not present, then Skyrim will still show the nif in inventory, using the default values. Name should be ‘INV’ (without the quotes). For rotations, a short of “4712” appears as “4.712” but “959” appears as “0.959” meshesweaponsdaedricdaedricbowskinned.nif

property rotation_x
property rotation_y
property rotation_z
property zoom
class BSKeyframeController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiKeyframeController

An extended keyframe controller.

property data_2
class BSLODTriShape(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTriBasedGeom

A variation on NiTriShape, for visibility control over vertex groups.

property level_0_size
property level_1_size
property level_2_size
class BSLagBoneController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

A controller that trails a bone behind an actor.

property linear_rotation
property linear_velocity
property maximum_distance
class BSLeafAnimNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

Unknown, related to trees.

class BSLightingShaderProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiProperty

Skyrim PP shader for assigning material/shader/texture.

property alpha
property emissive_color
property emissive_multiple
property environment_map_scale
property eye_cubemap_scale
property glossiness
property hair_tint_color
property left_eye_reflection_center
property lighting_effect_1
property lighting_effect_2
property max_passes
property parallax_envmap_strength
property parallax_inner_layer_texture_scale
property parallax_inner_layer_thickness
property parallax_refraction_scale
property refraction_strength
property right_eye_reflection_center
property scale
property shader_flags_1
property shader_flags_2
property skin_tint_color
property sparkle_parameters
property specular_color
property specular_strength
property texture_clamp_mode
property texture_set
property uv_offset
property uv_scale
class BSLightingShaderPropertyColorController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiFloatInterpController

This controller is used to animate colors in BSLightingShaderProperty.

property type_of_controlled_color
class BSLightingShaderPropertyFloatController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiFloatInterpController

This controller is used to animate float variables in BSLightingShaderProperty.

property type_of_controlled_variable
class BSLightingShaderPropertyShaderType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

Values for configuring the shader type in a BSLightingShaderProperty

Default = 0
Heightmap = 3
WorldMap1 = 9
WorldMap2 = 13
WorldMap3 = 15
WorldMap4 = 18
class BSMasterParticleSystem(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

Bethesda-Specific node.

property max_emitter_objects
property num_particle_systems
property particle_systems
class BSMaterialEmittanceMultController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiFloatInterpController

Bethesda-Specific node.

class BSMultiBound(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Bethesda-specific node.

property data
class BSMultiBoundAABB(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.BSMultiBoundData

Bethesda-specific node.

property extent
property position
class BSMultiBoundData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Abstract base type for bounding data.

class BSMultiBoundNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

Bethesda-specific node.

property multi_bound
property unknown_int
class BSMultiBoundOBB(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.BSMultiBoundData

Oriented bounding box.

property center
property rotation
property size
class BSMultiBoundSphere(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.BSMultiBoundData

Bethesda-specific node.

property radius
property unknown_int_1
property unknown_int_2
property unknown_int_3
class BSNiAlphaPropertyTestRefController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiAlphaController

Unkown

class BSOrderedNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

Bethesda-Specific node.

property alpha_sort_bound
property is_static_bound
class BSPSysArrayEmitter(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysVolumeEmitter

Particle emitter that uses a node, its children and subchildren to emit from. Emission will be evenly spread along points from nodes leading to their direct parents/children only.

class BSPSysHavokUpdateModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

property modifier
property nodes
property num_nodes
class BSPSysInheritVelocityModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

property unknown_float_1
property unknown_float_2
property unknown_float_3
property unknown_int_1
class BSPSysLODModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

property uknown_float_1
property uknown_float_2
property uknown_float_3
property uknown_float_4
class BSPSysMultiTargetEmitterCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierCtlr

Particle system (multi?) emitter controller.

property data
property unknown_int_1
property unknown_short_1
property visibility_interpolator
class BSPSysRecycleBoundModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

property unknown_float_1
property unknown_float_2
property unknown_float_3
property unknown_float_4
property unknown_float_5
property unknown_float_6
property unknown_int_1
class BSPSysScaleModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

property floats
property num_floats
class BSPSysSimpleColorModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Bethesda-Specific Particle node.

property color_1_end_percent
property color_1_start_percent
property color_2_end_percent
property color_2_start_percent
property colors
property fade_in_percent
property fade_out_percent
class BSPSysStripUpdateModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Bethesda-Specific (mesh?) Particle System Modifier.

property update_delta_time
class BSPSysSubTexModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Similar to a Flip Controller, this handles particle texture animation on a single texture atlas

property end_frame
property frame_count
property frame_count_fudge
property loop_start_frame
property loop_start_frame_fudge
property start_frame
property start_frame_fudge
class BSPackedAdditionalDataBlock(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property atom_sizes
property block_offsets
property data
property has_data
property num_atoms
property num_blocks
property num_total_bytes
property num_total_bytes_per_element
property unknown_int_1
class BSPackedAdditionalGeometryData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.AbstractAdditionalGeometryData

property block_infos
property blocks
property num_block_infos
property num_blocks
property num_vertices
class BSParentVelocityModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Particle modifier that adds a blend of object space translation and rotation to particles born in world space.

property damping
class BSPartFlag(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.bit_struct.BitStructBase

Editor flags for the Body Partitions.

property pf_editor_visible
property pf_start_net_boneset
property reserved_bits_1
class BSProceduralLightningController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiFloatInterpController

Skyrim, Paired with dummy TriShapes, this controller generates lightning shapes for special effects. First interpolator controls Generation.

property byte_1
property byte_2
property byte_3
property distance_weight
property float_2
property float_5
property fork
property interpolator_10
property interpolator_2_mutation
property interpolator_3
property interpolator_4
property interpolator_5
property interpolator_6
property interpolator_7
property interpolator_8
property interpolator_9_arc_offset
property strip_width
property unknown_short_1
property unknown_short_2
property unknown_short_3
class BSRefractionFirePeriodController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

Bethesda-specific node.

property interpolator
class BSRefractionStrengthController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiFloatInterpController

Bethesda-Specific node.

class BSRotAccumTransfInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTransformInterpolator

class BSSegment(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Bethesda-specific node.

property flags
property internal_index
property unknown_byte_1
class BSSegmentFlags(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.bit_struct.BitStructBase

An unsigned 32-bit integer, describing what’s inside the segment.

property bsseg_water
property reserved_bits_0
class BSSegmentedTriShape(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTriShape

Bethesda-specific node.

property num_segments
property segment
class BSShaderFlags(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.bit_struct.BitStructBase

Shader Property Flags

property sf_alpha_texture
property sf_decal_single_pass
property sf_dynamic_alpha
property sf_dynamic_decal_single_pass
property sf_empty
property sf_environment_mapping
property sf_external_emittance
property sf_eye_environment_mapping
property sf_face_gen
property sf_fire_refraction
property sf_hair
property sf_localmap_hide_secret
property sf_low_detail
property sf_multiple_textures
property sf_non_projective_shadows
property sf_parallax_occulsion
property sf_parallax_shader_index_15
property sf_refraction
property sf_remappable_textures
property sf_shadow_frustum
property sf_shadow_map
property sf_single_pass
property sf_skinned
property sf_specular
property sf_tree_billboard
property sf_unknown_1
property sf_unknown_2
property sf_unknown_3
property sf_unknown_4
property sf_vertex_alpha
property sf_window_environment_mapping
property sf_z_buffer_test
class BSShaderFlags2(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.bit_struct.BitStructBase

Shader Property Flags 2

property sf_2_1_st_light_is_point_light
property sf_2_2_nd_light
property sf_2_3_rd_light
property sf_2_alpha_decal
property sf_2_billboard_and_envmap_light_fade
property sf_2_envmap_light_fade
property sf_2_fit_slope
property sf_2_lod_building
property sf_2_lod_landscape
property sf_2_no_fade
property sf_2_no_lod_land_blend
property sf_2_no_transparecny_multisampling
property sf_2_premult_alpha
property sf_2_refraction_tint
property sf_2_show_in_local_map
property sf_2_skip_normal_maps
property sf_2_uniform_scale
property sf_2_unknown_1
property sf_2_unknown_10
property sf_2_unknown_2
property sf_2_unknown_3
property sf_2_unknown_4
property sf_2_unknown_5
property sf_2_unknown_6
property sf_2_unknown_7
property sf_2_unknown_8
property sf_2_unknown_9
property sf_2_vats_selection
property sf_2_vertex_colors
property sf_2_vertex_lighting
property sf_2_wireframe
property sf_2_z_buffer_write
class BSShaderLightingProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.BSShaderProperty

Bethesda-specific property.

property texture_clamp_mode
class BSShaderNoLightingProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.BSShaderLightingProperty

Bethesda-specific property.

property falloff_start_angle
property falloff_start_opacity
property falloff_stop_angle
property falloff_stop_opacity
property file_name
class BSShaderPPLightingProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.BSShaderLightingProperty

Bethesda-specific Shade node.

property emissive_color
property refraction_fire_period
property refraction_strength
property texture_set
property unknown_float_4
property unknown_float_5
class BSShaderProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiProperty

Bethesda-specific Property node

property environment_map_scale
property shader_flags
property shader_flags_2
property shader_type
property smooth
class BSShaderTextureSet(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Bethesda-specific Texture Set.

property num_textures
property textures
class BSShaderType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

The type of animation interpolation (blending) that will be used on the associated key frames.

SHADER_DEFAULT = 1
SHADER_LIGHTING30 = 29
SHADER_NOLIGHTING = 33
SHADER_SKIN = 14
SHADER_SKY = 10
SHADER_TALL_GRASS = 0
SHADER_TILE = 32
SHADER_WATER = 17
class BSSkyShaderProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiProperty

Skyrim Sky shader block.

property shader_flags_1
property shader_flags_2
property sky_object_type
property source_texture
property uv_offset
property uv_scale
class BSStripPSysData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysData

Bethesda-Specific (mesh?) Particle System Data.

property unknown_byte_6
property unknown_float_8
property unknown_int_7
property unknown_short_5
class BSStripParticleSystem(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiParticleSystem

Bethesda-Specific (mesh?) Particle System.

class BSTreadTransfInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiInterpolator

Bethesda-specific node.

property data
property num_tread_transforms
property tread_transforms
class BSTreadTransform(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Bethesda-specific node.

property name
property transform_1
property transform_2
class BSTreadTransformData(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Bethesda-specific node.

property rotation
property scale
property translation
class BSTreeNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

Node for handling Trees, Switches branch configurations for variation?

property bones
property bones_1
property num_bones_1
property num_bones_2
class BSValueNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

Bethesda-Specific node. Found on fxFire effects

property unknown_byte
property value
class BSWArray(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Bethesda-specific node.

property items
property num_items
class BSWaterShaderProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiProperty

Skyrim water shader property, different from “WaterShaderProperty” seen in Fallout.

property shader_flags_1
property shader_flags_2
property unknown_short_3
property uv_offset
property uv_scale
property water_direction
property water_shader_flags
class BSWindModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Particle Modifier that uses the wind value from the gamedata to alter the path of particles.

property strength
class BSXFlags(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiIntegerExtraData

Controls animation and collision. Integer holds flags: Bit 0 : enable havok, bAnimated(Skyrim) Bit 1 : enable collision, bHavok(Skyrim) Bit 2 : is skeleton nif?, bRagdoll(Skyrim) Bit 3 : enable animation, bComplex(Skyrim) Bit 4 : FlameNodes present, bAddon(Skyrim) Bit 5 : EditorMarkers present Bit 6 : bDynamic(Skyrim) Bit 7 : bArticulated(Skyrim) Bit 8 : bIKTarget(Skyrim) Bit 9 : Unknown(Skyrim)

class BallAndSocketDescriptor(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property unknown_4_bytes
property unknown_floats_1
property unknown_floats_2
property unknown_int_1
class BillboardMode(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

Determines the way the billboard will react to the camera. Billboard mode is stored in lowest 3 bits although Oblivion vanilla nifs uses values higher than 7.

ALWAYS_FACE_CAMERA = 0
ALWAYS_FACE_CENTER = 3
BSROTATE_ABOUT_UP = 5
RIGID_FACE_CAMERA = 2
RIGID_FACE_CENTER = 4
ROTATE_ABOUT_UP = 1
ROTATE_ABOUT_UP2 = 9
BlockTypeIndex

alias of pyffi.object_models.common.UShort

class BodyPartList(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Body part list for DismemberSkinInstance

property body_part
property part_flag
class BoneLOD(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Stores Bone Level of Detail info in a BSBoneLODExtraData

property bone_name
property distance
class BoundVolumeType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

BASE_BV = 4294967295
BOX_BV = 1
CAPSULE_BV = 2
HALFSPACE_BV = 5
SPHERE_BV = 0
UNION_BV = 4
class BoundingBox(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Bounding box.

property radius
property rotation
property translation
property unknown_int
class BoundingVolume(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property box
property capsule
property collision_type
property half_space
property sphere
property union
class BoxBV(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Box Bounding Volume

property axis
property center
property extent
class ByteArray(**kwargs)[source]

Bases: pyffi.object_models.xml.basic.BasicBase

Array (list) of bytes. Implemented as basic type to speed up reading and also to prevent data to be dumped by __str__.

get_hash(data=None)[source]

Returns a hash value (an immutable object) that can be used to identify the object uniquely.

get_size(data=None)[source]

Returns size of the object in bytes.

get_value()[source]

Return object value.

read(stream, data)[source]

Read object from file.

set_value(value)[source]

Set object value.

write(stream, data)[source]

Write object to file.

class ByteColor3(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

A color without alpha (red, green, blue).

property b
property g
property r
class ByteColor4(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

A color with alpha (red, green, blue, alpha).

property a
property b
property g
property r
class ByteMatrix(**kwargs)[source]

Bases: pyffi.object_models.xml.basic.BasicBase

Matrix of bytes. Implemented as basic type to speed up reading and to prevent data being dumped by __str__.

get_hash(data=None)[source]

Returns a hash value (an immutable object) that can be used to identify the object uniquely.

get_size(data=None)[source]

Returns size of the object in bytes.

get_value()[source]

Return object value.

read(stream, data)[source]

Read object from file.

set_value(value)[source]

Set object value.

write(stream, data)[source]

Write object to file.

class CStreamableAssetData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

property root
property unknown_bytes
class CapsuleBV(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Capsule Bounding Volume

property center
property origin
property unknown_float_1
property unknown_float_2
class ChannelConvention(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

CC_COMPRESSED = 4
CC_EMPTY = 5
CC_FIXED = 0
CC_INDEX = 3
class ChannelData(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Channel data

property bits_per_channel
property convention
property type
property unknown_byte_1
class ChannelType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

CHNL_ALPHA = 3
CHNL_BLUE = 2
CHNL_COMPRESSED = 4
CHNL_EMPTY = 19
CHNL_GREEN = 1
CHNL_INDEX = 16
CHNL_RED = 0
class CloningBehavior(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

Sets how objects are to be cloned.

CLONING_BLANK_COPY = 2
CLONING_COPY = 1
CLONING_SHARE = 0
class CollisionMode(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

CM_NOTEST = 3
CM_USE_ABV = 2
CM_USE_NIBOUND = 4
CM_USE_OBB = 0
CM_USE_TRI = 1
class Color3(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

A color without alpha (red, green, blue).

property b
property g
property r
class Color4(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

A color with alpha (red, green, blue, alpha).

property a
property b
property g
property r
class ComponentFormat(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

The data format of components.

F_FLOAT16_1 = 66097
F_FLOAT16_2 = 131634
F_FLOAT16_3 = 197171
F_FLOAT16_4 = 262708
F_FLOAT32_1 = 66613
F_FLOAT32_2 = 132150
F_FLOAT32_3 = 197687
F_FLOAT32_4 = 263224
F_INT16_1 = 66065
F_INT16_2 = 131602
F_INT16_3 = 197139
F_INT16_4 = 262676
F_INT32_1 = 66593
F_INT32_2 = 132130
F_INT32_3 = 197667
F_INT32_4 = 263204
F_INT8_1 = 65793
F_INT8_2 = 131330
F_INT8_3 = 196867
F_INT8_4 = 262404
F_NORMINT16_1 = 66073
F_NORMINT16_2 = 131610
F_NORMINT16_3 = 197147
F_NORMINT16_4 = 262684
F_NORMINT32_1 = 66601
F_NORMINT32_2 = 132138
F_NORMINT32_3 = 197675
F_NORMINT32_4 = 263212
F_NORMINT8_1 = 65801
F_NORMINT8_2 = 131338
F_NORMINT8_3 = 196875
F_NORMINT8_4 = 262412
F_NORMINT_10_10_10_2 = 66621
F_NORMINT_10_10_10_L1 = 66618
F_NORMINT_11_11_10 = 66619
F_NORMUINT16_1 = 66077
F_NORMUINT16_2 = 131614
F_NORMUINT16_3 = 197151
F_NORMUINT16_4 = 262688
F_NORMUINT32_1 = 66605
F_NORMUINT32_2 = 132142
F_NORMUINT32_3 = 197679
F_NORMUINT32_4 = 263216
F_NORMUINT8_1 = 65805
F_NORMUINT8_2 = 131342
F_NORMUINT8_3 = 196879
F_NORMUINT8_4 = 262416
F_NORMUINT8_4_BGRA = 262460
F_UINT16_1 = 66069
F_UINT16_2 = 131606
F_UINT16_3 = 197143
F_UINT16_4 = 262680
F_UINT32_1 = 66597
F_UINT32_2 = 132134
F_UINT32_3 = 197671
F_UINT32_4 = 263208
F_UINT8_1 = 65797
F_UINT8_2 = 131334
F_UINT8_3 = 196871
F_UINT8_4 = 262408
F_UINT_10_10_10_2 = 66622
F_UINT_10_10_10_L1 = 66617
F_UNKNOWN = 0
class ConsistencyType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

Used by NiGeometryData to control the volatility of the mesh. While they appear to be flags they behave as an enum.

CT_MUTABLE = 0
CT_STATIC = 16384
CT_VOLATILE = 32768

Bases: pyffi.formats.nif._ControllerLink, object

>>> from pyffi.formats.nif import NifFormat
>>> link = NifFormat.ControllerLink()
>>> link.node_name_offset
-1
>>> link.set_node_name("Bip01")
>>> link.node_name_offset
0
>>> link.get_node_name()
b'Bip01'
>>> link.node_name
b'Bip01'
>>> link.set_node_name("Bip01 Tail")
>>> link.node_name_offset
6
>>> link.get_node_name()
b'Bip01 Tail'
>>> link.node_name
b'Bip01 Tail'
get_controller_type()[source]
get_node_name()[source]

Return the node name.

>>> # a doctest
>>> from pyffi.formats.nif import NifFormat
>>> link = NifFormat.ControllerLink()
>>> link.string_palette = NifFormat.NiStringPalette()
>>> palette = link.string_palette.palette
>>> link.node_name_offset = palette.add_string("Bip01")
>>> link.get_node_name()
b'Bip01'
>>> # another doctest
>>> from pyffi.formats.nif import NifFormat
>>> link = NifFormat.ControllerLink()
>>> link.node_name = "Bip01"
>>> link.get_node_name()
b'Bip01'
get_property_type()[source]
get_variable_1()[source]
get_variable_2()[source]
set_controller_type(text)[source]
set_node_name(text)[source]
set_property_type(text)[source]
set_variable_1(text)[source]
set_variable_2(text)[source]
class CoordGenType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

Determines the way that UV texture coordinates are generated.

CG_DIFFUSE_CUBE_MAP = 4
CG_SPECULAR_CUBE_MAP = 3
CG_SPHERE_MAP = 2
CG_WORLD_PARALLEL = 0
CG_WORLD_PERSPECTIVE = 1
class CycleType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

The animation cyle behavior.

CYCLE_CLAMP = 2
CYCLE_LOOP = 0
CYCLE_REVERSE = 1
class Data(version=67108866, user_version=0, user_version_2=0)[source]

Bases: pyffi.object_models.Data

A class to contain the actual nif data.

Note that L{header} and L{blocks} are not automatically kept in sync with the rest of the nif data, but they are resynchronized when calling L{write}.

Variables
  • version – The nif version.

  • user_version – The nif user version.

  • user_version_2 – The nif user version 2.

  • roots – List of root blocks.

  • header – The nif header.

  • blocks – List of blocks.

  • modification – Neo Steam (“neosteam”) or Ndoors (“ndoors”) or Joymaster Interactive Howling Sword (“jmihs1”) or Laxe Lore (“laxelore”) style nif?

class VersionUInt(**kwargs)[source]

Bases: pyffi.object_models.common.UInt

get_detail_display()[source]

Return an object that can be used to display the instance.

set_value(value)[source]

Set value to C{value}. Calls C{int(value)} to convert to integer.

Parameters

value (int) – The value to assign.

get_detail_child_names(edge_filter=(True, True))[source]

Generator which yields all child names of this item in the detail view.

Override this method if the node has children.

Returns

Generator for detail tree child names.

Return type

generator yielding strs

get_detail_child_nodes(edge_filter=(True, True))[source]

Generator which yields all children of this item in the detail view (by default, all acyclic and active ones).

Override this method if the node has children.

Parameters

edge_filter (EdgeFilter or type(None)) – The edge type to include.

Returns

Generator for detail tree child nodes.

Return type

generator yielding DetailNodes

get_global_child_nodes(edge_filter=(True, True))[source]

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.

inspect(stream)[source]

Quickly checks whether the stream appears to contain nif data, and read the nif header. Resets stream to original position.

Call this function if you only need to inspect the header of the nif.

Parameters

stream (file) – The file to inspect.

inspect_version_only(stream)[source]

This function checks the version only, and is faster than the usual inspect function (which reads the full header). Sets the L{version} and L{user_version} instance variables if the stream contains a valid NIF file.

Call this function if you simply wish to check that a file is a NIF file without having to parse even the header.

Raises

ValueError – If the stream does not contain a NIF file.

Parameters

stream (file) – The stream from which to read.

read(stream)[source]

Read a NIF file. Does not reset stream position.

Parameters

stream (file) – The stream from which to read.

replace_global_node(oldbranch, newbranch, edge_filter=(True, True))[source]

Replace a particular branch in the graph.

property user_version
property user_version_2
property version
write(stream)[source]

Write a NIF file. The L{header} and the L{blocks} are recalculated from the tree at L{roots} (e.g. list of block types, number of blocks, list of block types, list of strings, list of block sizes etc.).

Parameters

stream (file) – The stream to which to write.

class DataStreamAccess(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.bit_struct.BitStructBase

Determines how the data stream is accessed?

property cpu_read
property cpu_write_mutable
property cpu_write_static
property cpu_write_static_inititialized
property cpu_write_volatile
property gpu_read
property gpu_write
class DataStreamUsage(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

Determines how a data stream is used?

USAGE_SHADER_CONSTANT = 2
USAGE_USER = 3
USAGE_VERTEX = 1
USAGE_VERTEX_INDEX = 0
class DeactivatorType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

DEACTIVATOR_INVALID = 0
DEACTIVATOR_NEVER = 1
DEACTIVATOR_SPATIAL = 2
class DecalVectorArray(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Array of Vectors for Decal placement in BSDecalPlacementVectorExtraData.

property normals
property num_vectors
property points
class DecayType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

Determines decay function. Used by NiPSysBombModifier.

DECAY_EXPONENTIAL = 2
DECAY_LINEAR = 1
DECAY_NONE = 0
class DistantLODShaderProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.BSShaderProperty

Bethesda-specific node.

EPSILON = 0.0001
class EffectShaderControlledColor(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

An unsigned 32-bit integer, describing which color in BSEffectShaderProperty to animate.

class EffectShaderControlledVariable(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

An unsigned 32-bit integer, describing which float variable in BSEffectShaderProperty to animate.

EmissiveMultiple = 0
class EffectType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

The type of information that’s store in a texture used by a NiTextureEffect.

EFFECT_ENVIRONMENT_MAP = 2
EFFECT_FOG_MAP = 3
EFFECT_PROJECTED_LIGHT = 0
EFFECT_PROJECTED_SHADOW = 1
class ElementReference(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property normalize_flag
property semantic
class EmitFrom(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

Controls which parts of the mesh that the particles are emitted from.

EMIT_FROM_EDGE_CENTER = 2
EMIT_FROM_EDGE_SURFACE = 4
EMIT_FROM_FACE_CENTER = 1
EMIT_FROM_FACE_SURFACE = 3
EMIT_FROM_VERTICES = 0
class EndianType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

ENDIAN_BIG = 0
ENDIAN_LITTLE = 1
class ExportInfo(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Information about how the file was exported

property creator
property export_info_1
property export_info_2
property unknown
class ExtraMeshDataEpicMickey(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property unknown_int_1
property unknown_int_2
property unknown_int_3
property unknown_int_4
property unknown_int_5
property unknown_int_6
class ExtraMeshDataEpicMickey2(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property end
property start
property unknown_shorts
class ExtraVectorsFlags(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

None = 0
Tangents_Bitangents = 16
class FaceDrawMode(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

This enum lists the different face culling options.

DRAW_BOTH = 3
DRAW_CCW = 1
DRAW_CCW_OR_BOTH = 0
DRAW_CW = 2
class Fallout3HavokMaterial(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

A material, used by havok shape objects in Fallout 3. Bit 5: flag for PLATFORM (for values 32-63 substract 32 to know material number) Bit 6: flag for STAIRS (for values 64-95 substract 64 to know material number) Bit 5+6: flag for STAIRS+PLATFORM (for values 96-127 substract 96 to know material number)

MAT_BABY_RATTLE = 30
MAT_BARREL = 23
MAT_BOTTLE = 24
MAT_BOTTLECAP = 14
MAT_BROKEN_CONCRETE = 19
MAT_CHAIN = 13
MAT_CLOTH = 1
MAT_DIRT = 2
MAT_ELEVATOR = 15
MAT_GLASS = 3
MAT_GRASS = 4
MAT_HEAVY_METAL = 11
MAT_HEAVY_STONE = 10
MAT_HEAVY_WOOD = 12
MAT_HOLLOW_METAL = 16
MAT_LUNCHBOX = 29
MAT_METAL = 5
MAT_ORGANIC = 6
MAT_PISTOL = 26
MAT_RIFLE = 27
MAT_RUBBER_BALL = 31
MAT_SAND = 18
MAT_SHEET_METAL = 17
MAT_SHOPPING_CART = 28
MAT_SKIN = 7
MAT_SODA_CAN = 25
MAT_STONE = 0
MAT_VEHICLE_BODY = 20
MAT_VEHICLE_PART_HOLLOW = 22
MAT_VEHICLE_PART_SOLID = 21
MAT_WATER = 8
MAT_WOOD = 9
class Fallout3Layer(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

Sets mesh color in Fallout 3 GECK. Anything higher than 72 is also null.

ACOUSTIC_SPACE = 21
ACTORZONE = 22
ADDONARM = 71
ADDONCHEST = 70
ADDONHEAD = 69
ADDONLEG = 72
ANIM_STATIC = 2
AVOIDBOX = 31
BIPED = 29
BODY = 46
CAMERAPICK = 35
CAMERASPHERE = 33
CHAIN = 68
CHARCONTROLLER = 30
CLOUD_TRAP = 16
CLUTTER = 4
COLLISIONBOX = 32
CUSTOMPICK1 = 39
CUSTOMPICK2 = 40
DEBRIS_LARGE = 20
DEBRIS_SMALL = 19
DOORDETECTION = 34
DROPPINGPICK = 42
GASTRAP = 24
GROUND = 17
HEAD = 45
INVISIBLE_WALL = 27
ITEMPICK = 36
LINEOFSIGHT = 37
L_CALF = 53
L_FOOT = 54
L_FORE_ARM = 50
L_HAND = 51
L_THIGH = 52
L_UPPER_ARM = 49
NONCOLLIDABLE = 15
NULL = 43
OTHER = 44
PACK = 67
PATHPICK = 38
PONYTAIL = 65
PORTAL = 18
PROJECTILE = 6
PROJECTILEZONE = 23
PROPS = 10
QUIVER = 63
R_CALF = 59
R_FOOT = 60
R_FORE_ARM = 56
R_HAND = 57
R_THIGH = 58
R_UPPER_ARM = 55
SHELLCASING = 25
SHIELD = 62
SPELL = 7
SPELLEXPLOSION = 41
SPINE1 = 47
SPINE2 = 48
STATIC = 1
TAIL = 61
TERRAIN = 13
TRANSPARENT = 3
TRANSPARENT_SMALL = 26
TRANSPARENT_SMALL_ANIM = 28
TRAP = 14
TREES = 9
TRIGGER = 12
UNIDENTIFIED = 0
WATER = 11
WEAPON = 64
WING = 66
class FieldType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

The force field’s type.

FIELD_POINT = 1
FIELD_WIND = 0
class FilePath(**kwargs)[source]

Bases: pyffi.formats.nif.string

A file path.

get_hash(data=None)[source]

Returns a case insensitive hash value.

class FileVersion(**kwargs)[source]

Bases: pyffi.object_models.common.UInt

get_detail_display()[source]

Return an object that can be used to display the instance.

read(stream, data)[source]

Read value from stream.

Parameters

stream (file) – The stream to read from.

set_value()[source]

Set value to C{value}. Calls C{int(value)} to convert to integer.

Parameters

value (int) – The value to assign.

write(stream, data)[source]

Write value to stream.

Parameters

stream (file) – The stream to write to.

class Flags(**kwargs)[source]

Bases: pyffi.object_models.common.UShort

class Footer(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._Footer, object

read(stream, data)[source]

Read structure from stream.

write(stream, data)[source]

Write structure to stream.

class ForceType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

The type of force? May be more valid values.

FORCE_PLANAR = 0
FORCE_SPHERICAL = 1
FORCE_UNKNOWN = 2
class FurnitureEntryPoints(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.bit_struct.BitStructBase

Furniture entry points. It specifies the direction(s) from where the actor is able to enter (and leave) the position.

property behind
property front
property left
property right
property up
class FurniturePosition(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Describes a furniture position?

property animation_type
property entry_properties
property heading
property offset
property orientation
property position_ref_1
property position_ref_2
class FxButton(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.FxWidget

Unknown.

class FxRadioButton(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.FxWidget

Unknown.

property buttons
property num_buttons
property unknown_int_1
property unknown_int_2
property unknown_int_3
class FxWidget(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

Firaxis-specific UI widgets?

property unknown_292_bytes
property unknown_3
class HairShaderProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.BSShaderProperty

Bethesda-specific node.

class HalfSpaceBV(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property center
property normal
property unknown_float_1
class HavokColFilter(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

ColFilter property for Havok. It contains Layer, Flags and Part Number

property flags_and_part_number
property layer
property unknown_short
class HavokMaterial(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property material
class Header(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._Header, object

has_block_type(block_type)[source]

Check if header has a particular block type.

Raises

ValueError – If number of block types is zero (only nif versions 10.0.1.0 and up store block types in header).

Parameters

block_type (L{NifFormat.NiObject}) – The block type.

Returns

True if the header’s list of block types has the given block type, or a subclass of it. False otherwise.

Return type

bool

class HeaderString(template=None, argument=None, parent=None)[source]

Bases: pyffi.object_models.xml.basic.BasicBase

get_detail_display()[source]

Return an object that can be used to display the instance.

get_hash(data=None)[source]

Returns a hash value (an immutable object) that can be used to identify the object uniquely.

get_size(data=None)[source]

Returns size of the object in bytes.

read(stream, data)[source]

Read object from file.

static version_string(version, modification=None)[source]

Transforms version number into a version string.

>>> NifFormat.HeaderString.version_string(0x03000300)
'NetImmerse File Format, Version 3.03'
>>> NifFormat.HeaderString.version_string(0x03010000)
'NetImmerse File Format, Version 3.1'
>>> NifFormat.HeaderString.version_string(0x0A000100)
'NetImmerse File Format, Version 10.0.1.0'
>>> NifFormat.HeaderString.version_string(0x0A010000)
'Gamebryo File Format, Version 10.1.0.0'
>>> NifFormat.HeaderString.version_string(0x0A010000,
...                                       modification="neosteam")
'NS'
>>> NifFormat.HeaderString.version_string(0x14020008,
...                                       modification="ndoors")
'NDSNIF....@....@...., Version 20.2.0.8'
>>> NifFormat.HeaderString.version_string(0x14030009,
...                                       modification="jmihs1")
'Joymaster HS1 Object Format - (JMI), Version 20.3.0.9'
write(stream, data)[source]

Write object to file.

class HingeDescriptor(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

This constraint allows rotation about a specified axis.

property axle_a
property axle_b
property perp_2_axle_in_a_1
property perp_2_axle_in_a_2
property perp_2_axle_in_b_1
property perp_2_axle_in_b_2
property pivot_a
property pivot_b
class ImageType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

Determines how the raw image data is stored in NiRawImageData.

RGB = 1
RGBA = 2
class InertiaMatrix(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._InertiaMatrix, object

as_list()[source]

Return matrix as 3x3 list.

as_tuple()[source]

Return matrix as 3x3 tuple.

get_copy()[source]

Return a copy of the matrix.

is_identity()[source]

Return True if the matrix is close to identity.

set_identity()[source]

Set to identity matrix.

class Key(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

A generic key with support for interpolation. Type 1 is normal linear interpolation, type 2 has forward and backward tangents, and type 3 has tension, bias and continuity arguments. Note that color4 and byte always seem to be of type 1.

property backward
property forward
property tbc
property time
property value
class KeyGroup(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Array of vector keys (anything that can be interpolated, except rotations).

property interpolation
property keys
property num_keys
class KeyType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

The type of animation interpolation (blending) that will be used on the associated key frames.

CONST_KEY = 5
LINEAR_KEY = 1
QUADRATIC_KEY = 2
TBC_KEY = 3
XYZ_ROTATION_KEY = 4
class LODRange(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

The distance range where a specific level of detail applies.

property far_extent
property near_extent
property unknown_ints
class LightMode(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

An unsigned 32-bit integer, describing how vertex colors influence lighting.

LIGHT_MODE_EMISSIVE = 0
LIGHT_MODE_EMI_AMB_DIF = 1
class Lighting30ShaderProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.BSShaderPPLightingProperty

Bethesda-specific node.

class LightingShaderControlledColor(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

An unsigned 32-bit integer, describing which color in BSLightingShaderProperty to animate.

class LightingShaderControlledVariable(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

An unsigned 32-bit integer, describing which float variable in BSLightingShaderProperty to animate.

Alpha = 12
Glossiness = 9
class LimitedHingeDescriptor(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._LimitedHingeDescriptor, object

update_a_b(transform)[source]

Update B pivot and axes from A using the given transform.

class LineString(**kwargs)[source]

Bases: pyffi.object_models.xml.basic.BasicBase

Basic type for strings ending in a newline character (0x0a).

>>> from tempfile import TemporaryFile
>>> f = TemporaryFile()
>>> l = NifFormat.LineString()
>>> f.write('abcdefg\x0a'.encode())
8
>>> f.seek(0)
0
>>> l.read(f)
>>> str(l)
'abcdefg'
>>> f.seek(0)
0
>>> l.set_value('Hi There')
>>> l.write(f)
>>> f.seek(0)
0
>>> m = NifFormat.LineString()
>>> m.read(f)
>>> str(m)
'Hi There'
get_hash(data=None)[source]

Returns a hash value (an immutable object) that can be used to identify the object uniquely.

get_size(data=None)[source]

Returns size of the object in bytes.

get_value()[source]

Return object value.

read(stream, data=None)[source]

Read object from file.

set_value(value)[source]

Set object value.

write(stream, data=None)[source]

Write object to file.

class MTransform(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property rotation
property scale
property translation
class MatchGroup(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Group of vertex indices of vertices that match.

property num_vertices
property vertex_indices
class MaterialData(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Data stored per-material by NiRenderObject

property material_extra_data
property material_name
class Matrix22(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

A 2x2 matrix of float values. Stored in OpenGL column-major format.

property m_11
property m_12
property m_21
property m_22
class Matrix33(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._Matrix33, object

as_list()[source]

Return matrix as 3x3 list.

as_tuple()[source]

Return matrix as 3x3 tuple.

get_copy()[source]

Return a copy of the matrix.

get_determinant()[source]

Return determinant.

get_inverse()[source]

Get inverse (assuming is_scale_rotation is true!).

get_scale()[source]

Gets the scale (assuming is_scale_rotation is true!).

get_scale_quat()[source]

Decompose matrix into scale and quaternion.

get_scale_rotation()[source]

Decompose the matrix into scale and rotation, where scale is a float and rotation is a C{Matrix33}. Returns a pair (scale, rotation).

get_transpose()[source]

Get transposed of the matrix.

is_identity()[source]

Return True if the matrix is close to identity.

is_rotation()[source]

Returns True if the matrix is a rotation matrix (a member of SO(3)).

is_scale_rotation()[source]

Returns true if the matrix decomposes nicely into scale * rotation.

set_identity()[source]

Set to identity matrix.

set_scale_rotation(scale, rotation)[source]

Compose the matrix as the product of scale * rotation.

sup_norm()[source]

Calculate supremum norm of matrix (maximum absolute value of all entries).

class Matrix44(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._Matrix44, object

as_list()[source]

Return matrix as 4x4 list.

as_tuple()[source]

Return matrix as 4x4 tuple.

get_copy()[source]

Create a copy of the matrix.

get_inverse(fast=True)[source]

Calculates inverse (fast assumes is_scale_rotation_translation is True).

get_matrix_33()[source]

Returns upper left 3x3 part.

get_scale_quat_translation()[source]
get_scale_rotation_translation()[source]
get_translation()[source]

Returns lower left 1x3 part.

is_identity()[source]

Return True if the matrix is close to identity.

is_scale_rotation_translation()[source]
set_identity()[source]

Set to identity matrix.

set_matrix_33(m)[source]

Sets upper left 3x3 part.

set_rows(row0, row1, row2, row3)[source]

Set matrix from rows.

set_scale_rotation_translation(scale, rotation, translation)[source]
set_translation(translation)[source]

Returns lower left 1x3 part.

sup_norm()[source]

Calculate supremum norm of matrix (maximum absolute value of all entries).

class MeshData(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property component_semantics
property is_per_instance
property num_components
property num_submeshes
property stream
property submesh_to_region_map
class MeshPrimitiveType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

Describes the type of primitives stored in a mesh object.

MESH_PRIMITIVE_LINESTRIPS = 2
MESH_PRIMITIVE_POINTS = 4
MESH_PRIMITIVE_QUADS = 3
MESH_PRIMITIVE_TRIANGLES = 0
MESH_PRIMITIVE_TRISTRIPS = 1
class MipMap(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Description of a MipMap within a NiPixelData object.

property height
property offset
property width
class MipMapFormat(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

An unsigned 32-bit integer, describing how mipmaps are handled in a texture.

MIP_FMT_DEFAULT = 2
MIP_FMT_NO = 0
MIP_FMT_YES = 1
class MoppDataBuildType(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

A byte describing if MOPP Data is organized into chunks (PS3) or not (PC)

BUILD_NOT_SET = 2
BUILT_WITHOUT_CHUNK_SUBDIVISION = 1
BUILT_WITH_CHUNK_SUBDIVISION = 0
class Morph(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

Geometry morphing data component.

property frame_name
property interpolation
property keys
property num_keys
property unknown_int
property vectors
class MorphWeight(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property interpolator
property weight
class MotionQuality(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

The motion type. Determines quality of motion?

MO_QUAL_BULLET = 6
MO_QUAL_CHARACTER = 8
MO_QUAL_CRITICAL = 5
MO_QUAL_DEBRIS = 3
MO_QUAL_FIXED = 1
MO_QUAL_INVALID = 0
MO_QUAL_KEYFRAMED = 2
MO_QUAL_KEYFRAMED_REPORT = 9
MO_QUAL_MOVING = 4
MO_QUAL_USER = 7
class MotionSystem(**kwargs)

Bases: pyffi.object_models.xml.enum.EnumBase

The motion system. 4 (Box) is used for everything movable. 7 (Keyframed) is used on statics and animated stuff.

MO_SYS_BOX = 4
MO_SYS_BOX_STABILIZED = 5
MO_SYS_CHARACTER = 9
MO_SYS_DYNAMIC = 1
MO_SYS_FIXED = 7
MO_SYS_INVALID = 0
MO_SYS_KEYFRAMED = 6
MO_SYS_SPHERE = 2
MO_SYS_SPHERE_INERTIA = 3
MO_SYS_THIN_BOX = 8
class MotorDescriptor(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property unknown_byte_1
property unknown_float_1
property unknown_float_2
property unknown_float_3
property unknown_float_4
property unknown_float_5
property unknown_float_6
class MultiTextureElement(template=None, argument=None, parent=None)

Bases: pyffi.object_models.xml.struct_.StructBase

property clamp
property filter
property has_image
property image
property ps_2_k
property ps_2_l
property unknown_short_3
property uv_set
class Ni3dsAlphaAnimator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown.

property num_1
property num_2
property parent
property unknown_1
property unknown_2
class Ni3dsAnimationNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown. Only found in 2.3 nifs.

property child
property count
property has_data
property name
property unknown_array
property unknown_floats_1
property unknown_floats_2
property unknown_short
class Ni3dsColorAnimator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown!

property unknown_1
class Ni3dsMorphShape(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown!

property unknown_1
class Ni3dsParticleSystem(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown!

property unknown_1
class Ni3dsPathController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown!

property unknown_1
class NiAVObject(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiAVObject, object

>>> from pyffi.formats.nif import NifFormat
>>> node = NifFormat.NiNode()
>>> prop1 = NifFormat.NiProperty()
>>> prop1.name = "hello"
>>> prop2 = NifFormat.NiProperty()
>>> prop2.name = "world"
>>> node.get_properties()
[]
>>> node.set_properties([prop1, prop2])
>>> [prop.name for prop in node.get_properties()]
[b'hello', b'world']
>>> [prop.name for prop in node.properties]
[b'hello', b'world']
>>> node.set_properties([])
>>> node.get_properties()
[]
>>> # now set them the other way around
>>> node.set_properties([prop2, prop1])
>>> [prop.name for prop in node.get_properties()]
[b'world', b'hello']
>>> [prop.name for prop in node.properties]
[b'world', b'hello']
>>> node.remove_property(prop2)
>>> [prop.name for prop in node.properties]
[b'hello']
>>> node.add_property(prop2)
>>> [prop.name for prop in node.properties]
[b'hello', b'world']
add_property(prop)[source]

Add the given property to the property list.

Parameters

prop (L{NifFormat.NiProperty}) – The property block to add.

apply_scale(scale)[source]

Apply scale factor on data.

Parameters

scale – The scale factor.

get_properties()[source]

Return a list of the properties of the block.

Returns

The list of properties.

Return type

list of L{NifFormat.NiProperty}

get_transform(relative_to=None)[source]

Return scale, rotation, and translation into a single 4x4 matrix, relative to the C{relative_to} block (which should be another NiAVObject connecting to this block). If C{relative_to} is None, then returns the transform stored in C{self}, or equivalently, the target is assumed to be the parent.

Parameters

relative_to – The block relative to which the transform must be calculated. If None, the local transform is returned.

remove_property(prop)[source]

Remove the given property to the property list.

Parameters

prop (L{NifFormat.NiProperty}) – The property block to remove.

set_properties(proplist)[source]

Set the list of properties from the given list (destroys existing list).

Parameters

proplist (list of L{NifFormat.NiProperty}) – The list of property blocks to set.

set_transform(m)[source]

Set rotation, translation, and scale, from a 4x4 matrix.

Parameters

m – The matrix to which the transform should be set.

class NiAVObjectPalette(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown.

class NiAdditionalGeometryData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.AbstractAdditionalGeometryData

property block_infos
property blocks
property num_block_infos
property num_blocks
property num_vertices
class NiAlphaController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiFloatInterpController

Time controller for transparency.

property data
class NiAlphaProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiProperty

Transparency. Flags 0x00ED.

property flags
property threshold
property unknown_int_2
property unknown_short_1
class NiAmbientLight(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiLight

Ambient light source.

class NiArkAnimationExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Unknown node.

property unknown_bytes
property unknown_ints
class NiArkImporterExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Unknown node.

property importer_name
property unknown_bytes
property unknown_floats
property unknown_int_1
property unknown_int_2
class NiArkShaderExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Unknown node.

property unknown_int
property unknown_string
class NiArkTextureExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Unknown node.

property num_textures
property textures
property unknown_byte
property unknown_int_2
property unknown_ints_1
class NiArkViewportInfoExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Unknown node.

property unknown_bytes
class NiAutoNormalParticles(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiParticles

Unknown.

class NiAutoNormalParticlesData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiParticlesData

Particle system data object (with automatic normals?).

class NiBSAnimationNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

Bethesda-specific extension of Node with animation properties stored in the flags, often 42?

class NiBSBoneLODController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiBoneLODController

A simple LOD controller for bones.

class NiBSPArrayController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiParticleSystemController

A particle system controller, used by BS in conjunction with NiBSParticleNode.

class NiBSParticleNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

Unknown.

class NiBSplineBasisData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Stores the number of control points of a B-spline.

property num_control_points
class NiBSplineCompFloatInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiBSplineFloatInterpolator

Unknown.

property base
property bias
property multiplier
property offset
class NiBSplineCompPoint3Interpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiBSplinePoint3Interpolator

Unknown.

class NiBSplineCompTransformEvaluator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

class NiBSplineCompTransformInterpolator(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiBSplineCompTransformInterpolator, object

apply_scale(scale)[source]

Apply scale factor on data.

get_rotations()[source]

Return an iterator over all rotation keys.

get_scales()[source]

Return an iterator over all scale keys.

get_translations()[source]

Return an iterator over all translation keys.

class NiBSplineData(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiBSplineData, object

>>> # a doctest
>>> from pyffi.formats.nif import NifFormat
>>> block = NifFormat.NiBSplineData()
>>> block.num_short_control_points = 50
>>> block.short_control_points.update_size()
>>> for i in range(block.num_short_control_points):
...     block.short_control_points[i] = 20 - i
>>> list(block.get_short_data(12, 4, 3))
[(8, 7, 6), (5, 4, 3), (2, 1, 0), (-1, -2, -3)]
>>> offset = block.append_short_data([(1,2),(4,3),(13,14),(8,2),(33,33)])
>>> offset
50
>>> list(block.get_short_data(offset, 5, 2))
[(1, 2), (4, 3), (13, 14), (8, 2), (33, 33)]
>>> list(block.get_comp_data(offset, 5, 2, 10.0, 32767.0))
[(11.0, 12.0), (14.0, 13.0), (23.0, 24.0), (18.0, 12.0), (43.0, 43.0)]
>>> block.append_float_data([(1.0,2.0),(3.0,4.0),(0.5,0.25)])
0
>>> list(block.get_float_data(0, 3, 2))
[(1.0, 2.0), (3.0, 4.0), (0.5, 0.25)]
>>> block.append_comp_data([(1,2),(4,3)])
(60, 2.5, 1.5)
>>> list(block.get_short_data(60, 2, 2))
[(-32767, -10922), (32767, 10922)]
>>> list(block.get_comp_data(60, 2, 2, 2.5, 1.5)) 
[(1.0, 2.00...), (4.0, 2.99...)]
append_comp_data(data)[source]

Append data as compressed list.

Parameters

data – A list of elements, where each element is a tuple of integers. (Note: cannot be an interator; maybe this restriction will be removed in a future version.)

Returns

The offset, bias, and multiplier.

append_float_data(data)[source]

Append data.

Parameters

data – A list of elements, where each element is a tuple of floats. (Note: cannot be an interator; maybe this restriction will be removed in a future version.)

Returns

The offset at which the data was appended.

append_short_data(data)[source]

Append data.

Parameters

data – A list of elements, where each element is a tuple of integers. (Note: cannot be an interator; maybe this restriction will be removed in a future version.)

Returns

The offset at which the data was appended.

get_comp_data(offset, num_elements, element_size, bias, multiplier)[source]

Get an interator to the data, converted to float with extra bias and multiplication factor. If C{x} is the short value, then the returned value is C{bias + x * multiplier / 32767.0}.

Parameters
  • offset – The offset in the data where to start.

  • num_elements – Number of elements to get.

  • element_size – Size of a single element.

  • bias – Value bias.

  • multiplier – Value multiplier.

Returns

A list of C{num_elements} tuples of size C{element_size}.

get_float_data(offset, num_elements, element_size)[source]

Get an iterator to the data.

Parameters
  • offset – The offset in the data where to start.

  • num_elements – Number of elements to get.

  • element_size – Size of a single element.

Returns

A list of C{num_elements} tuples of size C{element_size}.

get_short_data(offset, num_elements, element_size)[source]

Get an iterator to the data.

Parameters
  • offset – The offset in the data where to start.

  • num_elements – Number of elements to get.

  • element_size – Size of a single element.

Returns

A list of C{num_elements} tuples of size C{element_size}.

class NiBSplineFloatInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiBSplineInterpolator

Unknown.

class NiBSplineInterpolator(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiBSplineInterpolator, object

get_times()[source]

Return an iterator over all key times.

@todo: When code for calculating the bsplines is ready, this function will return exactly self.basis_data.num_control_points - 1 time points, and not self.basis_data.num_control_points as it is now.

class NiBSplinePoint3Interpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiBSplineInterpolator

Unknown.

property unknown_floats
class NiBSplineTransformInterpolator(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiBSplineTransformInterpolator, object

apply_scale(scale)[source]

Apply scale factor on data.

get_rotations()[source]

Return an iterator over all rotation keys.

get_scales()[source]

Return an iterator over all scale keys.

get_translations()[source]

Return an iterator over all translation keys.

class NiBezierMesh(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiAVObject

Unknown

property bezier_triangle
property count_1
property count_2
property data_2
property num_bezier_triangles
property points_1
property points_2
property unknown_3
property unknown_4
property unknown_5
property unknown_6
class NiBezierTriangle4(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Sub data of NiBezierMesh

property matrix
property unknown_1
property unknown_2
property unknown_3
property unknown_4
property unknown_5
property unknown_6
property vector_1
property vector_2
class NiBillboardNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

These nodes will always be rotated to face the camera creating a billboard effect for any attached objects.

In pre-10.1.0.0 the Flags field is used for BillboardMode. Bit 0: hidden Bits 1-2: collision mode Bit 3: unknown (set in most official meshes) Bits 5-6: billboard mode

Collision modes: 00 NONE 01 USE_TRIANGLES 10 USE_OBBS 11 CONTINUE

Billboard modes: 00 ALWAYS_FACE_CAMERA 01 ROTATE_ABOUT_UP 10 RIGID_FACE_CAMERA 11 ALWAYS_FACE_CENTER

property billboard_mode
class NiBinaryExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Binary extra data object. Used to store tangents and bitangents in Oblivion.

property binary_data
class NiBinaryVoxelData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Voxel data object.

property num_unknown_bytes_2
property num_unknown_vectors
property unknown_5_ints
property unknown_7_floats
property unknown_bytes_1
property unknown_bytes_2
property unknown_short_1
property unknown_short_2
property unknown_short_3
property unknown_vectors
class NiBinaryVoxelExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Voxel extra data object.

property data
property unknown_int
class NiBlendBoolInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiBlendInterpolator

An interpolator for a bool.

property bool_value
class NiBlendFloatInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiBlendInterpolator

An interpolator for a float.

property float_value
class NiBlendInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiInterpolator

An extended type of interpolater.

property unknown_int
property unknown_short
class NiBlendPoint3Interpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiBlendInterpolator

Interpolates a point?

property point_value
class NiBlendTransformInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiBlendInterpolator

Unknown.

class NiBone(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiNode

A NiNode used as a skeleton bone?

class NiBoneLODController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

Level of detail controller for bones. Priority is arranged from low to high.

property node_groups
property num_node_groups
property num_node_groups_2
property num_shape_groups
property num_shape_groups_2
property shape_groups_1
property shape_groups_2
property unknown_int_1
property unknown_int_2
property unknown_int_3
class NiBoolData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Timed boolean data.

property data
class NiBoolInterpController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiSingleInterpController

A controller that interpolates floating point numbers?

class NiBoolInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiKeyBasedInterpolator

Unknown.

property bool_value
property data
class NiBoolTimelineInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiBoolInterpolator

Unknown.

class NiBooleanExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Boolean extra data.

property boolean_data
class NiCamera(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiAVObject

Camera object.

property frustum_bottom
property frustum_far
property frustum_left
property frustum_near
property frustum_right
property frustum_top
property lod_adjust
property unknown_int
property unknown_int_2
property unknown_int_3
property unknown_short
property use_orthographic_projection
property viewport_bottom
property viewport_left
property viewport_right
property viewport_top
class NiClod(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTriBasedGeom

A shape node that holds continuous level of detail information. Seems to be specific to Freedom Force.

class NiClodData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTriBasedGeomData

Holds mesh data for continuous level of detail shapes. Pesumably a progressive mesh with triangles specified by edge splits. Seems to be specific to Freedom Force. The structure of this is uncertain and highly experimental at this point. No file with this data can currently be read properly.

property unknown_clod_shorts_1
property unknown_clod_shorts_2
property unknown_clod_shorts_3
property unknown_count_1
property unknown_count_2
property unknown_count_3
property unknown_float
property unknown_short
property unknown_shorts
class NiClodSkinInstance(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiSkinInstance

A copy of NISkinInstance for use with NiClod meshes.

class NiCollisionData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiCollisionObject

Collision box.

property bounding_volume
property collision_mode
property propagation_mode
property use_abv
class NiCollisionObject(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

This is the most common collision object found in NIF files. It acts as a real object that is visible and possibly (if the body allows for it) interactive. The node itself is simple, it only has three properties. For this type of collision object, bhkRigidBody or bhkRigidBodyT is generally used.

property target
class NiColorData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Color data for material color controller.

property data
class NiColorExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Unknown.

property data
class NiControllerManager(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

Unknown. Root of all controllers?

property controller_sequences
property cumulative
property num_controller_sequences
property object_palette
class NiControllerSequence(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiControllerSequence, object

add_controlled_block()[source]

Create new controlled block, and return it.

>>> seq = NifFormat.NiControllerSequence()
>>> seq.num_controlled_blocks
0
>>> ctrlblock = seq.add_controlled_block()
>>> seq.num_controlled_blocks
1
>>> isinstance(ctrlblock, NifFormat.ControllerLink)
True
class NiDataStream(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

property access
property cloning_behavior
property component_formats
property data
property num_bytes
property num_components
property num_regions
property regions
property streamable
property usage
class NiDefaultAVObjectPalette(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiAVObjectPalette

Unknown. Refers to a list of objects. Used by NiControllerManager.

property num_objs
property objs
property unknown_int
class NiDirectionalLight(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiLight

Directional light source.

class NiDitherProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiProperty

Unknown.

property flags
class NiDynamicEffect(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiAVObject

A dynamic effect such as a light or environment map.

property affected_node_list_pointers
property affected_nodes
property num_affected_node_list_pointers
property num_affected_nodes
property switch_state
class NiEnvMappedTriShape(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObjectNET

Unknown

property child_2
property child_3
property children
property num_children
property unknown_1
property unknown_matrix
class NiEnvMappedTriShapeData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTriShapeData

Holds mesh data using a list of singular triangles.

class NiExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

A generic extra data object.

property name
property next_extra_data
class NiExtraDataController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiSingleInterpController

An controller for extra data.

class NiFlipController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiFloatInterpController

Texture flipping controller.

property delta
property images
property num_sources
property sources
property texture_slot
property unknown_int_2
class NiFloatData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Possibly the 1D position along a 3D path.

property data
class NiFloatExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Float extra data.

property float_data
class NiFloatExtraDataController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraDataController

Unknown.

property controller_data
property num_extra_bytes
property unknown_bytes
property unknown_extra_bytes
class NiFloatInterpController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiSingleInterpController

A controller that interpolates floating point numbers?

class NiFloatInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiKeyBasedInterpolator

Unknown.

property data
property float_value
class NiFloatsExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Unknown.

property data
property num_floats
class NiFogProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiProperty

Describes… fog?

property flags
property fog_color
property fog_depth
class NiFurSpringController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

property bones
property bones_2
property num_bones
property num_bones_2
property unknown_float
property unknown_float_2
class NiGeomMorpherController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiInterpController

Time controller for geometry morphing.

property always_update
property data
property extra_flags
property interpolator_weights
property interpolators
property num_interpolators
property num_unknown_ints
property unknown_2
property unknown_ints
class NiGeometry(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiGeometry, object

>>> from pyffi.formats.nif import NifFormat
>>> id44 = NifFormat.Matrix44()
>>> id44.set_identity()
>>> skelroot = NifFormat.NiNode()
>>> skelroot.name = 'skelroot'
>>> skelroot.set_transform(id44)
>>> bone1 = NifFormat.NiNode()
>>> bone1.name = 'bone1'
>>> bone1.set_transform(id44)
>>> bone2 = NifFormat.NiNode()
>>> bone2.name = 'bone2'
>>> bone2.set_transform(id44)
>>> bone21 = NifFormat.NiNode()
>>> bone21.name = 'bone21'
>>> bone21.set_transform(id44)
>>> bone22 = NifFormat.NiNode()
>>> bone22.name = 'bone22'
>>> bone22.set_transform(id44)
>>> bone211 = NifFormat.NiNode()
>>> bone211.name = 'bone211'
>>> bone211.set_transform(id44)
>>> skelroot.add_child(bone1)
>>> bone1.add_child(bone2)
>>> bone2.add_child(bone21)
>>> bone2.add_child(bone22)
>>> bone21.add_child(bone211)
>>> geom = NifFormat.NiTriShape()
>>> geom.name = 'geom'
>>> geom.set_transform(id44)
>>> geomdata = NifFormat.NiTriShapeData()
>>> skininst = NifFormat.NiSkinInstance()
>>> skindata = NifFormat.NiSkinData()
>>> skelroot.add_child(geom)
>>> geom.data = geomdata
>>> geom.skin_instance = skininst
>>> skininst.skeleton_root = skelroot
>>> skininst.data = skindata
>>> skininst.num_bones = 4
>>> skininst.bones.update_size()
>>> skininst.bones[0] = bone1
>>> skininst.bones[1] = bone2
>>> skininst.bones[2] = bone22
>>> skininst.bones[3] = bone211
>>> skindata.num_bones = 4
>>> skindata.bone_list.update_size()
>>> [child.name for child in skelroot.children]
[b'bone1', b'geom']
>>> skindata.set_transform(id44)
>>> for bonedata in skindata.bone_list:
...     bonedata.set_transform(id44)
>>> affectedbones = geom.flatten_skin()
>>> [bone.name for bone in affectedbones]
[b'bone1', b'bone2', b'bone22', b'bone211']
>>> [child.name for child in skelroot.children]
[b'geom', b'bone1', b'bone21', b'bone2', b'bone22', b'bone211']
add_bone(bone, vert_weights)[source]

Add bone with given vertex weights. After adding all bones, the geometry skinning information should be set from the current position of the bones using the L{update_bind_position} function.

Parameters
  • bone – The bone NiNode block.

  • vert_weights – A dictionary mapping each influenced vertex index to a vertex weight.

flatten_skin()[source]

Reposition all bone blocks and geometry block in the tree to be direct children of the skeleton root.

Returns list of all used bones by the skin.

get_skin_deformation()[source]

Returns a list of vertices and normals in their final position after skinning, in geometry space.

get_skin_partition()[source]

Return the skin partition block.

get_vertex_weights()[source]

Get vertex weights in a convenient format: list bone and weight per vertex.

is_skin()[source]

Returns True if geometry is skinned.

send_bones_to_bind_position()[source]

Send all bones to their bind position.

@deprecated: Use L{NifFormat.NiNode.send_bones_to_bind_position} instead of

this function.

set_skin_partition(skinpart)[source]

Set skin partition block.

update_bind_position()[source]

Make current position of the bones the bind position for this geometry.

Sets the NiSkinData overall transform to the inverse of the geometry transform relative to the skeleton root, and sets the NiSkinData of each bone to the geometry transform relative to the skeleton root times the inverse of the bone transform relative to the skeleton root.

class NiGeometryData(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiGeometryData, object

>>> from pyffi.formats.nif import NifFormat
>>> geomdata = NifFormat.NiGeometryData()
>>> geomdata.num_vertices = 3
>>> geomdata.has_vertices = True
>>> geomdata.has_normals = True
>>> geomdata.has_vertex_colors = True
>>> geomdata.num_uv_sets = 2
>>> geomdata.vertices.update_size()
>>> geomdata.normals.update_size()
>>> geomdata.vertex_colors.update_size()
>>> geomdata.uv_sets.update_size()
>>> geomdata.vertices[0].x = 1
>>> geomdata.vertices[0].y = 2
>>> geomdata.vertices[0].z = 3
>>> geomdata.vertices[1].x = 4
>>> geomdata.vertices[1].y = 5
>>> geomdata.vertices[1].z = 6
>>> geomdata.vertices[2].x = 1.200001
>>> geomdata.vertices[2].y = 3.400001
>>> geomdata.vertices[2].z = 5.600001
>>> geomdata.normals[0].x = 0
>>> geomdata.normals[0].y = 0
>>> geomdata.normals[0].z = 1
>>> geomdata.normals[1].x = 0
>>> geomdata.normals[1].y = 1
>>> geomdata.normals[1].z = 0
>>> geomdata.normals[2].x = 1
>>> geomdata.normals[2].y = 0
>>> geomdata.normals[2].z = 0
>>> geomdata.vertex_colors[1].r = 0.310001
>>> geomdata.vertex_colors[1].g = 0.320001
>>> geomdata.vertex_colors[1].b = 0.330001
>>> geomdata.vertex_colors[1].a = 0.340001
>>> geomdata.uv_sets[0][0].u = 0.990001
>>> geomdata.uv_sets[0][0].v = 0.980001
>>> geomdata.uv_sets[0][2].u = 0.970001
>>> geomdata.uv_sets[0][2].v = 0.960001
>>> geomdata.uv_sets[1][0].v = 0.910001
>>> geomdata.uv_sets[1][0].v = 0.920001
>>> geomdata.uv_sets[1][2].v = 0.930001
>>> geomdata.uv_sets[1][2].v = 0.940001
>>> for h in geomdata.get_vertex_hash_generator():
...     print(h)
(1000, 2000, 3000, 0, 0, 1000, 99000, 98000, 0, 92000, 0, 0, 0, 0)
(4000, 5000, 6000, 0, 1000, 0, 0, 0, 0, 0, 310, 320, 330, 340)
(1200, 3400, 5600, 1000, 0, 0, 97000, 96000, 0, 94000, 0, 0, 0, 0)
apply_scale(scale)[source]

Apply scale factor on data.

get_vertex_hash_generator(vertexprecision=3, normalprecision=3, uvprecision=5, vcolprecision=3)[source]

Generator which produces a tuple of integers for each (vertex, normal, uv, vcol), to ease detection of duplicate vertices. The precision parameters denote number of significant digits behind the comma.

Default for uvprecision should really be high because for very large models the uv coordinates can be very close together.

For vertexprecision, 3 seems usually enough (maybe we’ll have to increase this at some point).

Parameters
  • vertexprecision (float) – Precision to be used for vertices.

  • normalprecision (float) – Precision to be used for normals.

  • uvprecision (float) – Precision to be used for uvs.

  • vcolprecision (float) – Precision to be used for vertex colors.

Returns

A generator yielding a hash value for each vertex.

update_center_radius()[source]

Recalculate center and radius of the data.

class NiGravity(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiParticleModifier

A particle modifier; applies a gravitational field on the particles.

property direction
property force
property position
property type
property unknown_float_1
class NiImage(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

property file_name
property image_data
property unknown_float
property unknown_int
property use_external
class NiInstancingMeshModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiMeshModifier

class NiIntegerExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Extra integer data.

property integer_data
class NiIntegersExtraData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiExtraData

Integers data.

property data
property num_integers
class NiInterpController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

A controller capable of interpolation?

class NiInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Interpolator objects - function unknown.

class NiKeyBasedInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiInterpolator

Interpolator objects that use keys?

class NiKeyframeController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiSingleInterpController

A time controller object for animation key frames.

property data
class NiKeyframeData(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiKeyframeData, object

apply_scale(scale)[source]

Apply scale factor on data.

class NiLODData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Abstract class used for different types of LOD selections.

class NiLODNode(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiSwitchNode

Level of detail selector. Links to different levels of detail of the same model, used to switch a geometry at a specified distance.

property lod_center
property lod_level_data
property lod_levels
property num_lod_levels
class NiLight(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiDynamicEffect

Light source.

property ambient_color
property diffuse_color
property dimmer
property specular_color
class NiLightColorController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPoint3InterpController

Light color animation controller.

class NiLightDimmerController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiFloatInterpController

Unknown controller.

class NiLightIntensityController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiFloatInterpController

Unknown controller

class NiLines(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTriBasedGeom

Wireframe geometry.

class NiLinesData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiGeometryData

Wireframe geometry data.

property lines
class NiLookAtController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

Unknown. Start time is 3.4e+38 and stop time is -3.4e+38.

property look_at_node
property unknown_1
class NiLookAtInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiInterpolator

Unknown.

property look_at
property rotation
property scale
property target
property translation
property unknown_short
class NiMaterialColorController(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiMaterialColorController, object

get_target_color()[source]

Get target color (works for all nif versions).

set_target_color(target_color)[source]

Set target color (works for all nif versions).

class NiMaterialProperty(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiMaterialProperty, object

is_interchangeable(other)[source]

Are the two material blocks interchangeable?

class NiMesh(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiRenderObject

property bound
property datas
property instancing_enabled
property modifiers
property num_datas
property num_modifiers
property num_submeshes
property primitive_type
property unknown_100
property unknown_101
property unknown_102
property unknown_103
property unknown_200
property unknown_201
property unknown_250
property unknown_251
property unknown_300
property unknown_301
property unknown_302
property unknown_303
property unknown_350
property unknown_351
property unknown_400
property unknown_51
property unknown_52
property unknown_53
property unknown_54
property unknown_55
property unknown_56
class NiMeshHWInstance(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

class NiMeshModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Base class for mesh modifiers.

property complete_points
property num_complete_points
property num_submit_points
property submit_points
class NiMeshPSysData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysData

Particle meshes data.

property num_unknown_ints_1
property unknown_byte_3
property unknown_int_2
property unknown_ints_1
property unknown_node
class NiMeshParticleSystem(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiParticleSystem

Particle system.

class NiMorphController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiInterpController

Unknown! Used by Daoc->’healing.nif’.

class NiMorphData(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiMorphData, object

apply_scale(scale)[source]

Apply scale factor on data.

class NiMorphMeshModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiMeshModifier

Performs linear-weighted blending between a set of target data streams.

property elements
property flags
property num_elements
property num_targets
class NiMorphWeightsController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiInterpController

property interpolators
property num_interpolators
property num_targets
property target_names
property unknown_2
class NiMorpherController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiInterpController

Unknown! Used by Daoc.

property data
class NiMultiTargetTransformController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiInterpController

Unknown.

property extra_targets
property num_extra_targets
class NiMultiTextureProperty(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiProperty

(note: not quite complete yet… but already reads most of the DAoC ones)

property flags
property texture_elements
property unknown_int
class NiNode(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiNode, object

>>> from pyffi.formats.nif import NifFormat
>>> x = NifFormat.NiNode()
>>> y = NifFormat.NiNode()
>>> z = NifFormat.NiNode()
>>> x.num_children =1
>>> x.children.update_size()
>>> y in x.children
False
>>> x.children[0] = y
>>> y in x.children
True
>>> x.add_child(z, front = True)
>>> x.add_child(y)
>>> x.num_children
2
>>> x.children[0] is z
True
>>> x.remove_child(y)
>>> y in x.children
False
>>> x.num_children
1
>>> e = NifFormat.NiSpotLight()
>>> x.add_effect(e)
>>> x.num_effects
1
>>> e in x.effects
True
>>> from pyffi.formats.nif import NifFormat
>>> node = NifFormat.NiNode()
>>> child1 = NifFormat.NiNode()
>>> child1.name = "hello"
>>> child_2 = NifFormat.NiNode()
>>> child_2.name = "world"
>>> node.get_children()
[]
>>> node.set_children([child1, child_2])
>>> [child.name for child in node.get_children()]
[b'hello', b'world']
>>> [child.name for child in node.children]
[b'hello', b'world']
>>> node.set_children([])
>>> node.get_children()
[]
>>> # now set them the other way around
>>> node.set_children([child_2, child1])
>>> [child.name for child in node.get_children()]
[b'world', b'hello']
>>> [child.name for child in node.children]
[b'world', b'hello']
>>> node.remove_child(child_2)
>>> [child.name for child in node.children]
[b'hello']
>>> node.add_child(child_2)
>>> [child.name for child in node.children]
[b'hello', b'world']
>>> from pyffi.formats.nif import NifFormat
>>> node = NifFormat.NiNode()
>>> effect1 = NifFormat.NiSpotLight()
>>> effect1.name = "hello"
>>> effect2 = NifFormat.NiSpotLight()
>>> effect2.name = "world"
>>> node.get_effects()
[]
>>> node.set_effects([effect1, effect2])
>>> [effect.name for effect in node.get_effects()]
[b'hello', b'world']
>>> [effect.name for effect in node.effects]
[b'hello', b'world']
>>> node.set_effects([])
>>> node.get_effects()
[]
>>> # now set them the other way around
>>> node.set_effects([effect2, effect1])
>>> [effect.name for effect in node.get_effects()]
[b'world', b'hello']
>>> [effect.name for effect in node.effects]
[b'world', b'hello']
>>> node.remove_effect(effect2)
>>> [effect.name for effect in node.effects]
[b'hello']
>>> node.add_effect(effect2)
>>> [effect.name for effect in node.effects]
[b'hello', b'world']
add_child(child, front=False)[source]

Add block to child list.

Parameters

child (L{NifFormat.NiAVObject}) – The child to add.

Keyword Arguments

front – Whether to add to the front or to the end of the list (default is at end).

add_effect(effect)[source]

Add an effect to the list of effects.

Parameters

effect (L{NifFormat.NiDynamicEffect}) – The effect to add.

get_children()[source]

Return a list of the children of the block.

Returns

The list of children.

Return type

list of L{NifFormat.NiAVObject}

get_effects()[source]

Return a list of the effects of the block.

Returns

The list of effects.

Return type

list of L{NifFormat.NiDynamicEffect}

get_skinned_geometries()[source]

This function yields all skinned geometries which have self as skeleton root.

merge_external_skeleton_root(skelroot)[source]

Attach skinned geometry to self (which will be the new skeleton root of the nif at the given skeleton root). Use this function if you move a skinned geometry from one nif into a new NIF file. The bone links will be updated to point to the tree at self, instead of to the external tree.

merge_skeleton_roots()[source]

This function will look for other geometries whose skeleton root is a (possibly indirect) child of this node. It will then reparent those geometries to this node. For example, it will unify the skeleton roots in Morrowind’s cliffracer.nif file, or of the (official) body skins. This makes it much easier to import skeletons in for instance Blender: there will be only one skeleton root for each bone, over all geometries.

The merge fails for those geometries whose global skin data transform does not match the inverse geometry transform relative to the skeleton root (the maths does not work out in this case!)

Returns list of all new blocks that have been reparented (and added to the skeleton root children list), and a list of blocks for which the merge failed.

remove_child(child)[source]

Remove a block from the child list.

Parameters

child (L{NifFormat.NiAVObject}) – The child to remove.

remove_effect(effect)[source]

Remove a block from the effect list.

Parameters

effect (L{NifFormat.NiDynamicEffect}) – The effect to remove.

send_bones_to_bind_position()[source]

This function will send all bones of geometries of this skeleton root to their bind position. For best results, call L{send_geometries_to_bind_position} first.

Returns

A number quantifying the remaining difference between bind positions.

Return type

float

send_detached_geometries_to_node_position()[source]

Some nifs (in particular in Morrowind) have geometries that are skinned but that do not share bones. In such cases, send_geometries_to_bind_position cannot reposition them. This function will send such geometries to the position of their root node.

Examples of such nifs are the official Morrowind skins (after merging skeleton roots).

Returns list of detached geometries that have been moved.

send_geometries_to_bind_position()[source]

Call this on the skeleton root of geometries. This function will transform the geometries, such that all skin data transforms coincide, or at least coincide partially.

Returns

A number quantifying the remaining difference between bind positions.

Return type

float

set_children(childlist)[source]

Set the list of children from the given list (destroys existing list).

Parameters

childlist (list of L{NifFormat.NiAVObject}) – The list of child blocks to set.

set_effects(effectlist)[source]

Set the list of effects from the given list (destroys existing list).

Parameters

effectlist (list of L{NifFormat.NiDynamicEffect}) – The list of effect blocks to set.

class NiObject(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiObject, object

apply_scale(scale)[source]

Scale data in this block. This implementation does nothing. Override this method if it contains geometry data that can be scaled.

find(block_name=None, block_type=None)[source]
find_chain(block, block_type=None)[source]

Finds a chain of blocks going from C{self} to C{block}. If found, self is the first element and block is the last element. If no branch found, returns an empty list. Does not check whether there is more than one branch; if so, the first one found is returned.

Parameters
  • block – The block to find a chain to.

  • block_type – The type that blocks should have in this chain.

is_interchangeable(other)[source]

Are the two blocks interchangeable?

@todo: Rely on AnyType, SimpleType, ComplexType, etc. implementation.

tree(block_type=None, follow_all=True, unique=False)[source]

A generator for parsing all blocks in the tree (starting from and including C{self}).

Parameters
  • block_type – If not None, yield only blocks of the type C{block_type}.

  • follow_all – If C{block_type} is not None, then if this is True the function will parse the whole tree. Otherwise, the function will not follow branches that start by a non-C{block_type} block.

  • unique – Whether the generator can return the same block twice or not.

class NiObjectNET(template=None, argument=None, parent=None)[source]

Bases: pyffi.formats.nif._NiObjectNET, object

add_controller(ctrlblock)[source]

Add block to controller chain and set target of controller to self.

add_extra_data(extrablock)[source]

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.

add_integer_extra_data(name, value)[source]

Add a particular extra integer data block.

get_controllers()[source]

Get a list of all controllers.

get_extra_datas()[source]

Get a list of all extra data blocks.

remove_extra_data(extrablock)[source]

Remove block from extra data list and extra data chain.

>>> from pyffi.formats.nif import NifFormat
>>> block = NifFormat.NiNode()
>>> block.num_extra_data_list = 3
>>> block.extra_data_list.update_size()
>>> extrablock = NifFormat.NiStringExtraData()
>>> block.extra_data_list[1] = extrablock
>>> block.remove_extra_data(extrablock)
>>> [extra for extra in block.extra_data_list]
[None, None]
set_extra_datas(extralist)[source]

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()]
[b'hello', b'world']
>>> [extra.name for extra in node.extra_data_list]
[b'hello', b'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()]
[b'world', b'hello']
>>> [extra.name for extra in node.extra_data_list]
[b'world', b'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 NiPSBombForce(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

property name
property unknown_1
property unknown_10
property unknown_2
property unknown_3
property unknown_4
property unknown_5
property unknown_6
property unknown_7
property unknown_8
property unknown_9
class NiPSBoundUpdater(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

property unknown_1
property unknown_2
class NiPSBoxEmitter(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

property name
property unknown_1
property unknown_10
property unknown_11
property unknown_12
property unknown_13
property unknown_14
property unknown_15
property unknown_16
property unknown_17
property unknown_18
property unknown_19
property unknown_2
property unknown_20
property unknown_21
property unknown_22
property unknown_23
property unknown_24
property unknown_25
property unknown_26
property unknown_27
property unknown_28
property unknown_29
property unknown_3
property unknown_30
property unknown_31
property unknown_32
property unknown_33
property unknown_34
property unknown_35
property unknown_36
property unknown_37
property unknown_38
property unknown_39
property unknown_4
property unknown_40
property unknown_41
property unknown_42
property unknown_43
property unknown_44
property unknown_45
property unknown_46
property unknown_47
property unknown_48
property unknown_5
property unknown_6
property unknown_7
property unknown_8
property unknown_9
class NiPSCylinderEmitter(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSSphereEmitter

property unknown_23
class NiPSDragForce(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

property unknown_1
property unknown_10
property unknown_2
property unknown_3
property unknown_4
property unknown_5
property unknown_6
property unknown_7
property unknown_8
property unknown_9
class NiPSEmitParticlesCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysEmitterCtlr

class NiPSEmitterDeclinationCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierCtlr

class NiPSEmitterDeclinationVarCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSEmitterDeclinationCtlr

class NiPSEmitterLifeSpanCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierCtlr

class NiPSEmitterPlanarAngleCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierCtlr

class NiPSEmitterPlanarAngleVarCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSEmitterPlanarAngleCtlr

class NiPSEmitterRadiusCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

property interpolator
property unknown_2
class NiPSEmitterRotAngleCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierCtlr

class NiPSEmitterRotAngleVarCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSEmitterRotAngleCtlr

class NiPSEmitterRotSpeedCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierCtlr

class NiPSEmitterRotSpeedVarCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSEmitterRotSpeedCtlr

class NiPSEmitterSpeedCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

property interpolator
property unknown_3
class NiPSFacingQuadGenerator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

property unknown_1
property unknown_10
property unknown_11
property unknown_12
property unknown_2
property unknown_3
property unknown_4
property unknown_5
property unknown_6
property unknown_7
property unknown_8
property unknown_9
class NiPSForceActiveCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

property interpolator
property unknown_2
class NiPSGravityForce(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

property unknown_1
property unknown_10
property unknown_11
property unknown_12
property unknown_13
property unknown_14
property unknown_15
property unknown_16
property unknown_17
property unknown_18
property unknown_19
property unknown_2
property unknown_20
property unknown_21
property unknown_22
property unknown_23
property unknown_24
property unknown_25
property unknown_26
property unknown_27
property unknown_28
property unknown_29
property unknown_3
property unknown_30
property unknown_31
property unknown_32
property unknown_33
property unknown_34
property unknown_35
property unknown_36
property unknown_4
property unknown_5
property unknown_6
property unknown_7
property unknown_8
property unknown_9
class NiPSGravityStrengthCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

property unknown_2
property unknown_3
class NiPSMeshEmitter(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

property name
property unknown_1
property unknown_10
property unknown_11
property unknown_12
property unknown_13
property unknown_14
property unknown_15
property unknown_16
property unknown_17
property unknown_18
property unknown_19
property unknown_2
property unknown_20
property unknown_21
property unknown_22
property unknown_23
property unknown_24
property unknown_25
property unknown_26
property unknown_27
property unknown_28
property unknown_3
property unknown_4
property unknown_5
property unknown_6
property unknown_7
property unknown_8
property unknown_9
class NiPSMeshParticleSystem(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSParticleSystem

property unknown_23
property unknown_24
property unknown_25
property unknown_26
class NiPSParticleSystem(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiAVObject

property emitter
property generator
property simulator
property unknown_10
property unknown_11
property unknown_12
property unknown_15
property unknown_16
property unknown_17
property unknown_19
property unknown_20
property unknown_21
property unknown_22
property unknown_27
property unknown_28
property unknown_29
property unknown_3
property unknown_30
property unknown_31
property unknown_32
property unknown_33
property unknown_34
property unknown_35
property unknown_36
property unknown_37
property unknown_38
property unknown_39
property unknown_4
property unknown_5
property unknown_6
property unknown_7
property unknown_8
property unknown_9
class NiPSPlanarCollider(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

property name
property unknown_byte_4
property unknown_floats_5
property unknown_int_1
property unknown_int_2
property unknown_short_3
class NiPSResetOnLoopCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

class NiPSSimulator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiMeshModifier

The mesh modifier that performs all particle system simulation.

property num_simulation_steps
property simulation_steps
class NiPSSimulatorCollidersStep(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSSimulatorStep

Encapsulates a floodgate kernel that simulates particle colliders.

property colliders
property num_colliders
class NiPSSimulatorFinalStep(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSSimulatorStep

Encapsulates a floodgate kernel that updates particle positions and ages. As indicated by its name, this step should be attached last in the NiPSSimulator mesh modifier.

class NiPSSimulatorForcesStep(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSSimulatorStep

Encapsulates a floodgate kernel that simulates particle forces.

property forces
property num_forces
class NiPSSimulatorGeneralStep(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSSimulatorStep

Encapsulates a floodgate kernel that updates particle size, colors, and rotations.

property color_keys
property color_loop_behavior
property grow_generation
property grow_time
property num_color_keys
property num_rotation_keys
property num_size_keys
property rotation_keys
property rotation_loop_behavior
property shrink_generation
property shrink_time
property size_keys
property size_loop_behavior
property unknown_1
property unknown_2
property unknown_3
class NiPSSimulatorMeshAlignStep(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSSimulatorStep

Encapsulates a floodgate kernel that updates mesh particle alignment and transforms.

property num_rotation_keys
property rotation_keys
property rotation_loop_behavior
class NiPSSimulatorStep(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Abstract base class for a single step in the particle system simulation process. It has no seralized data.

class NiPSSpawner(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

class NiPSSphereEmitter(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

property name
property unknown_10
property unknown_11
property unknown_12
property unknown_13
property unknown_14
property unknown_15
property unknown_16
property unknown_17
property unknown_18
property unknown_19
property unknown_2
property unknown_20
property unknown_21
property unknown_22
property unknown_3
property unknown_4
property unknown_5
property unknown_6
property unknown_7
property unknown_8
property unknown_9
class NiPSSphericalCollider(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

property unknown_1
property unknown_2
property unknown_3
property unknown_4
property unknown_5
property unknown_6
property unknown_7
class NiPSysAgeDeathModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Unknown particle modifier.

property spawn_modifier
property spawn_on_death
class NiPSysAirFieldAirFrictionCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Particle system controller for air field air friction.

class NiPSysAirFieldInheritVelocityCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Particle system controller for air field inherit velocity.

class NiPSysAirFieldModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysFieldModifier

Particle system modifier, used for controlling the particle velocity in a field like wind.

property direction
property unknown_boolean_1
property unknown_boolean_2
property unknown_boolean_3
property unknown_float_2
property unknown_float_3
property unknown_float_4
class NiPSysAirFieldSpreadCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Particle system controller for air field spread.

class NiPSysBombModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Particle modifier that uses a NiNode to use as a “Bomb Object” to alter the path of particles.

property bomb_axis
property bomb_object
property decay
property decay_type
property delta_v
property symmetry_type
class NiPSysBoundUpdateModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Unknown particle system modifier.

property update_skip
class NiPSysBoxEmitter(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysVolumeEmitter

Particle emitter that uses points within a defined Box shape to emit from..

property depth
property height
property width
class NiPSysCollider(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Particle system collider.

property bounce
property collider_object
property die_on_collide
property next_collider
property parent
property spawn_modifier
property spawn_on_collide
class NiPSysColliderManager(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Particle modifier that adds a defined shape to act as a collision object for particles to interact with.

property collider
class NiPSysColorModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Particle modifier that adds keyframe data to modify color/alpha values of particles over time.

property data
class NiPSysCylinderEmitter(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysVolumeEmitter

Particle emitter that uses points within a defined Cylinder shape to emit from.

property height
property radius
class NiPSysData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiRotatingParticlesData

Particle system data.

property aspect_ratio
property has_subtexture_offset_u_vs
property has_unknown_floats_3
property num_subtexture_offset_u_vs
property particle_descriptions
property subtexture_offset_u_vs
property unknown_byte_4
property unknown_floats_3
property unknown_int_4
property unknown_int_5
property unknown_int_6
property unknown_short_1
property unknown_short_2
property unknown_short_3
class NiPSysDragFieldModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysFieldModifier

Particle system modifier, used for controlling the particle velocity in drag space warp.

property direction
property use_direction
class NiPSysDragModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Unknown.

property drag_axis
property parent
property percentage
property range
property range_falloff
class NiPSysEmitter(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

A particle emitter?

property declination
property declination_variation
property initial_color
property initial_radius
property life_span
property life_span_variation
property planar_angle
property planar_angle_variation
property radius_variation
property speed
property speed_variation
class NiPSysEmitterCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierCtlr

Particle system emitter controller.

property data
property visibility_interpolator
class NiPSysEmitterCtlrData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Particle system emitter controller data.

property float_keys
property num_visibility_keys
property visibility_keys
class NiPSysEmitterDeclinationCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Unknown.

class NiPSysEmitterDeclinationVarCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Unknown.

class NiPSysEmitterInitialRadiusCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Unknown.

class NiPSysEmitterLifeSpanCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Unknown.

class NiPSysEmitterPlanarAngleCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Particle system controller for emitter planar angle.

class NiPSysEmitterPlanarAngleVarCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Particle system controller for emitter planar angle variation.

class NiPSysEmitterSpeedCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Unknown.

class NiPSysFieldAttenuationCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Particle system controller for force field attenuation.

class NiPSysFieldMagnitudeCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Particle system controller for force field magnitude.

class NiPSysFieldMaxDistanceCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Particle system controller for force field maximum distance.

class NiPSysFieldModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Base for all force field particle modifiers.

property attenuation
property field_object
property magnitude
property max_distance
property use_max_distance
class NiPSysGravityFieldModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysFieldModifier

Particle system modifier, used for controlling the particle velocity in gravity field.

property direction
class NiPSysGravityModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Adds gravity to a particle system, when linked to a NiNode to use as a Gravity Object.

property decay
property force_type
property gravity_axis
property gravity_object
property strength
property turbulence
property turbulence_scale
property unknown_byte
class NiPSysGravityStrengthCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Unknown.

class NiPSysGrowFadeModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Particle modifier that controls the time it takes to grow a particle from Size=0 to the specified Size in the emitter, and then back to 0. This modifer has no control over alpha settings.

property base_scale
property fade_generation
property fade_time
property grow_generation
property grow_time
class NiPSysInitialRotAngleCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Particle system controller for emitter initial rotation angle.

class NiPSysInitialRotAngleVarCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Particle system controller for emitter initial rotation angle variation.

class NiPSysInitialRotSpeedCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Particle system controller for emitter initial rotation speed.

class NiPSysInitialRotSpeedVarCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierFloatCtlr

Particle system controller for emitter initial rotation speed variation.

class NiPSysMeshEmitter(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysEmitter

Particle emitter that uses points on a specified mesh to emit from.

property emission_axis
property emission_type
property emitter_meshes
property initial_velocity_type
property num_emitter_meshes
class NiPSysMeshUpdateModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Unknown.

property meshes
property num_meshes
class NiPSysModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Generic particle system modifier object.

property active
property name
property order
property target
class NiPSysModifierActiveCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierBoolCtlr

Unknown.

property data
class NiPSysModifierBoolCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierCtlr

A particle system modifier controller that deals with boolean data?

class NiPSysModifierCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiSingleInterpController

A particle system modifier controller.

property modifier_name
class NiPSysModifierFloatCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifierCtlr

A particle system modifier controller that deals with floating point data?

property data
class NiPSysPlanarCollider(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysCollider

Particle Collider object which particles will interact with.

property height
property width
property x_axis
property y_axis
class NiPSysPositionModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Unknown particle system modifier.

class NiPSysRadialFieldModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysFieldModifier

Particle system modifier, used for controlling the particle velocity in force field.

property radial_type
class NiPSysResetOnLoopCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

Unknown.

class NiPSysRotationModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Particle modifier that adds rotations to particles.

property initial_axis
property initial_rotation_angle
property initial_rotation_angle_variation
property initial_rotation_speed
property initial_rotation_speed_variation
property random_initial_axis
property random_rot_speed_sign
class NiPSysSpawnModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysModifier

Unknown particle modifier.

property life_span
property life_span_variation
property max_num_to_spawn
property min_num_to_spawn
property num_spawn_generations
property percentage_spawned
property spawn_dir_chaos
property spawn_speed_chaos
property unknown_int
class NiPSysSphereEmitter(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysVolumeEmitter

Particle emitter that uses points within a sphere shape to emit from.

property radius
class NiPSysSphericalCollider(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysCollider

Particle Collider object which particles will interact with.

property radius
class NiPSysTrailEmitter(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysEmitter

Guild 2-Specific node

property unknown_float_1
property unknown_float_2
property unknown_float_3
property unknown_float_4
property unknown_float_5
property unknown_float_6
property unknown_float_7
property unknown_int_1
property unknown_int_2
property unknown_int_3
property unknown_int_4
class NiPSysTurbulenceFieldModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysFieldModifier

Particle system modifier, used for controlling the particle velocity in drag space warp.

property frequency
class NiPSysUpdateCtlr(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

Particle system controller, used for ???.

class NiPSysVolumeEmitter(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysEmitter

An emitter that emits meshes?

property emitter_object
class NiPSysVortexFieldModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiPSysFieldModifier

Particle system modifier, used for controlling the particle velocity in force field.

property direction
class NiPalette(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

A color palette.

property num_entries
property palette
property unknown_byte
class NiParticleBomb(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiParticleModifier

A particle modifier.

property decay
property decay_type
property delta_v
property direction
property duration
property position
property start
property symmetry_type
class NiParticleColorModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiParticleModifier

Unknown.

property color_data
class NiParticleGrowFade(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiParticleModifier

This particle system modifier controls the particle size. If it is present the particles start with size 0.0 . Then they grow to their original size and stay there until they fade to zero size again at the end of their lifetime cycle.

property fade
property grow
class NiParticleMeshModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiParticleModifier

Unknown.

property num_particle_meshes
property particle_meshes
class NiParticleMeshes(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiParticles

Mesh particle node?

class NiParticleMeshesData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiRotatingParticlesData

Particle meshes data.

class NiParticleModifier(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

A particle system modifier.

property controller
property next_modifier
class NiParticleRotation(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiParticleModifier

Unknown.

property initial_axis
property random_initial_axis
property rotation_speed
class NiParticleSystem(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiParticles

A particle system.

property modifiers
property num_modifiers
property unknown_int_1
property unknown_short_2
property unknown_short_3
property world_space
class NiParticleSystemController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

A generic particle system time controller object.

property color_data
property emit_flags
property emit_rate
property emit_start_time
property emit_stop_time
property emitter
property horizontal_angle
property horizontal_direction
property lifetime
property lifetime_random
property num_particles
property num_valid
property old_emit_rate
property old_speed
property particle_extra
property particle_lifetime
property particle_timestamp
property particle_unknown_short
property particle_unknown_vector
property particle_velocity
property particle_vertex_id
property particles
property size
property speed
property speed_random
property start_random
property trailer
property unknown_byte
property unknown_color
property unknown_float_1
property unknown_float_13
property unknown_floats_2
property unknown_int_1
property unknown_int_2
property unknown_normal
property unknown_short_2
property unknown_short_3
property vertical_angle
property vertical_direction
class NiParticles(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiGeometry

Generic particle system node.

class NiParticlesData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiGeometryData

Generic rotating particles data object.

property has_radii
property has_rotation_angles
property has_rotation_axes
property has_rotations
property has_sizes
property has_uv_quadrants
property num_active
property num_particles
property num_uv_quadrants
property particle_radius
property radii
property rotation_angles
property rotation_axes
property rotations
property sizes
property unknown_byte_1
property unknown_byte_2
property uv_quadrants
class NiPathController(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiTimeController

Time controller for a path.

property float_data
property pos_data
property unknown_float_2
property unknown_float_3
property unknown_int_1
property unknown_short
property unknown_short_2
class NiPathInterpolator(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiKeyBasedInterpolator

Unknown interpolator.

property float_data
property pos_data
property unknown_float_1
property unknown_float_2
property unknown_int
property unknown_short
property unknown_short_2
class NiPersistentSrcTextureRendererData(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.ATextureRenderData

property num_faces
property num_pixels
property pixel_data
property unknown_int_6
property unknown_int_7
class NiPhysXActorDesc(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown PhysX node.

property shape_description
property unknown_byte_1
property unknown_byte_2
property unknown_int_1
property unknown_int_2
property unknown_int_4
property unknown_int_5
property unknown_int_6
property unknown_quat_1
property unknown_quat_2
property unknown_quat_3
property unknown_ref_0
property unknown_ref_1
property unknown_ref_2
property unknown_refs_3
class NiPhysXBodyDesc(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown PhysX node.

property unknown_bytes
class NiPhysXD6JointDesc(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown PhysX node.

property unknown_bytes
class NiPhysXKinematicSrc(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown PhysX node.

property unknown_bytes
class NiPhysXMaterialDesc(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown node.

property unknown_byte_1
property unknown_byte_2
property unknown_int
class NiPhysXMeshDesc(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown PhysX node.

property num_vertices
property unknown_byte_1
property unknown_byte_2
property unknown_bytes_0
property unknown_bytes_1
property unknown_bytes_2
property unknown_bytes_3
property unknown_float_1
property unknown_float_2
property unknown_int_1
property unknown_int_2
property unknown_int_4
property unknown_ints_1
property unknown_short_1
property unknown_short_2
property unknown_shorts_1
property vertices
class NiPhysXProp(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObjectNET

Unknown PhysX node.

property num_dests
property prop_description
property transform_dests
property unknown_byte
property unknown_float_1
property unknown_int
property unknown_int_1
property unknown_refs_1
class NiPhysXPropDesc(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown PhysX node.

property actor_descs
property joint_descs
property material_descs
property num_dests
property num_joints
property num_materials
property unknown_byte_6
property unknown_int_1
property unknown_int_2
property unknown_int_3
property unknown_int_5
property unknown_string_4
class NiPhysXShapeDesc(template=None, argument=None, parent=None)

Bases: pyffi.formats.nif.NiObject

Unknown PhysX node.

property mesh_description
property unknown_float_1
property unknown_float_2