Xpresso COFFEE doesn't render out clones
-
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);
} -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/11/2008 at 07:50, xxxxxxxx wrote:
It is not allowed to insert objects through an expression. Also with GetActiveDocument() you only get the document you are working on. During rendering this document get cloned and you can't access it with GetActiveDocument(). You can see that it should render in the viewport because it doesn't clone the document for editor rendering. The 'doc' parameter of the COFFEE expression will give the rendered document as well.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/11/2008 at 08:11, xxxxxxxx wrote:
Thanks for clearing that up for me Matthias,
is there a work around? I have an output from an Xpresso node, which needs to be fed into the COFFEE i.e. in my actual code 'var count' is the Xpresso output (this all appeared to be working fine until I attempted an animation render.)
Thanks
Jon
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/11/2008 at 08:42, xxxxxxxx wrote:
Also, why isn't it allowed in the render if it works in the editor?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/11/2008 at 10:22, xxxxxxxx wrote:
OK, sorry to be repeating myself but I've got 2 questions:
• GetActiveDocument() doesn't refer to the document being rendered, so is there a way to refer to it with a command(s) in a COFFEE Xpresso node?
alternatively:
• is there a way to access Xpresso data with a COFFEE tag?
Thanks for any help
Jon
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/11/2008 at 14:04, xxxxxxxx wrote:
Hmmm...
it seems you can insert objects using an expression:
I made a new node by dragging an object from the scene into the Xpresso editor and gave it an Object output port, and also added a Link input port into the COFFEE node and linked the two together.
Then I replaced 'var doc = GetActiveDocument()' with 'var doc = Input1->GetDocument()'
In my tests so far, that seems to be working.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/11/2008 at 06:17, xxxxxxxx wrote:
It is not safe to insert objects from an Expression. Expressions are there to control the behaviour of existing objects, not to create new ones.
If you want to create objects safely, you will have to switch to C++ and program your own Generator object.
Grüße,
Jack -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/11/2008 at 06:29, xxxxxxxx wrote:
Hi Jack,
I'm only interested in this for my own animation projects, not plug-in development, and, slowly but surely, I'm approaching the results I'm after. I haven't received any instability issues (at least thus far) - so surely that's OK?
I wouldn't know where to start with C++ , and my current methods (combining Xpresso and COFFEE) seem convenient and successful (once I figure out the correct commands and syntax - which appears to be the biggest problem because of the sparse documentation. Though I'd like to express my thanks to this community - yourself included - for your prompt and knowledgeable support)
Cheers
Jon
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/11/2008 at 03:51, xxxxxxxx wrote:
Of course it's OK. Everything is OK if it works for you. And sure getting into C++ is not as easy as XPresso.
Anyway, if you go get into it, you will never regret it
Greetings,
Jack