Created
          August 25, 2025 16:16 
        
      - 
      
- 
        Save TayIorRobinson/3cc987db294a644ecba79631df164e4f to your computer and use it in GitHub Desktop. 
    Copy shape key values to another mesh in Blender
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | srcMesh = bpy.data.meshes['Mesh.017'] | |
| tgtMesh = bpy.data.meshes['Mesh.002'] | |
| # Usage: | |
| # Copy script to Notepad (or similar) so you can edit the names above | |
| # The mesh names are what appear at the top of the Properties window when you have the green mesh data tab selected (ie the page where you can see shape keys) | |
| # At the top select 'Scripting' tab (from the row that has 'Layout', 'Modelling', 'UV Editing', 'Shading', etc) | |
| # In the Python console window (the window that has green text 'PYTHON INTERACTIVE CONSOLE') paste the entire code in with your edited names | |
| def keysToDict(keys): | |
| return { key.name: key for key in keys.key_blocks } | |
| srcKeys = keysToDict(srcMesh.shape_keys) | |
| tgtKeys = keysToDict(tgtMesh.shape_keys) | |
| for i in srcKeys: | |
| if i in tgtKeys: | |
| tgtKeys[i].value = srcKeys[i].value | |
| else: | |
| print("Key " + i + " does not exist in target") | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment