Coder Social home page Coder Social logo

sverchok's Introduction

Sverchok

Sverchok CI Discord Stack Exchange questions GitHub issues by-label GitHub issues by-label

English

RU
Addon for: Blender version 2.93 and above. For 2.79 see special installation instruction.
License: GPL3
Prerequisites: We added optional nodes that depend on additional libraries. This wiki page lists these dependencies and includes installation instructions.
Documentation: If anything isn't clear (or missing) in this document please ask about it on the Issue Tracker, we want to get these lessons right and you can help us!
Community: Discord

Description

Sverchok is a powerful parametric tool for architects, allowing geometry to be programmed visually with nodes. Mesh and geometry programming consists of combining basic elements such as:

  • lists of indexed Vectors representing coordinates (Sverchok vectors are zero based)
  • lists of grouped indices to represent edges and polygons.
  • matrices (user-friendly rotation-scale-location transformations)
  • curves
  • surfaces
  • scalar and vector fields
  • solids
  • insolation/sun heating calculations

Possibilities

Comes with more than 600 nodes to help create and manipulate geometry. Combining these nodes will allow you to:

  • do parametric constructions
  • easily change parameters with sliders and formulas
  • power nodes such as: Profile parametric, UVconnect, Generative art, Mesh expression, Proportion edit, Wafel, Adaptive Polygons (tissue vectorized), Adaptive edges, ExecNodeMod, Vector Interpolation series of nodes, List manipulators, CSG Boolean, Bmesh ops, Bmesh props, etc.
  • do cross sections, extrusions, other modifications with height level flexible parametrised and vectorised node tools
  • calculate areas, volume, and perform other geometric analysis
  • make or import CSV tables or custom formats
  • use Vector/Scalar fields, create them, visualize data
  • Solid modelling
  • even code your own custom nodes in python with Scripted node
  • make your own 'addons' on node layouts and utilise them with Sverchok 3dview panel in your everyday pipeline
  • access to Blender Python API (bpy) with special Set and Get nodes
  • upgrade Sverchok with pressing one button
  • using genetic algorithm in your workflow
  • insolation/radiation calculations
  • SVG/DXF drawing export from node tree
  • brep/NURBS/IFC exchange
  • and much, much more!

Installation

Install Sverchok as you would any blender addon.

  • Installation from Preferences
    Download Sverchok archive (zip) from github

    • Do not unpack it after downloading, Blender will take care of that later.
    • Edit > Preferences > Add-ons >
    • Press the Install.. button
    • Browse to the location of the zip and select it, then press "Install Add-on"
    • Blender unpacks the add-on, and when completed it will present the option to enable it.
    • Enable it by clicking in the box beside Node: Sverchok:
    • Let Blender complete the installation, most likely this will take a few seconds, be patient.
    • When complete Blender will display:
      • Node: Sverchok

    By default Blender ( above 2.80) will store the fact that you enabled an add-on and it will be available next time you start Blender.

  • Upgrade Sverchok on fly
    Use button Check for new version in sverchok panel in node editor (press N for panel).
    Press Update Sverchok button.
    At the end press F8 to reload add-ons. In NodeView the new version number will appear in the N-panel.

  • Additionally
    Sverchok provides a lot of useful features out-of-the-box that don't require you to install anything extra, but we do provide additional nodes and scripts that make use of so called "3rd party" libraries like:

    • scipy
    • marching cubes
    • geomdl
    • SciKit-image
    • shapely
    • circlify
    • freecadpython3lib

    Instructions regarding their installation is found at this wiki page

Troubleshooting Installation Errors

If you are installing from a release zip, please be aware that if it contains a folder named sverchok-master.x.y.z, you will need to rename that folder to sverchok-master because folder names with dots are not valid python package names.

If you are installing from a release found here, these files contain folders that have the dots mentioned in the previous point. These versioned release zips are not meant for installing from, but rather can be used to try older versions of Sverchok when you are using older .blend files and older Blender versions. Don't use these release zips if you are installing sverchok for the first time.

Errors during "install" or "enable" in preferences

if an error is raised like:

NameError: name 'nodes' is not defined

then exit Blender and restart Blender. This time also activate Sverchok by checking the tickbox, but give it as long as it needs to initialize the add-on. It's a complicated Add-on and might take up to 10 seconds to enable (depends on how fast your machine is and how much ram you have).

Other reasons for failing:

In case Sverchok still fails to install, we've compiled a list of reasons and known resolutions here. Please let us know if you encounter other installation issues.

If you update with update button in sverchok panel it can raise an error if you renamed a folder, so follow this (a bootstrap script you can run from TextEditor)

Contact and Credit

Homepage: Home
Authors:

  • Alexander Nedovizin,
  • Nikita Gorodetskiy,
  • Linus Yng,
  • Agustin Gimenez,
  • Dealga McArdle,
  • Konstantin Vorobiew,
  • Ilya Portnov,
  • Eleanor Howick,
  • Walter Perdan,
  • Marius Giurgi,
  • Sergey Soluyanov,
  • Ivan Prytov,
  • Victor Doval,
  • Dion Moult,
  • Alessandro Zomparelli
  • Alex (aka Satabol)

Email: [email protected]

Please donate

sverchok's People

Contributors

agustinjb avatar arpegorpsgh avatar asahidari avatar cfyzzz avatar dolphindream avatar durman avatar elfnor avatar generalpancakemstr avatar jitql avatar kalwalt avatar kant avatar kosvor avatar kosvor2 avatar luzpaz avatar ly29 avatar mifth avatar moult avatar nortikin avatar pathim avatar portnov avatar rastart avatar rendetto avatar robinrosenstock avatar satabol avatar sb-child avatar stansu avatar vicdoval avatar wclyffe avatar willneedit avatar zeffii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sverchok's Issues

OpenGL branch

i create brench because think it should take long time development maybe and want to try to experiment with git branching

socket_value_update and .node.update()

        if 'x0' in self.inputs and len(self.inputs['x0'].links)>0:
            if not self.inputs['x0'].node.socket_value_update:
                self.inputs['x0'].node.update() 

The second 2 lines of this is a bad idea.
socket_value_update is a function and this will always return true. Therefore this will never get called.
But if was called it would cause a recursive call to the update function of the current node. It is the same as calling self.update()
So remove this code if you see it.

node id

Now that we started working with more than one layouts we should provide a standard safe way to get a hash that is unique over many node groups. This is needed for all nodes that have side effects or use a data cache. Like Text In&Out, Viewer, Index Viewer etc.
Right now it looks like this in the updated Viewer node.

n_id = self.name+self.id_data.name

Which will work most of the time but could lead to errors if a user rename the layouts or nodes.
I am thinking something like this as a standard way.

def node_id(node):
     return hash((node.name,node.id_data.name))

Or is there something built into blender already that would work.
The other options is to use two levels of dicts.

ps
Also the socket_id function in util py should be updated to something similar to be safe.

Socket Cache - RFC

History

All sockets had a String Property that was used to store the socket values.

self.outputs['Matrix'].MatrixProperty = str(matrixes)
And then they where read like this.
Integer = eval(self.inputs['Integer'].links[0].from_socket.StringsProperty)[0][0]

This was a simple good solution but obviously the biggest performance problem in Sverchok.

Performance testing from February:
diagram3-2

  • Today, using string and eval
  • Step 1: Using socket cache but still writing the string properties but only reading them when needed. A step in the conversion
  • Step 2: Initial implementation using python built in deepcopy
  • Step 2, New: Using custom made sv_deep_copy (see below)
  • Step 3, Using simple copy and not deep copy.

"step 2 new" is where we are today.

Current implementation

def SvGetSocketAnyType(self, socket):

def SvSetSocketAnyType(self, socket_name, out):

Issues:

  • Inconsistency with parameters
  • Long names
  • Socket names are not unique
    Note: This is because these functions are used in a way they were originally not planned to be used.

If we look at these function we see that already today they are only wrappers for another interface.
def SvSetSocket(socket, out):
def SvGetSocket(socket, copy = False):

These functions perform the actual Socket Cache functionality. data=socket_data_cache[ng][s_id]
They maintain a socket cache for each nodegroup that is reset on each Edit event, see #121 .
Note This reset happens in the makeTreeUpdate2 function.
Still these names are longer than needed and before defining the new interface I think we should discuss it.

Data integrity.

Data is only stored for each output socket. But since this data can 1) be read many times by the same node using partial updates and 2) be read from many sockets. It needs to be ensured that it is not modified. Many nodes always create new data but some modify the input in place. To ensure safety and to be able to keep the nodes as black boxes the following is used.

def sv_deep_copy(lst):
    if isinstance(lst,(list,tuple)):
        if lst and not isinstance(lst[0],(list,tuple)):
            return lst[:]
        return [sv_deep_copy(l) for l in lst]
    return lst

This much quicker than the built in deepcopy function that is very advanced and can handle many scenarios. If you can make this function quicker everything in Sverchok goes quicker. Using this is instead of copy.deepcopy() is the only difference between "step 2" and "step 2 new"

This function parses the data on every get socket unless the copy parameter is set to True when it uses a shallow copy.

Future

Interface

I think the best idea is to implement socket data cache function on in the socket class.

So we can use socket.get() and socket.set(data)

We could remove offload a lot of code for the nodes by providing an argument to be used instead if the socket isn't linked. int=socket.get([[self.integer]])

An optional argument for shallow copy for nodes that do not modify data in place, that would be off by default since many strange things can start to happen then...
Moving to the socket interface to the socket class could also provide a simple way to make specialized interfaces for different socket types in the future.
Other ideas:

  • Data depth
  • Vector etc generate
  • Data correct
  • Detect empty input
    However the even more general approach to this is #105

Cache datum

To provide an integer for the last modified input so nodes can see which input has changed.
The integer would be globally updated and always increasing. However I am not sure if this is worth the effort right now.

Questions?

list Interpolation_node

Goes well with the idea that there is a Matrix Interpolation node.

I was going to stick this in kdtree node, but because it could be useful in many other scenarios, perhaps a separate node is OK.

: input 
  - (some data with a length) (all)
  - switch [ type of interpolation ] 

    spread 
    [0.2, 0.5, 0.7] -> [.2 .2 .2 .2 .5 .5 .5 .5 .7 .7 .7 .7]

    interpolated /w rounding parameter
    (adds, int socket input for n digits)
    [0.2, 0.7] -> [0.2, 0.24, 0.28, 0.32, ............. 0.7]

    discretized
    (adds, int socket input for factor)
    [full list] -> [ full list discretized]

node_script CoffeeScript loader

some prerequisites exist for coffeescript loading.

  • node.js must be installed and coffee module

Preliminary experiments suggest that it should work, and that I can implement a few things but i'm not sure how to pass large data structures as arguments to it.

https://gist.github.com/zeffii/11183806
Frankly, i'm not sure this is worth the effort but I might do it out of curiosity. Though we should probably remove the coffeescript option from the UI on the next public release, if I haven't had success.

nurbs

Hey guys,

THis is fantastic. Grasshopper and Rhino is very limiting.
I read the blender wiki article and am very impressed.

Does this support the blender nurbs yet ?

DO you have a roadmap.

decompose node idea

We have join lists node.
We need anthonym node - decompose node:

it has veriable:
:::level
it makes from particular level of any list output sockets. multysockets.
For input only one adaptive socket.

for level 1 - makes objects series of sockets
for level 2 - makes vertices/pols/edgs series of sockets
for level 3 - makes digits
may be more levels, so it find lists depth and limit itself.

MatrixDeformNode not working

After a short debug, I put this line
SvSetSocketAnyType(self, 'Matrix', matrixes)
to the end of:
class MatrixDeformNode(Node, SverchCustomTreeNode):
def update(self):
function.
After this modification the node work well.

node_script_templates

It might be cool and useful for new adopters to have a good collection of templates to experiment with. The templates don't need to be super useful or complicated but will show the core concepts and limitations of the current implementation of the node_Script node.

Creating a collection of templates will also inform us of the limitations of this implementation. I will start soon, and implement a drop-down for template selection

node_Viewer.py / Viewer draw

fresh blend file, add node_Viewer.py

Traceback (most recent call last):
  File "C:\blender_trunk\2.70\scripts\addons\sverchok-master\..\sverchok-master\node_s.py", lin
e 97, in update
    speedUpdate(tree_name = self.name)
  File "C:\blender_trunk\2.70\scripts\addons\sverchok-master\..\sverchok-master\util.py", line
1055, in speedUpdate
    do_update(list_nodes4update[tree_name],bpy.data.node_groups[tree_name].nodes)
  File "C:\blender_trunk\2.70\scripts\addons\sverchok-master\..\sverchok-master\util.py", line
1020, in do_update
    nods[nod_name].update()
  File "C:\blender_trunk\2.70\scripts\addons\sverchok-master\..\sverchok-master\node_Viewer.py"
, line 147, in update
    if self.activate and (self.inputs['vertices'].links or self.inputs['matrix'].links):
KeyError: 'bpy_prop_collection[key]: key "matrix" not found'

location: C:\blender_trunk\2.70\scripts\addons\sverchok-master\..\sverchok-master\node_Viewer.p
y:121

location: C:\blender_trunk\2.70\scripts\addons\sverchok-master\..\sverchok-master\node_Viewer.p
y:121

Startup safety - for nodes with side effects

If a node access external data it must fail gracefully if the external data is not ready. Either by failing or using a cached state stored in a bpy.prop

Possible cause includes trying to acces bpy.data.node_groups which will fail during startup. In general most nodes should avoid bpy.ops and bpy.data. For many mesh operations bmesh provides all needed functionality and data exists independent for the blender scene.

This also makes for an easy quick safety fix.

        try:
            l=bpy.data.node_groups[self.id_data.name]
        except Exception as e:
            print(self.name, "cannot run during startup, press update.")
            return

node_Script scripting details and examples

Here are the current implementation rules for node-loadable scripts.

  • some example node-scripts will follow
    • the main working function must be called sv_main
    • function def must have input variables and defaults (for now..)
    • must have in_sockets and out_sockets , as shown in examples and return them

This is boilerplate to make the introspection easier.. I realize it's a little verbose.

Warning

If the code in the images differs from snippet displayed above the image, then the code snippet is always the latest guideline.

@vectorize decorator (one pass fits all)

As this beast grows, we learn that it has needs. The dilemma we face I think @nortikin and @ly29 agree, is it could be less complicated to write a function for a Node that can take any nested/unnested input and produce nested/unnested output.

input(s) -> ( some_function ) -> output(s)

input(s) -> (@vectorized some_function) -> outputs(s)
[input(s), inputs(s)] -> (@vectorized some_function) -> [output(s), outputs(s)]

My knowledge and experience with decorators is limited, but this seems like exactly what they are for.

util.py

there's an error I keep getting, and it's easy enough to fix. In 2.7 python it was possible to compare a None and a number, now in 3.3 this is no longer valid.

sverchok-master\util.py", line 300, in dataCorrect

    if dept < 2:

TypeError: unorderable types: NoneType() < int()

__init__.py can we automate this

a snapshot of the init is https://gist.github.com/anonymous/11253933

If all the python files are doing their own registration of the classes they hold, then perhaps we can do a clever introspection of the file structure inside the sverchok directory and do all imp.reload(), import, register(), unregister() in an automated way.

I've never done something like this.. so maybe it isn't possible?

degrees vs radians

theta isn't exposed to users, so we could make it a bit cleaner.
At the moment you have several references to things like radians(theta*i)

if Angle < 360:
    tetha = Angle/(Vertices-1)
else:
    tetha = Angle/Vertices
listVertX = []
listVertY = []
for i in range(Vertices):
    listVertX.append(Radius*cos(radians(tetha*i)))
    listVertY.append(Radius*sin(radians(tetha*i)))

but instead you could drop the radians calculations from the inner loop. It would look something like this:

radial_angle = radians(Angle)
if radial_angle < radians(360):
    tetha = radial_angle/(Vertices-1)
else:
    tetha = radial_angle/Vertices

listVertX = []
listVertY = []
for i in range(Vertices):
    sigma = theta*i
    listVertX.append(Radius*cos(sigma))
    listVertY.append(Radius*sin(sigma))

Or nicer using int(radial_angle < radians(360)) as the boolean cast to determin how many vertices to divide radial_angle by. But this may be less simple to read.

radial_angle = radians(Angle)
theta = radial_angle/(Vertices - int(radial_angle < radians(360)))

listVertX = []
listVertY = []
for i in range(Vertices):
    sigma = theta*i
    listVertX.append(Radius*cos(sigma))
    listVertY.append(Radius*sin(sigma))

I didn't want to do a pull request, just ask about how you think about radians() vs PI

List Switch/ MaskJoin and similar flow control

The opposite of List Mask+ other behaviour
To be able to perform an operation on a subset of list made with listmask and then merge it again, in order
Example with List Mask: on [1,2,3,4,5,6] [True ,False] For the false False output negate -> [1,-2,3,-4,5,-6]. (Simple example, can be done in other ways.)
A node that can be combined with list mask that takes Data1 Data2 and a mask, that combines them into one list again in the same order as list mask.
Default could be pattern of [1,0] like List Mask so one item from every list.
Round robin mode: Join mode List 1,2 and mask: [1,2,3] [5,6,7] [1 0 1 1 0 0] -> [1, 5, 2, 3, 6, 7]
mix-mode (different node? mix?): List 1,2 and : [3 4 5 6] [ -1 -1 -1 -1] mask: [1 0 1 1] -> [3 -1 5 6]

Some design questions needs to be addressed. Uneven input etc.

Todo(nikitron)

  • #894 text out to be updated
  • css table of help sphinx
  • #477 sublevels to integrate to all the nodes
  • music analizer for midi or something to output values
  • !(not remember what i ment) circles on vertices to produce holes - under development now
  • to integrate solution http://www.blenderartists.org/forum/showthread.php?339872-Addon-Map-via-UV&
  • to integrate solution http://blenderartists.org/forum/showthread.php?241950-A-Script-to-Skin-a-Point-Cloud-%28for-Blender-2-6x-or-Later%29
  • to integrate solution http://blenderartists.org/forum/showthread.php?348432-Addon-Edge-Roundifier-mesh-modeling-tool-for-building-arcs-on-selected-edges&highlight=sverchok
  • to set OpenGL light and material for Viewer Draw. In place of ugly solution. Progess 20%
  • to send money to goosberry or to invest in sverchok propaganda (google ads)
  • Lines connection to be able make real loft - as in looptools, so we could define subdivision and than connect parametrically all vertices. it is usefull for many cases.
  • Panel in 3D that represents manipulators floats and integers from layouts to use in 3d window and change parameters from tool panel. thouse we can make layout, let somebody download and use as usual addon, not as layout. he can not even open nodes layout... But we need make boolean in float and integer nodes that allows us embed parameter to sverchok panel in 3d toolshelf
  • List append node, List extend node, List insert node
  • List sum levels add
  • maybe all cache and handles must be on top to see them all to be able manage
  • debug regime. Linus made it!!!!!!!!!!!!!!!!!
  • extend file "for_developers" to be more clear
  • colors of nodes to be in one format - #274
    • red - is error
    • green - input
    • orange - output
    • bluish - all text nodes
      for this reason i should make default colors veriables and maybe decorators or something (need to find out of decorator first and try to do it)
  • data trees multyoutput separator node (Separator node) to make all object/verts/etc, depending on level, to go to separate socket
  • auto import nodes to init.py
  • !!! make button in toolbox to get new node on fly and register it ( blender_file_browser -- Copy_file_to_addon_folder -- set_relative_path_to_addon_path -- import_and_register_node_to_be_able_insert_it_in_c urrent_layout )
    Made but with F8 new reimport in init. thanks refactoring
  • make panel with properties, that will appear as sliders in this panel from particular float/int/listinput nodes, so in this nodes need to be boolean flag that defines whether it property needs to be in sverchok manipulation panel. that way we can make layouts and from 3d view to change items as with simple addon. so, that way we could make own addons inside svershok. This allows user who not deal with nodes to download layout and use it.
  • Make improvements of text viewer, delete loose node and other (my todo)
  • Decompose node to do completely
  • ΠΌΠ°Ρ‚Ρ€ΠΈΡ† Π³Π΅Π½Π΅Ρ€Π°Ρ‚ΠΎΡ€, Π·Π°Π΄Π°Π²Π°Π΅ΠΌΡ‹ΠΉ трСмя Π²Π΅ΠΊΡ‚ΠΎΡ€Π°ΠΌΠΈ, ΠΎΠ΄Π½ΠΈΠΌ достаточно, Π΄Ρ€ΡƒΠ³ΠΈΠ΅ ΠΎΡ€Ρ‚ΠΎΠ³ΠΎΠ½Π°Π»ΡŒΠ½ΠΎ ΡƒΠ³Π°Π΄Ρ‹Π²Π°ΡŽΡ‚ΡΡ, Π΄Π»ΠΈΠ½Π° Π²Π΅ΠΊΡ‚ΠΎΡ€Π° - масщтаб, ΠΏΠΎΠ»ΠΎΠΆΠ΅Π½ΠΈΠ΅ Π²Π΅ΠΊΡ‚ΠΎΡ€Π° Π² пространствС - ΠΏΠΎΠ²ΠΎΡ€ΠΎΡ‚.
  • ΡƒΠ·Π΅Π»-ΠΎΡ‡ΠΈΡΡ‚ΠΈΡ‚Π΅Π»ΡŒ списка ΠΎΡ‚ Π½ΡƒΠ»Π΅Π²Ρ‹Ρ… Π΄Π°Π½Π½Ρ‹Ρ…, ΠΊΠΎΡ‚ΠΎΡ€Ρ‹Π΅ ΠΏΠΎΠ»ΡƒΡ‡Π°ΡŽΡ‚ΡΡ ΠΏΡ€ΠΈ рассСчСнии ΠΏΡ€Π΅Π΄Π²Π°Ρ€ΠΈΡ‚Π΅Π»ΡŒΠ½ΠΎ рассСчённого ΠΎΠ±ΡŠΠ΅ΠΊΡ‚Π°, Ρ‚Π°ΠΊ Ρ‚Ρ€Π΅ΡƒΠ³ΠΎΠ»ΡŒΠ½ΠΈΠΊΠΈ Π±Ρ‹Π²Π°ΡŽΡ‚ Π½Π΅ Π·Π°ΠΌΠΊΠ½ΡƒΡ‚Ρ‹ΠΌΠΈ ΠΈΠ»ΠΈ Π²Π΅Ρ€ΡˆΠΈΠ½Ρ‹ Π½Π΅ Π½Π°ΠΉΠ΄Π΅Π½Ρ‹ΠΌΠΈ, Π² ΠΎΠ±Ρ‰Π΅ΠΌ, Π±Ρ‹Π²Π°Π΅Ρ‚.
  • Subdivide and produce useful topology Topology is main feature. needed node that takes vertex items, that belong to exact polygon. made by mask indexes in/out mask
  • generators uv direction, sublevel to all generators and defaults to false
  • custom text in 3d
  • data structure new, universal socket and other issues to discuss - #118 (comment) #184
  • Sv prefix renaming old classes to this standart
  • directories hierarhy and autoimport. maybe to make folders separately for modifiers and others? https://gist.github.com/nortikin/8f75694171ef6cdeff90
  • material socket
  • ΡƒΠ·Π΅Π» группирования ΠΏΠΎ маскС. Π’ΠΎΡ‚ Π΅ΡΡ‚ΡŒ ΠΏΡ€Π΅Π΄ΠΌΠ΅Ρ‚, ΡˆΠ°Ρ€. Π½Π°ΠΌ Π½Π°Π΄ΠΎ UV ΠΏΠΎΠΌΠ΅Π½ΡΡ‚ΡŒ. Ρ‡Ρ‚ΠΎ для этого ΡΠ΄Π΅Π»Π°Ρ‚ΡŒ - flip list, Π½ΠΎ Ρ„Π»ΠΈΠΏΠ°Ρ‚ΡŒ Π½Π°Π΄ΠΎ ΠΌΠ΅ΠΆΠ΄Ρƒ уровнями Π³Ρ€ΡƒΠΏΠΏ Π²Π΅Ρ€ΡˆΠΈΠ½. Π° для этого ΠΈΡ… Π½Π°Π΄ΠΎ ΡΠ³Ρ€ΡƒΠΏΠΏΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ. Π’ΠΎ Π΅ΡΡ‚ΡŒ, Ссли Ρƒ нас U6,V12, Ρ‚ΠΎ ΡΠ³Ρ€ΡƒΠΏΠΏΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ Π²Π΅Ρ€ΡˆΠΈΠ½Ρ‹ ΠΏΠΎ 6, Π·Π°Ρ‚Π΅ΠΌ Ρ„Π»ΠΈΠΏΠ½ΡƒΡ‚ΡŒ, Ρ‚Π°ΠΊ ΠΏΠΎΠ»ΡƒΡ‡ΠΈΠΌ Π³Ρ€ΡƒΠΏΠΏΡ‹ ΠΏΠΎ 12, Π½ΠΎ всСго Π³Ρ€ΡƒΠΏΠΏ 6, Π±Ρ‹Π»ΠΎ 12 Π³Ρ€ΡƒΠΏΠΏ ΠΏΠΎ 6 Π²Π΅Ρ€ΡˆΠΈΠ½. Π’ΠΎ Π΅ΡΡ‚ΡŒ ΡƒΠ·Π΅Π» Ρ„Π»ΠΈΠΏ Π½Π°ΠΉΠ΄Ρ‘Ρ‚ своСго Π½Π°ΠΏΠ°Ρ€Π½ΠΈΠΊΠ° "ΠΈ ΠΎΠ½ΠΈ ΡƒΠΉΠ΄ΡƒΡ‚ Π² Π·Π°ΠΊΠ°Ρ‚"
  • Get Bounding Box Center Point (BBOX CENTER) => would be nice to have setup that spit out Bounding Box,
  • Get the average position based on all vector.
  • Vectorization in two directions line defined scale between vectors vectorized or objects count vectorized. to prepare data have to use this form [ [ [0, 1, 20.2, 1.5], [1], [12,13,14,15,11] ] ] to make three objects with vectorized input. For that needed tools to manipulate levels as toy.
  • Fractal node - thanks Elfnor for lsystem
  • Viewer Draw sorting by name implementation
  • Sorting node reordered indexes output!!!!! important
  • Scale/Rotate/Mirror Vertices... nodes needed
  • Volume calculator!!!!

