Python API: Копирование объектов между документами
Re: Python API: Копирование объектов между документами
Пока вижу только одно решение: создание нового объекта с наследованием параметров предыдущего
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Python API: Копирование объектов между документами
питон:
App.ActiveDocument.copyObject()
вырезка из Document.h:
/** Copy an object from another document to this document
* If \a recursive is true then all objects this object depends on
* are copied as well. By default \a recursive is false.
* Returns the copy of the object or 0 if the creation failed.
*/
DocumentObject* copyObject(DocumentObject* obj, bool recursive=false);
/** Move an object from another document to this document
* If \a recursive is true then all objects this object depends on
* are moved as well. By default \a recursive is false.
* Returns the moved object itself or 0 if the object is already part of this
* document..
*/
DocumentObject* moveObject(DocumentObject* obj, bool recursive=false);
App.ActiveDocument.copyObject()
вырезка из Document.h:
/** Copy an object from another document to this document
* If \a recursive is true then all objects this object depends on
* are copied as well. By default \a recursive is false.
* Returns the copy of the object or 0 if the creation failed.
*/
DocumentObject* copyObject(DocumentObject* obj, bool recursive=false);
/** Move an object from another document to this document
* If \a recursive is true then all objects this object depends on
* are moved as well. By default \a recursive is false.
* Returns the moved object itself or 0 if the object is already part of this
* document..
*/
DocumentObject* moveObject(DocumentObject* obj, bool recursive=false);
Re: Python API: Копирование объектов между документами
Ну вот, а я собрался было велосипед изобретать
- DeepSOIC
- Veteran
- Posts: 7896
- Joined: Fri Aug 29, 2014 12:45 am
- Location: used to be Saint-Petersburg, Russia
Re: Python API: Копирование объектов между документами
я вот буквально только что ковырялся в этих исходниках, и тут этот топик всплыл