Set transparency for objects individually

Lets say I have a complex closed polysrf that defines a region and I want to manipulate/move objects within it while making sure that the objects stay within the region. Is there any way to ghost out closed polysrf so that it is still there as a reference, but transparent enough to see through it (so I can see and select the objects). It is also preferable that when I click on an object that the region is not possible to select, since I don’t want to deal with the selection menu every time I select the objects.

I know there is a transparency option in the display options, but I don’t want everything to be transparent.

I know that I could apply a transparent material, but I’m looking for something closer to the hide/unhide function.

You can either use the Lock / Unlock function or assign a specific -other- display mode to that one object. For example, your viewport can be in shaded but that one object in wireframe. Use SetObjectDisplayMode.

Locking the object would work well in this situation.
You won’t be able to select it, so the selection menu won’t come up.
And you have an option to choose the transparency of locked objects.

2 Likes

That’s it. Thanks for the tip.

Unless I misunderstand, it seems that you want to lock the objects and make them transparent at the same time. I wrote a little script for that a long time ago:

import rhinoscriptsyntax as rs

def LockAndGhost():
    objects = rs.GetObjects("Select object to lock",0 , True, True)
    if objects is None: 
        return
    else:
        rs.EnableRedraw(False)
        for object in objects:
            rs.SelectObject(object)
            rs.Command("_SetObjectDisplayMode Mode=Ghost", False)
            rs.LockObject(object)
        rs.EnableRedraw(True)

if __name__ == "__main__":
    LockAndGhost()

…and to reverse this:

import rhinoscriptsyntax as rs

def UnLockAndUnghost():
    objects = rs.AllObjects()
    if objects is None:
        return
    else:
        rs.EnableRedraw(False)
        for object in objects:
            if rs.IsObjectLocked(object):
                rs.UnlockObject(object)
                rs.SelectObject(object)
                rs.Command("_SetObjectDisplayMode _Mode=UseView _Enter", False)
        rs.EnableRedraw(True)
    rs.UnselectAllObjects()

if __name__ == "__main__":      
    UnLockAndUnghost()

Hope this is useful,

Dan