sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    Use Ruby To Apply Materials to Spacific Layers

    Scheduled Pinned Locked Moved Developers' Forum
    24 Posts 8 Posters 10.4k Views 8 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • honoluludesktopH Offline
      honoluludesktop
      last edited by

      Amos, Thanks, this is a big help for me. Any reason why (sometimes) I have to click on the display after the plugin has run in order for the textures to change? Hmm... Sometimes I change the component name from different menus, or change the texture name from diferent menus. Does it matter?

      1 Reply Last reply Reply Quote 0
      • bagateloB Offline
        bagatelo
        last edited by

        Inside the Vray Plugin have tool to apply materials to specific layers.

        While the cat's away, the mice will play

        1 Reply Last reply Reply Quote 0
        • Didier BurD Offline
          Didier Bur
          last edited by

          Hi,
          This one may help you too: layers_materials.rb to be found at the Ruby Library Depot, "layers Selection"page.

          DB

          1 Reply Last reply Reply Quote 0
          • A Offline
            austinryan
            last edited by

            Man I thought python and Dynamo were hard. I even had a go at lisp but for some reason I cant get my head a round ruby. I like the code above but want to use the clean code but also just add in the layer names and leave the other ones alone. It seams that when I run this it converts all the layers in the model to Default and then the layer color had to be the same as the material name. I like the hash option but cant seem to get it to run on transparent materials and it only paints 1 side. any suggestions

            P.S. I am bringing in a dwg (exported from Revit) with 20 or so layers and want to put all the layers to 1 color but windows I want them to be on Translucent Glass Gray

            F.E. all layers to color 123_White except 0_EX_Glazing it needs to be on Translucent Glass Gray

            Some of the issues

            1. the import comes in as 1 group (with layers in the group)
            2. some of the groups come in the main group with groups within groups (doors and Door windows)
              Objects come in with a material not defined (<auto1>)so a generic material must be placed on all the objects for the script to have a chance.

            Thanks in advance

            1 Reply Last reply Reply Quote 0
            • 1
            • 2
            • 2 / 2
            • First post
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement