I wrote a program in Python to copy entities between projects along with all available media. It is currently called via the function:
copyItem(entity['type'],entity['id'],new_project) (ex. copyItem('Asset',4835,'testshow'))
I used the blank app template referenced in the SGTK docs was able to get my custom app to register in the right click menu of the assets page in Chrome and launch a separate window when clicked. Here is where I need help.
- What is the python code to pull the entity type and entity id of the asset(s) that were selected prior to launching the app? The template contains the code "self._app.context" which displays the string "Asset asetnamehere" but I have not been able to find further documentation to snag the data I need. I browsed the Core and API docs but am coming up short.
- I would also like to have a drop down menu of projects the artist has access to in order to let them select a new project to copy the entity to. Any examples of this?
I have built apps in Qt before but am having a bit of trouble transferring that knowledge into sgtk app development.
Thanks in advance for any pointers, examples, assistance you can provide.