Cela supprimera la page "Documenation | Assets | Version 20.128"
. Soyez-en sûr.
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.
Before we can enter the asset manager. The assets should be created in some way. When linking to the story editor or marking in the script or simply selecting one from the left bar in the story editor. VCStudio will give you this asset selector window. Where you can either select already existing asset. Or create a new one. In the top, right corner there is a search box. Type the name of the asset in there. If such asset does not exist yet. It will give you an button to create one.
This is designed with script writer in mind. So you can mark characters and locations right in the script and create the assets for them on the fly.
Now let's look at the asset manager 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 top part of the middle is your important asset information. Name, type, icon, percentage. And a little configure link button.
Toward the bottom you can see the files of the asset. There are 4 categories of the files.
/dev/
folder. This one file is in the /ast/
folder. If this file exist, the percentage calculator will ignore the checklists and give you 100% for this asset. Even if you didn't do a thing in the checklist.Preview.png
which will be the preview image of the asset. You can click on the preview to set one up.On the right is your asset checklist. This will determen the percentage of the asset. See analytics for more information about checklists.
Appart from usual schedules and history tabs. You also have a complite list of mensions of this asset in the story. Clicking on those mensions will teleport you to the part in the script where this mension is.
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.
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 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 on 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.
Cela supprimera la page "Documenation | Assets | Version 20.128"
. Soyez-en sûr.