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

    Updating GUI

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 289 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 18/06/2015 at 09:11, xxxxxxxx wrote:

      Hi all,

      I want to update my PluginGUI.
      So I make a chek and then wanna activate one ore the other group in my gui
      But what is to be done that my MainDialog is updated

      Here is my code:

        
          def UpdateLayout(self) :   
              doc = c4d.documents.GetActiveDocument()   
              pree_check = []   
              pree_check = a_polygon_selektion_tag_is_selected(doc)   
              is_selected = pree_check[0]   
                
              self.LoadDialogResource(res.DLG_MAIN)   
              if is_selected == True:   
                  self.Enable(res.GRP_DEAKTIVATED_REASON, True)   
                  print "es ist etwas selektiert"   
                  self.RemoveElement(res.GRP_POLYGONS_AUTOMATICLY)   
              else:   
                  print "nichts ist selektiert"   
                  self.RemoveElement(res.GRP_DEAKTIVATED_REASON)   
                  self.Enable(res.GRP_POLYGONS_AUTOMATICLY, True)   
                      
          return True   
      

      Thanks a lot

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

        On 19/06/2015 at 06:45, xxxxxxxx wrote:

        Hello,

        you can update a group of your dialog layout using LayoutChanged(), typically in combination with LayoutFlushGroup(). You find and extensive dialog example in the C++ GitHub repository.

        Best wishes,
        Sebastian

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

          On 10/07/2015 at 10:09, xxxxxxxx wrote:

          Hello Kissling,

          was your question answered?

          Best wishes,
          Sebastian

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