Quick Drop Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

EasyConvert- QD Plugin

My 20% project continues. A subtle change for something that annoyed me.

The plugin now handles wires with more than one terminal. It will grab the first selected section and travel right/up/down until it reaches the end then find the nearest terminal. The old code use to just take the first two terminals in the array.This allows complex wire structures like the following

Example.png

Note: The bottom right wire was selected before running.

The terminal finding code was complex and I'm not entirely happy with it. If there is simpler way, I will be both annoyed and relieved. Needless to say, this version is a lot more experimental than the last. I haven't had a lot of testing.

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 11 of 14
(599 Views)

Personally I don't think this is a standard way that a QD plugin should work.  If I choose to insert a function on a wire, I don't expect it to try to insert it on multiple segments on that wire.  CTRL+I will only insert a function once, for every wire segment selected.  If I wanted multiple conversion done, I'd expect I need to select multiple segments.

0 Kudos
Message 12 of 14
(599 Views)

It actually won't do multiple selected segments on a single wire. It will do multiple wires.

Here is the logic:

For each wire selected, it looks to see if it has 2 terminals or more

  • 2 Terminals- Just use indexing
  • More- It finds the first selected segment and does the searching described above

Really, in practice, this allows you to have a working wire with multiple sinks and direct it somewhere new. You select the segment and it converts only that segment.

easyconvert flow.png

(the segment connected to the path is selected in this example)

Prior to this change, if you had multiple sinks the index #1 would be an essentially random sink. In the above example, it would select the sink going to the Str->U8 Array (Index #1 in terminals) and insert a typecast into your selected segment.

Josh
Software is never really finished, it's just an acceptable level of broken
0 Kudos
Message 13 of 14
(599 Views)

Bug fixed that I introduced when I added the "view as icon" code.

Added the following conversions

  • 1D->2D - Build array
  • 2D->1D - Index array
  • 2D-> Element - Index array

(again, all must be exact same type)

Josh
Software is never really finished, it's just an acceptable level of broken
Message 14 of 14
(599 Views)