Commit 7a314c38 authored by Dirk Wilden's avatar Dirk Wilden

copyObject moved to loadsaveinterface

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5856 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 9fd2e520
......@@ -177,35 +177,6 @@ bool getObject( const int _identifier , BaseObjectData*& _object ) {
// ===============================================================================
// ===============================================================================
int copyObject( const int _id ) {
if ( _id == -1 )
return -1;
// get the node
BaseObject* object = objectRoot_->childExists(_id);
if ( !object ) {
std::cerr << "Error while copying object ... not found" << std::endl;
return -1;
}
// remove the whole subtree below this item
BaseObject* copy = object->copy();
if ( copy == 0 ) {
std::cerr << "Unable to create a copy of the object." << std::endl;
}
// Integrate into object tree
copy->setParent( object->parent() );
if ( object->parent() )
object->parent()->appendChild(copy);
else
std::cerr << "Unable to add copy to object list" << std::endl;
return copy->id();
}
bool object_exists( const int _identifier ) {
if ( _identifier == -1 )
......
......@@ -73,20 +73,6 @@ namespace PluginFunctions {
DLLEXPORT
bool getPickedObject(const unsigned int _node_idx , BaseObjectData*& _object);
/** \brief Create a copy of the object with the given id
*
* Creates a copy of an object. All scenegraph nodes will be created. The object will
* be part of the object tree at the same location as the parent of the original mesh.
* This has to be done by setParent of the object.
*
* @return Pointer to new object or 0 if failed;
* */
DLLEXPORT
int copyObject( const int _id );
/** @} */
//=======================================
......
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