Closed ysrtyfn closed 1 week ago
Follows on from https://github.com/GraphiteEditor/Graphite/pull/1788 which got closed.
Adam's review from previous (deleted) PR: If the NodeInput for the String is exposed and connected to another node with NodeInput::Node, this will disconnect it when the name is changed in the layer panel. It doesn't really make sense to expose the name as an Input, since the only way it should be modified is through modifying the DocumentNode alias property.
I think it is best to remove the NodeInput entirely, and automatically add a NodeInput::Value with the TaggedValue::String based on the DocumentNode alias. This can be done in the flatten_with_fns step of the compilation process, where the input could be added when the NodeNetwork is compiled into an executable ProtoNetwork. This will allow the input to be fully hidden, similar to how footprints are automatically added. (This is quite advanced, but also a great way to learn about the compilation process. I can help more if I have time)
I outlined a bit of the process here, and the linked discord threads have more information https://github.com/GraphiteEditor/Graphite/issues/1762. Id recommend tracing over the entire compilation process, which starts here to get a basic understanding.
Added Label property to Artboard struct. Updated related artboard creation methods. Updated input indexes of Artboard node. Updated indexes used in
resize_artboard
method. Updatedflatten_with_fns
method to use node's alias as an input value for Artboard label.