Skip to content
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

Todo (ly) #119

Closed
13 of 18 tasks
ly29 opened this issue Apr 29, 2014 · 38 comments
Closed
13 of 18 tasks

Todo (ly) #119

ly29 opened this issue Apr 29, 2014 · 38 comments
Labels

Comments

@ly29
Copy link
Collaborator

ly29 commented Apr 29, 2014

@ly29 ly29 added the todo label Apr 29, 2014
@ly29
Copy link
Collaborator Author

ly29 commented May 9, 2014

List nodes include:
List Split.
Update List Slice to support stride.
etc

@ly29
Copy link
Collaborator Author

ly29 commented May 15, 2014

pref-panel
So the preferences panel is working. Will just make the debug panel do something before committing...

@ly29
Copy link
Collaborator Author

ly29 commented May 15, 2014

What should go in here?
Default colors for viewer nodes I think, maybe default settings for some other nodes where makes sense, most nodes don't need this. Pre post framge change, I think pre makes more sense and will switch back to it but make user configurable.

@ly29
Copy link
Collaborator Author

ly29 commented May 15, 2014

Also some options that in the future might affect how sverchok operates.

@nortikin
Copy link
Owner

there needed to be colors of input nodes, output nodes, text nodes, error in node. so, color scheme of nodes ui codification

@ly29
Copy link
Collaborator Author

ly29 commented May 16, 2014

Agreed.
All good suggestions.

@ly29
Copy link
Collaborator Author

ly29 commented May 17, 2014

Right now one can turn on it with DEBUG_MODE=True but with I will make part of the debug menu.
@zeffii suggested a heat map to Jimmy, an option which sounds nice.

Made some tests with a file made by Jimmy and all nodes took more or less the same small amount of time except Formula2 node which took 83% of the total time.
The file in:
http://blenderartists.org/forum/showthread.php?272679-Addon-WIP-Sverchok-parametric-nodes-for-architects&p=2648398&viewfull=1#post2648398
Results:
https://docs.google.com/spreadsheets/d/1o6uVOjraXxvxXiKFUYDS4S5tISOH8pW_ZzAEBdZ0iGQ/edit#gid=0

@zeffii
Copy link
Collaborator

zeffii commented May 17, 2014

hey, it's totally possible for grease pencil to draw a graph in the node view :)

@ly29
Copy link
Collaborator Author

ly29 commented May 17, 2014

Lets use that for feedback.
Have never thought about drawing with grease pencil like that in blender.

@nortikin
Copy link
Owner

it is fantastic indeed, i make note node but it is not what we need. Text as grease pensil is sounds fantastic

@nortikin
Copy link
Owner

@ly29 how formula1 do this task?

@ly29
Copy link
Collaborator Author

ly29 commented May 17, 2014

I will check.
Made an improvement with what I saw as one potential problem.

   def enlarge(self, lst, equal):
        ''' enlarge minor n[i] list to size of x list '''
        lst.extend([lst[-1] for i in range(equal)])

Note that is doesn't need to return the list because lists are mutable.
This was before:

    def enlarge(self, list, equal):
        ''' enlarge minor n[i] list to size of x list '''
        while equal > 0:
            list.append(list[-1])
            equal -= 1    
            #list = self.enlarge(list, equal-1)

        return list

Where commented out version as the first the recursive first implementation.
However it doesn't make that large a difference. But still an substantial improvement.

@ly29
Copy link
Collaborator Author

ly29 commented May 17, 2014

With Formula the formula nodes part the total execution time goes from 83% to 13% , which is lot more reasonable.
Of course this is due that Formula2 is much more clever and does more interesting things.
But still I think it could quicker.

@ly29
Copy link
Collaborator Author

ly29 commented May 19, 2014

text
Text in/out almost ready some structural, backwards compatible, changes:

  • Solved reload problem by changing mode of operation with reset, reload and load
  • Bug fixing
  • Json output socket takes their name from input node+socket
  • Simplified operator code
  • Append mode for output
  • Multi layout safe

Solves #155 and most of #168 with exception for string input node. Until/if we make proper string support should we have a string node with one purpose? Formula can be used for that even if you get [["String"]] instead of "String"
Not sure so waiting with that part.

@ly29
Copy link
Collaborator Author

ly29 commented May 19, 2014

Todo text:

  • support ordering of socket for JSON format
  • naming of csv fields
  • investigate reload/dump on every update
  • prettier formatting for json and Sverchok list format. ?

@ly29
Copy link
Collaborator Author

