BrendanParmer / NodeToPython

Convert Blender node groups to a Python add-on
MIT License
236 stars 21 forks source link

Node name not included in script #68

Closed gnistregn closed 8 months ago

gnistregn commented 11 months ago

The Name attribute of nodes is not replicated when exported as a script. It is used to name the variable in the resulting script, but the attribute isn't initialized with the name. This is what I get from a Value node currently:

#node Foo
foo = paint_visualizer_002.nodes.new("ShaderNodeValue")
foo.label = "FooLabel"

But would be great if it also populated name, like this:

#node Foo
foo = paint_visualizer_002.nodes.new("ShaderNodeValue")
foo.name = "Foo"
foo.label = "FooLabel"