How do I snap a GMask Vertex to an Axis or Point Locator?


Within an Action Node, I have a GMask rectangle. How do I move an existing vertex from that rectangle to snap to an Axis or Point Locator in 3D space?

I can easily do this with a selected corner of a Surface with Extended Bicubic turned on, combined with holding the Shift key to move and snap it to a Point Locator. I would like to have the same functionality for GMask Shapes.

For those of you who have not used Point Locators before, to make them work in Action in this context, be sure to disable the Snap Z Position option found under Node Prefs / Viewport.

@lewis has a superb tutorial on how to use Point Locators with 3D cameras. Don’t be surprised if your jaw hits the floor! Mine did. Thank you, @lewis for sharing!

@randy was kind enough to make the point locator available via an action node. Thank you, @randy!

And thank you, @mikev for the Axis to Point Locators python script!!! This is very helpful!

So… Is there a successful way to snap a vertex to an axis or point locator?

Thank you in advance for your help!



I doesn’t sound possible. Gmask vertices have no position.z. The best you can do is link x and y by expressions.

Yeah sorry, not possible. Gmasks exist in the 3d space, but they are not three dimensional objects (I often wish they were!)


If the points are coplanar then you can select them all and create a point locator. Then use the plane transform axis behaviour. View the scene through the front/side/top views and drag each point to the center of a point locator box. Doesn’t snap but you can get pretty close.

Thank you @ytf, @gpm and @ryland.

Coming from Maya I’m used to having the ability to create surfaces from splines. Via your responses I was inspired to try something novel. I created Surface Color node and connected that to the Action Node via a New Media input. Next, I switched the surface from Flat to Extended Bicubic. Via the Vertices tab for the Surface, I subdivided the surface.

Using this approach I now have a closed surface with points that will snap to the Point Locators in 3D space. This is a different way of solving the challenge. I also like that I have handles for each point to give it the desired shape.

Thank you for inspiring me and for your thoughtful responses! Have a great day/weekend!


I thought doing this with an extended bicubic would screw up the tangent handles. I know that’s what happens when you connect them to something with expressions

When I move the points freehand using the “snap to point locators” process and then adjust the handles, the handles work as desired. For my test I used a surface with one subdivision (2 x 2). Do you get the same results when adjusting the points by hand?

I get the proper result when I move them by hand. I’ve never used a “snap to locator” for extended bicubic vertices, but I have used many with expressions. The handles don’t follow because they have their own animation channels, so they need to be linked by expression also. I assumed the snap to locator was similar, but I guess not.