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

    GetActiveBaseDraw() problem + questions

    SDK Help
    0
    1
    143
    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/03/2004 at 15:56, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.206 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hi,
      Is it possible to draw into the editor window, have handles and to be able to click the handles to modify the active object while using a dialog type plugin?
      Currently I am using GetActiveBaseDraw(), but It is producing wierd effects. Im trying to draw a circle around the active object

          
          
          
          
          BaseObject *op = doc->GetActiveObject();
          
          
          
          
          Matrix mCircle;
          
          
          
          
           Matrix m = op->GetMg();  
           mCircle.off = op->GetPos();  
           mCircle.v1 = m.v1 * 100;  
           mCircle.v2 = m.v2 * 100;
          
          
          
          
           bd->Circle3D(mCircle);
          
          
          
      

      But the circle is drawing in a complete different place, and moves around incorrectly when im moving/rotating the viewport. The code worked fine when I created a ObjectData plugin which has got me confused.
      Using the GetActiveBaseDraw() I can draw my handles, but how can I detect when the mouse has clicked and moved one? Is it possible?
      I sort of need a mix between a ObjectData and a ToolData plugin but I need to be able to click objects in the editor and the editor to update with the contents of a BaseDraw function.
      I thought I could do what im after using a ToolData plugin but, when the plugin is active, Its not possible to select an object using the editor is it?
      And an ObjectData plugin is not ideal because that inserts an object into the scene.
      Thanks for reading

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