I read some data from an external csv file into animation nodes, split the lines into individual parts (data columns) containing floating point numbers and want to use these floating point numbers in an object transformation.

However, the split lines are of type text, while the transformation expects float. How can I transform text to float? In the image the current value is 7.5 as can be seen in the debug node, I'd like to use this as input to the combine vector node.

How to use a text list element as float?

In python this is easy enough >>float() so I tried to do this, using the script animation node, but could not figure out how to deal with input/output values within the script node.


1 Answer 1


Search in the menu (Shift+A) for Convert

It's a generic node that converts all to all. There are other nodes that are not in the menu yet.

enter image description here

Sometimes it is added automatically.

In this case it is not cause you have to be a bit careful about the input, not to get a None. None is not taken well by some types of data/sockets and will give errors for vectors and others. So don't jump in using it all around :)


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .