Blender V5.0
blender::nodes::node_fn_format_string_cc Namespace Reference

Classes

struct  FormatPatternInfo
class  FormatInputsLookup
struct  ProcessedPythonCompatibleFormat
class  FormatStringMultiFunction

Functions

static void node_declare (NodeDeclarationBuilder &b)
static void node_init (bNodeTree *, bNode *node)
static void node_copy_storage (bNodeTree *, bNode *dst_node, const bNode *src_node)
static void node_free_storage (bNode *node)
static bool node_insert_link (bke::NodeInsertLinkParams &params)
static void node_operators ()
static void node_layout_ex (uiLayout *layout, bContext *C, PointerRNA *ptr)
static void node_blend_write (const bNodeTree &, const bNode &node, BlendWriter &writer)
static void node_blend_read (bNodeTree &, bNode &node, BlendDataReader &reader)
static std::optional< StringReffind_format_specifier (const StringRef format)
static int64_t find_next_format_start_or_end (const StringRef format, const int64_t start, std::string &r_out)
static FormatPatternInfo get_pattern_by_type_impl (const CPPType &type)
static const FormatPatternInfoget_pattern_by_type (const CPPType &type)
static std::string create_invalid_python_compatible_format_error (const StringRef format, const StringRef format_outer, const FormatPatternInfo &pattern)
static std::optional< ProcessedPythonCompatibleFormatpreprocess_python_compatible_syntax (const StringRef format, const StringRef format_outer, const CPPType &type, FormatInputsLookup &inputs_lookup, std::optional< std::string > &r_error)
static void format_with_fmt (const fmt::runtime_format_string<> format, const GVArray &input, const GVArray *widths, const GVArray *precisions, const IndexMask &mask, MutableSpan< std::string > r_formatted_strings)
static void format_with_python_compatible_syntax (const StringRef format_pattern, const StringRef format_outer, const GVArray &input, const IndexMask &mask, FormatInputsLookup &inputs_lookup, MutableSpan< std::string > r_formatted_strings, std::optional< std::string > &r_error)
static void format_with_hash_syntax (const StringRef format_pattern, const GVArray &input, const IndexMask &mask, MutableSpan< std::string > r_formatted_strings, std::optional< std::string > &r_error)
static void format_without_format_specifier (const GVArray &input, const IndexMask &mask, MutableSpan< std::string > r_formatted_strings, std::optional< std::string > &r_error)
static bool format_strings (const StringRef format, const Span< GVArray > inputs, const VectorSet< std::string > &input_names, const IndexMask &mask, MutableSpan< std::string > r_formatted_strings, std::optional< std::string > &r_error)
static void node_build_multi_function (NodeMultiFunctionBuilder &builder)
static void node_register ()

Function Documentation

◆ create_invalid_python_compatible_format_error()

std::string blender::nodes::node_fn_format_string_cc::create_invalid_python_compatible_format_error ( const StringRef format,
const StringRef format_outer,
const FormatPatternInfo & pattern )
static

◆ find_format_specifier()

std::optional< StringRef > blender::nodes::node_fn_format_string_cc::find_format_specifier ( const StringRef format)
static

Definition at line 118 of file node_fn_format_string.cc.

References BLI_assert, and length().

Referenced by format_strings().

◆ find_next_format_start_or_end()

int64_t blender::nodes::node_fn_format_string_cc::find_next_format_start_or_end ( const StringRef format,
const int64_t start,
std::string & r_out )
static

Definition at line 137 of file node_fn_format_string.cc.

References i.

Referenced by format_strings().

◆ format_strings()

◆ format_with_fmt()

void blender::nodes::node_fn_format_string_cc::format_with_fmt ( const fmt::runtime_format_string<> format,
const GVArray & input,
const GVArray * widths,
const GVArray * precisions,
const IndexMask & mask,
MutableSpan< std::string > r_formatted_strings )
static

◆ format_with_hash_syntax()

void blender::nodes::node_fn_format_string_cc::format_with_hash_syntax ( const StringRef format_pattern,
const GVArray & input,
const IndexMask & mask,
MutableSpan< std::string > r_formatted_strings,
std::optional< std::string > & r_error )
static

◆ format_with_python_compatible_syntax()

void blender::nodes::node_fn_format_string_cc::format_with_python_compatible_syntax ( const StringRef format_pattern,
const StringRef format_outer,
const GVArray & input,
const IndexMask & mask,
FormatInputsLookup & inputs_lookup,
MutableSpan< std::string > r_formatted_strings,
std::optional< std::string > & r_error )
static

◆ format_without_format_specifier()

void blender::nodes::node_fn_format_string_cc::format_without_format_specifier ( const GVArray & input,
const IndexMask & mask,
MutableSpan< std::string > r_formatted_strings,
std::optional< std::string > & r_error )
static

◆ get_pattern_by_type()

const FormatPatternInfo * blender::nodes::node_fn_format_string_cc::get_pattern_by_type ( const CPPType & type)
static

◆ get_pattern_by_type_impl()

FormatPatternInfo blender::nodes::node_fn_format_string_cc::get_pattern_by_type_impl ( const CPPType & type)
static

Also see https://fmt.dev/latest/syntax/.

Definition at line 175 of file node_fn_format_string.cc.

References blender::CPPType::is().

Referenced by get_pattern_by_type().

◆ node_blend_read()

void blender::nodes::node_fn_format_string_cc::node_blend_read ( bNodeTree & ,
bNode & node,
BlendDataReader & reader )
static

Definition at line 113 of file node_fn_format_string.cc.

References blender::nodes::socket_items::blend_read_data().

Referenced by node_register().

◆ node_blend_write()

void blender::nodes::node_fn_format_string_cc::node_blend_write ( const bNodeTree & ,
const bNode & node,
BlendWriter & writer )
static

Definition at line 108 of file node_fn_format_string.cc.

References blender::nodes::socket_items::blend_write().

Referenced by node_register().

◆ node_build_multi_function()

void blender::nodes::node_fn_format_string_cc::node_build_multi_function ( NodeMultiFunctionBuilder & builder)
static

◆ node_copy_storage()

void blender::nodes::node_fn_format_string_cc::node_copy_storage ( bNodeTree * ,
bNode * dst_node,
const bNode * src_node )
static

◆ node_declare()

◆ node_free_storage()

void blender::nodes::node_fn_format_string_cc::node_free_storage ( bNode * node)
static

◆ node_init()

void blender::nodes::node_fn_format_string_cc::node_init ( bNodeTree * ,
bNode * node )
static

Definition at line 60 of file node_fn_format_string.cc.

References data, MEM_callocN(), and bNode::storage.

Referenced by node_register().

◆ node_insert_link()

bool blender::nodes::node_fn_format_string_cc::node_insert_link ( bke::NodeInsertLinkParams & params)
static

◆ node_layout_ex()

void blender::nodes::node_fn_format_string_cc::node_layout_ex ( uiLayout * layout,
bContext * C,
PointerRNA * ptr )
static

◆ node_operators()

void blender::nodes::node_fn_format_string_cc::node_operators ( )
static

◆ node_register()

◆ preprocess_python_compatible_syntax()