DarklightGames / io_scene_psk_psa

A Blender extension for importing and exporting Unreal PSK and PSA files
GNU General Public License v3.0
312 stars 20 forks source link

Bones can be exported with names that are not handled correctly by Unreal Engine #21

Closed cmbasnett closed 1 year ago

cmbasnett commented 2 years ago

This is more of a compatibility bug than it is a bug with the exporter itself.

If a bone has a name that is not properly serializable by the UT engine, the bone will be present, but will not properly animate. This is likely because the bone names are being serialized as name types within the engine, which only allow ASCII alphanumeric, spaces, and underscore characters.

There are a couple of solutions here:

  1. Only allow ASCII alphanumeric, spaces, and underscore characters (throw an error)
  2. Automatically transform the names of the bones to replace invalid characters.

I'm leaning heavily towards the first solution, since it results in less "magic" and surprises for bone names when it comes to hooking things up in code. I'm not sure if this is a problem with UE3, but I would assume it has the same issue.

cmbasnett commented 2 years ago

Fixed in commit edafa1cf on feature-psk-mesh-wysiwyg.

This will be merged to main once that branch has been soak tested and is determined to be stable.

cmbasnett commented 1 year ago

This is now part of 4.0.0

Kinkojiro commented 1 year ago

Just FYI UE3 does allow hyphen "-" so LeftShoulder-Swivel etc are legitimate bone names in UE3

cmbasnett commented 1 year ago

You're right, that's my mistake. I have pushed an updated version that allows hyphens in the bone names: https://github.com/DarklightGames/io_scene_psk_psa/releases/tag/4.0.1