Setting material hue-shift or colourize
-
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?
-
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=2is 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 newmaterial.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 ???
-
Ok, so I'm haven't missed any methods that actually do this. One more for the feature requests then.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement