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

    Making Buttons in the viewport

    Scheduled Pinned Locked Moved PYTHON Development
    1 Posts 0 Posters 173 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 09/03/2012 at 22:44, xxxxxxxx wrote:

      Hi,

      Making a plugin based on ObjectData.  I want to either create a 3 button widget in the viewport with BaseDraw commands OR be able through code to make a HUD entry of a DropDown Menu.

      I've created 3 squares in the viewport with BaseDraw and a handful of DrawLine2D commands.  I even have read the mouse x and y from the EditorWindow and I know when the mouse is inside those squares. I have IF statements changing values of description parameters like it should.  HOWEVER, because the user is clicking on the viewport, it keeps unselecting the object.  So it kind of defeats the purpose of having them be convenient buttons.  I then tried forcing it to re-select the object through code which it does for one frame then unselects again.  Point is, this whole solution seems hacky.

      If I could through code just create a HUD element on INIT, that would be great as well.

      The end result is I want an automatic way upon instantiation of the plug-in to have some kind of widget in the viewport to allow the user to switch the 3 modes the plug-in works in.

      Any suggestions?

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