-
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
Todo (zeffii) #118
Comments
For index viewer: |
I should also do a todo and maybe one: what on my mind re sverchok |
i'll do what I can re idx viewer, you may have to show me what you mean with the node_id, and how to add it. |
def draw_buttons(self, context, layout):
row = layout.row(align=True)
row.prop(self, "activate", text="Show")
row.prop(self, "draw_bg", text="Background")
layout.separator()
col = layout.column(align=True)
row = col.row(align=True)
row.active = (self.activate)
row.prop(self, "display_vert_index", toggle=True)
row.prop(self, "display_edge_index", toggle=True)
row.prop(self, "display_face_index", toggle=True) |
Either everybody just use hash(node) as key for callbacks etc or we define this in util.py. Which we can change if we need.
Then use that which is unique for the node instead of the self.name+self.id_data.name or self.name
So we can disable callbacks on opening a new file.
Clean up handler in node_s
|
|
Also check it the node group is active
|
I will optimize this as much as possible, but probably won't add automatic face index hiding if occluded (at least not initially) |
@ly29 i'm not sure how to wedge that into my new code.. reads |
Do not worry. I can put it in |
This is as far as I want to take the current ScriptNode prototype. I have a few thoughts concerning the Node UI and making it easier to nuke the sockets and load a new fresh template. |
import re
k = "def sv_main(verts=[], dist=1.1, strength=1.0):"
def write_in_sockets_list(test_str):
if not "def sv_main(" in test_str:
return
# get dict
r = re.compile('(?P<name>\w+)=(?P<defval>.*?|\[\])[,\)]')
k = [m.groupdict() for m in r.finditer(test_str)]
print(k)
# convert dict
socket_mapping = {
'[]': 'v'
# assume more will follow
}
socket_members = []
for variable in k:
stype = variable['defval']
sname = variable['name']
shorttype = socket_mapping.get(stype, 's')
list_item = str([shorttype, sname, {0}])
l = list_item.format(sname)
socket_members.append(" " + l)
socket_items = ",\n".join(socket_members)
declaration = 'in_sockets = [\n'
declaration += socket_items
declaration += "]"
print(declaration)
f = write_in_sockets_list(k)
print(f) will add to TextEditor soon. |
List Input, Vector Input or to acess blender data? |
the main thing is the pixel space. some of those more atomic nodes take up quite a bit of surface area.. |
@ly29 is there any way to store something like a dict per instance of a Node ? |
Agree about pixel space. Blender nodes looks clumsy sometimes. |
woah! I think that will speed up ScriptNode because right now I have to obtain the node_function on each update. |
something like: |
Yes. |
Or since you are only storing one per node: |
making it a key allows me to do |
True that. |
these execute functions, is there a better way to get self/node ? using the dict works nicely, but breaks existing node_groups that use ScriptNode |
committed :D |
this is with a linear transition between two states of a set of input variables, the transition should be linear for some but not all. all cool and useful problems :) https://www.dropbox.com/s/gjgkhmqx2lo5ckh/aviation_drome_014.blend (includes semi-vectorized petal_sin) |
yes, i will love to have this in custom nodes too cupola subdivision and rotation is rotating wrong. some screw or shifting appears. to make straight vertical vertices you need only |
ahh crap, I just realized Blender deletes Node layouts that don't have 'users' . wtf. |
I wonder is it possible to automatically set |
my blender not delete layouts with nodes |
hmmm.. I need to press the F or blender will delete them when saving. |
hash 9337574 |
very strange, I can only speculate why this happened now |
:O |
will make dynamic vertex sizes work too. Useful for larger screens |
yes, you did it, thnks. how did you shading? |
it uses the single point light source as implemented already in ViewerDraw, except with FloatVectorProperty pointing at the Normal. |
Very nice, thought about using GLSL shaders? |
@zeffii
but not know how to get working |
lets say, shaders in GL will be headake, but lighting is in. question is how to get working |
unfortunately my current hardware doesn't support GLSL shaders |
if there is ready solution... we need most simple case |
i don't know which is more efficient, lighting or handpainting polygons.. |
Just color and simple shading will be enough. Also verify polygon data which can crash blender and or cause visual artifacts |
lights are not necessary, if we want lights then use bmesh viewer. this node is not intended to replace ViewerDraw, but instead offer a complementary set of useful features, especially:
|
we need improve viewer draw completely. But if you making little improvements for now is enough |
I'm drawing up this list to keep track of things I want to complete before other random stuff.
node_scripts/zeffii/
current_file_CLONE_HHMM
which may span several similar files sequentially or parallel.
(low priority)
(on hold, partially implemented or implemented but not committed)
long term
done, presently in beta
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_text
(function, internal file, update)=read_text
(internal_file)done
vector * x
andvector * 1/x
.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) node_Script scripting details and examples #85 (comment)
def sv_main(verts=[], dist=1.1, strength=1.0):
can easily be parsed and turned into in_sockets list.
def sv_main()
. having a new import per iteration was a bad idea from the startThe text was updated successfully, but these errors were encountered: