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

    Accessing buttons on dialogue possible?

    Scheduled Pinned Locked Moved PYTHON Development
    1 Posts 0 Posters 128 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/07/2014 at 10:53, xxxxxxxx wrote:

      If at all possible, I would like to automate caching of x-particles (we have many Cache objects), but the process involves a dialogue.

      It begins with a button on the Cache object attributes, which is accessible with:

       import c4d
      from c4d import gui
      def main() :
          
          obj = doc.SearchObject("Cache")
          c4d.CallButton(obj, c4d.XOCA_CACHE_FILL)
      if __name__=='__main__':
          main()
      

      This pulls up the dialogue, with other buttons to initiate the rest of the process.

      Is there anyway to access this second set of these buttons? Or it is possible to directly access the dialogue without simulating the first button? Or is there some way to use a timer / delay function and then somehow re-employ the CallButton command?

      Thanks.

      The res file for the dialogue with the second set of buttons is this:

      // C4D-DialogResource
      DIALOG IDD_CACHEBUILD
      {
        NAME IDS_DIALOG; CENTER_V; CENTER_H; 
        
        GROUP IDC_STATIC
        {
          NAME IDS_STATIC1; ALIGN_TOP; SCALE_H; 
          BORDERSTYLE BORDER_NONE; BORDERSIZE 4, 4, 4, 0; 
          COLUMNS 1;
          
          STATICTEXT IDC_STATIC { NAME IDS_STATIC; CENTER_V; ALIGN_LEFT; }
          STATICTEXT IDC_STATIC { NAME IDS_STATIC3; CENTER_V; ALIGN_LEFT; }
          STATICTEXT IDC_STATIC { NAME IDS_STATIC2; CENTER_V; ALIGN_LEFT; }
          STATICTEXT IDC_STATIC { NAME IDS_STATIC4; CENTER_V; ALIGN_LEFT; }
          GROUP IDC_STATIC
          {
            NAME IDS_STATIC5; ALIGN_TOP; CENTER_H; 
            BORDERSTYLE BORDER_NONE; BORDERSIZE 0, 16, 0, 0; 
            COLUMNS 3;
            
            BUTTON IDC_OVERWRITECACHE { NAME IDS_BUTTON; ALIGN_TOP; ALIGN_LEFT; }
            BUTTON IDC_NEWCACHE { NAME IDS_BUTTON1; ALIGN_TOP; ALIGN_LEFT; }
            BUTTON IDC_CANCELCACHE { NAME IDS_BUTTON2; ALIGN_TOP; ALIGN_LEFT; }
          }
        }
      }

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