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

    Best way to display a bitmap in the viewport background

    General Talk
    4
    5
    777
    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.
    • R
      rui_mac
      last edited by

      I would like to create an Object plugin and I would like the code to be able to show a bitmap, with optional alpha (transparency) adjustment, in the background of the viewports (perspective and orthogonal views).
      What is the best way do do it?
      I don't need actual code. Just what methods to override and what must I make to be sure it displays below all viewport objects.
      Thank you very much in advance for any reply.

      Rui Batista

      1 Reply Last reply Reply Quote 0
      • kbarK
        kbar
        last edited by kbar

        You can draw into the viewport using a scene hook and render a quad containing a bitmap texture. These may help you get started.

        [URL-REMOVED]
        [URL-REMOVED]


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

        https://www.gamelogicdesign.com
        https://www.plugins4d.com

        R 1 Reply Last reply Reply Quote 0
        • R
          rui_mac @kbar
          last edited by

          @kbar, thank you for the reply.
          The problem with the Scene Hook is that it requires C++.
          I'm coding in python.

          1 Reply Last reply Reply Quote 0
          • M
            m_adam
            last edited by m_adam

            Hi sorry for the late reply, I overlooked your topic.

            You will need to override the Draw method of your ObjectData and then use BaseDraw.DrawTexture.

            Cheers,
            Maxime.

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

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

              Hello @rui_mac,

              without any further questions or replies, we will consider this thread as solved by Monday the 20th and flag it accordingly.

              Thank you for your understanding,
              Ferdinand

              MAXON SDK Specialist
              developers.maxon.net

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