sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Setting material hue-shift or colourize

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 188 Views 2 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.
    • thomthomT Offline
      thomthom
      last edited by

      In the SU material adjust the texture colour. You can adjust the Hue, Saturation and Lightness etc. But you can also set it to colourize instead of just shifting the values. Is that possible from the API?

      Thomas Thomassen β€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

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

        http://code.google.com/apis/sketchup/docs/ourdoc/texture.html#average_color returns the texture's default 'color' to use when texture is set 'off'. You can of course set the material's actual "color" to anything desired which is similar to colorize, but of course it's not quite the same thing...

        http://code.google.com/apis/sketchup/docs/ourdoc/material.html#materialType returns the "type" of the material - 0=solid, 1=textured and 2=textured+colorized: however' there doesn't seem to be a method for changing the settings... material.materialType=2 is missing. It seems you can only find if colorize is set, but you can't set it externally... We could make a clunky work around importing a colorized skm file and changing its other accessible settings like color= and texture= to match the material in question (I'm 'good' at 'clunky' !) but then of course we'd also need a new material.loadSKM(my.skm) method... 😞 To avoid that we could import a special component with that colorized material applied to it then immediately delete it ? Use that material and rename it to match, clone the details from the other one etc, using my material.name="newName" method ??? ❓

        TIG

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          Ok, so I'm haven't missed any methods that actually do this. One more for the feature requests then.

          Thomas Thomassen β€” SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          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