1
$\begingroup$

I'm wondering if there's a way to join all objects that share the same texture image. I don't want to join them if they have the same material, but rather, if they use the same source image texture.

I assume it's possible with Python scripting? For clarity, I'm using Blender v2.76 on Windows 10. I've tried "Select Linked" with Shift+L > Texture in Object mode but it doesn't work.

Edit

To clarify, I'm asking if this can be done automatically/not-manually. Here's why: I imported an .obj file, and for some reason it imported each face as its own, separate object (let's call these "face/objects"). This yields around 3,000 separate objects or so. I figured that, since each of the face/objects share only 3 source image textures, it'd be possible to select each face/object that uses the same source texture image to merge them into one object. In the end this should yield only 3 objects. I hope that made sense.

$\endgroup$
1
$\begingroup$

Yes, you can do this through the outliner editor window. Select all of the objects in your scene which have the desired texture image. Then, moving to the outliner window, expand the datablock for each object to the point where you can see the names of the image textures that you want to use to join the objects. In the outliner window, select image texture of one of the objects you wish to join, then each of the others, selecting these in the outliner window by holding down the SHFT key while you select the objects with the LMB. You can now join the selected objects by using CTRL - J

$\endgroup$
  • $\begingroup$ My apologies, please refer to my edit. $\endgroup$ – Jace Cotton Mar 1 '16 at 16:20
  • $\begingroup$ Jase, I don't have the skillset to write the code to combine into objects automatically, but the fact that it can be done manually means a Python script can be written to do it, too. $\endgroup$ – brasshat Mar 1 '16 at 18:34
  • $\begingroup$ That's definitely good to know. I'm guessing blender.SE shouldn't be used to request Python snippets, but at least now I know it can be done, so thanks for the info. $\endgroup$ – Jace Cotton Mar 1 '16 at 18:51
  • $\begingroup$ I'd expect that a request for a code snippet would be considered out of scope for the site, but would fit right into the python support forum at Blender artists. $\endgroup$ – brasshat Mar 1 '16 at 20:38
  • $\begingroup$ Ah, I think you're right about the scope thing. In that case, I will accept your answer. Thanks for the help! $\endgroup$ – Jace Cotton Mar 2 '16 at 19:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.