From f50e048de426ae6816db42e4357453f92c0ac9ab Mon Sep 17 00:00:00 2001 From: satabol Date: Fri, 2 Sep 2022 20:42:27 +0300 Subject: [PATCH] - docs updates --- docs/nodes/list_main/decompose.rst | 2 +- docs/nodes/list_main/index.rst | 10 ++++---- docs/nodes/list_main/join.rst | 16 ++++++------ docs/nodes/list_main/length.rst | 2 +- docs/nodes/list_main/statistics.rst | 7 ++---- docs/nodes/list_main/zip.rst | 8 +++--- docs/nodes/list_struct/flip.rst | 11 ++++++--- docs/nodes/list_struct/item.rst | 4 +-- docs/nodes/list_struct/item_insert.rst | 2 +- docs/nodes/list_struct/levels.rst | 2 +- docs/nodes/list_struct/list_struct_index.rst | 2 +- docs/nodes/list_struct/repeater.rst | 2 +- docs/nodes/list_struct/reverse.rst | 2 +- docs/nodes/list_struct/shift_mk2.rst | 10 ++++---- docs/nodes/list_struct/shuffle.rst | 4 +-- docs/nodes/list_struct/slice.rst | 4 +-- docs/nodes/list_struct/slice_lite.rst | 2 +- docs/nodes/list_struct/sort.rst | 26 +++++++++++++++++--- docs/nodes/list_struct/split.rst | 2 +- docs/nodes/list_struct/start_end.rst | 10 ++++---- nodes/list_struct/sort.py | 2 +- 21 files changed, 75 insertions(+), 55 deletions(-) diff --git a/docs/nodes/list_main/decompose.rst b/docs/nodes/list_main/decompose.rst index fb967c295e..7794adc928 100644 --- a/docs/nodes/list_main/decompose.rst +++ b/docs/nodes/list_main/decompose.rst @@ -31,7 +31,7 @@ Parameters Outputs ------- -- **data** - multisocket +* **data** - multisocket Example of usage diff --git a/docs/nodes/list_main/index.rst b/docs/nodes/list_main/index.rst index 88c8be294d..1104b5ff3a 100644 --- a/docs/nodes/list_main/index.rst +++ b/docs/nodes/list_main/index.rst @@ -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 ------- diff --git a/docs/nodes/list_main/join.rst b/docs/nodes/list_main/join.rst index aecb46b4c6..54eaf3d8cc 100644 --- a/docs/nodes/list_main/join.rst +++ b/docs/nodes/list_main/join.rst @@ -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 -------- diff --git a/docs/nodes/list_main/length.rst b/docs/nodes/list_main/length.rst index 6a0b542f79..1f55f1ce13 100644 --- a/docs/nodes/list_main/length.rst +++ b/docs/nodes/list_main/length.rst @@ -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 ------- diff --git a/docs/nodes/list_main/statistics.rst b/docs/nodes/list_main/statistics.rst index e36b5e235c..8d1b7b718a 100644 --- a/docs/nodes/list_main/statistics.rst +++ b/docs/nodes/list_main/statistics.rst @@ -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. diff --git a/docs/nodes/list_main/zip.rst b/docs/nodes/list_main/zip.rst index a4bb28fca8..8ca54b99f6 100644 --- a/docs/nodes/list_main/zip.rst +++ b/docs/nodes/list_main/zip.rst @@ -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 diff --git a/docs/nodes/list_struct/flip.rst b/docs/nodes/list_struct/flip.rst index d6e57c9738..58d0b31fad 100644 --- a/docs/nodes/list_struct/flip.rst +++ b/docs/nodes/list_struct/flip.rst @@ -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. @@ -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 -------- diff --git a/docs/nodes/list_struct/item.rst b/docs/nodes/list_struct/item.rst index 2898da5421..e87e6a9913 100644 --- a/docs/nodes/list_struct/item.rst +++ b/docs/nodes/list_struct/item.rst @@ -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 -------- diff --git a/docs/nodes/list_struct/item_insert.rst b/docs/nodes/list_struct/item_insert.rst index 137baca094..7e2a6db17d 100644 --- a/docs/nodes/list_struct/item_insert.rst +++ b/docs/nodes/list_struct/item_insert.rst @@ -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 \ No newline at end of file diff --git a/docs/nodes/list_struct/levels.rst b/docs/nodes/list_struct/levels.rst index 945aceca31..425193c3fb 100644 --- a/docs/nodes/list_struct/levels.rst +++ b/docs/nodes/list_struct/levels.rst @@ -149,4 +149,4 @@ If we enable both Flatten flags, we concatenate lists of vertices into lists of * Number-> :doc:`Number Range ` * List->List Struct-> :doc:`List Split ` * List->List Main-> :doc:`List Zip ` -* Text-> :doc:`Stethoscope ` \ No newline at end of file +* Text-> :doc:`Stethoscope ` diff --git a/docs/nodes/list_struct/list_struct_index.rst b/docs/nodes/list_struct/list_struct_index.rst index 90b86a8618..09c74ff9f0 100644 --- a/docs/nodes/list_struct/list_struct_index.rst +++ b/docs/nodes/list_struct/list_struct_index.rst @@ -17,4 +17,4 @@ List Struct sort flip levels - slice_lite \ No newline at end of file + slice_lite diff --git a/docs/nodes/list_struct/repeater.rst b/docs/nodes/list_struct/repeater.rst index 3f5ef194d3..cbba0e0d89 100644 --- a/docs/nodes/list_struct/repeater.rst +++ b/docs/nodes/list_struct/repeater.rst @@ -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 -------- diff --git a/docs/nodes/list_struct/reverse.rst b/docs/nodes/list_struct/reverse.rst index aac2f19670..f711461487 100644 --- a/docs/nodes/list_struct/reverse.rst +++ b/docs/nodes/list_struct/reverse.rst @@ -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 ------- diff --git a/docs/nodes/list_struct/shift_mk2.rst b/docs/nodes/list_struct/shift_mk2.rst index 4d2835c307..5e34a22f52 100644 --- a/docs/nodes/list_struct/shift_mk2.rst +++ b/docs/nodes/list_struct/shift_mk2.rst @@ -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 -------- diff --git a/docs/nodes/list_struct/shuffle.rst b/docs/nodes/list_struct/shuffle.rst index 8ff56bc4b5..d4a26bf68c 100644 --- a/docs/nodes/list_struct/shuffle.rst +++ b/docs/nodes/list_struct/shuffle.rst @@ -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 -------- diff --git a/docs/nodes/list_struct/slice.rst b/docs/nodes/list_struct/slice.rst index c60d473d73..9b7ffaec74 100644 --- a/docs/nodes/list_struct/slice.rst +++ b/docs/nodes/list_struct/slice.rst @@ -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 -------- diff --git a/docs/nodes/list_struct/slice_lite.rst b/docs/nodes/list_struct/slice_lite.rst index d1d0e9fb6b..b03204c9ef 100644 --- a/docs/nodes/list_struct/slice_lite.rst +++ b/docs/nodes/list_struct/slice_lite.rst @@ -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 \ No newline at end of file +https://github.com/nortikin/sverchok/issues/1656 diff --git a/docs/nodes/list_struct/sort.rst b/docs/nodes/list_struct/sort.rst index 2b161d14e5..9d68f10c5b 100644 --- a/docs/nodes/list_struct/sort.rst +++ b/docs/nodes/list_struct/sort.rst @@ -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 ` +* Text-> :doc:`Simple Text ` +* Text-> :doc:`String Tools ` +* Text-> :doc:`Stethoscope ` + +.. 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 ` +* Text-> :doc:`Simple Text ` +* Text-> :doc:`String Tools ` +* Text-> :doc:`Stethoscope ` + + + 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 diff --git a/docs/nodes/list_struct/split.rst b/docs/nodes/list_struct/split.rst index 385a5a73af..20ad35efba 100644 --- a/docs/nodes/list_struct/split.rst +++ b/docs/nodes/list_struct/split.rst @@ -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 ` -* Text-> :doc:`Stethoscope ` +* Text-> :doc:`Stethoscope ` \ No newline at end of file diff --git a/docs/nodes/list_struct/start_end.rst b/docs/nodes/list_struct/start_end.rst index bcefb3e45c..4b8ad3df90 100644 --- a/docs/nodes/list_struct/start_end.rst +++ b/docs/nodes/list_struct/start_end.rst @@ -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 -------- diff --git a/nodes/list_struct/sort.py b/nodes/list_struct/sort.py index ad12f92367..7e2765e2ca 100644 --- a/nodes/list_struct/sort.py +++ b/nodes/list_struct/sort.py @@ -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'