Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Drawing Multiple Lines from TagPlugin

    Cinema 4D SDK
    s22 python sdk
    2
    3
    319
    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.
    • ?
      A Former User
      last edited by A Former User

      Hello!
      I have a follow-up question regarding drawing from a Tag. why is this code only drawing one line? I am calling DrawLine2D four times in this example.

          def Draw(self, tag, op, bd, bh):
              bd.SetPen(c4d.Vector(1, 0.7, 0))
              bd.SetMatrix_Screen()   
      
              p1 = c4d.Vector(0,0,0)
              p2 = c4d.Vector(100,100,100)
              p3 = c4d.Vector(500,500,500)
              p4 = c4d.Vector(300,300,300)
      
              bd.DrawLine2D(p1, p2)   
              bd.DrawLine2D(p2, p3)   
              bd.DrawLine2D(p3, p4)   
              bd.DrawLine2D(p4, p1)   
      
              return c4d.DRAWRESULT_OK
      

      Draw_Multiple_Lines.png

      1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand
        last edited by

        Hi,

        you are drawing four line segments. Just because you place them all somewhere on the line segment between <0, 0, 0> and <500, 500, 500>, they are indistinguishable for us. Either change your pen color or draw a more exiting geometry 😉

        Cheers,
        zipit

        MAXON SDK Specialist
        developers.maxon.net

        ? 1 Reply Last reply Reply Quote 0
        • ?
          A Former User @ferdinand
          last edited by

          @zipit Hahahahaha! Thank you! I see my lines now. Who hoo! 😆

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