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

    UserData group without title bar [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 476 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 02/06/2016 at 08:32, xxxxxxxx wrote:

      Hi everyone.

      I have a project with a fair amount of dynamic user data and I'd really like to use groups without a title bar so my user data doesn't get all jumbled up when replacing sliders etc.

      I'm using c4d.DESC_TITLEBAR to attempt to set the container to not have a title bar. 
      The value in the base container for the group remains False when I get the UserDataContainer again to check it and even if I go into the GUI user data settings, the boolean for title bar is indeed unchecked.

      If I toggle the check box to True and back to False for title bar in the GUI user data settings, the title bar does then disappear. Unfortunately this won't be helping me in the long run.

      http://static1.squarespace.com/static/5500a2cfe4b0373af0c82e15/t/57504f27555986efb900116c/1464880954617/PIP_PluginCafe_01

      http://static1.squarespace.com/static/5500a2cfe4b0373af0c82e15/t/57504f43555986efb9001263/1464880973940/PIP_PluginCafe_02

        
          root = c4d.GetCustomDatatypeDefault(c4d.DTYPE_GROUP)
          root[c4d.DESC_NAME]        = "Root group"
          root[c4d.DESC_PARENTGROUP] = c4d.DescID(0)
        
          obj.SetUserDataContainer([c4d.ID_USERDATA, 1], root)
          
          u_id    = 1
          desc_UD = c4d.DescLevel(c4d.ID_USERDATA)
          desc_ID = c4d.DescLevel(u_id, c4d.DTYPE_GROUP, 0)
          desc_id = c4d.DescID(desc_UD, desc_ID)
        
          bc = c4d.GetCustomDatatypeDefault(c4d.DTYPE_GROUP)
          bc[c4d.DESC_NAME]        = "Group 1"
          bc[c4d.DESC_TITLEBAR]    = False
          bc[c4d.DESC_PARENTGROUP] = desc_id
        
          obj.SetUserDataContainer([c4d.ID_USERDATA, 2], bc)
      

      Do I need to update something somewhere before it'll work? Is there something I'm missing? I'm always reluctant to assume things are bugs. 🙂

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

        On 02/06/2016 at 12:19, xxxxxxxx wrote:

        When adding new UD items. It's often required to use this message after your insert code.
        This message forces the UD to fully update.

        c4d.SendCoreMessage(c4d.COREMSG_CINEMA, c4d.BaseContainer(c4d.COREMSG_CINEMA_FORCE_AM_UPDATE))
        

        I've personally only needed to use this message when adding new UD items.
        Editing or deleting existing ones doesn't seem to require it.

        -ScottA

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

          On 03/06/2016 at 02:19, xxxxxxxx wrote:

          Thanks for the input, that's a useful message type!

          This definitely helps with some other issues I've been encountering but unfortunately not this one 😞

          Thanks,

          Adam

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

            On 03/06/2016 at 03:46, xxxxxxxx wrote:

            Hello,

            if you define a name for your group Cinema assumes that you want to display that name, so it displays the group title anyway. If you do not want to display the title you must not define a name, only the DESC_SHORT_NAME short name.

              
            bc[c4d.DESC_SHORT_NAME]  = "Group 1"  
            

            Best wishes,
            Sebastian

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

              On 03/06/2016 at 03:56, xxxxxxxx wrote:

              Amazing! That works perfectly.

              Cheers,

              Adam

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