I built blender 2.93a using Visual Studio 2019 on Windows 10 and tried to enable Molecular Addon for my personal debugging. In the release build, I could enable it and the addon worked normally. But, in Debug mode, I could not import the addon (got import error message.) The addon is using cython code and it seems Blender debug build cannot handle it.
Since 2.93 is using Python 2.9, I compiled the cython code using Python 2.9 and the code was loaded correctly in Release build as mentioned. But I could not in Debug build.
Is there anything I am missing? I would appreciate any help.
Moluclar links directly to the release mode python dll (python39.dll) which is called python39_d.dll for a debug build, so you can only load this addon on release builds. (unless you build a special version that links to the debug pytohn library)
Can you let me know in which timing the addon is linked to the dll? Should I set some flag when I compile the cython code to link to python39_d.dll?
Sorry I am new to cython and Blender addon, so I donât know how to find relevant documents. I would appreciate if you could let me know some website describing that.
The following is the provided setup.py used to compile cython code in Molecular addon. I guess I need to modify this so that it can be used in Blender Debug build. Can you point out where I should modify? I am kinds of stuck nowâŚ
Note this is for windows
import platform
from distutils.core import setup
from Cython.Distutils import build_ext, Extension
import Cython.Compiler.Options