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

    SceneHookData::Draw not clearing

    SDK Help
    0
    2
    194
    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 16/03/2004 at 15:30, xxxxxxxx wrote:

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

      ---------
      Hi,
      Im trying to draw a line in the editor with a SceneHookData plugin.
      The problem I'm having is that the an 'echo' of my drawing is left behind in the editor until it is rotated, moved or scaled.

        
      Bool SceneHookTest::Draw(PluginSceneHook *node, BaseDocument *doc, BaseDraw *bd, BaseDrawHelp *bh, BaseThread *bt, LONG flags)  
      {  
        
           GePrint(LongToString(GeGetTimer()) + ": SceneHookTest::Draw()");  
             
           BaseObject *op = doc->GetActiveObject();  
           if(!op) return SceneHookData::Draw(node,doc,bd,bh,bt,flags);  
        
           bd->SetPen(Vector(1,1,0));  
           bd->Line3D(Vector(0), op->GetPos()*bh->GetMg());  
        
           return SceneHookData::Draw(node,doc,bd,bh,bt,flags);  
      }  
      

      This draws a line like it should, if I move an object around with the move tool, a line3d updates like it should, but if I rotate the viewport and then drag the object, two line3d's appear.
      One of them is in the old location, and one of them is in the correct location.

      Have a look at the image below for an animated example, you can see at the end of the animation, there are now two lines. If I rotate the viewport, the old line will be erased, but the problem starts over again with new locations.

      What am I doing wrong?

      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 20/03/2004 at 02:34, xxxxxxxx wrote:

        Hi Ian,
        just a guess, but could it be an OpenGL issue? It seems that the old line is not deleted because of a "smart refresh" of the editor...

        Cheers,
        Arndt

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