Skip to content

Commit

Permalink
Merge pull request #4639 from nortikin/update_menu_nodes_comments_v04
Browse files Browse the repository at this point in the history
docs update
List->List Struct
List->List Main
  • Loading branch information
satabol authored Sep 2, 2022
2 parents 6cc1476 + f50e048 commit a2c5960
Show file tree
Hide file tree
Showing 21 changed files with 75 additions and 55 deletions.
2 changes: 1 addition & 1 deletion docs/nodes/list_main/decompose.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Parameters
Outputs
-------

- **data** - multisocket
* **data** - multisocket


Example of usage
Expand Down
10 changes: 5 additions & 5 deletions docs/nodes/list_main/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ List -> List main -> List Index
Inputs
------

- **data** - where to search items
- **Item** - what to search in data
* **data** - where to search items
* **Item** - what to search in data

In use range mode:

- **Start index** - index from which to start searching (inclusive)
- **End index** - index where to finish searching (exclusive)
* **Start index** - index from which to start searching (inclusive)
* **End index** - index where to finish searching (exclusive)

Outputs
-------

- **Index** - An index of an item in data. If there is no such item -1 value will be returned.
* **Index** - An index of an item in data. If there is no such item -1 value will be returned.

Options
-------
Expand Down
16 changes: 8 additions & 8 deletions docs/nodes/list_main/join.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,29 +51,29 @@ level 2 Match + Mix + Wrap:
Inputs
------

**data** multisocket
* **data** multisocket

Parameters
----------

**Match**: length of lists will be matched before joining
**Match mode**: how length of lists should be matched (Repeat Last, Cycle, Match Short...)
**Mix** to mix (not zip) data inside
**Wrap** to wrap additional level
**Levels** level of joining
* **Match**: length of lists will be matched before joining
* **Match mode**: how length of lists should be matched (Repeat Last, Cycle, Match Short...)
* **Mix** to mix (not zip) data inside
* **Wrap** to wrap additional level
* **Levels** level of joining

Advanced Parameters
-------------------

In the N-Panel (and on the right-click menu) you can find:

**NumPy Mode**: When enabled the node will expect and produce lists of NumPy arrays. It will be faster when joining NumPy Arrays but due the nature of the implementation it will fail when trying to join arrays with different axis number.
* **NumPy Mode**: When enabled the node will expect and produce lists of NumPy arrays. It will be faster when joining NumPy Arrays but due the nature of the implementation it will fail when trying to join arrays with different axis number.


Outputs
-------

**data** adaptable socket
* **data** adaptable socket

Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion docs/nodes/list_main/length.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Takes any kind of data.
Parameters
----------

**Level:** Set the level at which to observe the List. Min Level is 0.
* **Level:** Set the level at which to observe the List. Min Level is 0.

Outputs
-------
Expand Down
7 changes: 2 additions & 5 deletions docs/nodes/list_main/statistics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,8 @@ The fonts used for this node are monospace fonts for best text alignment.

Outputs
-------
**Name(s)**
The name(s) of the statistical value(s) computed corresponding to the selected statistical function.

**Value(s)**
The statistical quantity of the input values corresponding to the selected function. For a vectorized input the output values are a series of quantities corresponding to the selected function.
* **Name(s)** The name(s) of the statistical value(s) computed corresponding to the selected statistical function.
* **Value(s)** The statistical quantity of the input values corresponding to the selected function. For a vectorized input the output values are a series of quantities corresponding to the selected function.

When "All Statistics" is selected the **Names** and **Values** outputs will list the names and the corresponding values for all the statistical functions.

Expand Down
8 changes: 4 additions & 4 deletions docs/nodes/list_main/zip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ out level 3 = [[[[], []], [[], []]]]
Inputs
------

**data** multisocket
* **data** multisocket

Properties
----------

**level** integer to operate level of conjunction
**unwrap** boolean to unwrap from additional level, added when zipped
* **level** integer to operate level of conjunction
* **unwrap** boolean to unwrap from additional level, added when zipped

Outputs
-------

**data** adaptable socket
* **data** adaptable socket


