Invalid path char: Animation name contains | (pipe) char, fails when used in Windows

An animation is named myModel|myAnimation in PlayCanvas, which contains the invalid | char, that is not supported in Windows filenames. This breaks the downloaded builds:

Exporting animation from Blender:
image

Yields the following in PlayCanvas editor:

Which after downloading and unpacking the local build in Windows results in:

When running the build, the animation no longer being recognized and the model is no longer animated

1 Like

@yak32

1 Like

We have a ticket to track these: Disallow/Replace problematic characters in Asset names? · Issue #449 · playcanvas/editor · GitHub

Hopefully, we will find time to handle these issues on import

Do I understand correctly that it was Blender that ended up naming a file with the | character and not PlayCanvas? Maybe I can look into it on the Blender side to attempt to avoid running into this in projects.
My post was mainly aimed at the idea that the naming convention myModel|myAnimation was something that the PlayCanvas asset loader assigns, and that it might be better picking something else for that. If that’s not the case, than the issue you posted is still a handy feature to pursue.

I’m not familiar with Blender but I’m under the impression it’s from the naming convention in Blender rather than PlayCanvas otherwise I would have expected more reports of this issue.

@slimbuck Would you know more about this?

Sorry for the trouble @JangoH. We don’t do a good job of sanitizing filenames in our asset pipeline. This is definitely something we should address and will do so under the ticket that @yaustar linked.

1 Like

We just faced the same issue as I’m working on Mac, but a colleague who uses Windows was unable to pull the repo due to that pipe in the file name.
So just wanted to bump this thread - I know its not really your fault that the pipe ended up in the filename in the first place, but if you could just add a regex that searches and replaces those problematic chars that would be a really appreciated helper function :slight_smile:

1 Like

Just wanted to give this thread a quick bump because we ran into the same issue. Good news though, once we renamed everything, the build worked again.

But I gotta say, it’s still pretty annoying when a file update throws in ‘new’ animations with the “|” character.
Screenshot 2023-06-20 141106

1 Like

I think we deployed a fix for that, could you please retest?

Bit of a late reply. And I hate to re-bump. But we still run in to this issue unfortunately.

The more we are working with animations the ‘harder’ it gets.

Especially in the following scenario:

Existing characters with a bunch of animations.
The animation asset names are renamed so the build works.

An update of the animation file is required.
The original animations are not being updated instead “new” animation files are added with the problematic character.

Now we have to delete the old animation files, rename the all of the new ones, and link them again on the existing templates.

Repeat this a couple of times, and frustration levels are rising. :sweat_smile: