Page MenuHome

Geometry Nodes: Special Characters
ClosedPublic

Authored by Erik Abrahamsson (erik85) on Sep 23 2021, 8:56 PM.

Details

Summary

This patch adds a new node called "Special Characters" with two string outputs: "Line Break" and "Tab".

Diff Detail

Repository
rB Blender

Event Timeline

Erik Abrahamsson (erik85) requested review of this revision.Sep 23 2021, 8:56 PM
Erik Abrahamsson (erik85) created this revision.

I think the functionality is fine, just adding Jacques since I want to be sure this is what he had in mind for the double constant output function.

source/blender/nodes/function/nodes/node_fn_input_special_characters.cc
50–52

Using the blender namespace explicitly shouldn't be necessary here, since this is already in blender::nodes.
Same with above

This revision is now accepted and ready to land.Sep 24 2021, 12:28 AM
This revision now requires review to proceed.Sep 24 2021, 12:28 AM
source/blender/nodes/function/nodes/node_fn_input_special_characters.cc
50–52

Oops, I thought I deleted this comment, because it's not correct. Just ignore it.

Jacques Lucke (JacquesLucke) added inline comments.
source/blender/nodes/function/nodes/node_fn_input_special_characters.cc
50–52

It should be correct though. This can easily be in the blender::nodes namespace, or not?

55

Just use the for (const int i : mask) loop here. mask.foreach_index can be faster sometimes, but here it's just not worth the additional complexity. In practice the mask will only contain a single element anyway, because the output is constant.

This revision is now accepted and ready to land.Sep 24 2021, 4:19 PM
source/blender/nodes/function/nodes/node_fn_input_special_characters.cc
50–52

I looked at the other nodes and they only use the nodes namespace for the declaration, but I agree it would be nicer to have the whole node in it (except for register_node_type_fn_input_special_characters).

Erik Abrahamsson (erik85) marked 5 inline comments as done.
  • The whole node in blender::nodes namespace
  • Changed foreach_index to for loop.