Huesforalice
04-23-2008, 03:53 PM
Hi Guys,
I'm fairly new to cinema but quite excited about the usability of the program (went through maya and max already). I'm trying to get the hang of developing COFFEE Scripts. I'd consider myself a somewhat experienced software developer but I'm finding it pretty hard to get the hang of using the API documentation (when using the script editor inside cinema).
For example the api documentation says, "basedocument" should have the member "BaseObject* GetActiveObject()", so I write
var obj;
obj = doc->GetActiveObject();
that seems to work ok.
Now the API also says there should be a member "void GetActiveObjects(AtomArray& a, Bool children)"
Now the question is, how do I use this memberfunction in the script editor? If I write
var a;
doc->GetActiveObjects(a, false);
I get something like a "Member not found" error. Is there a way of defining pointers in the script editor? I'm just generally confused. Perhaps it would be sufficient to point me towards an introduction to scripting COFFEE inside Cinema as opposed to the API which seems to target C++ developers using proper c++ code.
Many thanks to all who answer, I'll repay in form of useful scripts (as soon as I've understood how things work :) ).
Dave
I'm fairly new to cinema but quite excited about the usability of the program (went through maya and max already). I'm trying to get the hang of developing COFFEE Scripts. I'd consider myself a somewhat experienced software developer but I'm finding it pretty hard to get the hang of using the API documentation (when using the script editor inside cinema).
For example the api documentation says, "basedocument" should have the member "BaseObject* GetActiveObject()", so I write
var obj;
obj = doc->GetActiveObject();
that seems to work ok.
Now the API also says there should be a member "void GetActiveObjects(AtomArray& a, Bool children)"
Now the question is, how do I use this memberfunction in the script editor? If I write
var a;
doc->GetActiveObjects(a, false);
I get something like a "Member not found" error. Is there a way of defining pointers in the script editor? I'm just generally confused. Perhaps it would be sufficient to point me towards an introduction to scripting COFFEE inside Cinema as opposed to the API which seems to target C++ developers using proper c++ code.
Many thanks to all who answer, I'll repay in form of useful scripts (as soon as I've understood how things work :) ).
Dave
