Maxon Developers
    • Downloads
      • All Downloads
      • Cinema 4D Python SDK
      • Cinema 4D C++ SDK
      • Cineware SDK
      • ZBrush GoZ SDK
      • Cinema 4D Python Examples
      • Cinema 4D C++ Examples
      • Project Tool
      • SDK Database
    • Documentation
      • Cinema 4D Python SDK
      • Cinema 4D C++ SDK
      • Cineware SDK
      • ZBrush GoZ SDK
    • Forum
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Forums
      • Overview
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • News & Information
      • Downloads
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Register
    • Login

    Script with Bone Tail doesn't rung

    SDK Help
    0
    3
    174
    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 11/01/2006 at 05:18, xxxxxxxx wrote:

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

      ---------
      Dear Friends of Cinema 4D, I have found a coffee script of an bone tail, but it doesn't work. I have copied it from a cinema bood by sven hauth, I have got an error message in line 9 and 2. I have started since 4 days to understand the coffee language, I am a beginner with coffee scripts 🙂 bye, and perhaps somebody can help me, best regards to all cinema users, Frankolino 🙂
       
      Mistake and Fault in Line with "var opcnt..."
      // Script for BoneDirection "TailSpline" begins
      currentobjName = Get("Bone");
      Var opcnt=>15;
      Main(dock,op){
      Var op1=op;
      Var jsobj=doc->GetJS("TailSpline");
      sop->InitLength(1);
      var mat,smat=sop->GetMg(),pos,pos1,I=0.0,bc,rot;
      while (op1){
      I++;
      Pos=smat->GetMulP(sop->GetSplinePoint(sop->
       UniformTonatural((I-1)/opcnt),1));
      pos1=smat->GetMulP(sop->GetSplinePoint(sop->
       UniformTonatural((i)/opcnt),1));
      mat=op1->GetUpMg();
      mat->Invert();
      pos=mat->GetMulP(pos);
      pos1=mat->GetMulP(pos1);
      rot=VectorToHPB(pos1-pos) ;
      op1->SetRotation(rot);
      op1=op1->GetDown();
      }
      // Script for BoneDirection "TailSpline" ends
      <file://===================>
      }

      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 11/01/2006 at 06:24, xxxxxxxx wrote:

        For line 2: var opcnt = 15; (removed the '>'). Is that in the code or is it a typo?
        For line 9: I++ is illegal for real (floating point) values (only integral values). If you want to increment a real value, do this instead: I = I+1.0; If COFFEE supports it (not sure), you could do it shorthand: I += 1.0;

        HTH!

        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 11/01/2006 at 06:52, xxxxxxxx wrote:

          Hi Robert, very good! - I will try it. Many thanks! 🙂 Frankolino

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