66 if (node_tree ==
nullptr) {
71 if (
node ==
nullptr) {
79 const ContextualNodeTreeLogs tree_logs = NodesEvalLog::get_contextual_tree_logs(*snode);
86 tree_logs.foreach_tree_log([&](NodeTreeLog &tree_log) {
87 tree_log.ensure_socket_values();
88 tree_log.ensure_layer_names();
89 for (
const std::string &name : tree_log.all_layer_names) {
90 if (!names.
add(name)) {
98 NodeTreeLog *tree_log = tree_logs.get_main_tree_log(*
node);
102 tree_log->ensure_socket_values();
103 NodeLog *node_log = tree_log->find_node_log(
node->identifier);
104 if (node_log ==
nullptr) {
113 const ValueLog *value_log = tree_log->find_socket_value_log(*input_socket);
114 if (value_log ==
nullptr) {
118 if (
const std::optional<GeometryInfoLog::GreasePencilInfo> &grease_pencil_info =
119 geo_log->grease_pencil_info)
121 for (
const std::string &name : grease_pencil_info->layer_names) {
122 if (names.
add(name)) {
123 layer_names.
append(&name);
152 std::string *item =
static_cast<std::string *
>(item_v);
153 if (item ==
nullptr) {
162 if (node_tree ==
nullptr) {
168 if (
node ==
nullptr) {
174 if (socket ==
nullptr) {
195 ICON_OUTLINER_DATA_GP_LAYER,
205 button_placeholder_set(but, placeholder);
212 button_func_search_set_results_are_suggestions(but,
true);
214 button_func_search_set(but,
217 static_cast<void *
>(
data),
#define GEO_NODE_INPUT_NAMED_LAYER_SELECTION
#define STRNCPY_UTF8(dst, src)
#define BLI_assert_unreachable()
void append(const T &value)
bNodeSocket * node_find_enabled_input_socket(bNode &node, StringRef name)
BLI_STATIC_ASSERT(std::is_trivially_destructible_v< AttributeSearchData >, "")
static void layer_search_update_fn(const bContext *C, void *arg, const char *str, ui::SearchItems *items, const bool is_first)
static Vector< const std::string * > get_layer_names_from_context(const bContext &C, LayerSearchData &data)
void node_geometry_add_layer_search_button(const bContext &, const bNode &node, PointerRNA &socket_ptr, ui::Layout &layout, const StringRef placeholder)
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, SearchItems &items, bool is_first)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
void * MEM_new_zeroed(size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
BMesh const char void * data
wmWindowManager * CTX_wm_manager(const bContext *C)
void ED_undo_push(bContext *C, const char *str, UndoEncodeHints hints=UndoEncodeHints(0))
SpaceNode * CTX_wm_space_node(const bContext *C)
bScreen * ED_screen_animation_playing(const wmWindowManager *wm)
#define UI_MENU_ARROW_SEP
struct bNodeTree * edittree
char socket_identifier[MAX_NAME]