Hi everyone,
I'm currently working on my last mecabricks creation in blender, but my computer is not a beast, so I need to lighten the meshes before being able to do something, like selecting in fact. So after some wasted time passed in active autosmooth and remove doubles, I finally came with a very little script to do three things that help a lot:
So from the collada mecabricks export, without any normals (Normals: None in the export options), you just have to run the script, and it's baked!
NOTE: before running the script you must do one thing in fact in blender: move all the imported model in the last top layer.
NOTE 2 (optional): I used to scale up the model by 100.
|o|o|o|o|o| |o|o|o|o|here|
|o|o|o|o|o| |o|o|o|o|o|
Here the script, have fun 😉
#########################################
import bpy
objs = [ob for ob in bpy.context.scene.objects if ob.layers[9]]
for ob in objs:
ob.select = False
if ob.type == "MESH":
ob.select = True
bpy.context.scene.objects.active = ob
bpy.ops.object.mode_set(mode="EDIT")
bpy.ops.mesh.select_all(action="SELECT")
bpy.ops.mesh.remove_doubles(use_unselected=True)
bpy.ops.object.mode_set(mode="OBJECT")
ob.data.use_auto_smooth = 1
bpy.ops.object.shade_smooth()
EDIT: the indentation is not working, so here a gist: https://gist.github.com/othelarian/43caa3233ba463e6ca975f9117735fb5
LEGO, le logo LEGO, la minifigurine et les configurations des briques et tenons sont des marques déposées de LEGO Group of Companies. ©2024 The LEGO Group.
Mecabricks, le logo Mecabricks et tout le contenu non couvert par les droits d'auteur du groupe LEGO sont, sauf indication contraire, ©2011-2024 Mecabricks.