257 lines (220 with data), 11.5 kB
// Set BM_LEG_MODEL to OFF if both BM_LEG_RIGHT/LEFT are OFF
#ifdef BM_LEG_RIGHT
#ifdef BM_LEG_LEFT
#if BM_LEG_RIGHT == OFF & BM_LEG_LEFT == OFF
#ifdef BM_LEG_MODEL
#undef BM_LEG_MODEL
#endif
#define BM_LEG_MODEL OFF
#endif
#endif
#endif
// Allow for BM_LEG_MODEL to switch Legs models off completely.
#ifdef BM_LEG_MODEL
#if BM_LEG_MODEL == OFF
#ifndef BM_LEG_RIGHT
#define BM_LEG_RIGHT OFF
#endif
#ifndef BM_LEG_LEFT
#define BM_LEG_LEFT OFF
#endif
#endif
#endif
// Logic block to make it easier to later check if the leg model is a variant of the TLEM model
#ifdef BM_LEG_MODEL_IS_TLEM
#undef BM_LEG_MODEL_IS_TLEM
#endif
#ifdef BM_LEG_MODEL
#if BM_LEG_MODEL != _LEG_MODEL_LEG_ & BM_LEG_MODEL != OFF
#define BM_LEG_MODEL_IS_TLEM ON
#else
#define BM_LEG_MODEL_IS_TLEM OFF
#endif
#else
#define BM_LEG_MODEL_IS_TLEM ON
#endif
//
#ifndef BM_ARM_SHOULDER_RHYTHM
#ifdef BM_ARM_SHOULDER_RHYTHM_RIGHT
#define BM_ARM_SHOULDER_RHYTHM BM_ARM_SHOULDER_RHYTHM_RIGHT
AnyInt deprecated_left_right_rythm= warn(0, strformat("\n"+
"------------------------------------------------------------------------------------------------------\n"+
" `BM_ARM_SHOULDER_RYTHM_LEFT` is deprecated.\n"+
" The single statement `BM_ARM_SHOULDER_RYTHM` sets the shoulder rythm for both sides.\n"+
"-------------------------------------------------------------------------------------------------------\n"));
#endif
#endif
#ifndef BM_ARM_SHOULDER_RHYTHM
#ifdef BM_ARM_SHOULDER_RHYTHM_LEFT
#define BM_ARM_SHOULDER_RHYTHM BM_ARM_SHOULDER_RHYTHM_LEFT
AnyInt deprecated_left_right_rythm= warn(0, strformat("\n"+
"------------------------------------------------------------------------------------------------------\n"+
" `BM_ARM_SHOULDER_RYTHM_RIGHT` is deprecated.\n"+
" The single statement `BM_ARM_SHOULDER_RYTHM` sets the shoulder rythm for both sides.\n"+
"-------------------------------------------------------------------------------------------------------"));
#endif
#endif
//
#ifndef BM_ARM_DETAILED_HAND
#ifdef BM_ARM_DETAIL_HAND_RIGHT
#define BM_ARM_DETAILED_HAND BM_ARM_DETAIL_HAND_RIGHT
AnyInt deprecated_left_right_detail_hand= warn(0, strformat("\n"+
"------------------------------------------------------------------------------------------------------\n"+
" `BM_ARM_DETAIL_HAND_RIGHT` is deprecated.\n"+
" The single statement `BM_ARM_DETAILED_HAND` sets hand model for both sides.\n"+
"-------------------------------------------------------------------------------------------------------"));
#endif
#endif
#ifndef BM_ARM_DETAILED_HAND
#ifdef BM_ARM_DETAIL_HAND_LEFT
#define BM_ARM_DETAILED_HAND BM_ARM_DETAIL_HAND_LEFT
AnyInt deprecated_left_right_detail_hand= warn(0, strformat("\n"+
"------------------------------------------------------------------------------------------------------\n"+
" `BM_ARM_DETAIL_HAND_LEFT` is deprecated.\n"+
" The single statement `BM_ARM_DETAILED_HAND` sets hand model for both sides.\n"+
"-------------------------------------------------------------------------------------------------------"));
#endif
#endif
#ifdef BM_LEG_MODEL
#if BM_LEG_MODEL == _LEG_MODEL_TLEM1_
AnyInt deprecated_TLEM1_model = warn(0, strformat("\n"+
"------------------------------------------------------------------------------------------------------\n"+
" The Twente Lower Extremity Model v.1 (TLEM1) is deprecated and will no longer be maintained. \n"+
" It may be removed from AMMR in future releases.\n"+
" Please use the TLEM 2 (which is default or set: #define BM_LEG_MODEL _LEG_MODEL_TLEM2_) \n"+
"-------------------------------------------------------------------------------------------------------"));
#endif
#endif
#ifdef BM_LEG_MODEL
#if BM_LEG_MODEL == _LEG_MODEL_TLEM21_
AnyInt deprecated_TLEM21_model = warn(0, strformat("\n"+
"------------------------------------------------------------------------------------------------------\n"+
" The Twente Lower Extremity Model v.2.1 (TLEM2.1) is deprecated and will no longer be maintained. \n"+
" It may be removed from AMMR in future releases.\n"+
" Please use the TLEM 2.2 (which is default or set: #define BM_LEG_MODEL _LEG_MODEL_TLEM2_) \n"+
"-------------------------------------------------------------------------------------------------------"));
#endif
#endif
#ifdef BM_SCALING_MY_FILE
AnyInt deprecated_BM_SCALING_MY_FILE = warn(0, strformat("\n"+
"------------------------------------------------------------------------------------------------------\n"+
" `BM_SCALING_MY_FILE is deprecated, and renamed to `BM_SCALING_FILE`\n"+
"-------------------------------------------------------------------------------------------------------"));
#ifndef BM_SCALING_FILE
#define BM_SCALING_FILE BM_SCALING_MY_FILE
#endif
#endif
#ifdef BM_MANNEQUIN_DRIVER_ANKLE_EVERSION_RIGHT
#ifndef BM_MANNEQUIN_DRIVER_ANKLE_SUBTALAR_EVERSION_RIGHT
#define BM_MANNEQUIN_DRIVER_ANKLE_SUBTALAR_EVERSION_RIGHT BM_MANNEQUIN_DRIVER_ANKLE_EVERSION_RIGHT
#endif
AnyInt deprecated_BM_MANNEQUIN_DRIVER_ANKLE_EVERSION_RIGHT = warn(0, strformat("\n"+
"------------------------------------------------------------------------------------------------------------------------ \n"+
" `BM_MANNEQUIN_DRIVER_ANKLE_EVERSION_RIGHT` is deprecated.\n"+
" Please use `BM_MANNEQUIN_DRIVER_ANKLE_SUBTALAR_EVERSION_RIGHT` instead for all leg models.\n"+
"------------------------------------------------------------------------------------------------------------------------ "));
#endif
#ifdef BM_MANNEQUIN_DRIVER_ANKLE_EVERSION_LEFT
#ifndef BM_MANNEQUIN_DRIVER_ANKLE_SUBTALAR_EVERSION_LEFT
#define BM_MANNEQUIN_DRIVER_ANKLE_SUBTALAR_EVERSION_LEFT BM_MANNEQUIN_DRIVER_ANKLE_EVERSION_LEFT
#endif
AnyInt deprecated_BM_MANNEQUIN_DRIVER_ANKLE_EVERSION_LEFT = warn(0, strformat("\n"+
"------------------------------------------------------------------------------------------------------------------------ \n"+
" `BM_MANNEQUIN_DRIVER_ANKLE_EVERSION_LEFT` is deprecated.\n"+
" Please use `BM_MANNEQUIN_DRIVER_ANKLE_SUBTALAR_EVERSION_LEFT` instead for all leg models.\n"+
"------------------------------------------------------------------------------------------------------------------------ "));
#endif
// Trigger check for read-only AMMR if we think user is running
// the AMMR version in the install directory.
#ifpathexists "<ANYBODY_PATH_AMMR>/../AnyBody.exe"
#if ANYBODY_PYTHON_AVAILABLE
#ifndef ANYBODY_DISMISS_READONLY_NOTICE
// use of a python function
AnyFunEx IsFileWriteable =
{
AnyIntVar Return = 0;
AnyFunExMonoPy is_file_writeable =
{
ModuleFile = "ammr-checks.py";
ArgList = {
AnyStringVar MainFile = ANYBODY_PATH_MAINFILE;
};
};
};
AnyInt MainFileIsReadOnlyNotice = notice(IsFileWriteable(ANYBODY_PATH_MAINFILE), strformat("\n"+
"\n------------------------------------------------------------------------------------------------------\n"+
" Note: Your Main-file appears to be read-only. \n"+
" \n"+
" Are you running models directly from the install direcotry?\n"+
" It is good practice to copy models to for example your documents folder.\n"+
" This notice can be disabled with: #define ANYBODY_DISMISS_READONLY_NOTICE \n"+
"-------------------------------------------------------------------------------------------------------\n"));
#endif
#endif
#endif
#ifdef BM_TRUNK_THORACIC_FUTURE
#if BM_TRUNK_THORACIC_FUTURE == ON
AnyMessage msg_THORACIC_FUTURE = { TriggerPreProcess = On; Type = MSG_Error; Message = strformat("\n"+
"\n----------------------------------------------------------------------------------------------------------\n"+
" Note: BM_TRUNK_THORACIC_FUTURE is a development option for a future thoracic model. \n"+
"\n"+
" The model will not be able to load when this is enabled. Please remove this option or set it to OFF:\n"+
" ``#define BM_TRUNK_THORACIC_FUTURE OFF`` \n"+
"-----------------------------------------------------------------------------------------------------------\n");};
#endif
#endif
#ifdef BM_TRUNK_DISC_STIFNESS
#ifndef BM_TRUNK_DISC_STIFFNESS
#define BM_TRUNK_DISC_STIFFNESS BM_TRUNK_DISC_STIFNESS
#endif
AnyInt deprecated_BM_TRUNK_DISC_STIFNESS = warn(0, strformat("\n"+
"------------------------------------------------------------------------------------------------------------------------ \n"+
" `BM_TRUNK_DISC_STIFNESS` has been renamed to BM_TRUNK_DISC_STIFFNESS.\n"+
" Please use the corrected name instead.\n"+
"------------------------------------------------------------------------------------------------------------------------ "));
#endif
#ifdef BM_TRUNK_LUMBAR_DISC_STIFNESS
#ifndef BM_TRUNK_LUMBAR_DISC_STIFFNESS
#define BM_TRUNK_LUMBAR_DISC_STIFFNESS BM_TRUNK_LUMBAR_DISC_STIFNESS
#endif
AnyInt deprecated_BM_TRUNK_LUMBAR_DISC_STIFNESS = warn(0, strformat("\n"+
"------------------------------------------------------------------------------------------------------------------------ \n"+
" `BM_TRUNK_LUMBAR_DISC_STIFNESS` has been renamed to BM_TRUNK_LUMBAR_DISC_STIFFNESS.\n"+
" Please use the corrected name instead.\n"+
"------------------------------------------------------------------------------------------------------------------------ "));
#endif
#ifdef BM_TRUNK_CERVICAL_DISC_STIFNESS
#ifndef BM_TRUNK_CERVICAL_DISC_STIFFNESS
#define BM_TRUNK_CERVICAL_DISC_STIFFNESS BM_TRUNK_CERVICAL_DISC_STIFNESS
#endif
AnyInt deprecated_BM_TRUNK_CERVICAL_DISC_STIFNESS = warn(0, strformat("\n"+
"------------------------------------------------------------------------------------------------------------------------ \n"+
" `BM_TRUNK_CERVICAL_DISC_STIFNESS` has been renamed to BM_TRUNK_CERVICAL_DISC_STIFFNESS.\n"+
" Please use the corrected name instead.\n"+
"------------------------------------------------------------------------------------------------------------------------ "));
#endif
#ifndef ANYBODY_PYTHON_SUPPRESS_NOTICE
#if ANYBODY_PYTHON_AVAILABLE == 0
AnyMessage PythonMissing =
{
Type = MSG_Message;
TriggerPreProcess = On;
Message = strformat("\n"+
"-----------------------------------------------------------------------\n"+
" Python is not availble. Some features may be unavailable.\n"+
" \n"+
" To fix this:\n"+
" \n"+
" 1. Reinstall AnyBody and choose to install Python.\n"+
" 2. (Advanced) Set ANYBODY_PATH_PYTHONHOME to your\n"+
" existing Python installation folder.\n"+
" \n"+
" Hide this message: Add #define ANYBODY_PYTHON_SUPPRESS_NOTICE\n"+
" to your model.\n"+
"-----------------------------------------------------------------------\n");
};
#endif
#endif
#ifpathexists "ammr-beta.any"
#include "ammr-beta.any"
#endif