DynamoWishlist icon indicating copy to clipboard operation
DynamoWishlist copied to clipboard

python component improvements

Open ksobon opened this issue 11 years ago • 8 comments

I would love the Python editor to get some love in Dynamo:

  • auto indenting would be nice.
  • ability to run it without exiting the window would be nice(console)
  • ability to define more than one output i hate the current gymnastics with single list
  • ability to define tool tip message/input parameter requirements on hover
  • still no dictionaries, wrapping everything into separate class is a workaround not a solution

These might all be repeats from numerous other requests, but is there a timetable for any of these?

Thank you,

ksobon avatar Dec 05 '14 14:12 ksobon

Now that you brought this up again, I copy-paste a modified version of my email from August here to be added to your list:

  1. Default Values. For many of the nodes we need to be able to assign a default value to the input so users don’t have to provide an input for every single inputs.
  2. Re-execution of the definition. In some cases Dynamo doesn’t update the custom node upon changing the input vales. I needed to disconnect and reconnect the wires to get it to work.
  3. Tooltip/Description for inputs and outputs in custom node.
  4. Having access to the Python node itself from inside the node. (eg. This.IN0.Description = “blah blah blah”)
  5. Call dynamo nodes inside Python script. Apparently it will be possible in 0.0.7 [Already possible]
  6. Make Python editor as a docking window and add a run button to node so it can be used as a editor.
  7. Add helper window for Python component to show the inputs for functions.

mostaphaRoudsari avatar Dec 05 '14 15:12 mostaphaRoudsari

I insist on bringing this up every now and then since its a forgotten topic. Thanks for chiming in. Your list is much better :+1:

ksobon avatar Dec 05 '14 17:12 ksobon

Yet another request for Dictionary support. https://forum.dynamobim.com/t/get-a-dictionary-out-of-python-node/12817

ksobon avatar Jun 29 '17 01:06 ksobon

Just-merged PR DynamoDS/Dynamo#8182 adds a run button to the editor window and allows you to have multiple windows open at once.

Dewb avatar Oct 17 '17 21:10 Dewb

Many other very good enhancement ideas in this thread. I hope to have time to address a couple of other frequent requests before 2.0, but I can't promise anything yet.

Dewb avatar Oct 17 '17 21:10 Dewb

While I understand the merits of having a decent built-in editor I think that building one will take energy away from working on issues that are more Dynamo-centric. So how do we go about hooking up an external code editor into a Python Node? I would love to be able to edit my code in Sublime Editor.

professor-pickle avatar Oct 20 '18 09:10 professor-pickle

@tomekpiatek, see this: https://github.com/gtalarico/ironpython-stubs

mostaphaRoudsari avatar Oct 20 '18 15:10 mostaphaRoudsari

  1. Default Values. For many of the nodes we need to be able to assign a default value to the input so users don’t have to provide an input for every single inputs.

We want to strive for as consistent an experience as possible, so given that we think that having a bespoke way to implement defaults into the Python node via UI affordance would introduce a new paradigm. This paradigm would diverge from existing approaches where we currently define functions in codeblocks or custom nodes using the: paramName: type = defaultVal / paramName = defaultVal syntax.

Two options in Dynamo today are as follows:

  1. Adding a code block with an inline if statement before each input
  2. Within the Python code you use an if statement and deal with it in code

Note: We are improving the Editor UI of the Python Node and tacking on some improvements to the Python experience at the same time, hence why this thread was resurrected.

Amoursol avatar Nov 01 '22 20:11 Amoursol