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

    BitmapButtons problems

    Scheduled Pinned Locked Moved SDK Help
    6 Posts 0 Posters 538 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 13/11/2012 at 20:25, xxxxxxxx wrote:

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

      ---------
      Hey guys.
      After discovering that Maxon changed the bitmap button definitions starting with R13. I'm having trouble getting the BITMAPBUTTON_OUTBORDER flags to work.
      None of them are changing the way the button looks like they're supposed to.

      I've tried this in both C++ and Python and get the same results.
      I can make either an animated button that always has a flat (borderless)  profile.
      Or
      I can make a raised button profile. But the button does not animate.

      What I want is a raised button profile that also animates when clicked.
      The BITMAPBUTTON_OUTBORDER flag BORDER_OUT is supposed to do that. But it isn't working for me.
      In fact. None of the border flags are working for me.

        
      //This code creates a Bitmap button with a raised profile  
      //But it does not animate when clicked  
        
        bc = c4d.BaseContainer()  
        self.GroupBegin(0, c4d.BFH_SCALEFIT|c4d.BFH_SCALEFIT, 0, 0, "Push Button",0)   
        self.GroupBorder(c4d.BORDER_BLACK)          
        bc.SetLong(c4d.BITMAPBUTTON_BORDER, c4d.BORDER_OUT)          #Sets the border of the button to be raised like a typical button  
        bc.SetBool(c4d.BITMAPBUTTON_BUTTON, True)                    #<----Button does not animate when clicked  
        self.MY_BITMAP_BUTTON2 = self.AddCustomGui(MY_BITMAP_BUTTON2, c4d.CUSTOMGUI_BITMAPBUTTON, "Bitmap Button", c4d.BFH_SCALEFIT|c4d.BFH_SCALEFIT, 130, 30, bc)  
        
        
      //This code is supposed to create a Bitmap button with a raised profile..But the profile is always flat  
      //But it does animate when clicked  
        
        bc = c4d.BaseContainer()  
        self.GroupBegin(0, c4d.BFH_SCALEFIT|c4d.BFH_SCALEFIT, 0, 0, "Push Button",0)   
        self.GroupBorder(c4d.BORDER_BLACK)          
        bc.SetLong(c4d.BITMAPBUTTON_OUTBORDER, c4d.BORDER_OUT)       #<----Does not work?  
        bc.SetBool(c4d.BITMAPBUTTON_BUTTON, True)                    #Makes the button animate(sink) when clicked  
        self.MY_BITMAP_BUTTON2 = self.AddCustomGui(MY_BITMAP_BUTTON2, c4d.CUSTOMGUI_BITMAPBUTTON, "Bitmap Button", c4d.BFH_SCALEFIT|c4d.BFH_SCALEFIT, 130, 30, bc)
      

      Everything was working fine for me in R12. And I could create a raised button that animates when clicked
      But the new changes are giving me problems.
      What Am I doing wrong?

      -ScottA

      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 14/11/2012 at 01:10, xxxxxxxx wrote:

        I haven't tried this but reading the R14 SDK seems to imply that if you set BITMAPBUTTON_OUTBORDER, as you do in your second example, you should set BITMAPBUTTON_BORDER as well (the SDK says this is used for the pressed button state when BITMAPBUTTON_OUTBORDER is set).

        Might be worth a try.

        Steve

        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 14/11/2012 at 08:01, xxxxxxxx wrote:

          Hi Steve,

          I tried that but it doesn't work for me.

              bc.SetBool(c4d.BITMAPBUTTON_BUTTON, True)               //Makes a button animate  when clicked  
            bc.SetLong(c4d.BITMAPBUTTON_BORDER, c4d.BORDER_OUT)     //Makes a raised button profile..but animation is broken!!  
            bc.SetLong(c4d.BITMAPBUTTON_OUTBORDER, c4d.BORDER_OUT)  //<--This does nothing and None of the flags work!!?
          

          I've tried every permutation of this I can think of.
          And in every case. BITMAPBUTTON_OUTBORDER and the flags associated with it doesn't work.
          I'm stumped.!Confused[URL-REMOVED]

          -ScottA


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

          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 20/11/2012 at 08:51, xxxxxxxx wrote:

            *Bump.

            I hate to bump things. But using animated bitmap buttons with a raised profile is something I used a lot in R12. So I really need an answer to this for R13&14.
            All the other border options work fine for me EXCEPT the BITMAPBUTTON_OUTBORDER option.
            Could someone please post how to use the BITMAPBUTTON_OUTBORDER option?

            BITMAPBUTTON_BORDER;  
            BITMAPBUTTON_BUTTON;  
            BITMAPBUTTON_TOGGLE;  
            BITMAPBUTTON_DRAWPOPUPBUTTON;  
            BITMAPBUTTON_TOOLTIP;  
            BITMAPBUTTON_ICONID1;  
            BITMAPBUTTON_ICONID2;  
            BITMAPBUTTON_SPECIAL;  
            BITMAPBUTTON_NOBORDERDRAW;  
            BITMAPBUTTON_OUTBORDER; <--------------This is the only one that doesn't work as expected for me!  
            BITMAPBUTTON_BACKCOLOR;
            

            -ScottA

            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 21/11/2012 at 20:09, xxxxxxxx wrote:

              Hi Scott,
               
              I'm currently playing around with bitmap things and the bitmap button was one of them. I tried the OUTBORDER flag but haven't noticed any change to the border either.
               
              WP.

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

                On 25/09/2014 at 06:44, xxxxxxxx wrote:

                Ever figure out a fix for using OUTBORDER?

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