public static bool Export_To(string _filepath) { List <IINode> nodes = GetSelection(); foreach (IINode _node in nodes) { IIDerivedObject _gObject = (IIDerivedObject)_node.ObjectRef; IClass_ID classID = maxGlobal.Class_ID.Create((uint)BuiltInClassIDA.TRIOBJ_CLASS_ID, 0); ITriObject _mObject = (ITriObject)_gObject.ObjRef.ConvertToType(0, classID); IMesh _mMesh = _mObject.Mesh; _mMesh.BuildNormals(); IIDerivedObject theObj = (IIDerivedObject)_node.ObjectRef; for (int m = 0; m < theObj.Modifiers.Count; m++) { IModifier theModifier = theObj.GetModifier(m); if (theModifier.ClassName == "Skin") { IISkin _skin = (IISkin)theModifier.GetInterface((InterfaceID)(0x00010000)); IISkinContextData _skinContext = _skin.GetContextInterface(_node); ComputeVertexData(_mMesh, _skinContext, semantic, _filepath); } } } return(true); }