Skip to content

Commit

Permalink
+ simplify porting of Raytracing module to Python3
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jan 18, 2016
1 parent 1081492 commit 05279d2
Show file tree
Hide file tree
Showing 4 changed files with 379 additions and 370 deletions.
18 changes: 8 additions & 10 deletions src/Mod/Raytracing/App/AppRaytracing.cpp
Expand Up @@ -35,11 +35,12 @@
#include "LuxFeature.h"
#include "LuxProject.h"

extern struct PyMethodDef Raytracing_methods[];
namespace Raytracing {
extern PyObject* initModule();
}


extern "C" {
void AppRaytracingExport initRaytracing()
PyMODINIT_FUNC initRaytracing()
{
// load dependent module
try {
Expand All @@ -50,16 +51,13 @@ void AppRaytracingExport initRaytracing()
return;
}

Raytracing::RaySegment ::init();
Raytracing::RayFeature ::init();
Raytracing::RayProject ::init();
Raytracing::RaySegment ::init();
Raytracing::RayFeature ::init();
Raytracing::RayProject ::init();
Raytracing::LuxFeature ::init();
Raytracing::LuxProject ::init();


(void) Py_InitModule("Raytracing", Raytracing_methods); /* mod name, table ptr */
(void) Raytracing::initModule();
Base::Console().Log("Loading Raytracing module... done\n");

}

} // extern "C" {

0 comments on commit 05279d2

Please sign in to comment.