tome-editor
tome-editor copied to clipboard
Field Value Conversions
The user can add, edit and remove custom field value conversions. These conversion are specified in RPN. When adding or editing a field definition, the user can specify a conversion for that field. The conversion is applied when exporting the field values.
I'm not familiar with the term RPN - does ist stand for Reverse Polish Notation? Can you give an example of how such a definition would look like?
For example if i wanted to export a string type to be always enclosed by " ", what would it look like? Or if I want to export a color value as 0xAARRGGBB hexadecimal value.
The original idea was to support common value conversions. We've encountered designers to be much more familiar with angles in degrees, while most game engines need angles in radians, for instance. This feature was originally planned for supporting this use case.
You're right: RPN stands for Reverse Polish Notation. The advantage of such a notation is that parsing these is a solved problem. An example would be
$VALUE$ 0.01745329 *
However, you questions suggests that we need to think in a much broader context here :) I haven't imagined that you could something like this for formatting string or color values.
I'm curious: How badly do you need this? Is this something we should add to the next release?