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

    Q: DrawPolygon

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 322 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

      On 03/02/2013 at 05:47, xxxxxxxx wrote:

      Hi
      Im trying to draw a simple rectangle to screen space as a visual aid for the user. But when i do this, i cant draw the fourth corner. What am i doing wrong? Colors are just for debugging:

        
      def main() :   
          bd = doc.GetActiveBaseDraw()   
          bd.SetMatrix_Screen()   
          p = ( c4d.Vector(200,200,0), c4d.Vector(200,400,0), c4d.Vector(400,400,0), c4d.Vector(400,200, 0) )   
          f = ( c4d.Vector(1,0,0), c4d.Vector(0,1,0), c4d.Vector(0,0,1), c4d.Vector(0,0,0) )   
          bd.DrawPolygon(p, f)   
      

      Cheers
      Bonsak

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 03/02/2013 at 06:46, xxxxxxxx wrote:

        You can not draw from the Script Manager or a Python Tag/Generator/Node. You need to create a
        plugin and overwrite the Draw() method.

        -N

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 03/02/2013 at 07:20, xxxxxxxx wrote:

          Ah! Of course 🙂
          Thanks.

          Cheers
          Bonsak

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