Is there an API to trigger Asset Manager's Import function?

Is there an API to trigger Asset Manager's Import function?

kyumin_h
Explorer Explorer
257 Views
3 Replies
Message 1 of 4

Is there an API to trigger Asset Manager's Import function?

kyumin_h
Explorer
Explorer

Hi,

I'm trying to build an automation system that registers .osb files to the Asset Manager automatically once the files are generated.

However, it seems like the only way to register assets into Asset Manager is by using the Import function directly from the Asset Manager UI.
If there are alternative ways, I’d love to hear about them.

After using the Import function, I noticed that the imported asset generates three files:

  • .osb

  • .png (thumbnail)

  • .xml (metadata/config)

So I have a few questions:


Summary:

  1. Is there a Python API to trigger the Import function of Asset Manager?

  2. If I place a .osb file in a specific folder, is there a way to automatically register it in Asset Manager? (without  .png .xml  )

  3. Are there APIs to separately generate the .png thumbnail and .xml file that the Import function creates?

If there’s any other recommended approach for automating Asset Manager registration, I’d greatly appreciate it.

 

Thank you!

0 Likes
Accepted solutions (1)
258 Views
3 Replies
Replies (3)
Message 2 of 4

Christian_Garimberti
Advisor
Advisor
Accepted solution

Hi, there are the V1 API

 

createEnvironmentAsset(environmentNode, assetManagerDirectory)

createGeometryAsset(node, assetManagerDirectory)

createMaterialAsset(material, assetManagerDirectory)

createSceneplateAsset(node, assetManagerDirectory)

 

and other API's in the vrAssetsModule in V1

 

Best

Chris

 

Christian Garimberti
Technical Manager and Visualization Enthusiast
Qs Informatica S.r.l. | Qs Infor S.r.l. | My Website
Facebook | Instagram | Youtube | LinkedIn

EESignature

Message 3 of 4

kyumin_h
Explorer
Explorer

Thanks for the answer — it works perfectly!

 

0 Likes
Message 4 of 4

kyumin_h
Explorer
Explorer

Just a heads-up: if you try to run the function on a Geometry node directly under the created root, you'll still get the error 'Passed node is not a valid asset root.'

However, if you group the Geometry node first (i.e., wrap it in a Transform/Group node), it works fine. So I hope this helps anyone trying to use this!

0 Likes