Documenation | Linking Assets | Version 20.128
Jeison Yehuda Amihud (Blender Dumbass) redigerade denna sida 3 år sedan

NOTE: This Documentation Article is written for a specific verion of VCStudio mentioned in the title. If you have a newer version, some things might be changed. There could be a newer version of this article in the wiki. If there is non. Please be aware of possible changes. The Version could be found in the bottom, right corner of VCStudio

COPYLEFT: This article is a part of VCStudio and might be used and reproduced using either GNU General Public License or CC-BY-SA.

Linking Assets

Linking of assets was implemented in Version 20.1263

Content:

  • Simple guide
  • Advanced explanation

Simple Guide

When working on shots. You want to be able to use the assets you've created in the animation blend files. Sure you can link or append them manually using built in Blender's functions. But it introduces a problem of knowing where to find the asset's blend files. ( In the /ast/ directory )

Linking

Anyway for the sake of convenience I developed a linking system that does this job kind of for you. But you will need to go through some steps in order to do that.

On the picture above you can see that every Blend file in the shots have 2 buttons at the bottom. One of them. The one on the left. Is the linking assets button.

Clicking it will give you a little conformation dialog. If assets were marked in the text of the shot it will load them automatically. Else you will need to add each of them one by one.

In the top, left side of the window you can see 3 modes of linking.

  • Linking. It will just make instances of the assets in the blend file.
  • Library Overrides. It will make Library Overrides to each asset you link.
  • Proxy. It will make the legacy proxy to the rigs of the assets.

Also there is a little button to add all the assets from the shot text again. In case you removed some by exident.

Now sometimes you will get something like this.

This means that the asset is not yet configured for linking that you will have to do the configuration.

Configuration

There is a button for that above the main progress bar in the asset manager.

The configuration is broken up to 3 steps.

Make the asset.

Of course before the asset is able to go to production it has to be finished first. So the configuartion window will check the checklist of the asset and see whether you are done or not.

Copy the ast blend file

There is a specific folder for final blend files. /ast/ folder. And the linker will refer to it when linking. Actually if you place the blend file there manually. You can bypass the Making the asset step. If there is a file the progress becomes 100% by default.

Choosing Collections and a Rig

When I make rigs there is usually hell of a lot of not needed collections. Stuff like rig elements. Trash objects that used to build the asset. This is not a part of the rig. So in this window you can select your collections that you would like to be linked.

And since we are doing proxies / library overrides we want to know what objects to proxy. Or which one is your rig. Either proxy or library overrides. The script needs to know which one is the rig. So here you go.

Actually I made so if you call the collection exactly as the asset. Then it's selected by default. With the rig it selects every Armature object by default.

Advanced explanation

The folowing part of the article is for hard core nerdy people who want to know how everything works. And contains redundant information for a simple person that just want to use VCStudio. Anyway here it is.

Files

The best documentation is to read the code of the software directly. For the linking assets I recommend:

How does it link?

When you press okay in the conformation window it launches blender -b ( in the background ) and makes it launch the studio/bpy_do_linking.py script. Which is parsing a file called autolink.data where it finds which assets it needs to link. And what mode we are in. And so I'm using standart blender bpy functions to do the linking and proxies. By the end it just saves the file and quits.

All the output of this script is piped into the studio/studio_shot_linkLayer.py using what's called subprocess.Popen() and reading it I can estimate the percentage of the linking opration. And show a progress bar.

How does it know what collections and what objects are in the file?

Similarly as in the previous thing. But this time we are running the studio/bpy_get_blend_content.py and piping this. The script basically just outputs the list of collections and the list of objects / object types it finds in every collection. All using standard bpy commands.