/// <summary> /// Record the asset uuids embedded within the given text (e.g. a script). /// </summary> /// <param name="textAsset"></param> private void RecordTextEmbeddedAssetUuids(AssetBase textAsset) { // m_log.DebugFormat("[ASSET GATHERER]: Getting assets for uuid references in asset {0}", embeddingAssetId); string text = Utils.BytesToString(textAsset.Data); // m_log.DebugFormat("[UUID GATHERER]: Text {0}", text); MatchCollection uuidMatches = Util.PermissiveUUIDPattern.Matches(text); // m_log.DebugFormat("[UUID GATHERER]: Found {0} matches in text", uuidMatches.Count); foreach (Match uuidMatch in uuidMatches) { UUID uuid = new UUID(uuidMatch.Value); if (uuid == UUID.Zero) { continue; } // m_log.DebugFormat("[UUID GATHERER]: Recording {0} in text", uuid); if (!UncertainAssetsUUIDs.Contains(uuid)) { UncertainAssetsUUIDs.Add(uuid); } AddForInspection(uuid); } }
/// <summary> /// Record the asset uuids embedded within the given text (e.g. a script). /// </summary> /// <param name="textAsset"></param> private void RecordEmbeddedAssetDataUuids(AssetBase textAsset) { // m_log.DebugFormat("[ASSET GATHERER]: Getting assets for uuid references in asset {0}", embeddingAssetId); if (textAsset.Data.Length < 36) { return; } List <UUID> ids = Util.GetUUIDsOnData(textAsset.Data, 0, textAsset.Data.Length); if (ids == null || ids.Count == 0) { return; } for (int i = 0; i < ids.Count; ++i) { if (ids[i] == UUID.Zero) { continue; } if (!UncertainAssetsUUIDs.Contains(ids[i])) { UncertainAssetsUUIDs.Add(ids[i]); } AddForInspection(ids[i]); } }
/// <summary> /// Record the asset uuids embedded within the given text (e.g. a script). /// </summary> /// <param name="textAsset"></param> private void RecordTextEmbeddedAssetUuids(AssetBase textAsset) { string text = Utils.BytesToString(textAsset.Data); foreach (Match uuidMatch in Util.PermissiveUUIDPattern.Matches(text)) { UUID uuid = new UUID(uuidMatch.Value); if (uuid == UUID.Zero) { continue; } if (!UncertainAssetsUUIDs.Contains(uuid)) { UncertainAssetsUUIDs.Add(uuid); } AddForInspection(uuid); } }
private void RecordNoteCardEmbeddedAssetUuids(AssetBase textAsset) { List <UUID> ids = SLUtil.GetEmbeddedAssetIDs(textAsset.Data); if (ids == null || ids.Count == 0) { return; } for (int i = 0; i < ids.Count; ++i) { if (ids[i] == UUID.Zero) { continue; } if (!UncertainAssetsUUIDs.Contains(ids[i])) { UncertainAssetsUUIDs.Add(ids[i]); } AddForInspection(ids[i]); } }