58 if (node_tree ==
nullptr) {
62 const bNode *node = node_tree->node_by_id(
data.node_id);
63 if (node ==
nullptr) {
71 const ContextualGeoTreeLogs tree_logs = GeoNodesLog::get_contextual_tree_logs(*snode);
78 tree_logs.foreach_tree_log([&](GeoTreeLog &tree_log) {
79 tree_log.ensure_socket_values();
80 tree_log.ensure_layer_names();
81 for (
const std::string &name : tree_log.all_layer_names) {
82 if (!names.
add(name)) {
90 GeoTreeLog *tree_log = tree_logs.get_main_tree_log(*node);
94 tree_log->ensure_socket_values();
95 GeoNodeLog *node_log = tree_log->nodes.lookup_ptr(node->
identifier);
96 if (node_log ==
nullptr) {
101 for (
const bNodeSocket *input_socket : node->input_sockets()) {
105 const ValueLog *value_log = tree_log->find_socket_value_log(*input_socket);
106 if (value_log ==
nullptr) {
110 if (
const std::optional<GeometryInfoLog::GreasePencilInfo> &grease_pencil_info =
113 for (
const std::string &name : grease_pencil_info->layer_names) {
114 if (names.
add(name)) {
115 layer_names.
append(&name);
144 std::string *item =
static_cast<std::string *
>(item_v);
145 if (item ==
nullptr) {
154 if (node_tree ==
nullptr) {
159 bNode *node = node_tree->node_by_id(
data->node_id);
160 if (node ==
nullptr) {
166 if (socket ==
nullptr) {
188 ICON_OUTLINER_DATA_GP_LAYER,
212 static_cast<void *
>(
data),
SpaceNode * CTX_wm_space_node(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
#define GEO_NODE_INPUT_NAMED_LAYER_SELECTION
#define BLI_assert_unreachable()
#define BLI_STATIC_ASSERT(a, msg)
char * STRNCPY(char(&dst)[N], const char *src)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
bScreen * ED_screen_animation_playing(const wmWindowManager *wm)
void ED_undo_push(bContext *C, const char *str)
void UI_but_placeholder_set(uiBut *but, blender::StringRef placeholder_text)
void UI_but_func_search_set_results_are_suggestions(uiBut *but, bool value)
void UI_but_func_search_set(uiBut *but, uiButSearchCreateFn search_create_fn, uiButSearchUpdateFn search_update_fn, void *arg, bool free_arg, uiFreeArgFunc search_arg_free_fn, uiButHandleFunc search_exec_fn, void *active)
uiBut * uiDefIconTextButR(uiBlock *block, int type, int retval, int icon, std::optional< blender::StringRefNull > str, int x, int y, short width, short height, PointerRNA *ptr, blender::StringRefNull propname, int index, float min, float max, std::optional< blender::StringRef > tip)
void UI_but_func_search_set_sep_string(uiBut *but, const char *search_sep_string)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
BMesh const char void * data
void append(const T &value)
void * MEM_callocN(size_t len, const char *str)
bNodeSocket * node_find_enabled_input_socket(bNode &node, StringRef name)
void node_geometry_add_layer_search_button(const bContext &, const bNode &node, PointerRNA &socket_ptr, uiLayout &layout, const StringRef placeholder)
static Vector< const std::string * > get_layer_names_from_context(const bContext &C, LayerSearchData &data)
static void layer_search_update_fn(const bContext *C, void *arg, const char *str, uiSearchItems *items, const bool is_first)
static void layer_search_exec_fn(bContext *C, void *data_v, void *item_v)
void grease_pencil_layer_search_add_items(StringRef str, Span< const std::string * > layer_names, uiSearchItems &items, bool is_first)
#define UI_MENU_ARROW_SEP
struct bNodeTree * edittree
char socket_identifier[MAX_NAME]