Removed hard coded directory paths

- Removed references to core directory.
- Switch some references to tools directory
- Added preferences variables where appropriate
This commit is contained in:
DavidWyand-GG 2013-03-07 18:56:53 -05:00
parent 853b70255b
commit 4b1334db9f
25 changed files with 75 additions and 18 deletions

View file

@ -74,6 +74,10 @@ EndImplementEnumType;
//-----------------------------------------------------------------------------
String TSShapeConstructor::smCapsuleShapePath("core/art/shapes/unit_capsule.dts");
String TSShapeConstructor::smCubeShapePath("core/art/shapes/unit_cube.dts");
String TSShapeConstructor::smSphereShapePath("core/art/shapes/unit_sphere.dts");
ResourceRegisterPostLoadSignal< TSShape > TSShapeConstructor::_smAutoLoad( &TSShapeConstructor::_onTSShapeLoaded );
ResourceRegisterUnloadSignal< TSShape > TSShapeConstructor::_smAutoUnload( &TSShapeConstructor::_onTSShapeUnloaded );
@ -280,6 +284,23 @@ void TSShapeConstructor::initPersistFields()
Parent::initPersistFields();
}
void TSShapeConstructor::consoleInit()
{
Parent::consoleInit();
Con::addVariable( "$pref::TSShapeConstructor::CapsuleShapePath", TypeString, &TSShapeConstructor::smCapsuleShapePath,
"The file path to the capsule shape used by tsMeshFit.\n\n"
"@ingroup MeshFit\n" );
Con::addVariable( "$pref::TSShapeConstructor::CubeShapePath", TypeString, &TSShapeConstructor::smCubeShapePath,
"The file path to the cube shape used by tsMeshFit.\n\n"
"@ingroup MeshFit\n" );
Con::addVariable( "$pref::TSShapeConstructor::SphereShapePath", TypeString, &TSShapeConstructor::smSphereShapePath,
"The file path to the sphere shape used by tsMeshFit.\n\n"
"@ingroup MeshFit\n" );
}
TSShapeConstructor* TSShapeConstructor::findShapeConstructor(const FileName& path)
{
SimGroup *group;