Using addpoint and then setting an attribute or group dynamically for the created point

   2190   2   0
User Avatar
Member
60 posts
Joined: March 2018
Offline
I recently found this tutorial https://www.youtube.com/watch?v=GhquYJ9m1Oc [www.youtube.com] while trying to recreate this pencil shot http://motionographer.com/quickie/scaler/ [motionographer.com] . In this tutorial he is using animated recursive subdivision. Basically cutting up a grid and throwing it in a for each loop. I want to be able to tag certain points on each iteration so that I can access their positions after the for each loop. I am uploading the scene file, its just a lot of vex, but at the bottom is where the points are created. Any help would be appreciated, thanks.


Using this I can technically tag them, but it is creates odd results, some points are not where they should be after the for each loop. int pnt_05 = setpointattrib(0, “a”, addpoint(0,pos_05), 1, “set”);



Image Not Found

Attachments:
ars.hip (140.5 KB)

User Avatar
Member
60 posts
Joined: March 2018
Offline
I ended up using a different set up, but if it is possible to do I'd still be down to learn how.
Edited by animationalex - July 18, 2019 15:56:59
User Avatar
Member
504 posts
Joined: July 2005
Offline
Hi,

one thing which might help, is using the add function before putting the point into the setpointattrib function, because at the moment your return value of setpointattrib is pnt_05, which is also and integer but probably not the point number of the point pos_05, which was just added in the function setpointattrib.

Write something like this:
pnt_05 = addpoint(0,pos_05);
setpointattrib(0, a, pnt_05 , 1, set);

If you don't use pnt_05 again, this change will have no effect. I've tested your file and the point pos_05 is at the right position, but I didn't used the point number.
  • Quick Links