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

    Using Duplicate Tool in COFFEE

    Scheduled Pinned Locked Moved SDK Help
    1 Posts 0 Posters 136 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 25/04/2006 at 03:30, xxxxxxxx wrote:

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

      ---------
      Hello everyone,
      I am trying to use the Duplicate_Tool command in COFFEE to duplicate a target Cube object and make 8 copies.  Together with this process, I want to arrange the Cube copies in Circle mode.  I tried to check in toolduplicate.h to check if I am allowed to do that but I am redirected to _toolarrange.h.   _I tried using the following code which is activated by a button on my plugin dialog.  The Duplicate_Tool works fine giving me 8 copies of the Cube object, but I cannot seem to get the Circle mode working.  I tried using SendModelingCommand(ID_MODELING_ARRANGE_TOOL,...) as well but it does not work.  Here's the code:
      oObject::fNewObject(vDoc)
      {
         var obj = vDoc->FindObject("Cube");
         var bc = new(BaseContainer);
         bc->SetData(MDATA_DUPLICATE_COPIES, 8);
         bc->SetData(MDATA_ARRANGE_MODE_CIRCLE, true);
         bc->SetData(MDATA_ARRANGE_CIRCLE_START, 0 );
         bc->SetData(MDATA_ARRANGE_CIRCLE_END, 360 );
         bc->SetData(MDATA_ARRANGE_CIRCLE_RADIUS,500 );
         bc->SetData(MDATA_ARRANGE_CIRCLE_USE_MOVE, true );
         bc->SetData(MDATA_ARRANGE_CIRCLE_USE_MOVE_X, true);
         bc->SetData(MDATA_ARRANGE_CIRCLE_USE_MOVE_Y, true);
         bc->SetData(MDATA_ARRANGE_CIRCLE_USE_MOVE_Y, true);
         bc->SetData(MDATA_ARRANGE_CIRCLE_ALIGNTANGENTIAL, true );
         bc->SetData(MDATA_ARRANGE_CIRCLE_USE_ROTATION, true );
         bc->SetData(MDATA_ARRANGE_CIRCLE_MOVE,vector(0,0,0));
         bc->SetData(MDATA_ARRANGE_CIRCLE_ROTATION, vector(0,0,0));
         var result = SendModelingCommand(ID_MODELING_DUPLICATE_TOOL,vDoc,obj,bc,MODIFY_ALL);
         EventAdd();
         vDoc->Message(MSG_UPDATE);
         vDoc->Message(DOCUMENT_CHANGED);
         return TRUE;
      }

      I would appreciate if someone could help me.  Look forward to learn from everyone.
      Thank you very much.
      best regards,
      wengkit

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