Announcement

Collapse
No announcement yet.

Python 4.20 - How do I set Material(s) on a SkeletalMesh

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Python 4.20 - How do I set Material(s) on a SkeletalMesh

    Hey guys, I'm looking for your help again!

    I'm looking for a way to set materals on a SkeletalMesh via Python. I can see them by writing:

    print Unreal.SkeletalMesh.materials

    which would print me the SkeletalMaterial. But I don't know how to set them :/

    Thanks again for your future help

    #2
    SOLVED!!!!

    SkeletalMesh.set_editor_property('materials', SkeletalMaterial)

    Comment


      #3
      Could u explain what goes into the SkeletalMaterial class? I can see u input the material slot name, but where does the name of the new material go?

      Comment


        #4
        nevermind i got it working...

        Comment


          #5
          Hey, any idea how to assign the material to a specific lod? Or tell a lod to use a particular slot?
          Work Tutorials

          Comment


            #6
            EDIT: nevermind, I was able to get this to work for my needs. Sorry, I should have waited a few minutes before posting.

            material_list = [unreal.SkeletalMaterial(material_instance_obj)]
            mesh.set_editor_property('materials', material_list)


            Originally posted by skealeye View Post
            nevermind i got it working...
            skealeye what was your solution? I'm at the same point you were trying to figure out how to specify the material to be assigned on the SkeletalMaterial class. Any help is greatly appreciated.
            Last edited by KBeu; 11-13-2020, 06:38 PM.

            Comment

            Working...
            X