70 lines (61 with data), 3.3 kB
#if ANYBODY_BUILTIN_PYTHON_AVAILABLE
AnyGUIPlugin BMPlugin = {
#ifndef __BMPLUGIN_PATH__
#path __BMPLUGIN_PATH__ "<ANYBODY_PATH_AMMR>/Tools/Plugins/BM_Plugin-1.1.3-py3.11.egg"
//#path __BMPLUGIN_PATH__ "<pathto>\bm-plugin\__main__.py"
#endif
PluginFile = __BMPLUGIN_PATH__;
#ifndef BM_CONFIG_PLUGIN
#define BM_CONFIG_PLUGIN ""
#endif
AnyStringVar BodyModelConfigFile = BM_CONFIG_PLUGIN;
// #undef BM_CONFIG_PLUGIN
ToolTip = "Change configuration of Body model";
Extra = CompleteNameOf(&.BMPlugin);
//Console = On;
//Interactive = On;
DisplayName = CompleteNameOf(&...HumanModel) + ": Configuration";
#ifdef BM_CONFIG_PLUGIN
#if BM_CONFIG_PLUGIN != ""
// The BM_CONFIG_PLUGIN file is set so we can assume it is included by the users.
// Thus, we don't need to include it here.
#ifnpathexists BM_CONFIG_PLUGIN
AnyInt BM_config_file_missing= warn(0, strformat("\n"+
"------------------------------------------------------------------------------------------------------\n"+
" The BodyModel configuration file defined by `BM_CONFIG_PLUGIN` does not seem to exist.\n"+
" Please create the file or remove the path definition.\n"+
"-------------------------------------------------------------------------------------------------------"));
#endif
#endif
#else
// // There is no BM_CONFIG_PLUGIN path set. Thus, we check if the
// // BodyModelConfiguration.any exist in the main file directory. If so we assume that
// // we want to use that file, and include it.
// #path _TEMP_DEFAULT_SCRIPT_FILE "<ANYBODY_PATH_MAINFILEDIR>\BodyModelConfiguration.any"
// #ifpathexists _TEMP_DEFAULT_SCRIPT_FILE
// // Before including the plugin config file we check if there are
// // user define BM parameters which can cause conflicts with the
// // BM configurator.
// #include "Ifdef_BM_param.any"
// #ifdef _BM_PARAM_DEFINED_
// AnyInt User_define_BM_parameters = warn(0, strformat("\n"+
// "------------------------------------------------------------------------------------------------------------\n"+
// " The model uses the BodyModel configuration plugin while also having manually defined BM parameters. \n"+
// " This can cause problems if the plugin tries to configure the already user-defined values. \n"+
// "\n"+
// " You can suppress this warning by removing the user defined BM parmaters or by defining and including\n"+
// " the BM Plugin file manually in your model:\n"+
// " \n"+
// " #define BM_CONFIG_PLUGIN "+strquote("path/to/BodyModelConfigFile.any") +"\n"+
// " #include "+strquote("<BM_CONFIG_PLUGIN>") + "\n"+
// "------------------------------------------------------------------------------------------------------------"));
//
// #endif
// Main = { #include "<_TEMP_DEFAULT_SCRIPT_FILE>" };
// #ifndef BM_CONFIG_PLUGIN
// #define BM_CONFIG_PLUGIN "<_TEMP_DEFAULT_SCRIPT_FILE>"
// #endif
// #endif
#endif
};
#endif