Forgot password?

Create an account!

Forum

« back

RhinoScript – Material by Layer Name

Messages

Please log in to write a message.

  • 3. RobSteady (Sep 04, 2012 16.33):

    Hi Johannes,

    unfortunately I'm not at all familiar with scripting.
    But I think it should be ok to to apply the material to the layer instead of changing all object properties.

    Should look like the attached image.


    Rob

    Material by Layer Name
  • 2. Johannes (Aug 21, 2012 18.23):

    hi rob, are you familiar with scripting?
    There are Material and Layer methods in rhinoScript:
    - Rhino.ObjectsByLayer (strLayer [, blnSelect])
    - Rhino.LayerName (strLayer [, blnFullPath])
    - Rhino.MaterialName (intMaterialIndex [, strName])
    - ....

    You need to write a loop through all objects on that layer (ceiling) and rename the Materials.
    Is there no option to apply the material to the layer instead of changing all object properties?

    johannes

  • 1. RobSteady (Aug 21, 2012 17.44):

    Hi,

    I need a script that renames the material name to the same name as the layer.
    For example:

    Layer: "Ceiling" -> Material Name (in the Layer tab): "Ceiling"

    Is there a way to script this?


    Rob

Recommend

Why are these buttons gray?