private void ExportIni_Node(IniFile iniFile, string parentName, Kn5Node node, int priority = 0) {
var name = node == RootNode ? parentName : parentName + "_" + node.Name;
var section = iniFile["model_FBX: " + name];
section.Set("ACTIVE", node.Active);
section.Set("PRIORITY", priority);
if (node.NodeClass == Kn5NodeClass.Base) {
if (IsMultiMaterial(node)) {
var p = node.Children.Count;
foreach (var child in node.Children) {
ExportIni_Node(iniFile, name, child, --p);
}
} else {
foreach (var child in node.Children) {
if (node == RootNode && child.NodeClass == Kn5NodeClass.Mesh) {
ExportIni_TrackNode(iniFile, name, child);
} else {
ExportIni_Node(iniFile, name, child);
}
}
}
} else {
section.Set("VISIBLE", node.IsVisible);
section.Set("TRANSPARENT", node.IsTransparent);
section.Set("CAST_SHADOWS", node.CastShadows);
section.Set("LOD_IN", node.LodIn);
section.Set("LOD_OUT", node.LodOut);
section.Set("RENDERABLE", node.IsRenderable);
}
}