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

    ViewportHUD

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 318 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 02/08/2010 at 02:22, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   11.5 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hi,

      does anybody know how to use the ViewportHUD class? I couldn't find any info at all.

      What i want to do is to draw a string in the viewport during the mouse loop of a tool plugin - exactly like the move/scale/rotate tools do it.

      I tried the following:

        
      // in MouseInput   
      viewportHud = ViewportHUD::Alloc()   
      viewportHud->BeginGroup();   
      ViewportHUDControl* ctrl = viewportHud->AddControl(HUDCONTROL_TYPE_STATIC, doc, bd, NULL, DescID(10000), BaseContainer(), GeData("Hallo!"), DA_STRING);       
      ctrl->SetTopLeft(500, 500);   
      viewportHud->EndGroup();   
      
        
      // in Draw   
      viewportHud->DrawHUD(doc, NULL, doc->GetFps(), bd, HUDCONTROL_DFLAGS_NAME | HUDCONTROL_DFLAGS_FRAME);   
      

      this code draws nothing, and DrawHUD returns False 😞

      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 02/08/2010 at 05:37, xxxxxxxx wrote:

        Hi Michael,

        I think it´s not working. At least I never got it working and if I remember correctly someone (guess it was Mikael back then) told me that it´s not possible to draw custom elements in the c4d HUD. Although I am not sure if that still applies but as it´s not working for you either it seems to be still valid.

        Instead use a GeClipMap and draw into it, then let it be drawn with DrawTexture instead. That works fine for me and I use it in my tree tool too, so that works for sure.

        HTH

        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 02/08/2010 at 05:56, xxxxxxxx wrote:

          Thanks for the info at least 😉

          I think i will use the workaround with the GeClipMap then.

          best regards,
          Michael

          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 04/08/2010 at 03:52, xxxxxxxx wrote:

            The classes and functions within lib_viewport.h are currently private and not meant for plugin development.

            cheers,
            Matthias

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