Pherakki / BlenderToolsForGFS

A Blender plugin for importing and exporting GFS files.
GNU General Public License v3.0
20 stars 1 forks source link

Non-UTF-8 strings cause import errors #84

Open Pherakki opened 1 year ago

Pherakki commented 1 year ago

Strings are currently decoded immediately after they are read. This causes issues since a string that does not fit the proposed encoding scheme will cause the program to crash.

Losing the encoding does however cause annoyances. Instead, the dynamic typing of Python should be exploited and:

On import to Blender, the type of the string can then be checked:

To complete this feature, the override_name will need to be changed to a BYTE_STRING subtype, and all strings loaded into override_name should be converted to bytes. Code using the override_name will then need to be adjusted to account for this.