-
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
Pulga physics modular (WIP) #3525
Conversation
Yay! :)
|
@portnov What type of property the socket should contain? @vicdoval Can be useful: #3507 (comment) |
The socket should look like this now: class SvForceSocket(NodeSocket, SvSocketCommon):
color = (int, int, int, int)
default_property: FloatVectorProperty(default=(0, 0, 0), size=3, subtype='DISTANCE', update=process_from_socket)
use_prop: BoolProperty(default=True) # just in case if it should be True by default
def draw_property(self, layout, prop_origin=None, prop_name='default_property'): ...
# here you can draw what ever you like in socket layout
# it is not mondatory def sv_init(self):
sock = self.inputs.new('SvForceSocket', 'Name')
sock.use_prop = True # if it is not by default true
scok.defaul_property = (1, 1, 1) # in case if node should have another default value |
@Durman is it possible to define the description attribute of the default property? |
Yes, but this description will be shared among all users of the socket. |
So is not possible to do it per socket (as with the regular props)? (i was trying with a |
Property is like class variable only actual values can be different among class instances. I had a look at animation nodes and it looks like sockets properties do not have any tooltips. Probably the properties are initialized in sockets. |
Good news for performance: Cython is pip_instalable and cKDtree of scipy is super fast (up to 40x) |
@vicdoval Did you manage to overcome the necessity of messing with python's |
not any file messing, only clicking on the pip install button and start to use cKDTree (that is 100 times faster than the regular KDTree in the same scenario with 26000 vertices) |
than adding to extra nodes deps? |
Reminder: Don't trust numpy vectorize (creating my own for loop i got a 2x boost) |
Yeah, |
Also if you have to create a array for every output number (for the vectorize method) is slower that creating the array first and fill it with the values |
Has anybody experimented with the |
I did not, but I do not have too many hopes for it: Blender clearly expects all python scripts to be "sequential", so I expect a lot of concurrency problems / locks / wtfs. But worth a try. |
It looks like that I tried. I remember each process was launching new Blender. |
How can i try the pulga nodes? I can't find them in the master branch |
@onerawartist this is a work in progress so it is still not merged with the master. If you want to try it in its actual state (some things may change and there is not full documentation) you can get it from this branch https://github.com/vicdoval/sverchok/tree/pulga_physics_2 |
New Features: