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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    How to get Tags (BaseTags) using COFFEE

    Scheduled Pinned Locked Moved SDK Help
    9 Posts 0 Posters 794 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 27/11/2004 at 20:36, xxxxxxxx wrote:

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

      ---------
      Hey all,

      I'm in the process of developing a .obj-based format that'll support my needs (bones/animation, etc) in a video game engine I've been working on.

      How I would like to configure things would be by using markers to signify the start of a new animation (with a marker marked "end" to finish the last animation). So that brings me to my question, I'm using the COFFEE interface and I can't seem to figure out how to get to all the BaseKeys in the document (so I can check for MarkerKey and query the number of markers and the name of each). How do I get this information?

      Thanks in advance!
      Derek

      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 28/11/2004 at 10:54, xxxxxxxx wrote:

        Hi,

        you need to go through all objects in the document and get their keys. Example:

        var key = obj->GetFirstTrack()->GetFirstSequence()->GetFirstKey();

        you can then use GetNext() to get the next key.

        Katachi

        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 28/11/2004 at 15:15, xxxxxxxx wrote:

          Awesome, thanks Designer :).

          EDIT: Hrm, that seems to error out on me when I run it.

          Doing       
          var key = op->GetFirstTrack()->GetFirstSequence()->GetFirstKey();
          or
          var key = op->GetFirstTrack()->GetFirstSequence();

          Generate: "Incompatible values... NIL / OBJECT"

          (var test = op->GetFirstTrack() works fine though).

          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 28/11/2004 at 15:55, xxxxxxxx wrote:

            maybe because there is no sequence yet for op? Did you check?

            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 28/11/2004 at 16:38, xxxxxxxx wrote:

              What do you mean by checking? As in checking in the document (I surely can't expect everything with the document to contain animation...) or within the COFFEE plugin by doing something like:

              if(op->GetFirstTrack()->GetFirstSequence() == NULL) ...

              Because running the above code generates that same error.

              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 28/11/2004 at 21:00, xxxxxxxx wrote:

                And after we figure this out I'll have to find out how to get all the keyframes between the tags. So lets say there is one animation in a file, that means two markers, the first signifying the start of the animation (probably at frame zero in this case) and another marker at the last frame of animation marked "end". Between those two I need to record each keyframe that would change the locations/rotations of any bones it applies to. (I hope that made sense).

                Thanks again!

                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 30/11/2004 at 14:54, xxxxxxxx wrote:

                  Alright, fixed that silly error by doing something a little ugly:

                    
                          if(op->GetFirstTrack() != NULL)  
                          {  
                              if(op->GetFirstTrack()->GetFirstSequence() != NULL)  
                              {  
                                 if(op->GetFirstTrack()->GetFirstSequence()->GetFirstKey() != NULL)  
                                 {  
                                      key = op->GetFirstTrack()->GetFirstSequence()->GetFirstKey();  
                                 }  
                              }  
                          }  
                  

                  Now on to the markers and all the keyframed stuff I can find for bone objects between the markers. Finding the BaseKeys is pretty easy thus far, but I'm having no luck finding the markers (none of the BaseKeys I find from going through the objects are markers). Where would the markers be stored?

                  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 01/12/2004 at 02:19, xxxxxxxx wrote:

                    Markers are unfortunately not accessible. (Neither in C++ nor C.O.F.F.E.E.) You will have to use some other way for the user to specify the interval.

                    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 01/12/2004 at 09:51, xxxxxxxx wrote:

                      Wow, I guess just another thing I can't enjoy using. Any ideas how else I can do things?

                      After some thought the best I can come up with is doing an animation every one-hundred frames, obviously when I load in the data I discard the time after the last keyframe in the sequence. With that I'd have to go in by hand and name (in the file I export) the animations as that's fairly important to me.

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