Examples
Expand Down
11 changes: 8 additions & 3 deletions docs/nodes/list_struct/flip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ Functionality
-------------

Flips the data on selected level.

[[[1,2,3],[4,5,6],[7,8,9]],[[3,3,3],[1,1,1],[8,8,8]]] (two objects, three vertices)

with level 2 turns to:

[[[1, 2, 3], [3, 3, 3]], [[4, 5, 6], [1, 1, 1]], [[7, 8, 9], [8, 8, 8]]] (three objects, two vertices)

with level 3 turns to:

[[1, 4, 7], [2, 5, 8], [3, 6, 9], [3, 1, 8], [3, 1, 8], [3, 1, 8]] (six objects with three digits)

last example is not straight result, more as deviation.
Expand All @@ -21,17 +26,17 @@ But for now working level is 2
Inputs
------

**data** - data to flip
* **data** - data to flip

Properties
----------

**level** - level to deal with
* **level** - level to deal with

Outputs
-------

**data** - flipped data
* **data** - flipped data

Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions docs/nodes/list_struct/item.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ A list of indexes of the items to select, allow negative index python indexing s
Outputs
-------

Item, the selected items on the specified level.
Other, the list with the selected items deleted.
* **Item**, the selected items on the specified level.
* **Other**, the list with the selected items deleted.

Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion docs/nodes/list_struct/item_insert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ Examples
Trying various inputs, adjusting the parameters, and piping the output to a *Debug Print* (or stethoscope) node will be the fastest way to acquaint yourself with the inner workings of the *List Item Insert* Node.

.. image:: https://github.com/vicdoval/sverchok/raw/docs_images/images_for_docs/list_struct/list_item_insert/list_item_insert.png
:alt: insert_item_in_list_sverchok_blender_example.png
:alt: insert_item_in_list_sverchok_blender_example.png
2 changes: 1 addition & 1 deletion docs/nodes/list_struct/levels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ If we enable both Flatten flags, we concatenate lists of vertices into lists of
* Number-> :doc:`Number Range </nodes/number/number_range>`
* List->List Struct-> :doc:`List Split </nodes/list_struct/split>`
* List->List Main-> :doc:`List Zip </nodes/list_main/zip>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`
2 changes: 1 addition & 1 deletion docs/nodes/list_struct/list_struct_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ List Struct
sort
flip
levels
slice_lite
slice_lite
2 changes: 1 addition & 1 deletion docs/nodes/list_struct/repeater.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Removes any extra layers of wrapping (brackets or parentheses) found at the curr
Outputs
-------

Lists (nested). The type of *Data out* will be appropriate for the operations defined by the parameters of the Node.
* **Lists** (nested). The type of *Data out* will be appropriate for the operations defined by the parameters of the Node.

Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion docs/nodes/list_struct/reverse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Parameters
----------


**Level:** Set the level at which to observe the List.
* **Level:** Set the level at which to observe the List.

Outputs
-------
Expand Down
10 changes: 5 additions & 5 deletions docs/nodes/list_struct/shift_mk2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ Shifting data in selected level on selected integer value as:
Inputs
------

**data** - list of data any type to shift
**Shift** - value that defines shift
* **data** - list of data any type to shift
* **Shift** - value that defines shift

Properties
----------

**level** - manipulation level, 0 - is objects shifting
**enclose** - close data when shifting, that way ending cut numbers turns to beginning
* **level** - manipulation level, 0 - is objects shifting
* **enclose** - close data when shifting, that way ending cut numbers turns to beginning

Outputs
-------

**data** - shifter data, adaptive socket
* **data** - shifter data, adaptive socket

Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions docs/nodes/list_struct/shuffle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ Affects the output order.
Outputs
-------

Item, the selected items on the specified level.
Other, the list with the selected items deleted.
* **Item**, the selected items on the specified level.
* **Other**, the list with the selected items deleted.

Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions docs/nodes/list_struct/slice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Stop point for the slice.
Outputs
-------

