Eyeon:Script/Reference/Libraries/eyeon/readstring

From VFXPedia

Jump to: navigation, search


Contents

Arguments

eyeon.readstring(string value)

  • value (required, string)

A string containing the data structured like a Fusion composition


Returns

This function returns a table if it successfully reads the composition, and nil if it fails.


Remarks

The eyeon.readstring function reads a a string and parses it as if it were a composition, formatting the results into a table. It is identical to the eyeon.readfile function, except it uses a string input instead of a file from disk.

Fusion does not have to be running when this happens. The result can be manipulated and written back to a string using the eyeon.writestring function.


Requires

  • eyeonScript 5.2


Examples

filename = "c:\\composition1.comp"
 
f, err = io.open(filename, "r")
if f then
  c = f:read("*a")
  t = eyeon.readstring(str)
  if t then
     dump(t)
  else
     print("Could not parse contents of "..filename)
  end
else
  print(err)
end


Tips for readstring (edit)

EyeonTips:Script/Reference/Libraries/eyeon/readstring