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

How I can set the Value as Layer name of the object?

$
0
0

How I can write the Layer name of the objects as a Value of the Key “Material” in the Attributes User Text of the objects?

I do found this piece of code that works but i don’t know how I can get the Layer Name and pass-it into the “Layer_name” value of the script.

import rhinoscriptsyntax as rs
obj = rs.GetObject("Select object")
if obj:
    rs.SetUserText( obj, "Material", "Layer_name" )

P.S. Also I do want to modify this script to accept preselected objects. Best regards.

4 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles