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
    • Recent
    • Tags
    • Users
    • Login

    BaseDraw.DrawPoints() not working?

    Scheduled Pinned Locked Moved PYTHON Development
    11 Posts 0 Posters 891 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 22/02/2013 at 17:20, xxxxxxxx wrote:

      yeah, it is (still) broken in python. i am using 3D handles as a replacement.

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

        On 22/02/2013 at 17:55, xxxxxxxx wrote:

        ugh.  Well thanks for the heads up so I'm not chasing my tail. I guess I'll put in a report.

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

          On 23/02/2013 at 08:10, xxxxxxxx wrote:

          What's broken in DrawPoints?
          I have some python plugins I wrote with my own custom spline class that lets me draw custom 2D splines (multiple lines with points) in the editor view like a HUD.  And it uses bd.DrawPoints().

          I'm not sure I understand what you're goal is Chris.
          But a "line with many points" sounds a lot like a spline to me.
          If that's what you're looking for. I can send you an example to look at.

          -ScottA

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

            On 23/02/2013 at 20:51, xxxxxxxx wrote:

            A line with many points meaning, not interpolated with a few points using a built in Spline.  Meaning a series of linear lines to a LOT of individual points that make up samples of where a camera is at every single frame.  However, I have it all working now.  I took little devil's advice and use draw handles for my points and I went back and tried DrawLine() and put it in a for loop reading of a list of vectors and I have both types now (point per frame path and solid line path)

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

              On 23/02/2013 at 21:03, xxxxxxxx wrote:

              Scott, I would be curious to see hoe you are calling DrawPoints though.  I give it a list as it asked and I get invalid object length error.  So I gave up.  But the Handles are working beautifully.

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

                On 23/02/2013 at 22:16, xxxxxxxx wrote:

                Send me PM with your e-mail address Chris.

                -Scott

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

                  On 24/02/2013 at 11:50, xxxxxxxx wrote:

                  Thanks for the email with your class, Scott.  I have to reply here as my outgoing mail server is down this weekend.  I see your DrawPoints() is working.  I wonder if it's because you implemented all of the arguments it asks for.  In the SDK it has anything passed beyond vp in brackets as if it's optional, but I wonder if that's not the case.

                  I'm happy with where I landed with handles and Draw Line:

                  Here is what the two look like.  Each of them is built by the sampled position where the camera will be throughout it's journey.  The DrawHandle is used for dots (DRAWHANDLE_MINI) and the solid line is connecting them in a for loop with DrawLine()

                  DrawHandle:

                  Sold Line with DrawLine()

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

                    On 24/02/2013 at 12:28, xxxxxxxx wrote:

                    If I understand what you're saying.
                    My code proves that their is nothing wrong with the DrawPoints() function. Right?

                    I just want to be sure I'm not missing something.

                    -ScottA

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

                      On 24/02/2013 at 12:45, xxxxxxxx wrote:

                      It seems there's nothing wrong IF you implement ALL the parameters.  But I only implemented the vp parameter as that's all that was said to be required in the SDK.  The others were in brackets being optional.  I did not implement those as I just wanted to get the points working, which they did not.

                      I haven't run your class yet (just looked at the code) so I didn't test on my machine, but I assume it works on yours?

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

                        On 24/02/2013 at 14:18, xxxxxxxx wrote:

                        Yeah.
                        The plugin I sent you works.

                        It draws 2D spline objects just fine and dandy.
                        But I also wanted to try and build in the option of being able to move the points of the splines around with the mouse after they are created.
                        I got hung up on that part. And haven't had time to go back and take another crack at it.

                        -ScottA

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