How to change the input output names of Python node?


#1

Can somebody please explain how to change these input, output names: IN[0], IN[1], OUT… of Python node?

Thank you.


#2

cant…unless i am wrong


#3

You can always add your script node to a custom node and name the inputs/outputs to whatever you desire:

DynamoSandbox_2016-01-30_10-45-27


#4

Dimitar,

Technically, yes but we both know that this was not the question that the OP asked. :slight_smile:


#5

Thank you for the replies both Kondrad and Dimitar.

Indeed being able to directly change the input and output names of the python node would be very beneficial.
But it is also good to know that there is a workaround.

Thank you guys. Both of you.


#6

would be nice at least to be able to add multiple outputs


#7

Hi @Konrad_K_Sobon and @Dimitar_Venkov,

Two years after this question, the python node in Dynamo can still not change its input and output names?
The workaround that Dimitar showed in his post above, still needs to be used?


#8

Yes, still no multiple output Python nodes. cc: @Zach_Kron @Michael_Kirschner2 @Michael_Dewberry


#9

Actually, with dynamo 2, you can technically change the name of any port because they get serialized to the json file and deserialized back the next time you open the file. So if you tweak the correct part of the *.dyn, you can :slight_smile:


#10

Thank you for the reply both @Konrad_K_Sobon and @Dimitar_Venkov!

Dimitar, so there is a work around to change the name of python node “IN” input to something. By manually opening the .dyn file in some text editor.
But through Dynamo interface there is still no way to do it?
Is it planned at some point in future to have the multiple inputs added as well?
I don’t want to sound unpolite but it’s a bit odd that no change has been done for the last three years.


#11

By the sounds of the posts, what people are asking for is the ability to create a custom node functionality from the python nodes themselves. Can I ask why?

From my perspective: they don’t scale well, and if used in large enough number to make this feature worthwhile you’d create more problems than you’d have saved by not using other existing methods (ie: zero touch or standard custom nodes).


#12

I think changing the input name is unneeded however I can understand the want for named inputs just for the sake of easy visualization (Dynamo being a visual programming). A python script with just IN’s might not be easy to understand at a glance and would require you to go inside the script to figure out what inputs they are. It makes the overall reading of a graph harder. Making a custom node might be too much for just a one-time use python. Along with that, custom nodes do not share as well as a python node directly within the graph.

It could be easily solved, however, by using a codeblock with named variables just before the python, as like a screen for the inputs.


#13

It makes perfect sense to allow users to not only rename input ports, but also output ports, as well as make that Python node a variable input/output node. I don’t see a good reason, why it shouldn’t be. Grasshopper components have had that functionality for years.