Skip to content

Instantly share code, notes, and snippets.

View zeroruka's full-sized avatar
🌙
zeroruka

zeroruka

🌙
zeroruka
View GitHub Profile
# https://blender.stackexchange.com/questions/56795/script-outdated-shape-keys-and-applying-subdivision-surface-modifier
import bpy
def reset_shape_keys ():
for name, shape_key in get_active_block().items():
shape_key.value = 0
def get_active_block ():
if bpy.context.object.active_shape_key is None or bpy.context.object.active_shape_key.id_data is None:
bpy.context.object.active_shape_key_index = 0