Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5746

Rhino 7 - GetColor() missing transparency

$
0
0

Hi there! I’ve been using this lovely little script to quickly change the colors of objects:
import rhinoscriptsyntax as rs

    def QuickColour():
        objects = rs.GetObjects("Pick objects for colour change", 0, None, True)
        if objects is None: return
        rs.EnableRedraw(False)
        colour = rs.GetColor(rs.ObjectColor(objects[0]))
        if colour is None:
            rs.UnselectAllObjects()
            rs.EnableRedraw(True)
            return
        else:
            for object in objects:
                rs.ObjectColor(object, colour)
                rs.ObjectPrintColorSource(object, 2) 
        rs.UnselectAllObjects()
        rs.EnableRedraw(True)

    if __name__ == "__main__":     
        QuickColour()`Preformatted text`

The issue is that now the HSL sliders are missing the transparency option:
image

Compared to editing color the “normal” way:
image

Is there any way around this issue?

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 5746

Trending Articles