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")
相关推荐
妙为1 天前
unreal engine5(UE5)中使用Rider
ue5·游戏引擎·虚幻·rider
归真仙人3 天前
【UE】LineTraceByProfile
ue5·游戏引擎·ue4·unreal engine
-FxYaM-4 天前
【UE】渲染框架学习路径-初次修改源码
服务器·网络·c++·windows·ue5·unreal engine
一锅炖出任易仙6 天前
创梦汤锅学习日记day23
学习·ai·ue5
妙为8 天前
unreal engine5.7.4,创建ThirdPerson第三人称模版,类型是c++崩溃
c++·ue5·虚幻·unreal engine5
weixin_4046793111 天前
虚幻5电子书
ue5
directx3d_beginner12 天前
5,动画蓝图类接口转c++
ue5
RuiZN12 天前
UE5 蓝图 FPS 02 Event Beginplay
c++·ue5
RuiZN12 天前
UE5 蓝图 FPS 01 Event Tick
c++·ue5
directx3d_beginner12 天前
6,执行攻击改为c++
ue5