-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spreadsheet functionality #3639
Comments
Seems very powerful, allows a not nodal behaviour in a nodal environment... also seems a bit confusing.. How did you create the "Center" item in the Center column? |
Well, the problem I tried to address is the following. I noted that every non-trivial node tree consists of the following blocks:
In my trees, the most complex, most "noddy" parts are 1 and 2, there are a lot of links between nodes there also. So I thought maybe it is possible to place such inputs and calculations into several spreadsheets. I did not manage to develop a good workflow, how should one usually use spreadsheets to replace or simplify parts 1 or 2. It is obviously possible, but I'm not sure how to do it in the best way. |
I'm quite suspicious about wifi nodes. How all output wifi nodes can be identified in a tree? If there are hundreds of nodes in a tree it will be quite difficult task.With links there is no such problem. |
Yep, it's not necessary, just looks better (imho). Btw, maybe it worth to show the same panel in the N panel of node editor? Maybe even with option: to display all input nodes or just those marked with "to_3d". |
Why not but renaming should be done in this case I think. The panel should be renamed to something like |
|
do you have if formula and isinstance(formula, str):
result[row_name][col_name] = sv_compile(formula)
return result |
It understands expressions only, not statements. You can do |
@vkter for now, it is in sverchok-extra addon :) |
I'm not sure how exactly useful these things are, so at the moment I've put them to sverchok-extra master. These nodes do not require any dependencies; they can be easily moved to Sverchok, the only question is do we need them.
"Data Item" node.
This is similar to
dictionary Out" node, but adopted to work with nested dictionaries. In node UI you select a "path" in the nested dictionary, and the node outputs the item. For example, you can calculate something like
my_dict['Boxes']['MyBox']['Width']`.Or, for one (not more than one) of the nested keys you can say "All keys", this will be something like
my_dict[*]['Width']
ormy_dict['Box1'][*]
:"Spreadsheet" node.
This is more cumbersome. It allows you to input data in spreadsheet-like interface. Each row ("item") has user-provided name, and each column also. Columns to be used are configured in the N panel of the node. Supported types of columns are: integer, float, vector, boolean, string and formula. Most interesting is, off course,
formula
. It gives a possibility to do calculations in a way similar to LibreOffice or Excel (without aggregation functions). Python syntax is used, as usual in Sverchok. You can refer to other cells of the same spreadsheet asRowName.ColumnName
. You can refer to other columns of the same row just asColumnName
. Special input socket namedInput
is supported for nested dictionaries input (e.g. you can plug another spreadsheet here); you can refer to items of that dictionary asInput.RowName.ColumnName
. Any other variables (apart from well-known functions such assin
orpi
) will automatically become additional inputs of the Spreadsheet node.The node can output data in several ways:
Data
output for nested dictionary,Rows
output for RowName -> List of values in this row, andColumns
for ColumnName -> List of values in that column.The text was updated successfully, but these errors were encountered: