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

    Setting keyframes with COFFEE

    Scheduled Pinned Locked Moved SDK Help
    11 Posts 0 Posters 840 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 10/04/2009 at 14:31, xxxxxxxx wrote:

      Hi Rui.
      Quick test and it works here, both with scriptmanager or with a Coffee Tag.

      Cheers
      Lennart

      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 10/04/2009 at 14:43, xxxxxxxx wrote:

        Well, so try this sample file. http://www.ruimac.com/files/Anim_Test.c4d.zip It should set a keyframe for the sphere object as soon as you add an asterisc to the beginning of its name. Then, it will delete the asterisc from the beginning of the name. It is set to only save position keyframes, but you can delete the lines that do that. Anyway, it is not working and I don't understand why 😞 Rui Batista

        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 10/04/2009 at 17:17, xxxxxxxx wrote:

          Hm. I guess you need to put in a AnimateDocument() or AnimateObject().
          Putting the code into the ScriptManager and it runs fine.
          So I guess the ScriptManager does a internal one frame animation
          of some sort.

          Cheers
          Lennart

          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 10/04/2009 at 17:24, xxxxxxxx wrote:

            Well, I tried putting a AnimateDocument() and an AnimateObject() and it still didn't work 😞 Any more sugestions? Rui Batista

            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 11/04/2009 at 11:52, xxxxxxxx wrote:

              I'm not sure if there's a COFFEE equiv, but after the AnimateDocument(), see if you can:
              DrawViews(DA_FORCEFULLREDRAW, NULL);

              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 11/04/2009 at 12:00, xxxxxxxx wrote:

                ...my C++ code that does general scene animation basically uses this sequence (inside a loop) :
                //----------------------------------------------------------------
                // animate the document to the next frame
                //----------------------------------------------------------------
                StopAllThreads();
                BaseTime stime = BaseTime::BaseTime(frame, fps);
                pDoc->SetTime(stime);
                pDoc->AnimateDocument(NULL, TRUE, TRUE);
                EventAdd();
                #ifdef _R10p1_SDK_
                DrawViews(DA_FORCEFULLREDRAW, NULL);
                #else
                DrawViews(DA_FORCEFULLREDRAW);
                #endif
                // process this frame/scene here

                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 11/04/2009 at 12:00, xxxxxxxx wrote:

                  Still no cigar 😞 This is what I have now:
                  > doc->AnimateDocument(ANIMATE_QUICK); EventAdd(EVENT_ANIMATE|EVENT_FORCEREDRAW); CallCommand(12410); // record a keyframe EventAdd(TIMELINE_CHANGED);
                  And it stll doesn't work 😞 This is probably a bug. Rui Batista

                  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 11/04/2009 at 12:17, xxxxxxxx wrote:

                    Sorry, I may not be much help (I haven't done any COFFEE), but if you're calling the equivelent of RecordKey(), you might end up needing to change your process somewhat and get the CCurves and call AddKey() on the curves directly.  This thread has more details, but may or may not apply to you.

                    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 12/04/2009 at 03:44, xxxxxxxx wrote:

                      The problem here is that COFFEE doesn't allow the creation of keyframes. So, there is no RecordKey() or AddKey() in COFFEE. That is why I must use the direct call to CallCommand(12410); It is working fine if I do it inside a script made in the Script Manager. But not if I use it inside a COFFEE tag. Limitation? Bug? Ignorance? 😉

                      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 13/04/2009 at 07:06, xxxxxxxx wrote:

                        Howdy,

                        I'm not sure, but I think the key recording commands don't work from tags anymore in R11. :o(

                        If you look at this thread:
                        Autokey function
                        ... I had been using the AutoKey() function in c++ from a tag in R9 and R10, but there was a change in R11 and that function didn't work anymore from the tag. I ended up writing my own auto key function so the keys could be set from the tag.

                        I find it odd that CTrack, CCurve and CKey classes were added to R11 COFFEE, but the AddKey() and InsertKey() functions were not included in the CCurve class.

                        Adios,
                        Cactus Dan

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