Is there anyway to read a file in ice?
I worked with processing before (awsome java dialect) and often had to read tsv or csv files.
I wanted to figure out how to work with files or data in softmage as well.
Atm i try it with JScript and ICE in order to see the upside and the downside of each way.
I know i can use a String node but i just wonder if a filea can be read.
read file in ice
-
xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 09:02
- Location: Montreal Canada
Re: read file in ice
Write a script that reads in the file and sets the DataArray (assuming you have 2013, I believe write access was new in that release)clankill3r wrote:Is there anyway to read a file in ice?
I worked with processing before (awsome java dialect) and often had to read tsv or csv files.
I wanted to figure out how to work with files or data in softmage as well.
Atm i try it with JScript and ICE in order to see the upside and the downside of each way.
I know i can use a String node but i just wonder if a filea can be read.
-
clankill3r
- Posts: 131
- Joined: 21 Oct 2012, 13:36
Re: read file in ice
correct:
ICEAttribute.DataArray - Sets a 1D Array object containing the data defined by an attribute.
The refrence only shows a python and c# example so i will look into it a bit later.
thanks so far.
ICEAttribute.DataArray - Sets a 1D Array object containing the data defined by an attribute.
The refrence only shows a python and c# example so i will look into it a bit later.
thanks so far.
-
clankill3r
- Posts: 131
- Joined: 21 Oct 2012, 13:36
Re: read file in ice
one more before i dive into scripting.
I tried with a really long string in ice (around 6mb of data).
they are like
179,179,179,179,179,179................etc. (around 900) and then a ; and then numbers again sperated by a comma.
If i do a count in notepad++ for ; i get 1040, if i paste it in the string object in ice and paste back in notepad++ and do a count again it says 5.
Also if i split the string in ice and show the array size in ice it says 5 so i lost like 99% of the data.
What is the string character limit?
I tried with a really long string in ice (around 6mb of data).
they are like
179,179,179,179,179,179................etc. (around 900) and then a ; and then numbers again sperated by a comma.
If i do a count in notepad++ for ; i get 1040, if i paste it in the string object in ice and paste back in notepad++ and do a count again it says 5.
Also if i split the string in ice and show the array size in ice it says 5 so i lost like 99% of the data.
What is the string character limit?
-
xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 09:02
- Location: Montreal Canada
Re: read file in ice
A 6MB string? I would give up on String to Array and write a simple script to build an array.clankill3r wrote:one more before i dive into scripting.
I tried with a really long string in ice (around 6mb of data).
they are like
179,179,179,179,179,179................etc. (around 900) and then a ; and then numbers again sperated by a comma.
If i do a count in notepad++ for ; i get 1040, if i paste it in the string object in ice and paste back in notepad++ and do a count again it says 5.
Also if i split the string in ice and show the array size in ice it says 5 so i lost like 99% of the data.
What is the string character limit?