set frame



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

    On 24/08/2009 at 06:35, xxxxxxxx wrote:

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

    ---------
    Hi I know that this is probably very simple, but I'm afraid I'm not getting it. I'm trying to write a coffee tag pluggin and to fill an array. I want to use a loop to scroll through the frames and fill the user data info for each frame.
    I've tried:

    var i = 0;

    for (i = 0; i < max_frame; i = i + 1) {
    BaseTime (i,25);
    doc->SetTime();

    print (frame);
                        print (",");
                        print( arr_number[frame]);
                        println(" "); }

    but I'm not having any joy. Any help would be greatly appreciated.
    Regards Conor



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

    On 24/08/2009 at 06:49, xxxxxxxx wrote:

    Do something like this:

    > \> var i = 0; \> \> for (i = 0; i < 50; i++) \> { \>      var time = new(BaseTime); \>      time->SetFrame(i,25.0); \>      doc->SetTime(time); \> } \>

    cheers,
    Matthias



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

    On 24/08/2009 at 07:22, xxxxxxxx wrote:

    Thanks Matthias, I've tried this but its still not doing what I expected, instead of printing each frame and its user data, it prints out the current frame and its user date ,again and again, for the length of the loop.
    Is there a simpler way to fill an array ( made up of each frame and its user data)?



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

    On 24/08/2009 at 07:29, xxxxxxxx wrote:

    If I understand you correctly you want to fill an array with user data for each frame. If so then i think a COFFEE tag is not the best way to do it. Have you looked into writing a COFFEE script or MenuPlugin instead?

    cheers,
    Matthias



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

    On 24/08/2009 at 07:32, xxxxxxxx wrote:

    No. I'll start reading up on this now.
    Cheers Conor



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

    On 24/08/2009 at 07:37, xxxxxxxx wrote:

    The thing is a COFFEE tag is an expression which is called for eachframe and every change you make. A script or MenuPlugin is called just once by the user.

    Btw. if you use SetTime() you also have to call AnimateDocument() to actually animate the document.

    cheers,
    Matthias


Log in to reply