For versions after 1.0.0

  • Π³Π΅Π½Π΅Ρ€Π°Ρ‚ΠΎΡ€ сплайнов
  • Π½Π°Ρ…ΠΎΠΆΠ΄Π΅Π½ΠΈΠ΅ Ρ‚ΠΎΡ‡ΠΊΠΈ Π½Π° сплайнС - interpolation vertices
  • ВмСстС с Ρ‚Π΅ΠΌ, Π½Π°Π΄ΠΎ Π΄ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ Ρ‚ΠΈΠΏ сокСта - ΠΊΡ€ΠΈΠ²Ρ‹Π΅. ΠšΡ€ΠΈΠ²Π°Ρ опрСдСляСтся Π½Π΅ Ρ‚Π°ΠΊ ΠΊΠ°ΠΊ линия,
    Π° двумя Ρ€Ρ‹Ρ‡Π°Π³Π°ΠΌΠΈ ΠΈ ΡƒΠ·Π»ΠΎΠΌ, ΠΈΡ‚ΠΎΠ³ΠΎ Ρ‚Ρ€ΠΈ Π²Π΅ΠΊΡ‚ΠΎΡ€Π° Π½Π° Ρ‚ΠΎΡ‡ΠΊΡƒ. МоТно ΡΠ΄Π΅Π»Π°Ρ‚ΡŒ ΠΊΡ€ΠΈΠ²ΡƒΡŽ ΠΊΠ°ΠΊ линию, Π·Π°Ρ‚Π΅ΠΌ
    ΡΠΊΠΎΠ½Π²Π΅Ρ€Ρ‚ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ ΠΈ ΡΠ³Π»Π°Π΄ΠΈΡ‚ΡŒ, автоматичСски выстроив ΠΊΡ€Π°ΡΠΈΠ²Π΅Π½ΡŒΠΊΠΎ. И Ρ‚Π°ΠΊ ΠΈ Π±ΡƒΠ΄Π΅Ρ‚ Π³Π΅Π½Π΅Ρ€ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒΡΡ
    кривая ΠΈΠ· Π²Π΅ΠΊΡ‚ΠΎΡ€ΠΎΠ². Но ΠΊΠ°ΠΊ ΠΏΠ΅Ρ€Π΅Π΄Π°Π²Π°Ρ‚ΡŒ значСния? Если ΠΌΡ‹ считаСм Ρ„ΠΎΡ€ΠΌΡƒΠ»Π°ΠΌΠΈ эту бСзьС, Ρ‚ΠΎ
    Π½Π°ΠΌ Π½ΡƒΠΆΠ½Ρ‹ спСцифичСскиС Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠΈ, ΠΈ ΠΈΡ… Π½Π°Π΄ΠΎ Π΄ΠΎΡΡ‚Π°Ρ‚ΡŒ, ΠΈΠ±ΠΎ АПИ Π½Π΅ ΠΈΠΌΠ΅Π΅Ρ‚ Π½ΡƒΠΆΠ½Ρ‹Ρ…
    инструмСнтов (Π½Π°Ρ…ΠΎΠΆΠ΄Π΅Π½ΠΈΠ΅ Ρ‚ΠΎΡ‡ΠΊΠΈ Π½Π° ΠΊΡ€ΠΈΠ²ΠΎΠΉ... это ΠΏΡ€ΠΎΠ±Π»Π΅ΠΌΠ°, ΠΊΠ°ΠΆΠ΄Ρ‹ΠΉ Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚Ρ‡ΠΈΠΊ Ρ€Π΅ΡˆΠ°Π΅Ρ‚ ΠΏΠΎ-
    своСму), ΠΈ Ρ‚Π°ΠΊΠΆΠ΅ Π½Π°Π΄ΠΎ ΡƒΠΌΠ΅Ρ‚ΡŒ Π·Π°ΠΌΡ‹ΠΊΠ°Ρ‚ΡŒ ΠΊΡ€ΠΈΠ²Ρ‹Π΅, Π° ΠΎΡ‚ этого мСняСтся гСомСтрия ΠΈ Π½Π°Ρ…ΠΎΠΆΠ΄Π΅Π½ΠΈΠ΅
    Ρ‚ΠΎΡ‡ΠΊΠΈ Π½Π° ΠΊΡ€ΠΈΠ²ΠΎΠΉ ΠΈ ΠΏΡ€ΠΎΡ‡Π΅Π΅. Π Ρ‘Π±Ρ€Π° ΡƒΠΆΠ΅ Π½Π΅ Π΄Π΅ΠΉΡΡ‚Π²ΡƒΡŽΡ‚ Π½Π° ΠΊΡ€ΠΈΠ²Ρ‹Π΅, Ρ€Ρ‘Π±Ρ€Π° сокСт ΠΌΠΎΠΆΠ΅Ρ‚ Π±Ρ‹Ρ‚ΡŒ
    испольован ΠΈΠΌΠ΅Π½Π½ΠΎ для Π±ΡƒΠ»Π΅Π½Π° - Π·Π°Ρ†ΠΈΠΊΠ»ΠΈΡ‚ΡŒ ΠΈΠ»ΠΈ Π½Π΅Ρ‚. Π’ ΠΏΡ€ΠΎΡ‡Π΅ΠΌ, Ссли ΠΌΡ‹ всС Π΄Π°Π½Π½Ρ‹Π΅ ΠΏΠ΅Ρ€Π΅Π²ΠΎΠ΄ΠΈΠΌ
    Π² кэш, Ρ‚ΠΎ ΠΌΠΎΠΆΠ½ΠΎ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚ΡŒ Π²Π΅ΠΊΡ‚ΠΎΡ€ сокСт, оставив Ρ‚Π΅ΠΌ самым Π³ΠΈΠ±ΠΊΠΎΡΡ‚ΡŒ ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»ΡŽ. ΠΈ
    ΠΌΠ°Ρ€ΠΊΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ Π² кэшС Ρ‚ΠΈΠΏ Π΄Π°Π½Π½Ρ‹Ρ…. Π­Ρ‚ΠΎ всё касаСтся вСрсии 0,4,0.
  • IFC format for BIM export. basics for bmesh viewer m3
  • when bmesh viewer rename object it has to not delete object, but delete. For modifiers support. or make stack of modifiers for bmesh viewer to make auto modifier assigning.

