Join our discord community

Please or Register to create posts and topics.

Shotgun Sync Issues

First of all, this is a great tool you have created and we are excited about using it!  I hope you can help us solve an issue we are facing. The sync feature up to shotgun is not working for us and also when assets are synced from Shotgun to Prism, Prism can not find the item on shotgun.

  1. Creation of Asset in Prism does create asset in Shotgun and "Open in Shotgun" works for these Assets
  2. "Shotgun Assets to Local" will sync to Assets to Prism but for these synced Assets "Open in Shotgun" gives error "Could not find Asset _____ in Shotgun"
  3. "Local Assets to Shotgun" gives Error below, "Local Shots to Shotgun" also gives Error

05/11/19 11:15:25 ERROR - Prism_Plugin_Shotgun - Core: v1.2.1.31 - Plugin: v1.2.1.0:
File "C:/Prism\Scripts\PrismCore.py", line 3921, in <module>
qapp.exec_()
File "C:\Prism\Plugins\ProjectManagers\Shotgun\Scripts\Prism_Shotgun_Functions.py", line 244, in <lambda>
actSSL.triggered.connect(lambda: self.sgAssetsToSG(origin))
File "C:\Prism\Plugins\ProjectManagers\Shotgun\Scripts\Prism_Shotgun_Functions.py", line 75, in func_wrapper
erStr = ("%s ERROR - Prism_Plugin_Shotgun - Core: %s - Plugin: %s:\n%s\n\n%s" % (time.strftime("%d/%m/%y %X"), args[0].core.version, args[0].plugin.version, ''.join(traceback.format_stack()), traceback.format_exc()))

Traceback (most recent call last):
File "C:\Prism\Plugins\ProjectManagers\Shotgun\Scripts\Prism_Shotgun_Functions.py", line 72, in func_wrapper
return func(*args, **kwargs)
File "C:\Prism\Plugins\ProjectManagers\Shotgun\Scripts\Prism_Shotgun_Functions.py", line 727, in sgAssetsToSG
localAssets = [[os.path.basename(x), x.replace(origin.aBasePath, "")[1:]] for x in assets if x.replace(os.path.join(self.core.fixPath(origin.aBasePath), ""), "") not in origin.omittedEntities["Asset"]]
KeyError: 'Asset'

Hey,

sure I'll help you to solve these problems.

2. The problem here is that Assets in Prism can be grouped under multiple directories. For example characters/creatures/aliens/dragon. There could be multiple assets called dragon, which are grouped under different folders. In shotgun every asset has only a name and it can have an asset type, but not a flexible hierarchy length as in Prism. That's why Prism creates an "sg_localhierarchy" setting on every asset, which gets synced from Prism to SG. This setting stores the hierarchy path of that asset in the Prism project and Prism uses it to identify which Prism asset belongs to which SG asset. If you created the SG assets manually, they won't have this setting, which causes that error. You can add this setting manually to make it work.

3. I just fixed this error in v1.2.1.32. Thanks for reporting.

Richard,

Thanks for the quick response. You rock! Both issues are resolved. I am writing down what I did for the benefit of others and to refer back too in case I forget.

Regarding the Item not found issue:  When I created an asset named "Table" in Shotgun, I assigned it as type "Prop" which in turn created a Prop folder locally when I synced Shotgun assets to Prism-Pipeline and it created a subfolder named "Table"

Entering "Prop\Table" into the  Shotgun Asset info localHierarchy field in Shotgun did correct the issue and now I am able to use "Open in Shotgun " for that asset and it works perfectly.

Thank you also for the update on the sync Prism to Shotgun - that works great.