Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Heads up display to also show Active Soft Selection, Constraints etc.

Heads up display to also show Active Soft Selection, Constraints etc.

Its good to have  the message when the symmetry is active and to indicate what symmetry is active. Same for the polycount statistics and such.

 

Would be even far more useful an option to display the active  Selection and transform Constraints as well as when the Soft Selection is enabled plus many other counteless info I cant even think right now. Sometimes it happens to forget to turn those off immediately once I dont need them and all sorts of issues occur. 

For those that use a more minimal UI having the  Modeling toolkit or and Tool settings collapsed, these HUD options can even more in hand.

HUD Display options.png

4 Comments

Inserting images was broken at the time of posting so here some additional ones in case somebody doesnt know where the HUD appears

 

Maya HUD.jpg

BigRoy
Advocate

These actually aren't too complex to set up yourself, but do require some scripting knowledge.

 

Active Selection

 

from maya import cmds


def active_selection():
    return cmds.ls(sl=True) or "-"

NAME = "HUDActiveSelection"
if cmds.headsUpDisplay(NAME, query=True, exists=True):
    cmds.headsUpDisplay(NAME, edit=True, remove=True)
    print("Removed")
else:
    cmds.headsUpDisplay(NAME, 
                        section=1, 
                        block=0, 
                        blockSize='large', 
                        label='Selection', 
                        labelFontSize='small', 
                        command=active_selection, 
                        event="SelectionChanged")
    print("Added")

 

Soft Selection

This will show the soft selection state, falloff mode and the currently set radius/distance:

 

from maya import cmds


def soft_selection_state():
    
    enabled = cmds.softSelect(query=True, softSelectEnabled=True)
    if enabled:
        distance = cmds.softSelect(query=True, softSelectDistance=True)
        distance_str = "{0:.3f}".format(distance)
        falloff_index = cmds.softSelect(query=True, softSelectFalloff=True)
        falloff = {
            0: "Volume",
            1: "Surface",
            2: "Global",
            3: "Object"
        }.get(falloff_index, "Unknown falloff mode")
        return "{falloff}  -  {distance}".format(distance=distance_str, falloff=falloff)
    else:
        return "OFF"

NAME = "HUDSoftSelection"
if cmds.headsUpDisplay(NAME, query=True, exists=True):
    cmds.headsUpDisplay(NAME, edit=True, remove=True)
    print("Removed")
else:
    cmds.headsUpDisplay(NAME, 
                        section=1, 
                        block=0, 
                        blockSize='large', 
                        label='Soft Select', 
                        labelFontSize='small', 
                        command=soft_selection_state, 
                        event="softSelectOptionsChanged")
    print("Added")

 

---

 

Not entirely sure what you meant with showing the Transform Constraints. What type of information would you like to be shown?

 

Or how did you envision those settings to be shown otherwise?

when you move vertices or edges for ex you can constrain the movement to edge or face. This is usually handy when you don't want to ruin your surface. The components will slide on the edge or face respectively

BigRoy
Advocate

By the way, I've noticed that Soft Select status in viewport actually already exists in Maya - it's the "Select Details HUD" (visible also in your screenshot).

 

Here's an example code snippet to visualize the Transform Constraint status as a HUD in the viewport:

 

from maya import cmds


def transform_constraint_state():
    return cmds.xformConstraint(query=True, type=True)

NAME = "HUDTransformConstraint"
if cmds.headsUpDisplay(NAME, query=True, exists=True):
    cmds.headsUpDisplay(NAME, edit=True, remove=True)
    print("Removed")
else:
    cmds.headsUpDisplay(NAME, 
                        section=1, 
                        block=0, 
                        blockSize='large', 
                        label='Transform Constraint', 
                        labelFontSize='small', 
                        command=transform_constraint_state, 
                        event="xformConstraintOptionsChanged")
    print("Added")

 

I think what this shows is that it would already greatly benefit if there's a "HUD Editor" tool or alike to allow less technical artists to design HUD overlays and move them into screen areas where they'd like. Something with a nice UX like the Hotkey editor would be a great feature.

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea