Is there an API to set morph's value from script?

Issue #846 closed
Butaixianran created an issue

I’d like to set morph value from script by morph name.

But I can’t find a way from the Scripting Documentation. Is there an API for this?

thanks

Comments (3)

  1. Thomas Larsson repo owner

    You simply set the value of the corresponding rig property. It may be necessary to make an explicit update to make the morphs visible in the viewport. I added the following example to the sample file load_morph.py in the sample scripts repo.

    # Set morphs by setting the rig properties
    rig = bpy.data.objects["Genesis 8 Female"]
    rig["FBMAiko8"] = 1.0
    rig["FHMAiko8"] = 1.0

    # Force update to make the properties take
    bpy.ops.daz.update_all()

  2. Log in to comment