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

    generate PLA Keys ?

    SDK Help
    0
    5
    917
    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
      Helper
      last edited by

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

      On 28/12/2002 at 05:04, xxxxxxxx wrote:

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

      ---------
      Hi,
      got another little problem: I move some points of an obj, then i want to set a PLAKey for it. well, the timeline shows me the new key, but nothing seems to be stored in it. I tried to store the data in a PointTag , but that didn´t work either. Even explicite selecting of the moved points did´nt help .I do not understand the PLA Keys totaly. Can anybody help me ?

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

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

        On 30/12/2002 at 01:36, xxxxxxxx wrote:

        Unfortunately it's not possible to create your own PLA keys in C.O.F.E.E. (both R7 and R8). The reason is that you cannot change the element count in VariableTags and it's thus only possible to create empty PointTags.

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

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

          On 30/12/2002 at 04:52, xxxxxxxx wrote:

          Are you sure that this is not possible?

          I found this in my old COFFEE sources. (And as far as I remember I made PLA keys with Coffee.)

            
                         var vc=new(VariableChanged);  
                         vc->Init(old_pointcount,new_pointcount);  
                         obj->MultiMessage(MSG_POINTS_CHANGED,vc);  
          
          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

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

            On 30/12/2002 at 07:57, xxxxxxxx wrote:

            Well, that's a VariableChanged object not a VariableTag. But your approach to use a dummy message is clever. I'm not sure if this is what you suggested, but it led me to the following workaround:

                
                
                  
                // Expression to insert a PLA key onto the first track's first   
                // sequence (given that they are of the right types) of a cube.  
                  
                main(doc,op)  
                {  
                  var pt = new(PointTag);
                
                
                
                
                  var vc = new(VariableChanged);  
                  vc->Init(0, 8);  
                  pt->Message(MSG_POINTS_CHANGED,vc);
                
                
                
                
                  var ps = op->GetPoints();  
                  ps[0] = vector(200);  
                  pt->SetData(ps);
                
                
                
                
                  var pla = new(PLAKey);  
                  pla->SetPointTag(pt);
                
                
                
                
                  op->GetFirstTrack()->GetFirstSequence()->InsertKey(pla);  
                }
            

            And this code actually seems to work fine in R8!

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

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

              On 02/01/2003 at 09:49, xxxxxxxx wrote:

              Hi,
              I used the code above an it worked on the first try !!
              Thanks for the help, i can finish my Plugin now .
              Greetings, Nico

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