20tab / UnrealEnginePython

Embed Python in Unreal Engine 4
MIT License
2.75k stars 746 forks source link

How to get sections in SkeletalMesh? #809

Closed r1c7 closed 4 years ago

r1c7 commented 4 years ago

Hi, I want to get the LOD section name in skeletalmesh, but I don't know how to get. 微信截图_20191118174736

jonlm commented 4 years ago

Example using the selected rig in the content browser:

import unreal_engine as ue
from unreal_engine.classes import SkeletalMesh

mesh = ue.get_selected_assets()[0]
if not mesh.is_a(SkeletalMesh):
    raise Exception('the script only works with Skeletal Meshes')

for m in mesh.Materials:
    print(m.MaterialSlotName)
r1c7 commented 4 years ago

@jonlm thanks