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

    Q: How can i draw 2d lines in the TextureViewer?

    Scheduled Pinned Locked Moved PYTHON Development
    8 Posts 0 Posters 787 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 01/03/2014 at 13:38, xxxxxxxx wrote:

      Hi
      I have made a ToolData plugin that does some drawing in the active 3d editor window. Its working exactly as i want to. I hoped to be able to draw an underlay of supporting lines in the TextureViewer as well when the user switches to UV editing, but i can't figure out how to draw 2d lines in the TextureViewer like i can in the 3d editors. I can't even figure out how to detect when the mouse is over or clicked in the TextureViewer šŸ™‚

      Anybody know how the UV polygons are drawn in the TextureViewer? And if its possible to draw lines like that in the TextureViewer with Python?
      Any help appreciated?

      Cheers
      Bonsak

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

        On 03/03/2014 at 12:03, xxxxxxxx wrote:

        AFAIK. The TextureViewer is part of BodyPaint. I've used it in C++.
        So you'll probably have to create a BaseBitmap and draw your lines in it. Then add that image to the viewer.

        But the problem is Sebastien has deviated a lot from the C++ SDK. And I have no idea what the heck he's doing. Confused
        In C++ there are things that allow us to work with the TV:
        Ā  -PaintTexture::CreateNewTexture()
        Ā  -PaintTexture::SetSelected_Texture()
        Ā  -SendPainterCommand()

        None of these things exist in the python SDK. And none of the things that are in the docs work for me either.
        They do silly things like yell at me for not including the correct parameters. When the docs say the params. should be void (empty). 😵

        -ScottA


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

          On 03/03/2014 at 12:15, xxxxxxxx wrote:

          Thanks Scott šŸ™‚
          Do you think the UV polygons in the TV is actually drawn in a BaseBitmap or is that done an otherway?

          Cheers
          Bonsak

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

            On 03/03/2014 at 13:33, xxxxxxxx wrote:

            I think the TV is just a window that hosts images that can have layers in them created through the BP class. There's no BaseDraw() type of thing for the TV window itself like the Editor View.
            At least as far as I'm aware of. I could be wrong.

            The BB thing is just a wild guess based on my own experience with the TV in C++.
            Only the Maxon support guys would know how it's done for sure.

            -ScottA

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

              On 04/03/2014 at 01:14, xxxxxxxx wrote:

              Thanks. I'll look into the BB route and see what i can come up with.

              Cheers
              Bonsak

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

                On 04/03/2014 at 08:48, xxxxxxxx wrote:

                If you do figure out how to add your BB to the TV. Please let me/us know.
                I can't make any of the PaintBitmap, PaintTexture, or PaintLayers stuff work in Python.

                -ScottA

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

                  On 04/03/2014 at 09:05, xxxxxxxx wrote:

                  Will do.

                  -b

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

                    On 07/12/2015 at 02:08, xxxxxxxx wrote:

                    Hi,
                    Any news or information related to this subject?

                    I am currently collecting information for a plugin I am planning to write, but cannot find anything related to perform 2d drawing on the TextureView window. From the comments so far it seems to be possible via C++ but haven't found much examples related to such.
                    Any info would be welcome.

                    Thanks,
                    Daniel

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