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

    Hi, Agosti Alessio

    The next line is unnecessary.

    'type': 'Asset',
댓글을 남기려면 로그인하세요.