{"id":566,"date":"2021-02-09T19:46:57","date_gmt":"2021-02-09T18:46:57","guid":{"rendered":"https:\/\/www.joerg-seyfried.de\/alt\/?p=566"},"modified":"2021-02-09T19:46:58","modified_gmt":"2021-02-09T18:46:58","slug":"blender-2-6-remove-doubles-for-all-objects","status":"publish","type":"post","link":"https:\/\/www.joerg-seyfried.de\/alt\/en\/2021\/02\/blender-2-6-remove-doubles-for-all-objects\/","title":{"rendered":"Blender 2.6: \u201cremove doubles\u201d for all objects"},"content":{"rendered":"\n<p>One of those \u201cGoogle-holes\u201d: you&#8217;re searching for something &#8211; and find nothing. So let&#8217;s fix this (and for me, it&#8217;s where I can find it again, kind of a web-clipboard).<br><a href=\"http:\/\/www.joerg-seyfried.de\/alt\/2012\/08\/blender-2-6-remove-doubles-fuer-alle-objekteblender-2-6-remove-doubles-for-all-objects\/blenderremalldoubles\/\" rel=\"attachment wp-att-240\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-240 size-medium\" title=\"BlenderRemAllDoubles\" src=\"https:\/\/www.joerg-seyfried.de\/alt\/wp-content\/uploads\/2012\/08\/BlenderRemAllDoubles-e1612896321733-450x199.jpg\" alt=\"\" width=\"450\" height=\"199\" srcset=\"https:\/\/www.joerg-seyfried.de\/alt\/wp-content\/uploads\/2012\/08\/BlenderRemAllDoubles-e1612896321733-450x199.jpg 450w, https:\/\/www.joerg-seyfried.de\/alt\/wp-content\/uploads\/2012\/08\/BlenderRemAllDoubles-e1612896321733-1024x452.jpg 1024w, https:\/\/www.joerg-seyfried.de\/alt\/wp-content\/uploads\/2012\/08\/BlenderRemAllDoubles-e1612896321733-768x339.jpg 768w, https:\/\/www.joerg-seyfried.de\/alt\/wp-content\/uploads\/2012\/08\/BlenderRemAllDoubles-e1612896321733-624x276.jpg 624w, https:\/\/www.joerg-seyfried.de\/alt\/wp-content\/uploads\/2012\/08\/BlenderRemAllDoubles-e1612896321733.jpg 1490w\" sizes=\"auto, (max-width: 450px) 100vw, 450px\" \/><\/a><br>Here&#8217;s the problem: Working with Blender, I imported a 3D scene from another program. After a few clicks, I realize that all vertices are duplicated (Collada import, and no way to change the export settings). Select, toggle edit mode, \u201cremove doubles\u201d, <a href=\"http:\/\/www.joerg-seyfried.de\/alt\/2012\/08\/blender-2-6-remove-doubles-fuer-alle-objekteblender-2-6-remove-doubles-for-all-objects\/bildschirmfoto-2012-08-19-um-09-52-54\/\" rel=\"attachment wp-att-242\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-242 size-thumbnail\" title=\"Bildschirmfoto 2012-08-19 um 09.52.54\" src=\"https:\/\/www.joerg-seyfried.de\/alt\/wp-content\/uploads\/2012\/08\/Bildschirmfoto-2012-08-19-um-09.52.54-e1612896338289-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\"><\/a>\u201crecalculate normals\u201d would be a valid approach for 10 meshes. But suppose you end up with several 100s? Right, there&#8217;s Blender&#8217;s built-in Python interpreter. So fire it up an any Blender window you like using the little button on the bottom left:<\/p>\n<p>\u2026and paste the following into that window (you might have to add one press of the return key). The script only works on the selected meshes (and ignores non-meshes), which makes it easier for <strong>really<\/strong> huge scenes &#8211; you might want to select only a few of them to get started, because Blender will be inresponsive during the script doing its job:<\/p>\n<pre>import bpy\nif bpy.context.selected_objects != []:\n\tfor ob in bpy.context.selected_objects:\n\t\tif ob.type == 'MESH':\n\t\t\tbpy.context.scene.objects.active = ob \n\t\t\tbpy.ops.object.mode_set(mode='EDIT') \n\t\t\tbpy.ops.mesh.select_all() \n\t\t\t# remove doubles:\n\t\t\tbpy.ops.mesh.remove_doubles() \n\t\t\t# recalculate outside normals:\n\t\t\tbpy.ops.mesh.normals_make_consistent(inside=False)\n\t\t\tbpy.ops.object.mode_set(mode='OBJECT')<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of those \u201cGoogle-holes\u201d: you&#8217;re searching for something &#8211; and find nothing. So let&#8217;s fix this (and for me, it&#8217;s where I can find it again, kind of a web-clipboard).Here&#8217;s the problem: Working with Blender, I imported a 3D scene from another program. After a few clicks, I realize that all vertices are duplicated (Collada [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[37],"tags":[],"class_list":["post-566","post","type-post","status-publish","format-standard","hentry","category-nicht-kategorisiert-en"],"_links":{"self":[{"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/posts\/566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/comments?post=566"}],"version-history":[{"count":1,"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/posts\/566\/revisions"}],"predecessor-version":[{"id":567,"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/posts\/566\/revisions\/567"}],"wp:attachment":[{"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/media?parent=566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/categories?post=566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.joerg-seyfried.de\/alt\/wp-json\/wp\/v2\/tags?post=566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}