I'm having this issue with animation nodes where, if I want to change the list of vertex positions of an object based on a boolean condition, then only one vertex gets affected. In this case, only the vertex at (1,1,0) gets moved upwards. In the example I appended, clearly all vertices of my object are at a lesser distance than 10, so they should all move. However, if I delete the "boolean branch" of the tree, and modify the whole list blindly, the whole object moves.
I'll append a screenshot of the actual nodetree where I'm having the issue. As you can see I'm looking for the nearest five particles of the particle system to the point, and then, with a very simple script, i find the velocities of those particles and calculate the resultin vector. Also, I check if the minimum distance of the five is less than some arbitrary number that I choose, and based on that, I decide to do the change or not. Appart from that, I check for the nearest points in the sphere to the current vertex in the iteration (and append the index of said vertex as well to the list of indices). Then I use a script which I will leave here to change all the vertices that are pointed to by those indices in the original list of vertex positions. And based on the boolean mentioned before, I choose what list to connect to the mesh output node.
What I intend this to do is, for every frame in the animation, change the whole list of vertex positions based on everything I just said.
Thanks for the help!
def mod_vec_list (ind, pos, vec_dist, vec_vel): for x in ind: cust_dist = (vec_dist - pos[x]).length + 1 pos[x] += (1/cust_dist) * vec_vel return pos res = mod_vec_list (ind, pos, vec_dist, vec_vel)