Transform axes
-
Let say you want to make a picture frame and then apply wood grain to the picture frame.
So you create left side group it and copy and flip. Now you have right side. If you create the top the same way and copy and flip for bottom. Now create group for all 4 parts.
When you apply vertical wood grain to the whole group. the wood grain goes across the grain for the top and bottom parts.
Is it possible to change the axes for just the top and bottom so when you apply wood grain the grain is correct for top and bottom part.
Or do you have to create top and bottom as vertical parts and then rotate them into position?
This is all to be done in a script within a plugin.
-
AFTER the outermost group is created, try exploding the 4 inner groups.
Then apply the material to the outer most group.
-
BTW I would not do it that way.
I'd create a rectangular path for the FollowMe, and then the profile for the frame, and do a FollowMe upon the path. -
Dan - I thought the picture frame analogy was simpler than a door. This is what I am actually doing.
I want to avoid having both horizontal and vertical wood grains.
-
First I built the door rails vertical, apply material and rotate in position.
At least it works.I couldn't find anything about changing the axes of a part in code.
-
By default a texture's 'grain' always follows that axis, so your make-the-parts-rotated_and_then-rotate-them-into-place method is a winner.
I think in your case it's the best approach...However, FYI you could also change the orientation of a texture for certain faces 'in code' - just like you might when using the manual 'Texture' tool - from the context-menu when a textured face is selected.
I [and others] have written several UV / Texture tools - which move, scale and rotate textures - look at their code for ways to transform some UVs and then apply them to a face.material.texture...
http://sketchucation.com/pluginstore?pln=TextureRandomizer
http://sketchucation.com/pluginstore?pln=TIG-TextureTools
Advertisement