THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/11/2008 at 05:43, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11
Platform: Mac OSX ;
Language(s) : C.O.F.F.E.E ; XPRESSO ;
---------
Hi,
I'm trying to clone a Mograph text object, using an Xpresso COFFEE node. My code works fine in the application itself when I press play, however it doesn't render out. Weirdly when I quit the picture viewer to stop rendering, all of the clones then appear in the scene. The clones render out fine when using a COFFEE tag instead of an Xpresso node.
Is this a limitation of Xpresso COFFEE nodes?
Thanks
Jon
Here's the code:
var counter = 0;
main()
{
var doc = GetActiveDocument();
counter++;
var count = tostring(counter);
var holder=doc->FindObject("text labels");
var myClone = doc->FindObject("text")->GetClone(CL_NO_BITS);
doc->InsertObject(myClone,holder,NULL);
myClone->SetName("text"+count);
var bc=myClone->GetContainer();
var txt = bc->GetData(PRIM_TEXT_TEXT);
bc->SetData(PRIM_TEXT_TEXT, count); // Assign value to the text object
myClone->SetContainer(bc);
}