11-13-2019, 03:37 PM
(This post was last modified: 11-13-2019, 03:38 PM by remkonoteboom.)
Without resorting to using pg_dump or mysqldump, the best way to export the data is through a plugin, however it is not clear why you would use this instead of a database dump as this essentially does the same thing. The advantage of a plugin is, of course, that you can load it into other projects. We usually have create a number of different plugins for different purposes, although you can combine them into one if you wish:
1) Database structure plugin (or stypes plugin)
2) Configuration plugin
3) Data plugin
The contents of a plugin from the database are determined by the manifest file ($BASE_PLUGIN_DIR/manifest.xml) and it looks like the following:
This will export (and import) the structure of the asset and shot tables.
This will export (and import) the contents of the asset and shot tables
You could also export (and import) part of the table using expressions:
The first line will export all assets with a category of character. The second line will export all tasks with a project code of "my_project".
1) Database structure plugin (or stypes plugin)
2) Configuration plugin
3) Data plugin
The contents of a plugin from the database are determined by the manifest file ($BASE_PLUGIN_DIR/manifest.xml) and it looks like the following:
This will export (and import) the structure of the asset and shot tables.
Code:
<manifest code="vfx_types">
<search_type code="vfx/asset"/>
<search_type code="vfx/shot"/>
</manifest>
This will export (and import) the contents of the asset and shot tables
Code:
<manifest code="vfx_data">
<sobject search_type="vfx/asset"/>
<sobject search_type="vfx/shot"/>
</manifest>
You could also export (and import) part of the table using expressions:
Code:
<manifest code="vfx_data">
<sobject search_type="vfx/asset" expression="@SOBJECT(vfx/asset['category','character'])"/>
<sobject search_type="sthpw/task" expression="@SOBJECT(sthpw/task['project_code','my_project'])">
</manifest>
The first line will export all assets with a category of character. The second line will export all tasks with a project code of "my_project".