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

    Layout switch

    SDK Help
    0
    7
    724
    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
      Helper
      last edited by

      On 17/01/2013 at 02:27, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   13 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hello,

      I like to know how I can switch the layout with the CallCommand(56000).
      My intention is to switch maybe from start layout to animation layout or an own layout definition per plugin.

      Thanks
      Marky

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

        On 17/01/2013 at 03:04, xxxxxxxx wrote:

        Hi.
        I use python script for this:

        import c4d, os  
        from c4d import gui, documents  
        #Welcome to the world of Python  
          
          
        def main() :  
          c4d.documents.LoadFile(c4d.storage.GeGetC4DPath(c4d.C4D_PATH_LIBRARY_USER)+os.sep+"layout"+os.sep+"layoutname.l4d")  
          
        if __name__=='__main__':  
          main()
        

        Cheers
        Phil

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

          On 21/01/2013 at 00:47, xxxxxxxx wrote:

          Oh thanks, it's working.

          One question, it's possible to start an python script automatically if Cinema4d started?

          Marky

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

            On 21/01/2013 at 01:03, xxxxxxxx wrote:

            Originally posted by xxxxxxxx

            One question, it's possible to start an python script automatically if Cinema4d started?

            Hi Marky,

            I think you could use -layout command line argument. 
            This command lets you load a specific layout when starting CINEMA 4D.

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

              On 21/01/2013 at 04:11, xxxxxxxx wrote:

              Afaik, there is (or can be) a startup.py in the user preferences folder, is that correct?

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

                On 21/01/2013 at 07:40, xxxxxxxx wrote:

                Originally posted by xxxxxxxx

                Afaik, there is (or can be) a startup.py in the user preferences folder, is that correct?

                A special script python_init.py can be defined in  {USER_FOLDER}/prefs/python to execute some Python code on startup of CINEMA 4D before any other Python stuff is loaded.
                This information is included in the Frequently Asked Questions of the docs.

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

                  On 28/05/2014 at 10:13, xxxxxxxx wrote:

                  Is there no way to have all C4D applications source from one common python script folder for the facility?  Most production houses have common code development areas, can we not change the python source directory to a central server location?

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