tome-editor icon indicating copy to clipboard operation
tome-editor copied to clipboard

Field Value Conversions

Open npruehs opened this issue 9 years ago • 3 comments

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.

npruehs avatar Jun 11 '15 21:06 npruehs

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.

pgrimsehl avatar Sep 08 '16 21:09 pgrimsehl

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.

npruehs avatar Sep 08 '16 22:09 npruehs

I'm curious: How badly do you need this? Is this something we should add to the next release?

npruehs avatar Sep 08 '16 23:09 npruehs