[Closed] snapMode.node – Detect if Mesh is in Container?
Hello!
I recently learned about the snapMode.node from Max 2016 documentation.
Which works well for finding the node under the mouse, when snap is on.
I ran into a problem though, using that, where, if a mesh is in a container, like we use at work, it will find the mesh object properly, but not see the container object it’s in…?
I tried to get the .parent of the mesh node, or other methods, but I think the snap is totally ignoring it.
I also tested using
mouseray = mapScreenToWorldRay mouse.pos
intersectRayScene mouseray
But, then it just does’t find anything, it it’s in a closed container…
Any ideas?
Thanks!
I just decided to have the user select objects in order of how they want them to align/be processed, and then also get the snap mesh/object like I was before.
So then for container objects, I can use the selection for the node to move, and the snap object/mesh for the transform data/matching.
Yeah. But the detected snap mesh for some reason doesn’t return / say it’s in a container.
But the way I have it now is fine. Makes it a little less confusing as well I think, for the user and I give some more specific warnings now if it fails.
I also have it working with groups now, but need to fix it so if a group is open and a mesh inside it is selected, it still works.