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

    USing BaseDraw to draw in editor

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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 16/07/2012 at 17:32, xxxxxxxx wrote:

      Can I draw lines in the editor using BaseDraw through a python tag?

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 17/07/2012 at 01:08, xxxxxxxx wrote:

        Yes, you can draw into the editor view overriding TagData.Draw(self, tag, op, bd, bh) : bd is the BaseDraw.

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 17/07/2012 at 01:13, xxxxxxxx wrote:

          Thank you for the reply, Yannick.
          So, I assume that it is only possible for a .pype file, not for a python script tag.

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 17/07/2012 at 01:16, xxxxxxxx wrote:

            Yes, that's fine if you're writing a TagData in python, and was my first reaction. Then I wondered if rui actually meant drawing in the editor using a python tag in the OM (i.e. right-click object, scripting tags, python).

            From the look of it you should be able to. If you get the active document, then call ActiveBaseDraw on that, you should be able to draw in the designated render view in the editor. But I haven't tried it.

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 17/07/2012 at 01:28, xxxxxxxx wrote:

              I am trying to do so, but the lines always appear traced (dashed) and I can't seem to find a way to make them solid.
              Also, I'm having a hard time drawing them in world coordinates.

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

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 17/07/2012 at 02:02, xxxxxxxx wrote:

                Not sure about the dashed lines, but BaseView (from which BaseDraw is derived) has a screen to world coordinates function.

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

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 17/07/2012 at 04:34, xxxxxxxx wrote:

                  I will check it out 🙂
                  Thank you.

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

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 17/07/2012 at 09:22, xxxxxxxx wrote:

                    Originally posted by xxxxxxxx

                    From the look of it you should be able to. If you get the active document, then call ActiveBaseDraw on that, you should be able to draw in the designated render view in the editor. But I haven't tried it.

                    You can't, the results are not the same. That might be the reason where the dashed lines come from
                     Not quite sure who told me, but someone from the support did tell me that drawing is only allowed
                    from the Draw() method. I also remember crashing C4D when I used to draw something within
                    GetVirtualObjects().

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

                      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                      On 17/07/2012 at 10:39, xxxxxxxx wrote:

                      Oh, ok... I will try to create a Tag plugin.
                      Thank you.

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