diff options
author | Hans Goudey <h.goudey@me.com> | 2022-01-21 00:10:28 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-01-21 00:10:28 +0300 |
commit | 9ca1052226d3eeb9546e6ea90f5ae3f8062e23ba (patch) | |
tree | 14d36039830dc451af01cbc2a8bb230823f15110 /source | |
parent | 4369c5817aaadb8888afd697074bdadc85e1485c (diff) |
Fix Python API docs build error
There is probably a better solution that's possible, but the few other
things I tried didn't work, and the build error should be resolved for
the buildbots. This is similar to the "breaks" in the namespace for
functions declared in `ED_node.h`.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_node/node_intern.hh | 5 | ||||
-rw-r--r-- | source/blender/editors/space_node/space_node.cc | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_intern.hh b/source/blender/editors/space_node/node_intern.hh index 9bd5c0ba00b..c161fc70402 100644 --- a/source/blender/editors/space_node/node_intern.hh +++ b/source/blender/editors/space_node/node_intern.hh @@ -45,6 +45,9 @@ struct wmGizmoGroupType; struct wmKeyConfig; struct wmWindow; +/* Outside of blender namespace to avoid Python documentation build error with `ctypes`. */ +extern const char *node_context_dir[]; + namespace blender::ed::space_node { /** Temporary data used in node link drag modal operator. */ @@ -325,8 +328,6 @@ void node_geometry_add_attribute_search_button(const bContext &C, PointerRNA &socket_ptr, uiLayout &layout); -extern const char *node_context_dir[]; - /* Nodes draw without dpi - the view zoom is flexible. */ #define HIDDEN_RAD (0.75f * U.widget_unit) #define BASIS_RAD (0.2f * U.widget_unit) diff --git a/source/blender/editors/space_node/space_node.cc b/source/blender/editors/space_node/space_node.cc index 40a7e3e616e..f794a8ce294 100644 --- a/source/blender/editors/space_node/space_node.cc +++ b/source/blender/editors/space_node/space_node.cc @@ -816,8 +816,14 @@ 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`. */ const char *node_context_dir[] = { "selected_nodes", "active_node", "light", "material", "world", nullptr}; + +namespace blender::ed::space_node { + static int /*eContextResult*/ node_context(const bContext *C, const char *member, bContextDataResult *result) |