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

    Save Project File in Render Settings

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 434 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 23/03/2015 at 12:29, xxxxxxxx wrote:

      Is there a way to have the "Save Project File..." button not show me the dialog? Or, if that's not possible, be able to store that saved file in a variable?

      Currently I'm doing the following, which always brings up the dialog.

      doc = c4d.documents.GetActiveDocument()
      rdata = doc.GetActiveRenderData()
         
      c4d.CallButton( rdata, c4d.RDATA_PROJECTFILESAVE )
      

      I couldn't find any arguments like dialogsAllowed.

      I've also tried the following:

      output = c4d.CallButton( rdata, c4d.RDATA_PROJECTFILESAVE )
      print output
      

      but that will always give me an result of None.

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

        On 24/03/2015 at 07:43, xxxxxxxx wrote:

        Hello,

        with CallButton() you can do just that: you can press a button. But you cannot change what this button does. In this case the "Save Project File..." button will open a file dialog, no matter what; there is no way of changing that behavior. Also, CallButton() will just press the button, but it will not handle any results of any action this button may do so the return value is None.

        The functionality of "Save Project File..." is not exposed in the API I'm afraid there is no other way of handling this.

        Best wishes,
        Sebastian

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

          On 24/03/2015 at 11:43, xxxxxxxx wrote:

          Bah, that's what I was afraid of since I couldn't find anything else in the documentation..

          Thank you for checking up on that.

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