Jump to content

Publish current Maya scene


Jamie Kenyon

Recommended Posts

Hi @Jamie Kenyon, the easier way would be to use the ftrack-python-api directly rather than the connector ones, which really have not been built for this purpose, that said though, this is some basic code you can start playing with :

please also note, connector is built on top of the legacy api and not the latest ftrack-python-api , hence you might have to do some dance to convert data between one another.
Is not hard, just inefficient.

from ftrack_connect_maya.connector.mayaassets import SceneAsset
from ftrack_connect.connector.base import FTAssetObject

scene_asset = SceneAsset()

iAObj = FTAssetObject(
    filePath=path,
    componentName=componentName,
    componentId=newComponent.getId(),
    assetVersionId=newftrackAssetVersion.getId()
)


scene_asset.publishAsset(iAObj)

 

Hope it helps.

L.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...