I’m currently at the bottom of the learning curve with Ruby in the hope to solves some functionality I wish was included as a standard with Sketchup.
Basically I want to make a script to control the placement and scale of certain textures. While there are workarounds (using individual dynamic nested sub components which copy rather than using a component with a textured face which scales), I feel there must be a way to write a script that can do the following - and effectively create a texture which always locks to a particular ‘real world’ scale.
This is what I’d like the script to do
- Find entities (components) with a particular texture.
- Find how these component instances have been scaled & in which direction (x,y,z)
- Adjust the scale of the textures within each of the instances so the scale of that particular texture is increased or decreased by that amount.
- Find the reference point for the texture within the component in relation to the reference point of the same texture outside the component & adjust the position accordingly so they match.
With a long road ahead to learn Ruby, can anyone tell me if this would be achievable or am I setting my goals a little too high. Any feedback would be welcomed…
- I’d also be happy to add an attribute option for texture scale in the dynamic component if this helps…