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

    BaseDraw::PolygonObject how?

    SDK Help
    0
    3
    278
    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/02/2004 at 07:52, xxxxxxxx wrote:

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

      ---------
      How do I use the BaseDraw::Polygon object to draw a polygonobject in the draw method of an ObjectData plugin?
      This is what I have, but nothing is drawn in the viewport

          
          
          
          
          Bool Plugin::Draw(PluginObject *op, LONG drawpass, BaseDraw *bd, BaseDrawHelp *bh)  
          {  
           BaseObject *bo=NULL;  
           bo = BaseObject::Alloc(Osphere);  
           if(!bo) { GePrint("No BaseObject"); return FALSE; }
          
          
          
          
           PolygonObject *po = ToPoly(bo);  
           if(!po) { GePrint("No PO"); return FALSE; }
          
          
          
          
           po->SetPos(Vector(0));  
           bd->PolygonObject(bh,po,DRAWPOLYOBJECT_LOCALMATRIX);
          
          
          
          
           // I commented this out because I thought it was deleting it    
           //BaseObject::Free(bo);
          
          
          
          
            
           return ObjectData::Draw(op,drawpass,bd,bh);  
          }
          
          
          
      
      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 28/02/2004 at 08:18, xxxxxxxx wrote:

        A cast won´t turn a sphere into a polygonobject. You will need to really convert it.

        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 28/02/2004 at 14:53, xxxxxxxx wrote:

          Ahh, thanks designer.
          I thought ToPoly was converting, I done it now.
          Ta

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