Hello guys,
I am trying to modify StaticMesh asset BodySetup and set double_sided_geometry using Python script and I am having small problem to make it work. I am doing this:
import unreal as ue
asset = ue.EditorAssetLibrary.load_asset('/Game/MyStaticMeshAsset')
bdy = ue.BodySetup(asset)
print( bdy.get_editor_property ("double_sided_geometry"))
bdy.set_editor_property('double_sided_geometry',True)
print(bdy.get_editor_property ('double_sided_geometry')) # Returns True
#but
bdy2 = ue.BodySetup(asset)
print( bdy2.get_editor_property ( 'double_sided_geometry' )) # Returns False - which means bd2 is copy of asset not the reference
ue.EditorAssetLibrary.save_loaded_asset( asset )
# as result in asset is still double_sided_geometry = False
I found out that bdy is copy of asset.BodySetup so I need to set it back modified version of BodySetup to asset but I don’t know how. Any help would be amazing!
Thanks!!!