THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/08/2009 at 04:30, xxxxxxxx wrote:
Cinema 4D Version: 10.5
Platform: Mac OSX ;
Language(s) : C.O.F.F.E.E ;
Hi can anyone give me any pointers on creating a txt exporter. is it possible to do from the user script? I have made a script that gathers all my user data for each frame, now I need to save this as a txt. file.
At the moment I am printing to the console window with the frame number as an index. Should this be put into an array for the purposes of exporting and if so is it possible to get
var end_frame = 90;
var myarray = new(array,end_frame);
myarray[frame] = (op#ID_USERDATA:1);
to work so that as the animation plays the array gets filled up with the userdata, then dumped out to the txt file?
Any help would be greatly appreciated.
On 28/08/2009 at 08:40, xxxxxxxx wrote:
If this is running in an XPresso node or Expression tag, COFFEE is not allowed to write files from there. This can only be done in a COFFEE plugin.
On 28/08/2009 at 09:27, xxxxxxxx wrote:
I was looking through the SDK at the Filter plugins and saw that there is a raw.cof example, would this be suitable to base my plugin on?
On 28/08/2009 at 09:45, xxxxxxxx wrote:
Yes. Looks like SaveObject() is just a dummy function which you need to create to do the actual writing to the file. Looking to see if they have full code somewhere. Yes, there is a BaseRaw.coh in my examples folder. Download this file:
This contains the simple HTML version of the COFFEE docs with the examples as separate files. You'll find both the raw.cof and BaseRaw.coh in there.
On 28/08/2009 at 09:48, xxxxxxxx wrote:
Thanks very much Robert, have a good weekend.