Open ly29 opened 9 years ago
To test.
Testing, easiest is to use git and then create a symlink in the addons
folder pointing to the SverchokRedux
folder.
There isn't much to do yet with the system.
but it not installing error in importing core/execute and compiler items from the same folder
PS
same problem was in initial Sverchok with dot import. dont remember how we solved
File "/home/ololo/.config/blender/2.76/scripts/addons/SverchokRedux/core/compiler.py", line 1, in <module>
from SverchokRedux.core.execute import GraphNode
File "/home/ololo/.config/blender/2.76/scripts/addons/SverchokRedux/core/execute.py", line 3, in <module>
from SverchokRedux.core.compiler import create_graph
ImportError: cannot import name 'create_graph'
maybe
sys.modules["SverchokRedux"] = sys.modules[__name__]
please register in paths
Ahh, will take of that, it seems does errors don't appear on reloading after doing the changes.
Should work now
I won't mess with the sys.modules
again, I think a better distribution system is in order
Tried to play a bit with opengl, but all the new functions where ´´´None´´´ in the bgl module. Didn't have time to look into that... @zeffii Any idea?
I'll make time to check the bgl stuff :) haven' looked at new functions yet
It is nifty, you give open gl vertices either as ordered triangles or as verts and topology. From a silly amount of function calls it becomes just a few. And then a shader programs paints it. We will need a good way to triangulate though.
And giving means passing a memory buffer in one call.
Oh, I just did something stupid, now the functions show up.
got any code to experiment with?
@ly29 i know it's probably only cosmetic.. and your code isn't in a final state but I do read the code. And am wondering: https://gist.github.com/zeffii/7979b80c1dd61d3028c3 if that might have any effect on speed
@zeffii Working on OpenGL code.
Yeah, thumbs from me about that change. Even thinking about turning it into a named tuple/class for easer use, for the links and the node. all the lookups are getting my nerves.
Link = namedtuple("Link", ["from_node", "from_socket", "to_node","to_socket"])
or even the shorter forms.
ideasman42 expressed an unfavourable opinion about the speed and implementation of namedtuple, quite some time ago -- i'm not sure if it is relevant here: http://blenderscripting.blogspot.nl/search/label/namedtuple
well if turns out to be a problem we can shift it along those lines. easy enough to do, the main thing I want is the interface of not having to look up things.
node=nodes[name]
node["bl_idname"]
# vs
node.bl_idname
# etc
yeah, massive headache those " "
all the time. I agree.
I tried to, but I think I get the theory of the more modern open gl but the specifics are bit new. A working piece of code would nice. Will hold of a bit with it.
@zeffii
import bgl
bgl.glGenVertexArrays is None
is also true for you?
>>> bgl.glGenVertexArrays()
Traceback (most recent call last):
File "<blender_console>", line 1, in <module>
TypeError: function takes exactly 2 arguments (0 given)
I don't think it's supposed to have any explicit return value, except None
I am interested to see what the bgl equivalent of https://gist.github.com/zeffii/131fb3a0f6fc3ca117fb is
see https://github.com/Sverchok/SverchokRedux/issues/16 for bgl talk
A bit of a break, will be quite busy the next couple of days. Will try to advance a bit here and there anyway.
So right now everything is kind broken, will focus on getting it to run again with consequences of the new type system. But will be day or two before I can do that.
The system is basically working now. As #7 is closed it is time to look forward a bit. All of these deserves their own issues.