List Input node

listinput
I did this some time ago never finished it.
Simple List Input. Max for now is 32 numbers but that is enough for most purposes.
I know we can do this via Formula2 node but this feels easier than writing in python list format.

Good idea or throw away?

How to find the name of the node_group from a Node?

if I know the name of the NodeTree, i could do this: bpy.data.node_groups['NodeTree']
but im going to implement a way to tick box check if the NodeTree should be updated upon frame_change event. The problem is the user might have more than one node_tree, and it might be wasteful to update all of them..

any hints?

index viewer bug

index-viewbug
Left doesn't work, right does.

Index_Viewer_draw.py", line 208, in draw_callback_px
    if data_edges and node.display_edge_index:
UnboundLocalError: local variable 'data_edges' referenced before assignment

possible bug in ScriptNode

here's a fun bug, which I will assign to myself

something about this script_node script is making the node confused.
https://gist.github.com/zeffii/11395698

The portion in triple quotes, can be uncommented and the script will produce a cube if you press Run in Text Editor.

However, if that section has the triple quotes, the script should work in ScriptNode, but it doesn't. I have some suspicions that this may be down to a bmesh state..

Edge graph to polygons

edges_to_polies

I'm investigating this now, automatically iterate through edges to find Edge Cycles with which to construct polygons. I think it makes sense to have a min=3 max=n parameter for the input. Hopefully will find the right graph theory paper to read, else I implement my own.

Suggestions welcome.

Error in util.py when loading saved .blend

Traceback (most recent call last):
  File "C:\blender_trunk\2.70\scripts\addons\sverchok-master\..\sverchok-master\
Viewer_draw.py", line 83, in draw_callback_view
    data_vector = Vector_generate(sl1)
  File "C:\blender_trunk\2.70\scripts\addons\sverchok-master\..\sverchok-master\
util.py", line 416, in Vector_generate
    return [[Vector(v) for v in obj] for obj in prop]
  File "C:\blender_trunk\2.70\scripts\addons\sverchok-master\..\sverchok-master\
util.py", line 416, in <listcomp>
    return [[Vector(v) for v in obj] for obj in prop]
TypeError: 'int' object is not iterable
Writing: C:\Users\dealga\AppData\Local\Temp\domestic.crash.txt

Sverchok update system RFC

A description about how updates happens in Sverchok since I know people wonder about it. Please ask questions.

Update events

Update can happen in the following ways:

  • Editor changes
  • Value change in a node
  • Frame change
  • Update button

What happens when each event is issued.

Editor changes

The whole node group is evaluated and a list of nodes is created. Then the update function is called on each node in a safe order. The update event from blender is issued to the class SverchCustomTree(NodeTree):
Since the it is hard to know what has changed between two editor change updates the whole list rebuilt, the socket cache cleared and update is called for the whole node group.

def update(self):
        makeTreeUpdate2(tree_name = self.name)
        speedUpdate(tree_name = self.name)

Value change in a node

If a numeric value in for example a float node is changed the following code is run.

def updateNode(self, context):
    speedUpdate(start_node = self.name,tree_name =self.id_data.name)

partial-updates

Note These list should be cached but at the moment they are not. Done!

Animation update

Animation updates are issued from a frame change handler.

 def update_ani(self):
        if self.sv_animate:
            speedUpdate(tree_name = self.name)
@persistent
def sv_update_handler(scene):
    '''Sverchok update handler'''
    for name,tree in bpy.data.node_groups.items():
        if tree.bl_idname =='SverchCustomTreeType' and tree.nodes:
            try:
                tree.update_ani()                
            except Exception as e:
                print('Failed to update:',name,str(e))

Update buttons

The various update buttons use the following operator.

class SverchokUpdateAll(bpy.types.Operator):
  def execute(self, context):
        makeTreeUpdate2()
        speedUpdate()
        return {'FINISHED'}

Note Perhaps we should separate this to have a update All and update current node tree now that we can show more than one node tree at the same time.

Functions

speedUpdate()

speedUpdate is the master update function which calls the update system and dispatches the various calls.
It has several modes.

  • Partial update only part of a node group starting in a named node
  • Update a named node group
  • Update all Sverchok node group
  • Update an Animation tree (not used yet)

Note It needs some cleaning to be honest.

makeTreeUpdate2()

If tree_name is passed an update list is created for that node group is stored in a update list cache. Without tree_name all node groups are processed.

Note The name comes since this is rewrite of the original update makeTreeUpdate2() function.

Building update lists

There are some function the can be used to create update lists. The list are flat and for the whole tree.

Make update list

Create an update list for a node group or a specified subset of node group. The node_set options is used by the next partial updates but can also be used for creating animation trees and other partial update trees.
simpleupdate-example
Gives the following list:

  1. Float
  2. List Series
  3. Vectors in
  4. List Length
  5. Vectors out
  6. List Series.001
    7 Vectors in.001
    8 Text Output
def make_update_list(node_tree,node_set = None):
    """ Makes a list for updates from a node_group
    if a node set is passed only the subtree defined by the node set is used. Otherwise
    the complete node tree is used.
    """ 

A short description of the algorithm used:

  • Select nodes that have inputs or outputs.
  • Create a dict of {nodeA :[nodeB, nodeC nodeD]} where the nodes in the list are the nodes that needs be updated before nodeA.
  • Select the wifi nodes and crete dependecies for them if needed.
  • Start with nodes without outputs and try to satisfy the dependecies while maintaining a stack of nodes and creating the output list for each node where the dependencies are satisfied.

It does some error checking on the way and the whole system fails without notifying the user. Because there are many fail invalid node trees states created during normal editing. For example every time you drag a noodle from one node to another 2 updates event are issued and one socket is connected and the other is not.

make_tree_from_nodes

Create an update list of nodes affected by a change by a set of nodes.

def make_tree_from_nodes(node_names,tree_name):
    """
    Create a partial update list from a sub-tree, node_names is a list of nodes that
    drives change for the tree
    Only nodes downtree from node_names are updated
    """

Future issues.

Some issued for the future.

Node state and Error handling

Node need a way to mark that they are not ready and in such cases they will not be updated. Also they need should be able to be marked as failed. I think 3 node states are needed.

  • Not ready
  • Ready
  • Failed

Separating UI and execute

Right now the ui changes and data processing events are not separated. They should be since editor changes might affect the node function and cause incorrect states. Also the other types of events (frame change and value change) do not need the UI update code to run.

I propose the following.

def update(self):
     handle sockets
     set state
def execute(self):
    process data

Animation node trees

Detect driven, animated etc nodes and update only update the parts of the node tree that are needed. Low priority.

Cache animation states

Not sure about how to do this. Low priority.

Bakery "Show" == can no longer reopen blend file

prtscr capture_40

(Starting from today, I will post bug report in here.)

Latest bug report is in regard to Bakery node. Sometimes a certain setup like above, and having Bakery at "Show" ON will crash Blender, and worse blend file can no longer be opened.

Viewer Text node

I saw @ly29 wants to tackle this. I have some some ideas to share.

Have a 'head' boolean, which causes the node to display only the first 20 entries in any of the inputs. Often we have no need to see all data, just a hint of what it contains.

As a helper node, this might be a crazy idea, but it would be cool to have a geometry viewer node with draws to the 2d context of either 3dview or node_editor view. to display the 'head' data. (still only update if 'live update' is ticked)

Todo (zeffii)

I'm drawing up this list to keep track of things I want to complete before other random stuff.

  • Node to turn (verts+edgpol) into dashed edges, creating new verts+edges (dropping polys)
    • exists as 'dashed_edges.py' in node_scripts/zeffii/
    • use a string representation, or pick from dropdown.
    • use slider for scale (scale is relative to world)
    • image
  • Script Node (Text Editor addon) to generate clone of current as current_file_CLONE_HHMM
    • This would enable something like a versioning system, especially useful for code experiments
      which may span several similar files sequentially or parallel.

(low priority)

  • profile node implement even spread on bezier spline using vector interpolation, this makes the node dependent on numpy. decide.
  • update Intersect Edges
    • add tolerance setting to Intersect Edges
    • add "touching" boolean (currently intersections are limited to X and not T )

(on hold, partially implemented or implemented but not committed)

  • 3d cursor node
  • Grease Pencil In node
    • select from all available grease pencil layers / strokes in the current .blend
    • After selection cache immediately?
  • Empty Node #188
  • finish 'inset specials' node (now a branch)
    • inset amount (relative, but absolute should be possible in some sense)
    • inner face (keep / remove)
    • axis vector + distance scalar to push inset vertices
      long term
  • 3d L-system Node (I implemented this as a nodescript, elfnor also introduced an alternative implementation as a proper Node)
  • plot stuff like http://stackoverflow.com/a/4687582/1243487

done, presently in beta

  • dump current node_tree to json, and generate from json.
  • Viewer Draw Extended
  • rounded rect using phymec's 0.3 code
  • Instancer Node #208
  • barely beta stethoscope
    This node shouldn't go on as beta for too long. The main reason it's not on the fast-track to node-proper is because I'm not sure how to format the data usefully. With DebugPrint node it's easy: "just spit out the data". But with BGL render it needs to be formatted and rounded so as not to overwhelm user or processor. The problem is not displaying the data, it's how to display the data in an abbreviated form in a meaningful way.
  • Eval Node
    • add =eval_text (function, internal file, update)
    • add =read_text (internal_file)

done

  • Simple 2pt bezier node (single segment)
  • Simple 3pt arc node (single segment)
  • Vector Math 2 Node, add Scalar vector * x and vector * 1/x .
    • this node is essentially finished, but I will be tested for another while before it replaces the original vector math node.
    • this node is also getting performance boosts.
  • SN should have an example about how to refresh imports
    I didn't figure out until a few minutes ago that scripted node could load my own local
    python modules. This means i can offload some work to code written in my favourite Text Editor (Sublime) #85 (comment)
  • make ui_operator example that deals with incoming socket data
  • Bmesh view revisit
    • ....pick new random mesh name
    • ....select all generated meshes
    • ....pick base material
  • Gtext node https://gist.github.com/zeffii/063763a6b5fc64544f4f
    • create bounds dict to map the width of each glyph
    • use spacing param to space relative to this.
    • prelim typeface
    • prelim drawing code
    • tokenizer for symbols (maybe \d = degree, \D = diameter, \r = radius ..etc)
    • transplant code into a donor node
    • make latin+cyrillic+extras remap.
    • build primary latin+cyrillic+extras font face
  • intersect edges node doesn't remove original edges, it should
  • fix generic node_script input, right now nested listed are not handled appropriately
  • debug print node ( printing incoming sockets directly to stdout, like viewer Text but without expectations of incoming data formatting ) done by @ly29 not commited yet
  • fix default node values for ScriptNode
  • update index viewer
    • add edges + faces to index viewer
  • make kb shortcut for TextEditor to convert sv_main defaults to a new in_scokets declaration
    def sv_main(verts=[], dist=1.1, strength=1.0):
    can easily be parsed and turned into in_sockets list.
  • ScriptNode to get regular import styles, ie: place imports before def sv_main(). having a new import per iteration was a bad idea from the start
  • ScriptNode to allow 'faux' operator buttons, to action functions.
  • Implement user defined background+vert+edge+face colours in the N panel (6 colours is too clunky for node UI)

Todo (ly)

  • Clean up util.py Further work needed, factor out things that doesn't need to be called by nodes...
  • update function, document #121 and work out issues. #152 #146 #144 #135 #123 -
  • socket cache, finish work. But first discuss #128 #147
  • Fix Text In out. Reload, stability, pretty printing json.
  • Finish VerticesSort. Axis sort, possible to sort only vertices without mesh data.
  • Finish Adaptive Edges. Different ways to align edges. Reuse existing verts to really connect edges. Scaling along, cross from edge.
  • Preferences and Debug Panel
  • Compcat UI Socket UI transistion #147
  • The missing List Nodes
    • List Split
    • Stride in List Slice
    • List Sort, sort by user index
    • Masked Join
    • Index Separate/Dispatch (namning?) like List Mask
  • Expose timings system. Heat map suggested, sounds good.
  • Revisit wifi nodes, in general way.
  • Float Series Creation #164
  • Doubles output in remove doubles

Node to bgl draw vertex indices for the preview

Blender has debug mode for proper mesh geometry, but I consider it unusable because the numbers don't have colour separation from the background.

This could be added to the Viewer node using a tickbox and additional options, or maybe preferably as a separate node with options like index limit and range to draw to minimize overhead. I've written the bgl drawing code already

https://gist.github.com/zeffii/9451340

blog post
img

UI upgrade - compact nodes.

It has become more and more annoying that our nodes are large and behave in a non standard way when it comes to show socket info. Now I found a way to expose our properties like a standard blender node does without making a big class system.
ui-circle
What is needed for the Radius property in Circle node:

rad_ = bpy.props.FloatProperty(name = 'Radius', description='Radius', default=1.0, options={'ANIMATABLE'}, update=updateNode)

def init(self, context):
        self.inputs.new('StringsSocket', "Radius").prop_name='rad_'

This also means we don't have set anything for Radius in draw_buttons

def draw_buttons(self, context, layout):
    layout.prop(self,"mode_", text="Mode")

New code in node_s

class StringsSocket(NodeSocketStandard):
        '''String any type - one string'''
        bl_idname = "StringsSocket"
        bl_label = "Strings Socket"
        prop_name = StringProperty(default='')

        def draw(self, context, layout, node, text):
            if not self.is_output and not self.is_linked and self.prop_name:
                layout.prop(node,self.prop_name)
            elif self.is_linked:
                layout.label(text + '. ' + SvGetSocketInfo(self))
            else:
                layout.label(text)

        def draw_color(self, context, node):
            return(0.6,1.0,0.6,1.0)

Issues

  • Doesn't work with ΒΊ characters for some reason.
  • If you specify ANGLE option you get value in radians, test while converting nodes.

I want to do some more testing before we commit this and start upgrading nodes.

Comments?

Animation auto init

A layout with a ready animation won't update without the user triggering another update event first. It should work.

update node tree

animatin needs to be ubpated every frame.
It is needed to avoid context issues especially of space data and areas. update must work in all of blender spaces. but when i put cursor to 3d window or else - animation stops.
File "/home/nikitron/.config/blender/2.70/scripts/addons/sverchok_nodes/../sverchok_nodes/util.py", line 939, in makeTreeUpdate2
list_nodes4update['TreeName'] = bpy.context.space_data.node_tree.name

Readme.md

Is it OK if I change the readme file to a markdown (README.md) file, for nicer render of text and structure?

I would also like to make the installation instructions more clear.

Formula2 eval "NameError: global name 'n' is not defined"

I'm trying to do
[(i,i+1,i+7,i+6) for i in range(X) if (i-n[0]) % (n[0]+1)]

with X input node integer 12
with n[0] input node integer 5

hand coding the second variable in the expression does work:
[(i,i+1,i+7,i+6) for i in range(X) if (i-5) % (5+1)]

or is this expression a little too complicated for Formula2 node and maybe better defined in a Node that reads from TextEditor..?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.