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")
相关推荐
曼巴UE53 天前
Unlua UE5.3 调试
ue5·lua·unlua
远离UE45 天前
UE5 母材质 编写笔记
笔记·ue5·材质
远离UE45 天前
UE5 HLSLTranslator 与 ShaderCompiler
ue5
1204157137 肖哥6 天前
UE5.7 场景打光管线流程_【雪山】
ue5
weixin_404679316 天前
虚幻5 替代小白人角色的完整逻辑
ue5
1204157137 肖哥9 天前
UE5.7 灯光详解
ue5
狂云歌10 天前
AI写UE的3Dgame
人工智能·3d·ue5·游戏程序
日月云棠14 天前
UE5源码分析之Editor——Blutility模块全面分析
ue5
日月云棠14 天前
UE5源码分析之Editor——BehaviorTreeEditor模块全面分析
ue5
日月云棠14 天前
UE5源码分析之Editor——AssetTagsEditor模块全面分析
ue5