ly29 commented Jun 29, 2014

data_structure.py refactoring.
Splitting out the update system from it to make things easier to handle, removing about 400 lines will make it easier to get into. Further re-factoring and cleanup is needed. Also good comments for all functions are needed.

@wclyffe
Copy link
Collaborator

wclyffe commented Jun 29, 2014

@ly29
data_structure.py : I tought a bit about it, and you were right, the name is a bit misleading. It could be splitted in acore folder/package, with sub-modules for each "magic" since they seem to not depend from each other

@ly29
Copy link
Collaborator Author

ly29 commented Jun 29, 2014

@wclyffe
core is good name. I will start with the update system since it is the biggest part and has few external users, except updateNode will leave it there in this first step since it is so many nodes, anyway it belongs in node_tree.py

@ly29
Copy link
Collaborator Author

ly29 commented Jun 29, 2014

From 1360 lines in data_structure.py to 1023 lines. A first step to reducing the size.
Want to test a bit more before pushing.

Will also move app handles to core/ directory I think it is good idea to split that from node_tree.py that I think should mainly be out class definitions for Node, Node Group and Sockets.

@ly29
Copy link
Collaborator Author

ly29 commented Jun 30, 2014

So I made a core directory with things that aren't directly used by any node and removed them from data_structure.py

sverchok/core$ ls 
handlers.py  update_system.py  upgrade_nodes.py

I think it is ready for using but for large refactoring some things always tend to break... Usually the abusive cases.

@ly29
Copy link
Collaborator Author

ly29 commented Jun 30, 2014

It is in the new development branch. Please somebody confirm that it works.

@zeffii
Copy link
Collaborator

zeffii commented Jun 30, 2014

syncing now

@ly29
Copy link
Collaborator Author

ly29 commented Jun 30, 2014

@zeffii
There are some minor functional changes, mostly in sv tools where the update button can update all or the current and the tools node which now update the layout it belongs to. Logical. I suspect you might never ever have used the tools node. Also some bug fixes included.

@zeffii
Copy link
Collaborator

zeffii commented Jun 30, 2014

it's working so far, I develop on this branch too if that's okay?

A - Correct, tools node doesn't even sound familiar

@nortikin
Copy link
Owner

sverchok upgrade not works
what you deleted?

@ly29
Copy link
Collaborator Author

ly29 commented Jun 30, 2014

@nortikin in development or master?

@ly29
Copy link
Collaborator Author

ly29 commented Jun 30, 2014

master seems to be working so I guess development. will test now

@ly29
Copy link
Collaborator Author

ly29 commented Jun 30, 2014

Both seems to be working for me (but are both broken as far as I am concerned since they don't respect the name of the sverchok directory but just unzips sverckok-master), as far as I can tell the update code shouldn't have been changed at all.

@nortikin
Copy link
Owner

i see that with many branches many troubles. i will now go to development branch and check for it working

@nortikin
Copy link
Owner

working. What it was? maybe i had not last sv_tools fixation

@ly29
Copy link
Collaborator Author

ly29 commented Jun 30, 2014

But since I moved a lot of things around many things might have broken, I think I found most of them but it is hard to be sure.

@ly29
Copy link
Collaborator Author

ly29 commented Jul 23, 2014

@ly29
Copy link
Collaborator Author

ly29 commented Sep 22, 2014

zip_longest eq. below from pythpn docs.
extend for 1) individual fill values for each list or iterator, allow individual behavoir for iterators.
combine with math recursion and level checking for true vectorization for SN2

class ZipExhausted(Exception):
    pass

def zip_longest(*args, **kwds):
    # zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D-
    fillvalue = kwds.get('fillvalue')
    counter = len(args) - 1
    def sentinel():
        nonlocal counter
        if not counter:
            raise ZipExhausted
        counter -= 1
        yield fillvalue
    fillers = repeat(fillvalue)
    iterators = [chain(it, sentinel(), fillers) for it in args]
    try:
        while iterators:
            yield tuple(map(next, iterators))
    except ZipExhausted:
        pass

@nortikin
Copy link
Owner

this code i will investigate long time

@nortikin
Copy link
Owner

sorry, what is chain here and where is defined?

@ly29
Copy link
Collaborator Author

ly29 commented Sep 23, 2014

@nortikin
See https://docs.python.org/3/library/itertools.html , the above code is just one building block from there.

@nortikin
Copy link
Owner

great!

@ly29
Copy link
Collaborator Author

ly29 commented Aug 18, 2016

This is so old I will just close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants