42 std::string
string = std::string((node_storage->
string) ? node_storage->
string :
"");
54 if (storage ==
nullptr) {
57 if (storage->
string !=
nullptr) {
68 if (source_storage->
string) {
72 dest_node->
storage = destination_storage;
98 bNode &node =
params.add_node(
"FunctionNodeInputString");
99 params.update_and_connect_available_socket(node,
"String");
105 const float width =
BLF_width(fstyle.
uifont_id,
string.data(),
string.size()) + 40.0f;
106 node.
width = std::clamp(width, 140.0f, 1000.0f);
116 ntype.
ui_description =
"Provide a string value that can be connected to other nodes in the tree";
#define FN_NODE_INPUT_STRING
void BLF_size(int fontid, float size)
float BLF_width(int fontid, const char *str, size_t str_len, ResultBLF *r_info=nullptr) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(2)
void BLO_read_string(BlendDataReader *reader, char **ptr_p)
void BLO_write_string(BlendWriter *writer, const char *data_ptr)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
const uiStyle * UI_style_get()
@ UI_ITEM_R_SPLIT_EMPTY_NAME
void construct_and_set_matching_fn(Args &&...args)
void * MEM_callocN(size_t len, const char *str)
void * MEM_dupallocN(const void *vmemh)
void MEM_freeN(void *vmemh)
void node_register_type(bNodeType &ntype)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
void fn_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
NodeBlendWriteFunction blend_write_storage_content
std::string ui_description
NodeBlendDataReadFunction blend_data_read_storage_content
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeMultiFunctionBuildFunction build_multi_function
const char * enum_name_legacy
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
NodeDeclareFunction declare