Assets.md 6.1 KB

Assets

In any animation project you need to make various Assets. Character rigs, Vehicles, Locations and many other assets. And some way to organize them is needed. This is why VCStudio is also a powerful asset management tool.

Chapters:

Adding New Assets

Before we can manage the assets we need to have them. They should be added somehow. Let's go over a few ways to add assets.

  • Marking Assets. In the script writer you can mark assets right in the text of your story. This is the best way to add assets.
  • Manual. In the story editor on the right you have the 4 icons. , , and . This is the asset category. Click on one. You will see there is no add asset button anywhere. Type the name of the asset in the search. And the button will appear.

Asset Window

Now let's look at the asset window it self.

As you can see this window is devided into 3 parts. The left side, the bigger middle part and the right side. This kind of layot will be in multiple places in the VCStudio. Usually it's because on the right there are checklists.

The Right

On the right is your asset checklist. This will determen the percentage of the asset. See analytics for more information about checklists.

The middle

The middle section is the main section of the asset window. This is where you will find the blend files. It usually gonna have one there by default. But you can create more using the search. On the picture above you can probably make out one blend file that is different. It has a purple top. It's the asset blend file. The final.

You can create the asset blend file using the button above the files.

Beside it you can see the progress bar. Which going to show how much of the asset is finished. Most of the time it's going to mirror the checklist on the right. But if there is an asset blend file it's going to be filled up regardless to whether the checklist is all checked or not.

Also you can edit the preview of the asset by clicking the big square on the top left. Or adding a Preview.png into renders folder. Also about the folders.

There are , , and which give you files from 4 different folders of the asset. Main folder for blend files, references, tex for textures and renders.

The left

Appart from usual schedules and history tabs. You also have a complete list of mensions of this asset in the story. Clicking on those mensions will teleport you to the part in the script where this mention is.

Now to the fun part. The actual rabbit hole. The digging of pure information. The legendary Source Code part.

Source Code

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

How does it draw the contents of the Blend-Files?

With any modern installation of Blender comes a little python script blender-thumbnailer.py which is getting the preview of the blend file and writes it into a PNG image 128 by 128 pixels in size.

I didn't write this file. But by reading it I've got some idea of how it works. In the blend file there is a location where the thumbnail is storred. It's prepared by Blender while you save the file. It seems to work only when saving from the UI and opening blender without UI will not update the preview. Which seems to be a bug or a limitation. Anyway because this script is under the GNU General Public License I could just copy it over to VCStudio. And I'm using it every time I need a preview of a blend file.

How does it adds a blend file?

Simple. There are empty blender files in the new_file folder. And I'm just copying one from there into where ever you need it. Only it's not actually simple. You can see that when you type in the search of the blend files and the name is not found it also gives you to copy a file from somewhere else. And techincally you can choose any file anywhere on the operating system. Which introduces a problem if that file you chose had linked things in it. Like textures or other assets. Changing the directory will break all those links and break textures and other stuff. So in order to do this I wrote copy_file() function. That checks if we are coping a blend file. And if yes. It opens the blend file inside blender (blender -b without UI) and does bpy.ops.wm.save_as_mainfile() command. Which is making the blender save the file as instead of simply copying the file directly. This keeps all the textures and linked asset still functional.

Help The Documentation

The documentation files are not perfect. And need maintenance.

If you are reading it from the VCStudio build in Documentation:

  • Press to edit locally.
  • Press to commit in our NotABug repository.

(C) J.Y.Amihud 2021. Under GPL v3 or later.