ue 操作 metahuman

操作张嘴:

python 复制代码
import unreal

ACTOR_NAME = "BP_Bernice_C_UAID_24B2B9B96FE856AF02_1876048431"

subsystem = unreal.get_editor_subsystem(unreal.EditorActorSubsystem)
actors = subsystem.get_all_level_actors()

actor = None
for a in actors:
    if a.get_name() == ACTOR_NAME:
        actor = a
        break

if not actor:
    unreal.log_error("Actor not found")
    raise SystemExit

# MetaHuman 的脸一般在 Face SkeletalMeshComponent 上
face_mesh = None
for comp in actor.get_components_by_class(unreal.SkeletalMeshComponent):
    if "Face" in comp.get_name():
        unreal.log("find face")
        face_mesh = comp
        break

if not face_mesh:
    unreal.log_error("Face SkeletalMeshComponent not found")
    raise SystemExit

# 张嘴
face_mesh.set_morph_target("jawOpen", 1.0)

unreal.log("MetaHuman mouth opened")
相关推荐
曼巴UE51 天前
Unlua 官方案例
c++·ue5·lua·ue
zhangzhangkeji1 天前
(29)UGameInstance 、UGameInstanceSubsystem 与 UGameState 的区别,一言
ue5
电子云与长程纠缠6 天前
UE5 两种方式实现蓝图编辑器下Tick
ue5
netcy6 天前
UE5 小部件 组合框(键)ComboBox (Key)
ue5
二DUAN帝8 天前
态势仿真推演系统 AFSIM+UE 架构选型
qt·ue5·afsim
maplewen.9 天前
【UE】GAS Gameplay Ability
ue5
帅_shuai_9 天前
UE5.6 Slate独立程序——初始化空白Slate环境
ue5
吴梓穆9 天前
UE5 c++ 模板函数
java·c++·ue5
吴梓穆9 天前
UE5 c++ 暴露变量和方法给蓝图
java·c++·ue5
混迹中的咸鱼9 天前
UE5 网络联机常用命令
网络·ue5