Leakoo
bolddunkley from patreon
bolddunkley patreon

Vertex animation textures, beanbags and boneless animations.

🕑 Added 2020-10-12 17:55:44 +0000 UTC
Vertex animation textures, beanbags and boneless animations.

Comments

Mate Steinforth

also extended this function so the orientation, scale and location stays consistent in the copied object: def new_object_from_frame(obj, f): """ Create a new mesh from the evaluated version of obj at frame f. """ context = bpy.context scene = context.scene scene.frame_set(f) # the correct way to set a frame and update depsgraph dg = context.view_layer.depsgraph # need depsgraph to access evaluated mesh attributes eval_obj = obj.evaluated_get(dg) duplicate = bpy.data.objects.new('frame_0', bpy.data.meshes.new_from_object(eval_obj)) # Copy transformation data (location, scale) from eval_obj to duplicate duplicate.location = eval_obj.location duplicate.scale = eval_obj.scale # Check rotation mode and copy rotation data accordingly if eval_obj.rotation_mode == 'QUATERNION': duplicate.rotation_mode = 'QUATERNION' duplicate.rotation_quaternion = eval_obj.rotation_quaternion else: duplicate.rotation_euler = eval_obj.rotation_euler return duplicate

Mate Steinforth

great stuff! started playing with it! I did have to change the blender script somewhat to get it to work with blender 3.x and spark though: MD_MorphTexture.py This makes sure that the proper object is exported (didn't work OOTB IDK maybe something changed in blender) and also that the object is exported as FBX, because the GLTF/GLB export (for some blender reason) changed the UVMap name which made it not work in Spark. enjoy. def export_mesh(obj, output_dir, name): if obj.name not in bpy.context.view_layer.objects: bpy.context.view_layer.active_layer_collection.collection.objects.link(obj) bpy.ops.object.select_all(action='DESELECT') obj.select_set(True) bpy.context.view_layer.objects.active = obj output_dir = output_dir + name + "_" + "mesh.fbx" bpy.ops.export_scene.fbx(filepath=output_dir, use_selection=True)


More Creators