I have a Data Prep recipe to modify some asset output paths.
When I first import the paths, they look like this:
[Image Removed]
After I run the recipe they are correctly changed to:
[Image Removed]
That seems to be working fine until I press the “Commit” Button. DataPrep writes everything out, but for some reason it also creates an empty folder structure for the old removed structure…
[Image Removed]
All the assets are placed in the correct folders, and the ones circled in red are just empty leftovers which are for some reason created. Is this a bug, or am I supposed to do some cleanup step to get rid of them?
Also, I don’t know if this is related, but when I do the asset renaming and folder moving, I get a validation error (log uploaded)
Is the validator not aware of the folder and name changes? This might be the reason why the old folders dont get removed…
[mention removed] Do you know if this is a bug or am I missing some steps?
Hi Maxim,
I am sorry. This definitely looks like a bug.
Dataprep’s asset outliner is properly reflecting the name changes but, based on the log you shared, the Dataprep editor seems to still hold onto the temporary packages it created.
How are you doing the renaming of the folder and the assets?
Regards,
Jean-Luc
Hi [mention removed]
I rename them in the manor that you suggested in another post. At least I tried to… this is how it is renamed and the folder is set:
[Image Removed]Blue line is one of the objects that is passed into dataprep, cast to the correct class.
V/R,
--Maxim
Hi Maxim,
Changing the path would be the culprit, Dataprep is only moving assets to the selected path on the commit. The UI reflects the targeted structure but not the internal one. I should have anticipated that.
The fix for the ability to set the target folder with ‘/’ in the path is fixed for the next release. The change is pretty simple. I can share it with you if you want to compile the editor with this change.
That said, the path will still be relative to the path where the Dataprep asset reside.
Regards,
Jean-Luc
[mention removed]
Sure! Let me know what the change is. It was supposed to be easy, I just did not want to make the change in case something else depended on the current functionality without my knowledge.
Do you know how to fix the mismatch of the internal paths for validation?
V/R,
--Maxim
Hi Maxim,
Below is the fix for the ‘/’ in the path, in DataprepOperations.cpp, line 462, replace the existing code of FDataprepSetOutputFolderDetails::FolderName_TextChanged with:
`void FDataprepSetOutputFolderDetails::FolderName_TextChanged(const FText& Text)
{
// Slash and Square brackets are invalid characters for a folder name
const FString InvalidChars = INVALID_OBJECTPATH_CHARACTERS TEXT(“.”);
FText ErrorMessage;
FString FolderPath = Text.ToString();
if (FolderPath.Len() == 0)
{
ErrorMessage = LOCTEXT(“InvalidFolderName_PathEmpty”, “A folder path must be at least one character long”);
}
else if (FolderPath.StartsWith(TEXT(“/”)))
{
ErrorMessage = LOCTEXT(“InvalidFolderName_MustBeRelative”, “A folder path must be relative”);
}
else
{
// See if the name contains invalid characters.
FString Char;
for (int32 CharIdx = 0; CharIdx < FolderPath.Len(); ++CharIdx)
{
Char = FolderPath.Mid(CharIdx, 1);
if (InvalidChars.Contains(*Char))
{
FString ReadableInvalidChars = InvalidChars;
ReadableInvalidChars.ReplaceInline(TEXT(“\r”), TEXT(“”));
ReadableInvalidChars.ReplaceInline(TEXT(“\n”), TEXT(“”));
ReadableInvalidChars.ReplaceInline(TEXT(“\t”), TEXT(“”));
ErrorMessage = FText::Format(LOCTEXT(“InvalidFolderName_InvalidCharacters”, “A folder path may not contain any of the following characters: {0}”), FText::FromString(ReadableInvalidChars));
break;
}
}
}
if (!ErrorMessage.IsEmpty() || !FFileHelper::IsFilenameValidForSaving(FolderPath, ErrorMessage))
{
TextBox->SetError(ErrorMessage);
}
else
{
// Clear error
TextBox->SetError(FText::GetEmpty());
}
bValidFolderName = ErrorMessage.IsEmpty();
}`The mismatch between what is displayed in Dataprep and what is committed cannot be fixed through a Dataprep operation. The path you set in Dataprep is applied during the commit. It is unfortunately all managed internally.
Regards,
Jean-Luc
P.S. : Our offices will be closed starting 06/30. Back on 07/14.
Got it, not a problem. So the mismatch will be a future patch then? Do you know in what UE version?
Thank you for the “/” fix!
V/R,
--Maxim
Hi Maxim,
Unfortunately, I do not know which UE version will contain the mismatch. I will add this to the list of requests against the Dataprep editor. It will be prioritized against along the other requests we have.
Thanks in advance for your patience.
Regards,
Jean-Luc