1

Shotgun API first steps, upload to a shot without ID

First off, apologies for this being a very probably lvl1 question. But ive just started playing around with python and shotgun's api tool. Currently im able to get files sent over via a script from our storage into a specific [Version] but i notice i have send it using the 'id' field for that 'Version'.

Code Example:

sg.upload("Version", 35052, AbsPath, field_name= "sg_uploaded_movie", display_name="Latest QT.mov")

 

Essentially what im having trouble getting my head around is how to tell the api where to send the files based on their names. So id i was to do a split operation on a file named [AAA_0020_v0002.mov] how would i go about telling that the destination is based off the split id the shot being [1](0020) and version being [2](v0002). It appears i cant do much without the 'id' field it just throws and error at me.

 

Thank you for your help :)

 

1 comment

  • 0
    Avatar
    Shaun

    Also dont know how to edit but the 'AbsPath' holder is telling shotgun the absolute path to the file :) ive had amazing sucess with mp4 but large mov's just wont go up :(

Please sign in to leave a comment.