sketchucation logo sketchucation
    • Login
    ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

    Edge color by material

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 2 Posters 488 Views
    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.
    • S Offline
      spring.freediver
      last edited by

      Does anyone know a way to use Ruby to set the style such that edge color is "By material"?

      The documentation for Style and Styles is pretty thin. I tried using:

      Sketchup.active_model.styles.each {|s| puts s.description}

      But I saw nothing in the style description to indicate color was "By material".

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        Sketchup.active_model.rendering_options["DisplayColorByLayer"]=true for by_layer
        Sketchup.active_model.rendering_options["EdgeColorMode"]=N N=... 0=by_material , 1=all_the_same, 2=by_axis

        Use Sketchup.active_model.rendering_options.to_a to list ALL available rendering options and their current settings.........

        TIG

        1 Reply Last reply Reply Quote 0
        • S Offline
          spring.freediver
          last edited by

          Thanks TIG.

          1 Reply Last reply Reply Quote 0
          • S Offline
            spring.freediver
            last edited by

            I found it to be:

            model.rendering_options["EdgeColorMode"]= 0 for Color By material
            model.rendering_options["EdgeColorMode"]= 1 for Color All same
            model.rendering_options["EdgeColorMode"]= 2 for Color By axis

            1 Reply Last reply Reply Quote 0
            • TIGT Offline
              TIG Moderator
              last edited by

              I was still editing my post when you replied...
              There are lots of ways of modifying your rendering appearance... 😉

              TIG

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

              Advertisement