Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    set frame

    Scheduled Pinned Locked Moved SDK Help
    6 Posts 0 Posters 492 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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)?

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              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

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                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

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post