Slice, the selected slices.
Other, the list with the slices removed.
* **Slice**, the selected slices.
* **Other**, the list with the slices removed.

Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion docs/nodes/list_struct/slice_lite.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ This node differs little from the current slice node, but it does use alternativ
.. image:: https://user-images.githubusercontent.com/619340/27024302-5a5a93a6-4f56-11e7-81fe-7b46ebbde185.png


https://github.com/nortikin/sverchok/issues/1656
https://github.com/nortikin/sverchok/issues/1656
26 changes: 22 additions & 4 deletions docs/nodes/list_struct/sort.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,40 @@ The node will sort the data based on the keys list. I not keys list is supplied
Inputs
------

**Data**: Any kind of data.
**Keys**: List with the desired order of the data
* **Data**: Any kind of data.
* **Keys**: List with the desired order of the data (new positions)

Parameters
----------

**Level:** Set the level at which to observe the List. Level 1 is top level (totally zoomed out), higher levels get more granular (zooming in) until no higher level is found (atomic). The node will just sort the data at the level selected.
* **Level:** Set the level at which to observe the List. Level 1 is top level (totally zoomed out), higher levels get more granular (zooming in) until no higher level is found (atomic). The node will just sort the data at the level selected.

Outputs
-------

**Data**: Sorted data. Depends on incoming data and can be nested.
* **Data**: Sorted data. Depends on incoming data and can be nested.

Examples
--------

.. image:: https://user-images.githubusercontent.com/14288520/188199920-cae91075-e413-4804-b4f7-4759986d9242.png
:target: https://user-images.githubusercontent.com/14288520/188199920-cae91075-e413-4804-b4f7-4759986d9242.png

* List->List Struct-> :doc:`List Shuffle </nodes/list_struct/shuffle>`
* Text-> :doc:`Simple Text </nodes/text/simple_text>`
* Text-> :doc:`String Tools </nodes/text/string_tools>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`

.. image:: https://user-images.githubusercontent.com/14288520/188199934-419325ec-3eb8-453f-8040-66b430a9c445.png
:target: https://user-images.githubusercontent.com/14288520/188199934-419325ec-3eb8-453f-8040-66b430a9c445.png

* Number-> :doc:`List Input </nodes/number/list_input>`
* Text-> :doc:`Simple Text </nodes/text/simple_text>`
* Text-> :doc:`String Tools </nodes/text/string_tools>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`



Sorting a list of random numbers:

.. image:: https://raw.githubusercontent.com/vicdoval/sverchok/docs_images/images_for_docs/list_struct/sort/list_sort_sverchok_blender_example_00.png
Expand Down
2 changes: 1 addition & 1 deletion docs/nodes/list_struct/split.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ Trying various inputs, adjusting the parameters, and piping the output to a *Deb
:target: https://user-images.githubusercontent.com/14288520/187968105-3093b440-92a3-4ed2-9359-8f8ef1567fab.png

* Number-> :doc:`Number Range </nodes/number/number_range>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`
* Text-> :doc:`Stethoscope </nodes/text/stethoscope_v28>`
10 changes: 5 additions & 5 deletions docs/nodes/list_struct/start_end.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ First and last items of data on some level
Inputs
------

**Data** - data to take items
* **Data** - data to take items

Properties
----------

**level** - level to take first and last items
* **level** - level to take first and last items

Outputs
-------

**Middl** - all between first and last items
**First** - First item
**Last** - Last item
* **Middl** - all between first and last items
* **First** - First item
* **Last** - Last item

Examples
--------
Expand Down
2 changes: 1 addition & 1 deletion nodes/list_struct/sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def key_sort(data, keys, level, idx):
class SvListSortNode(bpy.types.Node, SverchCustomTreeNode):
"""
Triggers: Order List Items
Tooltip: Sort List by value or using custom keys
Tooltip: Sort List by value or using custom keys\n\t['a0','b1','c2','d3','e4'], new order (3,2,0,1) => ['a0'(3), 'b1'(2), 'c2'(0), 'd3'(1)] => ['c2','d3','b1','a0']
"""
bl_idname = 'SvListSortNode'
bl_label = 'List Sort'
Expand Down

0 comments on commit a2c5960

Please sign in to comment.