sync
This commit is contained in:
1 parent
c22e06f8b0
commit
661d00f73d
6 files changed
+10
-4
No files matched your search
@@ -63,10 +63,16 @@ def import_fbx(filename, name, dest_path):
|
||||
|
||||
|
||||
def assign_material(skeletal_mesh, material):
|
||||
slots = skeletal_mesh.get_editor_property("materials")
|
||||
for slot in slots:
|
||||
slot.set_editor_property("material_interface", material)
|
||||
skeletal_mesh.set_editor_property("materials", slots)
|
||||
new_slots = []
|
||||
for slot in skeletal_mesh.get_editor_property("materials"):
|
||||
new_slot = unreal.SkeletalMaterial()
|
||||
new_slot.set_editor_property("material_interface", material)
|
||||
new_slot.set_editor_property("material_slot_name", slot.get_editor_property("material_slot_name"))
|
||||
new_slot.set_editor_property("uv_channel_data", slot.get_editor_property("uv_channel_data"))
|
||||
new_slots.append(new_slot)
|
||||
skeletal_mesh.set_editor_property("materials", new_slots)
|
||||
skeletal_mesh.modify()
|
||||
skeletal_mesh.post_edit_change()
|
||||
unreal.EditorAssetLibrary.save_asset(skeletal_mesh.get_path_name())
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 216 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 200 KiB |
Reference in new issue
Block a user