Root Nodes - BadDogSkyrim/PyNifly GitHub Wiki
When the root is a NiNode with the usual properties, it can be ignored both on import and export and the right thing will happen. When you need a BSFadeNode or want to set the properties, it takes extra work.
- An empty object is created to represent the nif's root node. All properties of the root node including flags and block type are stored with this object. Any scaling or change in orientation is also applied to this root object.
- All other nodes and shapes are imported as children of this root object. If the root object has scaling or transforms, the rest of the objects pick it up for free.
- On export, select the root object to export everything under it. This may be a useful way to export different subsets of Blender objects from a scene. This also lets you set the block type and flags for the export.
- You can still select a set of objects, or an armature, and export that. You'll get default values for the root node.
- See RootFlags below for root node flags.
Grouping nodes
- Some NiNodes seem to be created only to group shapes--e.g. the leeks in skyrim have several NiTriShapes under a node that is controlled by a collision object. Such nodes can be represented explicitly by creating an Empty object with the name "NiNode*". Children of that object will be exported as children of the corresponding NiNode.
Technical Stuff
RootFlags
HIDDEN = 1
SELECTIVE_UPDATE = 1 << 1
SELECTIVE_UPDATE_TRANSF = 1 << 2
SELECTIVE_UPDATE_CONTR = 1 << 3
SELECTIVE_UPDATE_RIGID = 1 << 4
DISPLAY_OBJECT = 1 << 5
DISABLE_SORTING = 1 << 6
SEL_UPD_TRANSF_OVERRIDE = 1 << 7
SAVE_EXT_GEOM_DATA = 1 << 9
NO_DECALS = 1 << 10
ALWAYS_DRAW = 1 << 11
MESH_LOD = 1 << 12
FIXED_BOUND = 1 << 13
TOP_FADE_NODE = 1 << 14
IGNORE_FADE = 1 << 15
NO_ANIM_SYNC_X = 1 << 16
NO_ANIM_SYNC_Y = 1 << 17
NO_ANIM_SYNC_Z = 1 << 18
NO_ANIM_SYNC_S = 1 << 19
NO_DISMEMBER = 1 << 20
NO_DISMEMBER_VALIDITY = 1 << 21
RENDER_USE = 1 << 22
MATERIALS_APPLIED = 1 << 23
HIGH_DETAIL = 1 << 24
FORCE_UPDATE = 1 << 25
PREPROCESSED_NODE = 1 << 26