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

    Load Layout/Menu

    Scheduled Pinned Locked Moved SDK Help
    5 Posts 0 Posters 462 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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 10/09/2011 at 23:56, xxxxxxxx wrote:

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

      ---------
      Hey Guys,

      Can anyone told me how to load a layout (*.l4d) or the menubar via C++ like the Chess-PlugIn?

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 12/09/2011 at 09:56, xxxxxxxx wrote:

        Is it to easy or nobody knows? 😉

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 12/09/2011 at 12:50, xxxxxxxx wrote:

          I don't do C++ but I imagine you do the same as coffee/python,
          just load it as file.

            
          // Add a short cut to this to make any sense:) tcastudios.com 2011   
            
          var layoutname = "tca"; // <-Your layout name here in quotes and no suffix   
            
          var fn = GeGetStartupWritePath();   
              fn->AddLast("library");   
              fn->AddLast("layout");   
              fn->AddLast(layoutname);   
              fn->SetSuffix("l4d");   
            
          if(!GeFileExist(fn,FALSE)) // Check if the file excists   
             {   
              println("Ops! No such layout");   
              return;// no such file , bail out   
             }   
            
          LoadDocument(fn);   
          println(layoutname+" Layout Loaded!");
          
          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 12/09/2011 at 21:27, xxxxxxxx wrote:

            Here's a very simple C++ example that loads a layout from a button in a dialog type plugin:

            Bool myDialog::Command(LONG id,const BaseContainer &msg)    
            {  
               
              Filename file = GeGetC4DPath(C4D_PATH_LIBRARY_USER) + "/layout/mylayout.l4d";    //Path to your layout file  
              
              Bool test = GeFExist(file, FALSE);   //Checks to see if the file exists(Second param. searches for the folder if set to TRUE)  
              GePrint(RealToString(test));         //Prints 1 if the file is found..Zero if not found  
              
              
              //To load the layout. I chose to put the code under a button with the ID:"MY_BUTTON"  
              switch (id)   
                {  
                case MY_BUTTON:      
                  LoadFile(file);   //Loads the layout file and switches the C4D layout  
                  break;  
                  
                 }  
              
              return TRUE;  
            }
            

            -ScottA

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 13/09/2011 at 09:09, xxxxxxxx wrote:

              Thank you.

              I did not know, that I can easly load the file. 🙂

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