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

    Button options [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 571 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 04/01/2015 at 20:57, xxxxxxxx wrote:

      Hi,

      Whenever we hover the mouse over a button it gets highlighted. Is there any option to turn it off.

      Thanks.
      Nishant

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

        On 05/01/2015 at 05:16, xxxxxxxx wrote:

        Hi,

        for standard buttons, I don't think this is possible. But you could use a bitmap button instead. Of course this implies doing the button graphics yourself.

        EDIT: Sorry, my first attempt was no good.

        Of course the standard buttons don't have any highlighting at all. So I guess your question is actually referring to BitmapButtons. I hope to return with a solution tomorrow.

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

          On 06/01/2015 at 02:49, xxxxxxxx wrote:

          Nishant,

          the BitmapButton has no option to deactivate the highlighting on mouse over.
          You can fake it by setting the background color of the BitmapButton, but this is impossible via resource file.

          You'll need to modify your bitmap button dynamically in GetDDescription().
          Unfortunately GetDDescription() is not available via Python... 😢

          In C++ it would look like so:

          Bool MyPlugin::GetDDescription(GeListNode* node, Description* description, DESCFLAGS_DESC& flags)
          {
            const DescID*   singleid;
            DescID          cid;
            BaseContainer*  bcDesc;
            
            if (!description->LoadDescription(node->GetType())) return FALSE;
            singleid = description->GetSingleDescID();
            cid = DescLevel(YOUR_BITMAP_BUTTON_ID, CUSTOMDATATYPE_BITMAPBUTTON, 0);
            if ((!singleid) || (cid.IsPartOf(*singleid, NULL)))
            {
              bcDesc = description->GetParameterI(cid, NULL);
              bcDesc->SetLong(BITMAPBUTTON_BACKCOLOR, COLOR_BGFOCUS); // you may choose other colors here
            }
            flags |= DESCFLAGS_DESC_LOADED;
            return TRUE;
          }
          
          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 06/01/2015 at 21:34, xxxxxxxx wrote:

            Thanks

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

              On 14/03/2017 at 05:37, xxxxxxxx wrote:

              Since Cinema 4D version 18.011 GetDDescription() is available in Python as well.

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