Add a new string input node String in the input category.
Description
Revisions and Commits
rB Blender | |||
D10316 | rBa961a2189cb3 Geometry Nodes: Add string input node |
Related Objects
- Mentioned In
- D10316: Added New String Input Node
Event Timeline
Alternatively, this can be added to the input value node? Were we can input multiple value types such as boolean int string float.
Love the idea.
With a string input node, later on it could be complimented by a node that takes a string input and font selection then generates a mesh.
Then later on after that, string nodes that take a string input, and perform manipulations, and output the result as a string output.
For now this node is simply a necessity for the attribute workflow, as the attribute input socket accepts a string as the name of the attribute.
Having a combined Input node regardless of the type is not a bad idea. For now this is simply following the design we generally have in Blender with e.g. shading nodes. But I can see this possibly changing once we have a broader range of different input types.
Great!! I already did some digging and I was wondering if the string node should be a Geometry node or instead a Function node (like the vector node) or a Shading node (like the value node).
Since it's general (could theoretically be used in any node tree), implementing it as a function node would be preferred, just like the vector input node.
Hi guys!! I have it working now.
I wanted to ask you if is OK this new DNA struct to store the string property:
typedef struct NodeInputString { char string[1024]; } NodeInputString;
I saw the bNodeSocketValueString use char value[1024] but I think is Deprecated.
Nice!
Right, just like the NodeInputVector node. bNodeSocketValueString isn't deprecated, it's just used for sockets, and since this string isn't a socket but a node property, it can't be used here.
Ok then.
I'll double check everything and I'll consult the developer intro on Best Practices and all that.
Thanks!
char string[1024];
but in this case, unicode characters are not supported. and we can't use this node as input for creating text mesh object 😢
P.S. also in houdini for example, text input filed also used in some nodes to create points/edges/faces/etc, from they text representation of array coordinates/id/etc, i mean lenght of 1024 maybe to short?
Utf8 should be supported by char arrays. 1024 does seem limiting if users would want to populate from coordinates, but it feels like if that's what you want to do then you should be using a text data block or some other solution that allows users to import data from heavy sources (CSVs, custom import formats, etc). Maybe a string size limit might be a problem in real production eventually though when generating text meshes like you said. But I think as an initial implementation 1024 should be fine for attribute name inputs.