I have a cuboidal structure. I have it uv unwrapped. Now, I need to apply a same seamless texture to all the sides. In effect, I need the uv faces one over the other. The code snippet below shows my approach in selecting the faces and placing them over each other,
bpy.context.area.type = 'IMAGE_EDITOR' //Translating the faces, to place them one above the other bpy.ops.uv.select(extend=False, location=(0.0, 0.0)) bpy.ops.transform.translate(value=(0.378906, 0, 0)) bpy.ops.uv.select(extend=False, location=(0.25, 0.0)) bpy.ops.transform.translate(value=(0.135343, 0, 0)) bpy.ops.uv.select(extend=False, location=(0.75, 0.0)) bpy.ops.transform.translate(value=(-0.351892, 0, 0)) bpy.ops.uv.select(extend=False, location=(0.6, 0.0)) bpy.ops.transform.translate(value=(-0.108398, 0, 0))
While I achieved as much as that, the next step requires me to scale them, so as to apply the image texture properly. So, once again I started selecting the same faces using the same method above. The only change was that "extend" was set to "true", in order to extend the selection. Well, simple as it felt, it didn't work. Then I realized, it selects based on the location and now all the faces have been translated to the same location.
It meant, I can't use this same selection statement. But this is the only method I know and I am still new to blender python.
My question. Is there an effective and easier way to select the uv faces, say like faces? If so, please share.
Now this is the sequence of operations which I executed in the console,
>>> import bmesh >>> bm = bmesh.new() >>> obj = bpy.context.active_object >>> bm.from_mesh(obj) >>> bm.faces. active ensure_lookup_table( get( index_update( layers new( remove( sort(
As you can see, bm.faces does not have any attribute named loop.