doc: sync zh-cn doc to en doc
This commit is contained in:
@ -3,16 +3,26 @@
|
||||
!!! info "Not latest version"
|
||||
This translated page is not the latest version because the modification of source page. Please see source page of the latest version.
|
||||
|
||||
!!! info "BME is extensible"
|
||||
BME's floor adder is extensible, each item in the menu is actually described by a set of JSON data. You can read the [Technical Information](./tech-infos.md) section to learn how we write this JSON, and you can even expand the types of floors that BME can create to suit your needs.
|
||||
|
||||
## Start Generating
|
||||
|
||||
### From Menu
|
||||
|
||||
In the 3D view, click `Add - Floors` to expand the Add Floors menu. The menu is shown below.
|
||||
|
||||

|
||||
|
||||
Click on the menu to see all supported floor types in the submenu that pops up. Their names and icons hint at the style and shape of the floor it is intended to create.
|
||||
Click on the menu to see all supported floor types by categories in the submenu that pops up. Their names and icons hint at the style and shape of the floor it is intended to create.
|
||||
|
||||
!!! info "BME is extensible"
|
||||
BME's floor adder is extensible, each item in the menu is actually described by a set of JSON data. You can read the [Technical Information](./tech-infos.md) section to learn how we write this JSON, and you can even expand the types of floors that BME can create to suit your needs.
|
||||
### From Sidebar
|
||||
|
||||
Additionally, you can press `N` on keyboard to expand the sidebar of 3D view and find `Ballance` tab inside it. You also can find these adder by clicking it and expanding `Floor` panel as presented in following image:
|
||||
|
||||

|
||||
|
||||
Comparing with menu, the advantage of this solution is that the sidebar is persistent in UI layout. It is more convenient and effective when adding multiple floors by reducing the time of repetitive opening add menu. Also, there is Rail and Component adder panels under this tab. This will not be introduced again in following chapters.
|
||||
|
||||
## Configure Floor
|
||||
|
||||
|
@ -15,11 +15,29 @@ Then we need to configure PyBMap, which comes with LibCmo. Please follow the man
|
||||
|
||||
Then we need to copy the configured PyBMap to our project under `bbp_ng/PyBMap` to complete this step.
|
||||
|
||||
## Generate Thumbnails and Compress JSON
|
||||
## Generate Resources
|
||||
|
||||
BBP comes with a built-in set of custom icons, as well as the JSON files needed by its component BME to describe the structure. By batch generating thumbnails and compressing JSON operations, the size of these parts can be reduced, making them suitable for loading in Blender and easier to distribute.
|
||||
BBP needs some resoures to run, and these resources need to be processed before using them.
|
||||
|
||||
Go to the `bbp_ng/tools` folder and run `python3 build_icons.py` which will batch generate thumbnails (this requires the PIL library, please install it via pip in advance). It actually generates thumbnails from the original images in the `bbp_ng/raw_icons` directory and stores them in the `bbp_ng/icons` folder. Running `python3 build_jsons.py` will compress the JSON, which actually reads, compresses, and writes the raw JSON files from the `bbp_ng/raw_jsons` directory into the `bbp_ng/jsons` folder.
|
||||
For generating these resrouces, we firstly need to navigate to `scripts` directory, and execute `uv sync` to restore the environment for scripts (Astral UV required).
|
||||
|
||||
### Generate Thumbnails
|
||||
|
||||
BBP comes with a built-in set of custom icons, however these icons are stored as their original size in repository for keeping convenient editing and high quality. We need to reduce the size of these icons to make them are easy to be loaded on Blender and easy for distribution by generating thumbnails for them.
|
||||
|
||||
Execute `uv run build_icons.py` to generate thumbnails. It actually generates thumbnails from the original images in the `assets/icons` directory and stores them in the `bbp_ng/icons` folder.
|
||||
|
||||
### Generate JSONs
|
||||
|
||||
The BME component in BBP relies on a series of JSON files to describe the prototype. These profiles are stored in the library in JSON5 format, making them easy for writers to read and write. We converte these JSON5 files to JSON files and compressing their size makes them easier to load in Blender, as well as to facilitate plugin distribution, by batchly generating them.
|
||||
|
||||
If you are the plugin developer or writer of these prototypes, you need to do an additional thing before generating these JSON files: verify these JSON files. The BBP plugin will assume that these JSON files are correct when loading them. If you put a JSON file with errors (e.g. missing some fields or has some typos, etc.), it will cause Blender to throw an error when creating prototype. Therefore, it is necessary to verify these JSON files. Execute `uv run validate_jsons.py` to verify all prototype files. If there are no errors, it means that everything is okey. It is important to note that the validator is not perfect, it can only verify the data as much as possible to ensure that some common erros (e.g. typo in field name) will not occur. It can not make 100% sure about that there is no error inside these files.
|
||||
|
||||
For compilers, all you need to do is that execute `uv run build_jsons.py` to generate JSON files. It actually reads, compresses, and writes the original JSON5 files in `assets/jsons` directory to the `bbp_ng/jsons` folder in JSON format.
|
||||
|
||||
### Generate Element Meshes
|
||||
|
||||
BBP has built-in mesh data for all Ballance element placeholders. Execute `uv run build_jsons.py` to deploy these meshes, which simply copies the mesh files under `assets/jsons` folder to `bbp_ng/jsons` folder.
|
||||
|
||||
## Packaging
|
||||
|
||||
|
@ -19,7 +19,9 @@ The BBP plugin currently has 2 settings to configure.
|
||||
|
||||
Please fill in the `Texture` directory of Ballance, from which the plugin will use the external texture files (i.e. the ones Ballance originally came with). Click on the folder button on the right to browse the folders and select it.
|
||||
|
||||
This is crucial for BBP to work properly, and only if it is filled out correctly will BBP not make errors during operation.
|
||||
This option is almost mandatory. If you don't fill it, various core functions like Virtools file import export, BME creation, rail creation, etc. will not be available (button is in grey color).
|
||||
|
||||
This is crucial for BBP to work properly, and only if it is filled correctly will BBP not make errors during operation.
|
||||
|
||||
### No Component Collection
|
||||
|
||||
|
@ -42,7 +42,12 @@ Virtools files can be exported by clicking `File - Export - Virtools File`. Clic
|
||||
|
||||
### Export Target
|
||||
|
||||
The Export Target section is used to determine which objects you need to export to a Virtools document. You can choose to export a collection or an object and select the corresponding collection or object below. Note that selecting a collection will export the objects in the internal collection as well, i.e. exporting nested collections is supported.
|
||||
The Export Target section is used to determine which objects you need to export to a Virtools document. You can choose 1 of 4 options:
|
||||
|
||||
* Object: Export single object. Select an object in following input box.
|
||||
* Collection: Export single collection. **This is the most commonly used option.** Select a collection in following input box. Note that selecting a collection will export the objects in the internal collection as well, i.e. exporting nested collections is supported.
|
||||
* Selected Object: Export selected objects. Select the objects to be exported before enter this dialog.
|
||||
* All Objects: Export all objects inside this document. This option should be used with caution. Because it brutely iterate the list of document objects to export, and it is likely to export many objects you don't need.
|
||||
|
||||
### Virtools Params
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
## Determining the Version
|
||||
|
||||
The principle of BBP's Blender support is to support the latest **LTS** version, and to spend some time migrating the plugin after the latest LTS version is released. The current plugin version **4.0** is based on Blender version **4.2.x**.
|
||||
The principle of BBP's Blender support is to support the latest **LTS** version, and to spend some time migrating the plugin after the latest LTS version is released. The current plugin version **4.3** is based on Blender version **4.5.x**.
|
||||
|
||||
Theoretically, BBP will work fine on other versions of Blender if no major changes have been made. For example you can try to run BBP plugin based on Blender 3.6 LTS on Blender 4.0. However, the developers of BBP do not deal with bugs that only appear in non-LTS versions. before installing the plugin, please select the appropriate version.
|
||||
|
||||
|
Reference in New Issue
Block a user