public readonly int FindIndexAll(ReadOnlySpan <byte> nodeName, Span <int> buffer) => FbxNode_.FindIndexAll(Pointer->ChildrenInternal, nodeName, buffer);
public readonly int FindIndexAll(RawString nodeName, Span <int> buffer) => FbxNode_.FindIndexAll(Pointer->ChildrenInternal, nodeName.AsSpan(), buffer);
public readonly int FindIndex(RawString nodeName) => FbxNode_.FindIndex(Pointer->ChildrenInternal, nodeName.AsSpan());
public readonly int FindIndex(string nodeName) => FbxNode_.FindIndex(Pointer->ChildrenInternal, nodeName);
public readonly int FindIndex(ReadOnlySpan <byte> nodeName) => FbxNode_.FindIndex(Pointer->ChildrenInternal, nodeName);
public readonly bool TryFind(string nodeName, out FbxNode node) => FbxNode_.TryFind(Pointer->ChildrenInternal, nodeName, out node);
public readonly bool TryFind(ReadOnlySpan <byte> nodeName, out FbxNode node) => FbxNode_.TryFind(Pointer->ChildrenInternal, nodeName, out node);
public readonly FbxNode Find(string nodeName) => FbxNode_.Find(Pointer->ChildrenInternal, nodeName);
private static unsafe bool ParseNodeRecord(Reader reader, int version, out FbxNode_ node) { ulong endOfRecord; ulong propertyCount; ulong propertyListLen; byte nameLen; if (version >= 7400 && version < 7500) { reader.UInt32(out var eor); endOfRecord = eor; reader.UInt32(out var pc); propertyCount = pc; reader.UInt32(out var pll); propertyListLen = pll; reader.Byte(out nameLen); } else if (version >= 7500 && version < 7600) { reader.UInt64(out endOfRecord); reader.UInt64(out propertyCount); reader.UInt64(out propertyListLen); reader.Byte(out nameLen); } else { throw new NotSupportedException($"Format version '{version}' is not supported."); } var isNullRecord = (endOfRecord == 0) && (propertyCount == 0) && (propertyListLen == 0) && (nameLen == 0); if (isNullRecord) { node = default; return(false); } node = default; try { node = new FbxNode_(new RawStringMem(nameLen), (int)propertyCount); var name = node.NameInternal; var properties = node.PropertiesInternal; reader.Read(name); SanitizeString(name); for (int i = 0; i < (int)propertyCount; i++) { ParseProperty(reader, ref properties[i]); } var hasChildren = (ulong)reader.BaseStream.Position != endOfRecord; var hasNullRecord = hasChildren || propertyCount == 0; if (hasChildren || hasNullRecord) { while (true) { if (!ParseNodeRecord(reader, version, out var child)) { break; } node.AddChild(child); } } } catch { node.Free(); node = default; throw; } return(true); }