Constant String node text input in Action Graph within Create

Hi,

I am trying to create a simple process by which data within regular .txt, .csv, etc files can be inputted into/outputted from Omniverse Create. For this I am using an Action Graph that takes inputs from the user, and then either performs a read or write operation.

To simplify the usage of the graph for the user, I have inserted Constant String nodes into which input text can be pasted. This text can be of any kind, and can contain all kinds of escape sequences. Here is where I face my issue: I want the escape sequences (such as \n and \t) to be maintained as is. Currently, the Constant String node is escaping these escape sequences with an additional . So instead of this being written to the file:

hi
hello

this is being written to the file:

hi\nhello

In other words, when I print the raw representation of what the Constant String node is capturing, it is hi\nhello and not hi\nhello.

Is there any way around this without having to add additional logic to my code to remove these extra ? (My input text can be of any kind, I have no information of what data it will contain).

I am aware that another alternative is to simply paste my input data into a Script node instead of a Constant String node, but this solution doesn’t seem so elegant.

Any help is appreciated, thanks!

Hi @riya.thomas. We’ve logged an issue for this: OM-55396

In the meantime, you could write a custom node or use a script node to unescape.

Hi, thanks for the workaround!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.