UI: Asset Shelf (Experimental Feature) #104831
|
@ -310,8 +310,6 @@ std::string AssetLibraryService::normalize_asset_weak_reference_relative_asset_i
|
|||
StringRefNull relative_asset_identifier = asset_reference.relative_asset_identifier;
|
||||
size_t offset = rfind_blendfile_extension(asset_reference.relative_asset_identifier);
|
||||
|
||||
std::cout << offset << "\n";
|
||||
|
||||
uint64_t alt_group_len;
|
||||
int64_t group_len;
|
||||
if (offset != std::string::npos) {
|
||||
|
@ -327,19 +325,10 @@ std::string AssetLibraryService::normalize_asset_weak_reference_relative_asset_i
|
|||
offset = 0;
|
||||
}
|
||||
|
||||
std::cout << offset << "\n";
|
||||
|
||||
alt_group_len = uint64_t(relative_asset_identifier.find(ALTSEP, int64_t(offset)));
|
||||
group_len = int64_t(
|
||||
std::min(uint64_t(relative_asset_identifier.find(SEP, int64_t(offset))), alt_group_len));
|
||||
|
||||
std::cout << offset << " " << group_len << "\n";
|
||||
|
||||
std::cout << relative_asset_identifier.find(SEP) << " " << alt_group_len << " ==> " << group_len
|
||||
<< "\n";
|
||||
std::cout << relative_asset_identifier << "\n";
|
||||
std::cout << utils::normalize_path(relative_asset_identifier, size_t(group_len) + 1) << "\n";
|
||||
|
||||
return utils::normalize_path(relative_asset_identifier, size_t(group_len) + 1);
|
||||
}
|
||||
|
||||
|
@ -363,10 +352,6 @@ std::string AssetLibraryService::resolve_asset_weak_reference_to_full_path(
|
|||
normalize_asset_weak_reference_relative_asset_identifier(
|
||||
asset_reference);
|
||||
|
||||
std::cout << library_path << "\n";
|
||||
std::cout << normalize_asset_weak_reference_relative_asset_identifier(asset_reference) << "\n";
|
||||
std::cout << normalized_full_path << "\n";
|
||||
|
||||
return normalized_full_path;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,8 +80,8 @@ class AssetLibraryService {
|
|||
AssetLibrary *get_asset_library_all(const Main *bmain);
|
||||
|
||||
/**
|
||||
* Return the position of the last blendfile extension in given path, or std::string::npos if
|
||||
* not found. Works with both kind of path separators. */
|
||||
* Return the start position of the last blendfile extension in given path, or std::string::npos
|
||||
* if not found. Works with both kind of path separators. */
|
||||
size_t rfind_blendfile_extension(StringRef path);
|
||||
/**
|
||||
* Return a normalized version of #AssetWeakReference.relative_asset_identifier.
|
||||
|
|
|
@ -115,9 +115,6 @@ TEST_F(AssetRepresentationTest,
|
|||
"to\\an\\asset";
|
||||
std::string resolved_path = service->resolve_asset_weak_reference_to_full_path(*weak_ref);
|
||||
|
||||
std::cout << expected_path << "\n";
|
||||
std::cout << resolved_path << "\n";
|
||||
|
||||
EXPECT_EQ(BLI_path_cmp(resolved_path.c_str(), expected_path.c_str()), 0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue