Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- import bmesh
- modif = 1.5
- me = bpy.context.object.data
- obj = bpy.context.object
- shapekeynames = []
- shapekeys = me.shape_keys
- for shapekey in shapekeys.key_blocks:
- shapekeynames.append(shapekey.name)
- for shapekeyname in shapekeynames:
- if shapekeyname == 'Basis':
- continue
- shapekeys.key_blocks[shapekeyname].slider_max = modif
- shapekeys.key_blocks[shapekeyname].value = modif
- # apply new 1.5x shape as mix, append old name with extra modifier
- newShapeKey = obj.shape_key_add(shapekeyname + '_NEW', True)
- shapekeys.key_blocks[shapekeyname].value = 0
- # delete old shape
- obj.shape_key_remove(shapekeys.key_blocks[shapekeyname])
- # rename new shape to old name
- shapekeys.key_blocks[shapekeyname + '_NEW'].name = shapekeyname
Advertisement
Add Comment
Please, Sign In to add comment