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

    Allocate CTrackData

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 274 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 02/03/2007 at 02:30, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R 10 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi,

      I have a question about CTrackData and how to allocate instances of it. I know there is the

        
      AutoAlloc<PluginTrack> track(pluginid);  
      track->InsertSequence(seq);  
      

      for the old animation plugins. But I can't find the corresponding CTrackPlugin class. There is a CTRACKPLUGIN struct but it hasn't got access to the CTrack-methods I want.

      Basically what I want is to allocate my own plugin tracks and then add some keys to them. In order to do that I must first be able to allocate a track, insert the track into my object allocate keys and insert them into the track.

      I'd like a way to do this with my own tracks:

        
      CTrack *track = CTrack::Alloc(node,id);  
      node->InsertTrackSorted(tmp);  
      CKey *key = track->GetCurve()->AddKey(someTime);  
      key->SetValue(track->GetCurve(),someValue);  
      

      Has anyone got some tips in this matter?

      Thanks
      /Jonas

      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 06/03/2007 at 05:28, xxxxxxxx wrote:

        Here a little example how to allocate the Blinker track from the SDK examples.

          
        BaseObject *op = doc->GetActiveObject();  
        if(!op) return TRUE;  
          
        CTrack *mytrack = CTrack::Alloc(op, DescLevel(1001152,1001152,0));  
        if(!mytrack) return FALSE;  
          
        op->InsertTrackSorted(mytrack);  
          
        return TRUE;  
        

        You have to pass the plugin ID within the DescLevel function.

        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 06/03/2007 at 23:56, xxxxxxxx wrote:

          Thanks alot for this Matthias.

          /Jonas

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