How to select Shapes directly from the perspective view?

How to select Shapes directly from the perspective view?

TheCalVRsimer
Participant Participant
2,202 Views
10 Replies
Message 1 of 11

How to select Shapes directly from the perspective view?

TheCalVRsimer
Participant
Participant

Hi,
I am working with STEP files from Fusion360 imported into Maya.
Each object is coming in as several trimmed surfaces, I can display, in the outliner, each Shape by allowing Shapes from the right mouse button contextual menu. I can then select each individual shape from the outliner. Is there a way to select each individual shape, forming one object, from the perspective view?

So far no luck!
Thanks for your help!

0 Likes
Accepted solutions (1)
2,203 Views
10 Replies
Replies (10)
Message 2 of 11

damaggio
Mentor
Mentor

Just select the shapes you want in the viewport just like anything else. There shouldn’t be a problem.

0 Likes
Message 3 of 11

TheCalVRsimer
Participant
Participant

Thanks for your reply,

No it does not, it selects the ensemble of shapes forming the one object.
As an example, let's take a screw modeled in fusion360.

When imported into Maya as a STEP file the screw comes in as one entity, let's call it one object (the screw). So, it will show in the outliner as one object, but in fact that one object is made of a bunch of Shapes than can be made visible in the outliner by allowing Shapes view from the right mouse button contextual menu. In the outliner those shape can be individually selected but not in the viewport. In the viewport it will select the entire object(the screw) not one of the individual shape I am clicking on.
I hope my explanation is a bit clearer

0 Likes
Message 4 of 11

damaggio
Mentor
Mentor

The Menu bar has an option to just select surfaces like Polygons or Nurbs, it won't let you select anything else like locators or curves, please try that.

0 Likes
Message 5 of 11

TheCalVRsimer
Participant
Participant

Thanks again for following up on my issue. Images are better than a thousand words!

The outliner before showing the shapes:

TheCalVRsimer_3-1658873030338.png

The outliner once Shapes has been ticked:

TheCalVRsimer_1-1658872579239.png

As you see my screw is made of 23 shapes and when I click on it in the viewport it only select the object(screw101). The only way I have to select the individual shapes is through the outliner as represented in the image below:

TheCalVRsimer_2-1658872816370.png

If I want to select the same shape through the viewport, it will select the entire screw as shown on the second image!

Thanks!

 

0 Likes
Message 6 of 11

damaggio
Mentor
Mentor

I see what you mean now, generally the original modeler should have exported as polygons and not as nurbs surfaces, now you have all these shapes that should be a single mesh / screw, I never work with nurbs but maybe since you have the pieces grouped you could create a Locator and parent the group to it, so when you select the locator it selects the whole system. I will invite others to chime in since is beyond the scope of my work.Best of luck.

0 Likes
Message 7 of 11

TheCalVRsimer
Participant
Participant

It is a STEP files exported from Fusion360 into Maya. The modeling is done in Fusion360 and Maya is used for animation and rendering. STEP files are bringing in only TrimmedSrf from Nurbs patches.
The screw example, I only need the headCap, that's why I want to be able, from the viewport, to select any undesirable geo(shapes) that won't appear in the render! I can't determine which shape I need to delete by simply looking at its name in the outliner, it needs to be selected through the viewport! : )
Thanks for your help!

Greatly appreciated!

 

0 Likes
Message 8 of 11

Kahylan
Advisor
Advisor
Accepted solution

Hi!

 

This is a bit problematic since it is a nurbs object with multiple shapes. Geometry objects could be selected per shape by just switching to component mode and using doubleclick selection, that doesn't work with surfacepatches and nurbs.

 

I think the easiest way to solve your problem is using a script that creates a tranform node for each shape and assignes the shape to it, breaking down one object with multiple shapes into multiple objecs with one shape each.

 

This script does this:

import maya.cmds as mc

def createObjectsForShapes():
    objects = mc.ls(sl = True)
    mc.select(cl = True)
    
    for o in objects:
        shapes = mc.listRelatives(o, shapes = True)
        for s in shapes:
            transform = mc.createNode("transform", n = "{0}_Trans".format(s))
            mc.parent(s, transform, s = True, r = True)
        
createObjectsForShapes()

just select the transform node above the shapes and run this script from a python tab or shelf button and it will break down the object in question into multiple objects that then can be selected in the viewport.

 

I hope it helps!

Message 9 of 11

TheCalVRsimer
Participant
Participant

Thank you so much for taking the time and offering a solution!

I will test the script tomorrow!

When I render with Arnold, I can select the individual shapes through the viewport render window. Doesn’t help much but interesting! I wish it would be that easy in the cam viewport window for Nurbs srf.

Greatly appreciate your help, thank you again!

0 Likes
Message 10 of 11

TheCalVRsimer
Participant
Participant

Hi,

Finally got to try your script!

It works wonders!
This is a game changer, gonna allow me to clean up and greatly reduce the amount of shapes I don't need coming from Fusion360.
Thank you very much again for the script!

Message 11 of 11

summers3d
Community Visitor
Community Visitor

This was a huge help for me as well.  Thank you!  I used it to be able to select hundreds of curves from Houdini that were each their own shape.

0 Likes