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

    c4d.gui.GradientCustomGui missing controls

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 823 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 15/04/2018 at 14:52, xxxxxxxx wrote:

      I've added the 'c4d.gui.GradientCustomGui' to a dialog, but it only displays the gradient portion, not all the controls ('Interpolation', 'Pos', and 'Intensity') pictured here in the SDK:

      Why not?

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

        On 16/04/2018 at 03:24, xxxxxxxx wrote:

        Hi terrachild,

        Actually, you have to unfold the menu of the GradientCustomGUI.

            def CreateLayout(self) :
                bc = c4d.BaseContainer()
                bc.SetInt32(c4d.CUSTOMGUI_LAYOUTMODE,c4d.LAYOUTMODE_MAXIMIZED)
                self.myGradGizmo = self.AddCustomGui(10001, c4d.CUSTOMGUI_GRADIENT, "", c4d.BFH_SCALEFIT|c4d.BFV_CENTER, 0, 0, bc)     
          
                return True    
        

        Hope it makes sense.

        Cheers,
        Maxime

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

          On 16/04/2018 at 11:24, xxxxxxxx wrote:

          Maxime,

          Thanks a lot.  I couldn't find that info.

          To get it to look like the pic, you also have to add this:

          bc.SetInt32(c4d.GRADIENTPROPERTY_NOEDITCOLOR, True)
          

          Although, to be completely accurate, adding this also includes the 'Load Preset' and 'Save Preset' buttons.

          I think someone should add this example to the docs here:
          https://developers.maxon.net/docs/py/2023_2/modules/c4d.gui/BaseCustomGui/GradientCustomGui/index.html

          Cheers,

          Chris

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

            On 17/04/2018 at 05:51, xxxxxxxx wrote:

            Yes, you are definitely right, it will be added to the documentation.

            Thanks for the suggestion.

            Cheers,
            Maxime

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