How can I import an MDL into the current stage from disk, using python script? Cheers.
When you say from disk, do you mean your own MDL?
Load the commands window into Create, then you can see the python representation of the actions you perform. I added a material to a ground plane and this is what came up. This appears to come from NVidia’s AWS server.
import omni.kit.commands
omni.kit.commands.execute(‘CreateMdlMaterialPrimCommand’,
mtl_url=‘http://omniverse-content-production.s3-us-west-2.amazonaws.com/Materials/Base/Wood/Bamboo.mdl’,
mtl_name=‘Bamboo’,
mtl_path=‘/World/Looks/Bamboo’)
omni.kit.commands.execute(‘BindMaterialCommand’,
prim_path=‘/World/GroundPlane/CollisionMesh’,
material_path=‘/World/Looks/Bamboo’)
Maybe that helps, or state more about what you are trying to do.
Hi,
Yep, I’m trying to load my own MDL
That seems super useful! I don’t see the same result though in my console- enabling the verbose mode doesn’t seem to help either. Is this different to the console extension?