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`.
This commit is contained in:
Hans Goudey 2022-01-20 15:10:28 -06:00
parent 4369c5817a
commit 9ca1052226
2 changed files with 9 additions and 2 deletions

View File

@ -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)

View File

@ -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)