addpoint, how to use it?

   1901   4   0
User Avatar
Member
1010 posts
Joined: April 2017
Offline
Hi!

I wanted to create a point at the top center of a box. I used the getbbox to get the min, max and center so I could create a vector (pos0) and used that inside the addpoint function.

I don't get any error but I also end up with 0 points created…

vector min = getbbox_min(1);
vector max = getbbox_max(1);
vector center = getbbox_center(1);

vector pos0 = set(center.x, max.y, center.z);
addpoint(0,pos0);


As always, I'm just missing something obvious…

-Olivier

Attachments:
addpoint.JPG (54.3 KB)

User Avatar
Member
2042 posts
Joined: Sept. 2015
Offline
It's because you have your box connected to input 1 of the wrangle, and since there are no points given for input 0, there are no points to run over, so nothing happens.

All other inputs other than 0 are for reference only.
User Avatar
Member
1010 posts
Joined: April 2017
Offline
AH!

So if I only want to have 1 point created, I need to have my box in input 0 and delete the box points after I created my point with addpoint?

-Olivier
User Avatar
Member
8595 posts
Joined: July 2007
Offline
Keep it connected as you have, just change Run Over to Detail as obviously there are no points in first input
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
1010 posts
Joined: April 2017
Offline
Ah! Wonderful!

Thanks you!

-Olivier
  • Quick Links