Differential D13466 Diff 46665 source/blender/nodes/function/nodes/node_fn_input_special_characters.cc
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/function/nodes/node_fn_input_special_characters.cc
| Show All 10 Lines | |||||
| * | * | ||||
| * You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
| * along with this program; if not, write to the Free Software Foundation, | * along with this program; if not, write to the Free Software Foundation, | ||||
| * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
| */ | */ | ||||
| #include "node_function_util.hh" | #include "node_function_util.hh" | ||||
| namespace blender::nodes { | namespace blender::nodes::node_fn_input_special_characters_cc { | ||||
| static void fn_node_input_special_characters_declare(NodeDeclarationBuilder &b) | static void fn_node_input_special_characters_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_output<decl::String>(N_("Line Break")); | b.add_output<decl::String>(N_("Line Break")); | ||||
| b.add_output<decl::String>(N_("Tab")); | b.add_output<decl::String>(N_("Tab")); | ||||
| }; | }; | ||||
| class MF_SpecialCharacters : public fn::MultiFunction { | class MF_SpecialCharacters : public fn::MultiFunction { | ||||
| Show All 26 Lines | |||||
| static void fn_node_input_special_characters_build_multi_function( | static void fn_node_input_special_characters_build_multi_function( | ||||
| NodeMultiFunctionBuilder &builder) | NodeMultiFunctionBuilder &builder) | ||||
| { | { | ||||
| static MF_SpecialCharacters special_characters_fn; | static MF_SpecialCharacters special_characters_fn; | ||||
| builder.set_matching_fn(special_characters_fn); | builder.set_matching_fn(special_characters_fn); | ||||
| } | } | ||||
| } // namespace blender::nodes | } // namespace blender::nodes::node_fn_input_special_characters_cc | ||||
| void register_node_type_fn_input_special_characters() | void register_node_type_fn_input_special_characters() | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_fn_input_special_characters_cc; | |||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| fn_node_type_base( | fn_node_type_base( | ||||
| &ntype, FN_NODE_INPUT_SPECIAL_CHARACTERS, "Special Characters", NODE_CLASS_INPUT, 0); | &ntype, FN_NODE_INPUT_SPECIAL_CHARACTERS, "Special Characters", NODE_CLASS_INPUT); | ||||
| ntype.declare = blender::nodes::fn_node_input_special_characters_declare; | ntype.declare = file_ns::fn_node_input_special_characters_declare; | ||||
| ntype.build_multi_function = | ntype.build_multi_function = file_ns::fn_node_input_special_characters_build_multi_function; | ||||
| blender::nodes::fn_node_input_special_characters_build_multi_function; | |||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||