00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 #include "Core.hh"
00048
00049 #include <ACG/QtWidgets/QtFileDialog.hh>
00050
00051 #include "OpenFlipper/common/GlobalOptions.hh"
00052 #include "OpenFlipper/BasePlugin/PluginFunctions.hh"
00053
00054 #include "OpenFlipper/widgets/loadWidget/loadWidget.hh"
00055 #include "OpenFlipper/widgets/addEmptyWidget/addEmptyWidget.hh"
00056
00057 #include <OpenFlipper/common/Types.hh>
00058 #include <ObjectTypes/PolyMesh/PolyMesh.hh>
00059
00060 #include <time.h>
00061
00062 void Core::resetScenegraph( bool _resetTrackBall ) {
00063 if ( OpenFlipper::Options::gui() && !OpenFlipper::Options::loadingSettings() ) {
00064
00065 for ( unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i ) {
00066
00067 PluginFunctions::viewerProperties(i).lockUpdate();
00068 coreWidget_->examiner_widgets_[i]->sceneGraph(root_node_scenegraph_, _resetTrackBall );
00069 PluginFunctions::viewerProperties(i).unLockUpdate();
00070 coreWidget_->examiner_widgets_[i]->updateGL();
00071 }
00072
00073 }
00074
00075
00076 if ( OpenFlipper::Options::gui() )
00077 coreWidget_->slotUpdateGlobalDrawMenu();
00078 }
00079
00080
00081
00082
00083
00084
00085 void Core::slotGetAllFilters ( QStringList& _list){
00086
00088
00089 for (int i=0; i < (int)supportedTypes_.size(); i++){
00090 QString f = supportedTypes_[i].plugin->getLoadFilters();
00091 f = f.section(")",0,0).section("(",1,1).trimmed();
00092 _list << (QString::number(supportedTypes_[i].plugin->supportedType().value()) + " " + f);
00093 }
00094 }
00095
00096 void Core::commandLineOpen(const char* _filename, bool _asPolyMesh ){
00097
00098 QString file(_filename);
00099
00100
00101 if ( !file.startsWith("/") && !file.contains(":") ) {
00102 file = QDir::currentPath();
00103 file += OpenFlipper::Options::dirSeparator();
00104 file += _filename;
00105 }
00106
00107
00108 commandLineFileNames_.push_back(std::pair< std::string , bool >(file.toStdString(), _asPolyMesh));
00109 }
00110
00111 void Core::commandLineScript(const char* _filename ) {
00112
00113 QString file(_filename);
00114
00115
00116 if ( !file.startsWith("/") && !file.contains(":") ) {
00117 file = QDir::currentPath();
00118 file += OpenFlipper::Options::dirSeparator();
00119 file += _filename;
00120 }
00121
00122
00123 commandLineScriptNames_.push_back(file.toStdString());
00124 }
00125
00126 void Core::slotExecuteAfterStartup() {
00127
00128
00129 bool scriptingSupport = false;
00130 slotPluginExists("scripting",scriptingSupport);
00131 if ( ! scriptingSupport ) {
00132 emit log(LOGERR ,tr("No scripting support available, please check if we load a scripting plugin .. Skipping script execution on startup"));
00133 }
00134
00135
00136
00137
00138 if ( scriptingSupport ) {
00139
00140
00141 QDir scriptDir = OpenFlipper::Options::scriptDir();
00142 QStringList scriptFiles = scriptDir.entryList(QDir::Files,QDir::Name);
00143
00144
00145 for ( int i = 0 ; i < scriptFiles.size(); ++i )
00146 if ( scriptFiles[i].endsWith("ofs") )
00147 emit executeFileScript(scriptDir.path() + QDir::separator() + scriptFiles[i]);
00148
00149 }
00150
00151
00152 for ( uint i = 0 ; i < commandLineFileNames_.size() ; ++i ) {
00153
00154
00155 QString tmp = QString::fromStdString(commandLineFileNames_[i].first);
00156 if ( tmp.endsWith("ofs") ) {
00157 commandLineScriptNames_.push_back(commandLineFileNames_[i].first);
00158 continue;
00159 }
00160
00161
00162 if (commandLineFileNames_[i].second)
00163 loadObject(DATA_POLY_MESH, QString::fromStdString(commandLineFileNames_[i].first));
00164 else {
00165 loadObject(QString::fromStdString(commandLineFileNames_[i].first));
00166 }
00167 }
00168
00169
00170 if ( scriptingSupport )
00171 for ( uint i = 0 ; i < commandLineScriptNames_.size() ; ++i ) {
00172 emit executeFileScript(QString::fromStdString(commandLineScriptNames_[i]));
00173 }
00174
00175
00176
00177 if ( !OpenFlipper::Options::gui() && !OpenFlipper::Options::remoteControl())
00178 exitApplication();
00179 }
00180
00181
00182 int Core::loadObject ( QString _filename ) {
00189 if (_filename.endsWith(".ini")) {
00190
00191
00192 openIniFile(_filename,true,true,true);
00193
00194 if ( OpenFlipper::Options::gui() )
00195 coreWidget_->addRecent(_filename, DATA_UNKNOWN);
00196
00197 return -2;
00198 } else
00199 if (_filename.endsWith(".ofs")) {
00200 emit log(LOGINFO ,tr("Starting script execution of %1.").arg( _filename)) ;
00201 emit executeFileScript(_filename);
00202 } else {
00203
00204 QFileInfo fi(_filename);
00205
00206 for (int i=0; i < (int)supportedTypes_.size(); i++){
00207
00208 QString filters = supportedTypes_[i].plugin->getLoadFilters();
00209
00210 if ( ! filters.contains( "*." + fi.completeSuffix() ) )
00211 continue;
00212
00213 if ( OpenFlipper::Options::gui() ) {
00214 coreWidget_->statusMessage( tr("Loading %1 ... ").arg(_filename));
00215 if ( !OpenFlipper::Options::loadingSettings() )
00216 coreWidget_->setStatus(ApplicationStatus::PROCESSING );
00217 }
00218
00219
00220 int id = supportedTypes_[i].plugin->loadObject(_filename);
00221
00222 if ( OpenFlipper::Options::gui() ) {
00223 if ( id != -1 )
00224 coreWidget_->statusMessage( tr("Loading %1 ... done").arg(_filename), 4000 );
00225 else
00226 coreWidget_->statusMessage( tr("Loading %1 ... failed!").arg(_filename), 4000 );
00227
00228 if ( !OpenFlipper::Options::loadingSettings() )
00229 coreWidget_->setStatus(ApplicationStatus::READY );
00230 }
00231
00232 return id;
00233 }
00234 }
00235
00236 emit log(LOGERR, tr("Unable to load object (type unknown). No suitable plugin found!") );
00237
00238 return -1;
00239 }
00240
00242 int Core::loadObject( DataType _type, QString _filename) {
00247 if (_type == DATA_UNKNOWN)
00248 return loadObject(_filename);
00249
00250 QFileInfo fi(_filename);
00251
00252 for (int i=0; i < (int)supportedTypes_.size(); i++)
00253 if (supportedTypes_[i].type & _type || supportedTypes_[i].type == _type) {
00254
00255 QString filters = supportedTypes_[i].plugin->getLoadFilters();
00256
00257 if ( ! filters.contains( "*." + fi.completeSuffix() ) )
00258 continue;
00259
00260
00261 if ( OpenFlipper::Options::gui() ) {
00262 coreWidget_->statusMessage( tr("Loading %1 ... ").arg(_filename));
00263 if ( !OpenFlipper::Options::loadingSettings() )
00264 coreWidget_->setStatus(ApplicationStatus::PROCESSING );
00265 }
00266
00267 int id = -1;
00268
00269
00270 if ( checkSlot( supportedTypes_[i].object , "loadObject(QString,DataType)" ) )
00271 id = supportedTypes_[i].plugin->loadObject(_filename, _type);
00272 else
00273 id = supportedTypes_[i].plugin->loadObject(_filename);
00274
00275 if ( OpenFlipper::Options::gui() ) {
00276 if ( id != -1 )
00277 coreWidget_->statusMessage( tr("Loading %1 ... done").arg(_filename), 4000 );
00278 else
00279 coreWidget_->statusMessage( tr("Loading %1 ... failed!").arg(_filename), 4000 );
00280
00281 if ( !OpenFlipper::Options::loadingSettings() )
00282 coreWidget_->setStatus(ApplicationStatus::READY );
00283 }
00284
00285 return id;
00286 }
00287
00288 emit log(LOGERR, tr("Unable to load object. No suitable plugin found!") );
00289
00290 return -1;
00291 }
00292
00293
00294 int Core::addEmptyObject( DataType _type ) {
00295
00296
00297
00298 int retCode = -1;
00299
00300
00301 for (int i=0; i < (int)supportedDataTypes_.size(); i++)
00302 if ( supportedDataTypes_[i].type & _type )
00303 retCode = supportedDataTypes_[i].plugin->addEmpty();
00304
00305 if(retCode != -1) return retCode;
00306
00307
00308 for (int i=0; i < (int)supportedTypes_.size(); i++)
00309 if ( supportedTypes_[i].type & _type ) {
00310 emit log(LOGERR, tr("File Plugins are not allowed to create empty objects anymore! Use the addEmpty call instead!") );
00311 retCode = supportedTypes_[i].plugin->addEmpty();
00312 }
00313
00314 return retCode;
00315 }
00316
00317
00318
00319
00320
00322 void Core::slotAddEmptyObject( DataType _type , int& _id ) {
00323
00324 _id = addEmptyObject( _type );
00325
00326 if ( OpenFlipper::Options::doSlotDebugging() ) {
00327 if ( sender() != 0 ) {
00328 if ( sender()->metaObject() != 0 ) {
00329 emit log(LOGINFO,"slotAddEmptyObject( " + _type.name() + "," + QString::number(_id) + tr(" ) called by ") +
00330 QString( sender()->metaObject()->className() ) );
00331 }
00332 } else {
00333 emit log(LOGINFO,"slotAddEmptyObject( " + _type.name() + "," + QString::number(_id) + tr(" ) called by Core") );
00334 }
00335 }
00336 }
00337
00339 void Core::slotCopyObject( int _oldId , int& _newId ) {
00340
00341 if ( _oldId == -1 ) {
00342 emit log(LOGERR,tr("Requested copy for illegal Object id: %1").arg(_oldId) );
00343 _newId = -1;
00344 return;
00345 }
00346
00347
00348 BaseObject* object = objectRoot_->childExists(_oldId);
00349
00350 if ( !object ) {
00351 emit log(LOGERR,tr("Requested copy for unknown Object id: %1 ").arg(_oldId) );
00352 _newId = -1;
00353 return ;
00354 }
00355
00356
00357 BaseObject* copy = object->copy();
00358
00359 if ( copy == 0 ) {
00360 emit log(LOGERR,tr("Unable to create a copy of the object."));
00361 return;
00362 }
00363
00364
00365 copy->setParent( object->parent() );
00366
00367
00368 _newId = copy->id();
00369
00370
00371 slotEmptyObjectAdded(_newId);
00372
00373
00374 slotObjectUpdated(_newId);
00375
00376 }
00377
00379 void Core::slotLoad(QString _filename, int _pluginID) {
00380
00381 if ( OpenFlipper::Options::gui() ) {
00382 coreWidget_->statusMessage( tr("Loading %1 ... ").arg(_filename));
00383 if ( !OpenFlipper::Options::loadingSettings() )
00384 coreWidget_->setStatus(ApplicationStatus::PROCESSING );
00385 }
00386
00387
00388 int id = supportedTypes_[_pluginID].plugin->loadObject(_filename);
00389
00390 if ( OpenFlipper::Options::gui() ) {
00391 if ( id != -1 )
00392 coreWidget_->statusMessage( tr("Loading %1 ... done").arg(_filename), 4000 );
00393 else
00394 coreWidget_->statusMessage( tr("Loading %1 ... failed!").arg(_filename), 4000 );
00395
00396 if ( !OpenFlipper::Options::loadingSettings() )
00397 coreWidget_->setStatus(ApplicationStatus::READY );
00398 }
00399
00400
00401 DataType type = DATA_UNKNOWN;
00402
00403
00404 if ( id > 0 ) {
00405
00406 BaseObjectData* object;
00407 PluginFunctions::getObject(id,object);
00408
00409 if ( !object ) {
00410
00411 BaseObject* baseObj = 0;
00412 GroupObject* group = 0;
00413
00414 PluginFunctions::getObject(id,baseObj);
00415
00416 if (baseObj){
00417
00418 group = dynamic_cast< GroupObject* > (baseObj);
00419
00420 if (group)
00421 type = DATA_GROUP;
00422 }
00423
00424 if ( group == 0 ){
00425 emit log(LOGERR,tr("Object id returned but no object with this id has been found! Error in one of the file plugins!"));
00426 return;
00427 }
00428 }
00429
00430
00431 if (object)
00432 type = object->dataType();
00433 }
00434
00435
00436 if ( id >= 0 )
00437 if ( OpenFlipper::Options::gui() )
00438 coreWidget_->addRecent(_filename, type);
00439 }
00440
00442 void Core::slotLoad(QString _filename, DataType _type, int& _id) {
00443 _id = loadObject(_type,_filename);
00444
00445 if ( _id < 0 )
00446 _id = -1;
00447 else
00448 if ( OpenFlipper::Options::gui() )
00449 coreWidget_->addRecent(_filename,_type);
00450 }
00451
00453 void Core::slotObjectOpened ( int _id ) {
00454 if ( OpenFlipper::Options::doSlotDebugging() ) {
00455 if ( sender() != 0 ) {
00456 if ( sender()->metaObject() != 0 ) {
00457 emit log(LOGINFO,tr("slotObjectOpened( ") + QString::number(_id) + tr(" ) called by ") +
00458 QString( sender()->metaObject()->className() ) );
00459 }
00460 } else {
00461 emit log(LOGINFO,tr("slotObjectOpened( ") + QString::number(_id) + tr(" ) called by Core") );
00462 }
00463 }
00464
00465
00466 BaseObjectData* object;
00467 PluginFunctions::getObject(_id,object);
00468
00469 QColor color;
00470
00471 if ( OpenFlipper::Options::randomBaseColor() ){
00472
00473 srand ( time(NULL) );
00474
00475 QColor bckgrnd = OpenFlipperSettings().value("Core/Gui/glViewer/defaultBackgroundColor").value<QColor>();
00476 int diff;
00477
00478 do{
00479 color.setRgb(rand()%255, rand()%255, rand()%255);
00480
00481 diff = (bckgrnd.red() - color.red()) *(bckgrnd.red() - color.red())
00482 +(bckgrnd.green() - color.green())*(bckgrnd.green() - color.green())
00483 +(bckgrnd.blue() - color.blue()) *(bckgrnd.blue() - color.blue());
00484 }while (diff < 70000);
00485 }
00486 else{
00487 color = OpenFlipper::Options::defaultBaseColor();
00488 }
00489
00490 ACG::Vec4f colorV;
00491 colorV[0] = color.redF();
00492 colorV[1] = color.greenF();
00493 colorV[2] = color.blueF();
00494 colorV[3] = color.alphaF();
00495
00496 object->setBaseColor( colorV );
00497
00498
00499
00500
00501
00502 if ( PluginFunctions::objectCount() == 1 && OpenFlipper::Options::gui() && !OpenFlipper::Options::loadingSettings() )
00503 for ( unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i ){
00504 PluginFunctions::viewerProperties(i).drawMode( OpenFlipper::Options::defaultDrawMode(i) );
00505
00506 if ( OpenFlipper::Options::defaultProjectionMode(i) == 0 )
00507 PluginFunctions::orthographicProjection(i);
00508 else
00509 PluginFunctions::perspectiveProjection(i);
00510
00511 PluginFunctions::setFixedView(OpenFlipper::Options::defaultViewingDirection(i), i );
00512 }
00513
00514
00515
00516
00517
00518 resetScenegraph(true);
00519
00520
00521
00522
00523 emit openedFile( _id );
00524
00525
00526
00527
00528 emit log( LOGINFO ,object->getObjectinfo() );
00529
00530
00531
00532
00533 emit signalObjectUpdated(_id);
00534
00535
00536
00537
00538 backupRequest(_id,"Original Object");
00539
00540
00541
00542
00543 QString filename = object->path() + OpenFlipper::Options::dirSeparator() + object->name();
00544 BaseObject* object2;
00545 PluginFunctions::getObject(_id,object2);
00546
00547
00548
00549
00550 if ( PluginFunctions::objectCount() == 1 && OpenFlipper::Options::gui() && !OpenFlipper::Options::loadingSettings() )
00551 for ( unsigned int i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i ) {
00552 coreWidget_->examiner_widgets_[i]->viewAll();
00553 }
00554
00555
00556 }
00557
00559 void Core::slotEmptyObjectAdded ( int _id ) {
00560
00561 if ( OpenFlipper::Options::doSlotDebugging() ) {
00562 if ( sender() != 0 ) {
00563 if ( sender()->metaObject() != 0 ) {
00564 emit log(LOGINFO,tr("slotEmptyObjectAdded( ") + QString::number(_id) + tr(" ) called by ") +
00565 QString( sender()->metaObject()->className() ) );
00566 }
00567 } else {
00568 emit log(LOGINFO,tr("slotEmptyObjectAdded( ") + QString::number(_id) + tr(" ) called by Core") );
00569 }
00570 }
00571
00572
00573 BaseObjectData* object;
00574 PluginFunctions::getObject(_id,object);
00575
00576
00577 emit emptyObjectAdded( _id );
00578
00579
00580 emit signalObjectUpdated(_id);
00581
00582 backupRequest(_id,"Original Object");
00583
00585
00586
00587
00588 }
00589
00590
00591
00592
00593
00595 void Core::slotAddEmptyObjectMenu() {
00596 std::vector< DataType > types;
00597 QStringList typeNames;
00598
00599 DataType currentType = 2;
00600
00601
00602
00603
00604
00605
00606
00607 for ( uint i = 0 ; i < typeCount() - 2 ; ++i) {
00608
00609
00610
00611
00612
00613
00614 for ( uint j = 0 ; j < supportedDataTypes_.size(); j++) {
00615
00616
00617 if ( supportedDataTypes_[j].type & currentType ) {
00618 types.push_back(currentType);
00619 typeNames.push_back( typeName( currentType ) );
00620
00621
00622 break;
00623 }
00624 }
00625
00626
00627 for ( uint j = 0 ; j < supportedTypes_.size(); j++) {
00628
00629
00630 if ( supportedTypes_[j].type & currentType ) {
00631
00632
00633 bool duplicate = false;
00634 for(std::vector< DataType >::iterator it = types.begin(); it != types.end(); ++it) {
00635 if(*it == currentType) {
00636 duplicate = true;
00637 break;
00638 }
00639 }
00640
00641 if(!duplicate) {
00642 types.push_back(currentType);
00643 typeNames.push_back( typeName( currentType ) );
00644
00645
00646 break;
00647 }
00648 }
00649 }
00650
00651
00652 currentType++;
00653 }
00654
00655 static addEmptyWidget* widget = 0;
00656
00657 if (supportedTypes_.size() != 0) {
00658
00659 if ( !widget ){
00660 widget = new addEmptyWidget(types,typeNames);
00661 widget->setWindowIcon( OpenFlipper::Options::OpenFlipperIcon() );
00662 connect(widget,SIGNAL(chosen(DataType, int&)),this,SLOT(slotAddEmptyObject(DataType, int&)));
00663 }
00664
00665 widget->show();
00666
00667 } else
00668 emit log(LOGERR,tr("Could not show 'add Empty' dialog. Missing file-plugins ?"));
00669
00670 }
00671
00672
00673
00674
00675
00677 void Core::loadObject() {
00678
00679 if ( OpenFlipper::Options::gui() ){
00680
00681 if (supportedTypes_.size() != 0){
00682 LoadWidget* widget = new LoadWidget(supportedTypes_);
00683 connect(widget,SIGNAL(load(QString, int)),this,SLOT(slotLoad(QString, int)));
00684 connect(widget,SIGNAL(save(int, QString, int)),this,SLOT(saveObject(int, QString, int)));
00685
00686 widget->setWindowIcon( OpenFlipper::Options::OpenFlipperIcon() );
00687
00688 widget->showLoad();
00689
00690 widget->disconnect();
00691 delete widget;
00692
00693 }else
00694 emit log(LOGERR,tr("Could not show 'load objects' dialog. Missing file-plugins."));
00695
00696 }
00697 }
00698
00700 void Core::loadSettings(){
00701
00702 if ( OpenFlipper::Options::gui() ){
00703
00704 QString complete_name;
00705
00706
00707 QFileDialog fileDialog( coreWidget_,
00708 tr("Load Settings"),
00709 OpenFlipperSettings().value("Core/CurrentDir").toString(),
00710 tr("INI files (*.ini)") );
00711
00712 fileDialog.setOption (QFileDialog::DontUseNativeDialog, true);
00713 fileDialog.setAcceptMode ( QFileDialog::AcceptOpen );
00714 fileDialog.setFileMode ( QFileDialog::AnyFile );
00715
00716 QGridLayout *layout = (QGridLayout*)fileDialog.layout();
00717
00718 QGroupBox* optionsBox = new QGroupBox( &fileDialog ) ;
00719 optionsBox->setSizePolicy( QSizePolicy ( QSizePolicy::Expanding , QSizePolicy::Preferred ) );
00720 optionsBox->setTitle(tr("Options"));
00721 layout->addWidget( optionsBox, layout->rowCount() , 0 , 1,layout->columnCount() );
00722
00723 QCheckBox *loadProgramSettings = new QCheckBox(optionsBox);
00724 loadProgramSettings->setText(tr("Load program settings"));
00725 loadProgramSettings->setToolTip(tr("Load all current program settings from the file ( This will include view settings, colors,...) "));
00726 loadProgramSettings->setCheckState( Qt::Unchecked );
00727
00728 QCheckBox *loadPluginSettings = new QCheckBox(optionsBox);
00729 loadPluginSettings->setText(tr("Load per Plugin Settings"));
00730 loadPluginSettings->setToolTip(tr("Plugins should load their current global settings from the file"));
00731 loadPluginSettings->setCheckState( Qt::Checked );
00732
00733 QCheckBox *loadObjectInfo = new QCheckBox(optionsBox);
00734 loadObjectInfo->setText(tr("Load all objects defined in the file"));
00735 loadObjectInfo->setToolTip(tr("Load all objects which are defined in the file"));
00736 loadObjectInfo->setCheckState( Qt::Checked );
00737
00738 QBoxLayout* frameLayout = new QBoxLayout(QBoxLayout::TopToBottom,optionsBox);
00739 frameLayout->addWidget( loadProgramSettings , 0 , 0);
00740 frameLayout->addWidget( loadPluginSettings , 1 , 0);
00741 frameLayout->addWidget( loadObjectInfo , 2 , 0);
00742 frameLayout->addStretch();
00743
00744 fileDialog.resize(550 ,500);
00745
00746
00747
00748
00749 QStringList fileNames;
00750 if (fileDialog.exec()) {
00751 fileNames = fileDialog.selectedFiles();
00752 } else {
00753 return;
00754 }
00755
00756 if ( fileNames.size() > 1 ) {
00757 std::cerr << "Too many save filenames selected" << std::endl;
00758 return;
00759 }
00760
00761 complete_name = fileNames[0];
00762
00763
00764 QString newpath = complete_name.section(OpenFlipper::Options::dirSeparator(),0,-2);
00765 OpenFlipperSettings().setValue("Core/CurrentDir", newpath);
00766
00767 if ( complete_name.endsWith("ini") ) {
00768 openIniFile( complete_name,
00769 loadProgramSettings->isChecked(),
00770 loadPluginSettings->isChecked(),
00771 loadObjectInfo->isChecked());
00772 if ( loadProgramSettings->isChecked() )
00773 applyOptions();
00774 }
00775
00776 coreWidget_->addRecent(complete_name, DATA_UNKNOWN);
00777 }
00778 }
00779
00781 void Core::loadSettings(QString _filename){
00782
00783 if ( !QFile(_filename).exists() )
00784 return;
00785
00786 QString newpath = _filename.section(OpenFlipper::Options::dirSeparator(),0,-2);
00787 OpenFlipperSettings().setValue("Core/CurrentDir", newpath);
00788
00789 if ( _filename.endsWith("ini") ) {
00790
00791 openIniFile(_filename,true,true,true);
00792 applyOptions();
00793 } else if ( _filename.endsWith("obj") ) {
00794 loadObject(_filename);
00795 applyOptions();
00796 }
00797
00798 }