THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/11/2012 at 18:57, xxxxxxxx wrote:
Half way there but on a side track :)
To see if I could get anything to work I managed to interpret
C++ code by Tobias Pfob from a closed forum, to COFFEE.
It does indeed make a 1 to 1 copy from "real" files in Content Browser.
That is, images and i.e. .c4d files but not "compressed" objects like
objects dragged into the CB from OM, not a big problem atm.
Trying to manage this in Python, I can't seem to find a "BaseFile" to
use. Something to initialize with a filename (the Content Browser Path "preset:// mylib.lib4d/etc..)
as I can't find a way for Python the accept a "non mounted" path, such as the CB path.
Are we looking at using HyperFile? No experience at all with that yet.
Any idea and,
my question now would be if this is possible with Python at all?
(Would be nice to not only talk to myself here :) )
Cheers
Lennart
main(doc,op)
{
var scr = new(Filename);
scr->SetFullString("preset://Prime.lib4d/Materials/HDRI/tex/HDR011.hdr");
var dst = new(Filename);
dst->SetFullString("/Users/lennart/Desktop/AAA.hdr");
var fsrc = new(BaseFile);
var fdst = new(BaseFile);
if(fsrc->Open(scr, FILEOPEN_READ))
{
println ("SOURCE OPEN");
if(fdst->Open(dst, FILEOPEN_WRITE))
{
println ("DEST OPEN");
var bitsize = fsrc->GetLength();
println (bitsize);
var c = new(bytes,bitsize);
fsrc->ReadBytes(c,bitsize);
fdst->WriteBytes(c,bitsize);
fdst->Close();
println ("DEST CLOSED");
}
fsrc->Close();
println ("SOURCE CLOSED");
}
gc();
}