Fix build error on WIN32 from `_bpy.context_members`

As of [0] which references context arrays from the Python API,
C++ name mangling caused 'node_context_dir' not to be found for WIN32.

[0]: c8edc458d1
This commit is contained in:
Campbell Barton 2022-05-18 19:24:08 +10:00
parent 3cd3a4abe3
commit f937c186de
Notes: blender-bot 2023-02-14 10:29:30 +01:00
Referenced by issue #76442, Hide Blender symbols by default on all platforms
2 changed files with 4 additions and 0 deletions

View File

@ -31,7 +31,9 @@ struct wmKeyConfig;
struct wmWindow;
/* Outside of blender namespace to avoid Python documentation build error with `ctypes`. */
extern "C" {
extern const char *node_context_dir[];
};
namespace blender::ed::space_node {

View File

@ -826,8 +826,10 @@ static void node_region_listener(const wmRegionListenerParams *params)
} // namespace blender::ed::space_node
/* Outside of blender namespace to avoid Python documentation build error with `ctypes`. */
extern "C" {
const char *node_context_dir[] = {
"selected_nodes", "active_node", "light", "material", "world", nullptr};
};
namespace blender::ed::space_node {