MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / setMountedObject

Method setMountedObject

Engine/source/T3D/guiObjectView.cpp:418–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

416//------------------------------------------------------------------------------
417
418void GuiObjectView::setMountedObject( const String& modelName )
419{
420 SAFE_DELETE( mMountedModel );
421 mMountedModelName = String::EmptyString;
422
423 // Load the model.
424
425 Resource< TSShape > model = ResourceManager::get().load( modelName );
426 if( !model )
427 {
428 Con::warnf( "GuiObjectView::setMountedObject - Failed to load object model '%s'",
429 modelName.c_str() );
430 return;
431 }
432
433 mMountedModel = new TSShapeInstance( model, true );
434 mMountedModelName = modelName;
435
436 if( !mMountSkinName.isEmpty() )
437 mMountedModel->reSkin( mMountSkinName );
438
439 if( mModel )
440 _initMount();
441}
442
443//------------------------------------------------------------------------------
444

Callers 1

guiObjectView.cppFile · 0.80

Calls 6

getFunction · 0.50
warnfFunction · 0.50
loadMethod · 0.45
c_strMethod · 0.45
isEmptyMethod · 0.45
reSkinMethod · 0.45

Tested by

no test coverage detected