Tcoffeeexpression

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 14/06/2008 at 16:21, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   10 
Platform:   Windows  ;   
Language(s) :   C.O.F.F.E.E  ;

---------
Hi,

i worked around, and had read, that i can't add keyframes normal in COFFEE. SO i try to make this with the help of a COFFEE Expression Tag.

> \> var coffeetag = AllocTag(Tcoffeeexpression); \> cam->InsertTag(coffeetag); \>

this adds a coffetag to my camera.

Now i want to know how i can adding something into this Tag.

e.g.

> \> var cam = new(array,4,2); \> \> cam[0][0] = vector(100.0,100.0,100.0); \> cam[0][1] = vector(90.0,0.0,90.0); \> \> cam[1][0] = vector(-100.0,-100.0,-100.0); \> cam[1][1] = vector(-90.0,0.0,-90.0); \> \> cam[2][0] = vector(100.0,100.0,100.0); \> cam[2][1] = vector(90.0,0.0,90.0); \> \> cam[3][0] = vector(-100.0,-100.0,-100.0); \> cam[3][1] = vector(-90.0,0.0,-90.0); \> \> var fps = 30; \> var current_frame = doc->GetTime()->GetFrame(fps); \> op->SetPosition(cam[int(current_frame)][0]); \> op->SetRotation(cam[int(current_frame)][0]); \>

This actualized automatically for every frame a new position.
Now i want to know how i can add such in my COFFEE TAG

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 14/06/2008 at 19:12, xxxxxxxx wrote:

Have a look at this thread

coffee expression tag text

cheers,
Matthias

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 15/06/2008 at 08:35, xxxxxxxx wrote:

Ok I tryed it. Now i get the Content of the Tag, but I don't know how to change its

> \> var coffeetag = AllocTag(Tcoffeeexpression); // Allocate the Coffee Tag \> var coffeeContent = "Hello World!";//sample for content \> var bc = coffeetag->GetContainer();//Getting Container \> println(bc->GetData(1000));// Get Data of the String ID 1000 \> bc->SetData( 1000, coffeeContent );//Replace new Content \> println(bc->GetData(1000)); //Output \>

It works very well, but it doesn't change anything on my Coffetag on my Camera

I also tryd some other IDs, because I don't know why ID 1000

so I tryd

> \> bc->GetId(); \> //OR \> bc->GetType(); \>

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 15/06/2008 at 10:54, xxxxxxxx wrote:

OK I thing i found my mistake, after searching the whole forum :)

I forgot to set my updated Container to my Coffetag

> \> var coffeetag = AllocTag(Tcoffeeexpression); \> var coffeeId = 1000; \> var coffeeContent = "Hello World!"; \> \> var bc = coffeetag->GetContainer(); \> bc->SetData( coffeeId, coffeeContent ); \> coffeetag->SetContainer( bc ); \>

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 15/06/2008 at 16:49, xxxxxxxx wrote:

Just use the container operator #.

> \> coffeetag#1000 = "hello world"; \>

cheers,
Matthias