Nodes to convert from Text to most other types

[From More type conversions...]

It seems to me that if one can convert something to text (in the way that a 2D Point converts to text, not how an image does), one ought to be able to convert it back after.

Component: 

Notes from Team Vuo

Vuo Pro: 

No — available with both Vuo CE and Vuo Pro

Complexity: 

●○○○ — Up to a few days of work

Potential: 

●○○ — Appeals to current community

The existing anything-to-Text type converter, Summarize Value, outputs data in a format that is human-readable (in fact, the same as the description in port popovers) but not necessarily straightforward to convert from Text back to the original type.

For this feature request, we could provide a Convert Value to Text node that outputs the value in JSON format and a Convert Text to Value node that inputs a value of the same format or certain other type-specific formats.

For example, an Integer or Real would be just the number (99). A Color could have one of several formats including {"r":0.5, "g":1, "b":0, "a":1} and 0.5, 1, 0, 1 and #7fff00.

More type conversions

Right now, attaching outputs of certain data types to inputs of similar data types give you an automatic conversion, sometimes supplying a contextual menu with a few options. I like this a lot, but there are a bunch of intuitive ones that don't seemt to exist. Here is my list of "missing" available conversions in Vuo, some more farfetched than others, with details as necessary:

  • Text to 2/3/4D Point
  • Real to Color (range of 0 to 1 converts to a color, from black to white, as in QC, with other possible options for R, G, B, RG, etc., or alpha)
  • Color to Real (reverse of above)
  • Text to Layer/Image (automatically generated text layer)
  • Image to Color (average color in image)
  • Layer/Image to Scene Object (similar to a QC sprite)

...And there are some list conversions that are unavailable where the non-list version is available: * 2/3D Points to 4D Points * 4D Points to 2/3D Points and Reals * Booleans to Integers and Reals * Images/Integers/Layers/Reals/SceneObjects/Texts to Booleans * Integers to 2/3/4D Points * Reals to 4D Points * Texts to Integers * 2/3/4D Points/Booleans/Colors/Images/Integers/Layers/SceneObjects to Texts

This is becoming an ongoing source of frustration for me, particularly the real lack of automatic list conversions. I don't recall the context, but I was recently wanting to convert a list of Integers to Texts and, because the conversion doesn't exist, I had to convert it to a list of Reals first.

Also, it seems to me that if one can convert something to text (in the way that a 2D Point converts to text, not how an image does), one ought to be able to convert it back after.

I didn't test other combinations, like Text to Math Expression List (though I do remember having trouble with this some time ago), but I guess my request is, generally speaking, to take down some of the existing limitations around conversion availability, especially in cases where the conversion is available only if the data is not stored in a list.

Component: 

Notes from Team Vuo

Vuo Pro: 

No — available with both Vuo CE and Vuo Pro

Complexity: 

●○○○ — Up to a few days of work

Potential: 

●○○ — Appeals to current community
Subscribe to RSS - Type