sketchucation logo sketchucation
    • 登入
    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!
    🔌 Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download

    Use Ruby To Apply Materials to Spacific Layers

    已排程 已置頂 已鎖定 已移動 Developers' Forum
    24 貼文 8 Posters 11.0k 瀏覽 8 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • honoluludesktopH 離線
      honoluludesktop
      最後由 編輯

      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 條回覆 最後回覆 回覆 引用 0
      • bagateloB 離線
        bagatelo
        最後由 編輯

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

        While the cat's away, the mice will play

        1 條回覆 最後回覆 回覆 引用 0
        • Didier BurD 離線
          Didier Bur
          最後由 編輯

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

          DB

          1 條回覆 最後回覆 回覆 引用 0
          • A 離線
            austinryan
            最後由 編輯

            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 條回覆 最後回覆 回覆 引用 0
            • 1
            • 2
            • 2 / 2
            • 第一個貼文
              最後的貼文
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement