Skip to content

Instantly share code, notes, and snippets.

@bohdon
Created June 6, 2012 19:54
Show Gist options
  • Save bohdon/2884325 to your computer and use it in GitHub Desktop.
Save bohdon/2884325 to your computer and use it in GitHub Desktop.
proarch and publish struct
import production
from mbotutils import proarchutils
from mbotutils import hourglassutils
proj = hourglassutils.getProject('diggs-game')
arch = proarchutils.getProjectArch(proj)
arch['assetType'].name = 'character'
arch['asset'].name = 'pig1'
arch['assetStep'].name = 'rig'
print(arch['assetStep'].get_path())
print(arch['assetStep-work'].get_path())
myStruct = arch['assetStep-work']
# myStruct would come from the file info, so here's where youd start
publishId = '{0}-publish'.format(myStruct.parent.id)
pubStruct = myStruct.parent[publishId]
print(pubStruct.get_path())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment