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:
Cinema 4D Version: R13
Platform: Windows ;
Language(s) : C++ ;
Can anyone told me how to load a layout (*.l4d) or the menubar via C++ like the Chess-PlugIn?
On 12/09/2011 at 09:56, xxxxxxxx wrote:
Is it to easy or nobody knows?
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();
if(!GeFileExist(fn,FALSE)) // Check if the file excists
println("Ops! No such layout");
return;// no such file , bail out
println(layoutname+" Layout Loaded!");
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"
LoadFile(file); //Loads the layout file and switches the C4D layout
On 13/09/2011 at 09:09, xxxxxxxx wrote:
I did not know, that I can easly load the file.