[PYTHON] [Blender] How to set shape_key with script

Set the shape key between Cube.001 and Cube. The shape key will be inserted in the name specified later. In the case of this sample, it is inserted on the Cube side.

import bpy

objectToSelect = bpy.data.objects["Cube.001"]
objectToSelect.select_set(True)
objectToSelect = bpy.data.objects["Cube"]
objectToSelect.select_set(True)

bpy.context.view_layer.objects.active = objectToSelect

bpy.ops.object.join_shapes()

Blender2.8 Personal notes

Recommended Posts

[Blender] How to set shape_key with script
[Cocos2d-x 3.0] How to automate Script Binding with binding-generator
How to add help to HDA (with Python script bonus)
How to create a submenu with the [Blender] plugin
How to update with SQLAlchemy?
How to cast with Theano
[Blender] How to dynamically set the selection of EnumProperty
How to Alter with SQLAlchemy?
How to separate strings with','
How to RDP with Fedora31
How to Delete with SQLAlchemy?
Python: How to use async with
How to use virtualenv with PowerShell
How to deal with imbalanced data
How to install python-pip with ubuntu20.04LTS
How to deal with imbalanced data
How to get started with Scrapy
How to get started with Python
How to deal with DistributionNotFound errors
How to get started with Django
How to Data Augmentation with PyTorch
How to use FTP with Python
[Blender] How to make a Blender plugin
[Blender] How to make Blender scripts multilingual
How to calculate date with python
How to install mysql-connector with pip3
How to INNER JOIN with SQLAlchemy
How to install Anaconda with pyenv
How to authenticate with Django Part 2
How to authenticate with Django Part 3
How to set the output resolution for each keyframe in Blender
How to do arithmetic with Django template
How to title multiple figures with matplotlib
How to get parent id with sqlalchemy
How to set optuna (how to write search space)
How to add a package with PyCharm
How to set up SVM using Optuna
How to set the server time to Japanese time
How to install DLIB with 2020 / CUDA enabled
How to use ManyToManyField with Django's Admin
How to use OpenVPN with Ubuntu 18.04.3 LTS
How to use Cmder with PyCharm (Windows)
How to prevent package updates with apt
How to work with BigQuery in Python
How to set xg boost using Optuna
How to use Ass / Alembic with HtoA
Script example to display BoundingBox with PIL
[Ubuntu] How to execute a shell script
How to deal with enum compatibility errors
Create a star system with Blender 2.80 script
How to use Japanese with NLTK plot
How to do portmanteau test with python
How to search Google Drive with Google Colaboratory
How to display python Japanese with lolipop
[Cocos2d-x] How to make Script Binding (Part 2)
How to download youtube videos with youtube-dl
How to use jupyter notebook with ABCI
How to power off Linux with Ultra96-V2
"How to pass PATH" to learn with homebrew
How to scrape websites created with SPA
How to use CUT command (with sample)