Commit 0d499a81 authored by Jan Möbius's avatar Jan Möbius

Get rid of separator node when creating objects. The objects have to do it themselves

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@8347 383ad7c9-94d9-4d36-a494-682f7c89f535
parent d446fc9e
......@@ -52,9 +52,12 @@
//== INCLUDES =================================================================
#include "Types.hh"
#include <OpenFlipper/common/GlobalOptions.hh>
#include <ACG/Scenegraph/SceneGraph.hh>
#include <OpenFlipper/common/BaseObjectCore.hh>
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
#include <QDir>
//== TYPEDEFS =================================================================
......@@ -75,11 +78,11 @@ BaseObjectData::BaseObjectData(const BaseObjectData& _object)
init();
}
BaseObjectData::BaseObjectData( SeparatorNode* _rootNode ) :
BaseObjectData::BaseObjectData() :
BaseObject(),
path_("."),
manipPlaced_(false),
rootNode_(_rootNode),
rootNode_( dynamic_cast< ACG::SceneGraph::SeparatorNode* > (PluginFunctions::getRootNode()) ),
separatorNode_(0),
manipulatorNode_(0),
materialNode_(0),
......@@ -153,8 +156,8 @@ void BaseObjectData::init() {
void BaseObjectData::setFromFileName(QString _filename ) {
QString str = _filename;
path_ = str.section(OpenFlipper::Options::dirSeparator(),0,-2);
setName(str.section(OpenFlipper::Options::dirSeparator(),-1));
path_ = str.section(QDir::separator() ,0,-2);
setName(str.section(QDir::separator(),-1));
}
void BaseObjectData::setName( QString _name ) {
......
......@@ -108,7 +108,7 @@ class DLLEXPORT BaseObjectData : public BaseObject
BaseObjectData(const BaseObjectData& _object);
/// constructor
BaseObjectData(SeparatorNode* _rootNode);
BaseObjectData();
///destructor
virtual ~BaseObjectData();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment