Not a bug

Animations with Invalid File Characters in the Names won't Convert

JDelekto 3 years ago updated by Peter - Soxware Developer 3 years ago 3

I am trying to convert several generic animation clips from an FBX file in an asset to Legacy.  Everything has been set up correctly, but when I attempt to convert, I get the error that there are invalid characters in the filename and that additional information has been logged to the console.

Unfortunately, nothing is logged to the console.  The clips that I am trying to convert have names with the pipe "|" character in them (this is how I received them), so I can only surmise that the tool is trying to create a filename from the actual animation clip name and of course the '|' character is going to fail.

Just a suggestion, but if animation clips can contain characters that are invalid filename characters, either map them to a valid character (i.e. replace '|' with '_') or perhaps give the user the option to supply a new name for the animation clip for the output file.

Thank you for your consideration!

Animation Converter Version:
1.0.3
Unity Version:
2020.3.11f1

Answer

Answer
Not a bug

Hi,

thank you very much for your support request.

I just double checked, the '|' character is indeed considered as invalid character. Thanks for suggesting the automatic re-naming, this is a good idea and I'm considering this for a future update.


You can re-name the animation files of the FBX manually. Expand the *.FBX file in Unity's project window (by clicking on the arrow next to it). Select the animation clips you want to convert and press CTRL + D. This is going to create duplicated versions of the clips as separate files. You can now re-name them (in case Unity hasn't adjusted their names already automatically). Now use this *.anim clips inside the animation converter.


Please let me know in case you have any follow-up questions or if this doesn't work for you.


Best regards,
Peter

Answer
Not a bug

Hi,

thank you very much for your support request.

I just double checked, the '|' character is indeed considered as invalid character. Thanks for suggesting the automatic re-naming, this is a good idea and I'm considering this for a future update.


You can re-name the animation files of the FBX manually. Expand the *.FBX file in Unity's project window (by clicking on the arrow next to it). Select the animation clips you want to convert and press CTRL + D. This is going to create duplicated versions of the clips as separate files. You can now re-name them (in case Unity hasn't adjusted their names already automatically). Now use this *.anim clips inside the animation converter.


Please let me know in case you have any follow-up questions or if this doesn't work for you.


Best regards,
Peter

Please add automatic renaming, you can use this 1 line:

animName = animName.Replace("|", "_");

Thanks

Hi Reslav,

thank you very much for your suggestion. I've added this to my to-do list for a new animation converter release. If you need this feature now, you can add the line yourself. The animation converter window source code is provided with the asset, so it should be easy to add it :-)

Let me know in case you need.

Best regards,
Peter