0001182: Preserve names and colors on console mode export to STEP
This commit is contained in:
@@ -25,47 +25,29 @@
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <stdio.h>
|
||||
# if defined (_POSIX_C_SOURCE)
|
||||
# undef _POSIX_C_SOURCE
|
||||
# endif // (re-)defined in pyconfig.h
|
||||
# include <Python.h>
|
||||
#endif
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Interpreter.h>
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <Mod/Part/App/TopologyPy.h>
|
||||
|
||||
#include "FeatureImportStep.h"
|
||||
#include "FeatureImportIges.h"
|
||||
|
||||
|
||||
/* registration table */
|
||||
extern struct PyMethodDef Import_methods[];
|
||||
extern struct PyMethodDef Import_Import_methods[];
|
||||
|
||||
|
||||
// python entry
|
||||
#ifdef FC_OS_WIN32
|
||||
# define ModuleExport __declspec(dllexport)
|
||||
#else
|
||||
# define ModuleExport
|
||||
#endif
|
||||
extern "C" {
|
||||
void ModuleExport initImport() {
|
||||
void ImportExport initImport()
|
||||
{
|
||||
(void) Py_InitModule("Import", Import_Import_methods); /* mod name, table ptr */
|
||||
|
||||
(void) Py_InitModule("Import", Import_methods); /* mod name, table ptr */
|
||||
try {
|
||||
Base::Interpreter().loadModule("Part");
|
||||
}
|
||||
catch(const Base::Exception& e) {
|
||||
PyErr_SetString(PyExc_ImportError, e.what());
|
||||
return;
|
||||
}
|
||||
|
||||
// load dependend module
|
||||
Base::Interpreter().loadModule("Part");
|
||||
|
||||
App::AbstractFeatureFactory().AddProducer("ImportStep",new App::AbstractFeatureProducer<Import::FeatureImportStep>);
|
||||
App::AbstractFeatureFactory().AddProducer("ImportIges",new App::AbstractFeatureProducer<Import::FeatureImportIges>);
|
||||
|
||||
Base::Console().Log("Import loaded\n");
|
||||
|
||||
return;
|
||||
Base::Console().Log("Loading Import module... done\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user