Hi!
I want to migrate a project made in Solaris, including an Asset database and Layout nodes. It looks like both Asset database and Layout node use absolute paths.
The same goes for Stage Manager, where you can't change the Asset Path under Reference detail.
Is there any way to change this, or am I missing something?
The project is locked in the original directory this way.
Any documentation on how the Asset database references files would also be appreciated.
Thanks
Thanks
Layout node using absolute paths, migrating Asset database
393 3 1-
- vojtaklemperer
- Member
- 2 posts
- Joined: Aug. 2019
- Online
-
- kymwatts
- Member
- 24 posts
- Joined: Dec. 2016
- Offline
once you use have picked something from the asset database, and placed it into a stagemanger or a layout lop, there is nolonger a connection , back to the database.
the asset database you may need to rebuild, its problaly the fastest with out learning python/sqllite to update the paths inside of the db. in tops there is a node called "USD add assets to gallery", that you can point to the new usd path locations and create a new db.
the layout lop next, inside the dive network for the layout lop, there will be a bunch of asset refernce lop's these will contain the paths to the assets used by the layout lop, you should be able to repath the assets here.
the stagemanager , is a little bit more tricky, depending on the amount of edits made , will depend on how many things you need to change.
pythonically, you could do something like this to find all the usd file paths and then replace them with the new location for those assets.
hope this helps.
the asset database you may need to rebuild, its problaly the fastest with out learning python/sqllite to update the paths inside of the db. in tops there is a node called "USD add assets to gallery", that you can point to the new usd path locations and create a new db.
the layout lop next, inside the dive network for the layout lop, there will be a bunch of asset refernce lop's these will contain the paths to the assets used by the layout lop, you should be able to repath the assets here.
the stagemanager , is a little bit more tricky, depending on the amount of edits made , will depend on how many things you need to change.
pythonically, you could do something like this to find all the usd file paths and then replace them with the new location for those assets.
# get stagemanager node smn = hou.node('/stage/path/to/stagemanager/node') # get number of edits num_edits = smn.parm('num_changes').eval() # itterate over the edits to find which ones have usd paths for i in range(1,num_edits + 1): usd_ref_path = smn.parm(f'reffilepath{i}').eval() print(f"usd_ref_path:: {usd_ref_path}") # look for a key word or partial file path if 'project1' in usd_ref_path: # replace the filepath with a search and replace updated_usd_path = usd_ref_path.replace('project1','project2') # update the path: smn.parm(f'reffilepath{i}').set(updated_usd_path)
hope this helps.
-
- wanglifu
- Member
- 196 posts
- Joined: Feb. 2017
- Offline
-
- vojtaklemperer
- Member
- 2 posts
- Joined: Aug. 2019
- Online
-
- Quick Links