0

Is it possible to add by conde a new asset?

Hi all,

I am  try to write a little function to add a new asset , by code. but I dont know what is wrong . If someone could help me.

part of code:

assetname = 'Pluto'
sg = Shotgun()
data = {'project': {"type": "Project", "id": 90},
'sg_status_list': 'hld',
'code': assetname,
'type': 'Asset',
'sg_asset_type': 'Character'}

sg.create('Asset', data)

I got this error
shotgun_api3.shotgun.Fault: API create() Asset.type doesn't exist:
{"field_name"=>"type", "value"=>"Asset"}

many thanks

1 条评论

  • 0
    Avatar
    takeyama

    Hi, Agosti Alessio

    The next line is unnecessary.

    'type': 'Asset',
请先登录再写评论。